$(document).ready(function() {	

	$("#contact_name").DefaultValue("Jméno a Příjmení");
	$("#contact_mail").DefaultValue("E-mail");
	$("#contact_tel").DefaultValue("Telefon");
	$("#contact_text").DefaultValue("Text zprávy");
	
	if(ie==false)
	{
		$("ul#work").css({opacity: 0.5});
		
		$("#toggle_button a, ul#work").mouseenter(function(){
			$(this).stop(true, true).animate({opacity: 1}, 300, function() {})
		});
		$("#toggle_button a, ul#work").mouseleave(function(){
			if($("#toggle_form").css('height')=="0px"){
				$(this).stop(true, true).animate({opacity: 0.5}, 300, function() {})}
		});
	}
	
	$("#toggle_button a, ul#work").click(function(){
		if($("#toggle_form").css('height')=="0px")
		{
			if(ie==false){$("#toggle_button a").stop(true, true).animate({opacity: 1}, 300, function() {})};
			$("#toggle_form_grid").css({'display':'block'});
			$("#toggle_form").stop(true, true).animate({'height': '350px'}, 1000, function() {})
			$("#toggle_form form").stop(true, true).animate({opacity: 1}, 1000, function() {})
		}
		if($("#toggle_form").css('height')=="350px")
		{
			$("#toggle_form").stop(true, true).animate({'height': '0px'}, 1000, function() {$("#toggle_form_grid").css({'display':'none'});
				if(ie==false){$("#toggle_button a").stop(true, true).animate({opacity: 1}, 300, function() {})};
			});
			$("#toggle_form form").stop(true, true).animate({opacity: 0}, 1000, function() {})
		}
	});
	
	$("#toggle_form input[type=submit]").mouseenter(function(){
		$(this).stop(true, true).animate({opacity: 1}, 200, function() {})
	});
	$("#toggle_form input[type=submit]").mouseleave(function(){
		$(this).stop(true, true).animate({opacity: 0.5}, 200, function() {})
	});
	
	$(".contact_newsletter1").mouseenter(function(){
		$(".contact_newsletter1").animate({opacity: 1}, 200, function() {})
	});
	$(".contact_newsletter1").mouseleave(function(){
		$(".contact_newsletter1").animate({opacity: 0.5}, 200, function() {})
	});
	
	$(".contact_newsletter2").mouseenter(function(){
		$(".contact_newsletter2").animate({opacity: 1}, 200, function() {})
	});
	$(".contact_newsletter2").mouseleave(function(){
		$(".contact_newsletter2").animate({opacity: 0.7}, 200, function() {})
	});	
	
});
