jQuery(function($) {			var timer = null;			var wait  = 4000; // auto rotate interval in ms			var image_width = 320;			var image_height = 240;		   			function Initialize() {						$("a.carousel-back").animate({opacity: "0.1"}, 1);				$("a.carousel-next").animate({opacity: "0.1"}, 1);						var lwidth = image_width;				var lheight = image_height;				var swidth = lwidth/2;				var sheight = lheight/2;				var bwidth = $("div.carousel").width();				var bheight = $("div.carousel").height();						//$("img#n1").css({'top' : ((bheight-lheight)/2) });				$("img#n1").css({'left' : ((bwidth-lwidth)/2) });				$("img#n1").css({'width' : image_width });				$("img#n1").css({'height' : image_height });				$("img#n1").css({'position' : 'absolute' });				$("img#n1").css({'z-index' : '3'});							$("img#n2").css({'top' : ((bheight-lheight)/2)-(sheight/2)+sheight });				$("img#n2").css({'top' : '60'});				$("img#n2").css({'left' : ((bwidth-lwidth)/2)-(swidth/2)+30 });				$("img#n2").css({'width' : image_width/2 });				$("img#n2").css({'height' : image_height/2 });				$("img#n2").css({'position' : 'absolute' });				$("img#n2").css({'z-index' : '2'});							$("img#n3").css({'top' : ((bheight-lheight)/2)-(sheight/2)+sheight });				$("img#n3").css({'top' : '60'});				$("img#n3").css({'left' : ((bwidth-lwidth)/2)-(swidth/2)+lwidth-30 });				$("img#n3").css({'width' : image_width/2 });				$("img#n3").css({'height' : image_height/2 });				$("img#n3").css({'position' : 'absolute' });				$("img#n3").css({'z-index' : '1'});							$("img#n1").attr("id", "1");  				$("img#n2").attr("id", "2");  				$("img#n3").attr("id", "3");  			  			}						function set_rotating_false () {				return false;			}						function rotate_right () {						if (!$("img#1").is(':animated')){											clearInterval(testTimer);												//$("a.carousel-back").fadeOut(50);  				//$("a.carousel-next").fadeOut(50);							var lwidth = image_width;				var lheight = image_height;				var swidth = image_width/2;				var sheight = image_height/2;				var bwidth = $("div.carousel").width();				var bheight = $("div.carousel").height();							var left = ((bwidth-lwidth)/2)-(swidth/2)+30;				var right = left + lwidth-60;				var top = ((bheight-lheight)/2)-(sheight/2)+sheight;							$("img#2").animate({    					width: lwidth,    					height: lheight,    					top: (bheight-lheight)/2,    					left: (bwidth-lwidth)/2  					});		  					$("img#2").css({'z-index' : '3'});  					  			  			  					$("img#1").animate({    					width: lwidth/2,    					height: lheight/2,    					top: top,    					left: right  					});  					$("img#1").css({'z-index' : '2'});  					  			  					$("img#3").animate({    					width: lwidth/2,    					height: lheight/2,    					top: top,    					left: left  					}, function(){  						rotating = false;  						testTimer = setInterval(function() { rotate_right(); set_rotating_false(); }, wait);  					});  					$("img#3").css({'z-index' : '1'});  					  				  				  					$("img#1").attr("id", "temp3");  					$("img#2").attr("id", "temp1");  					$("img#3").attr("id", "temp2");  				  					$("img#temp1").attr("id", "1");  					$("img#temp2").attr("id", "2");  					$("img#temp3").attr("id", "3");  				  					//$("a.carousel-back").fadeIn(500);  				  					//$("a.carousel-next").fadeIn(500);  	  					  					}  				  			}  			  			  			// spat **************************************  			  			  			function rotate_left() {  			  			if (!$("img#1").is(':animated')){  			  				clearInterval(testTimer);  			  				//$("a.carousel-back").fadeOut(50);  				//$("a.carousel-next").fadeOut(50);							var lwidth = image_width;				var lheight = image_height;				var swidth = image_width/2;				var sheight = image_height/2				var bwidth = $("div.carousel").width();				var bheight = $("div.carousel").height();							var left = ((bwidth-lwidth)/2)-(swidth/2)+30;				var right = left + lwidth-60;				var top = ((bheight-lheight)/2)-(sheight/2)+sheight;							$("img#3").animate({    					width: lwidth,    					height: lheight,    					top: (bheight-lheight)/2,    					left: (bwidth-lwidth)/2  					});	  					  			  			  					$("img#1").animate({    					width: lwidth/2,    					height: lheight/2,    					top: top,    					left: left  					});  					  			  					$("img#2").animate({    					width: lwidth/2,    					height: lheight/2,    					top: top,    					left: right  					}, function(){  						testTimer = setInterval(function() { rotate_right(); set_rotating_false(); }, wait);  					});  					  					$("img#2").css({'z-index' : '1'});  					$("img#1").css({'z-index' : '2'});  					$("img#3").css({'z-index' : '3'});  					  				  				  					$("img#1").attr("id", "temp2");  					$("img#2").attr("id", "temp3");  					$("img#3").attr("id", "temp1");  				  					$("img#temp1").attr("id", "1");  					$("img#temp2").attr("id", "2");  					$("img#temp3").attr("id", "3");  				  					//$("a.carousel-back").fadeIn(500);  				  					//$("a.carousel-next").fadeIn(500);  				  				}	  					  			}		  			 				  			  			// udalosti  			  			Initialize();  			  			  			testTimer = setInterval(function() { rotate_right(); set_rotating_false(); }, wait);  			  			$("a.carousel-back").live("click", function(event) {  				  				  					rotate_left();  				  				  			});  			  			$("a.carousel-next").live("click", function(event) {  									rotate_right();							});						$("a.carousel-next").hover(function () {    			    			$(this).animate({opacity: "0.9"});  				}, function () {  				$(this).animate({opacity: "0.1"});  				}			);						$("a.carousel-back").hover(function () {    			    			$(this).animate({opacity: "0.9"});  				}, function () {  				$(this).animate({opacity: "0.1"});  				}			);				});
