
$(document).ready(function() {

//	$("#container").show("explode", { pieces: 36 }, 1000 );


//	effect("#parapet", "explode", );

//$("#img1").show("explode", { pieces: 36 }, 1800, function() { $(this).removeClass("current"); });
//$("#img3").show("explode", { pieces: 36 }, 1800, function() { $(this).removeClass("current"); });
//$("#img4").show("bounce", { times: 4 }, 1500 , function() { $("#img3").show("bounce", { times: 3 }, 1000 ); } );
//$("#img6").show("bounce", { times: 3 }, 1000 , function() { $("#img5").show("bounce", { times: 4 }, 1500 ); } );
//$("#parapet").bind("onmouseover", function { show("pulsate", { times: 2 }, 1000 ); } );
//$("#img3").show("explode", { pieces: 36 }, 3000, function() { $(this).removeClass("current"); });
//$("#img4").show("explode", { pieces: 36 }, 3000, function() { $(this).removeClass("current"); });
//$("#parapet").show("explode", { pieces: 36 }, 3000, function() { $(this).removeClass("current"); });
$("#img1").animate({"left": "-=550px"}, 1).animate({"left": "+=550px"}, 2000);
$("#img6").animate({"left": "+=550px"}, 1).animate({"left": "-=550px"}, 2000);
$("#img2").animate({"left": "+=550px"}, 1).animate({"left": "-=550px"}, 2000);
$("#img4").animate({"top": "+=250px"}, 1).animate({"top": "-=250px"}, 2000);
$("#img3").animate({"top": "-=300px"}, 1).animate({"top": "+=300px"}, 2000);
$("#img5").animate({"left": "-=550px"}, 1).animate({"left": "+=550px"}, 2000);//$("#parapet").show("explode", { pieces: 36 }, 2000 );
//$("#onas").show("explode", { pieces: 36 }, 2000 );
//$("#cenik").show("explode", { pieces: 36 }, 2000 );
//$("#kontakt").show("explode", { pieces: 36 }, 2000 );
//$("#aktuality").show("explode", { pieces: 36 }, 2000 );

$("#logo_img").fadeTo("slow", 0.66).fadeTo("slow", 1).fadeTo("slow", 0.66).fadeTo("slow", 1);


	$("div.effect")
		.hover(function() {
			$(this).addClass("hover");
		}, function() {
			$(this).removeClass("hover");
		})
		;
	
	
	var effect = function(el, n, o) {
		
		$.extend(o, {
			easing: "easeOutQuint"
		});
		
		$(el).bind("click", function() {
			
			$(this).addClass("current").hide(n, o, 1000, function() {
				var self = this;
				window.setTimeout(function() {
					$(self).show(n, o, 1000, function() { $(this).removeClass("current"); });
				},500);
			});
		});
		
	};
		

	effect("#blindHorizontally", "blind", { direction: "horizontal" });
	effect("#blindVertically", "blind", { direction: "vertical" });
	
	effect("#bounce3times", "bounce", { times: 3 });
	
	effect("#clipHorizontally", "clip", { direction: "horizontal" });
	effect("#clipVertically", "clip", { direction: "vertical" });
	
	effect("#dropDown", "drop", { direction: "down" });
	effect("#dropUp", "drop", { direction: "up" });
	effect("#dropLeft", "drop", { direction: "left" });
	effect("#dropRight", "drop", { direction: "right" });
	
//	effect("#parapet", "explode", {  });
//	effect("#parapet", "explode", { pieces: 36 });
	
	effect("#fold", "fold", { size: 50 });
	
	effect("#highlight", "highlight", {  });
	
//	effect("#parapet", "pulsate", { times: 2 });
	
	effect("#puff", "puff", { times: 2 });
	effect("#scale", "scale", {  });
	
	$("#shake").bind("click", function() { $(this).addClass("current").effect("shake", {}, 100, function() { $(this).removeClass("current"); }); });
	
	effect("#slideDown", "slide", { direction: "down" });
	effect("#slideUp", "slide", { direction: "up" });
	effect("#slideLeft", "slide", { direction: "left" });
	effect("#slideRight", "slide", { direction: "right" });
	
	$("#parapet").bind("click", function() { $(this).addClass("current").effect("transfer", { to: "div:eq(0)" }, 1000, function() { $(this).removeClass("current"); }); });

$("a").hover(function(){$(this).fadeOut(100);$(this).fadeIn(500);});
});

