/*
$(document).ready(function() {
	//repeat blink for homepage news
	$.fn.repeat = function(speed, time){
		var $this = $(this);
		$this.fadeIn(speed);
		setInterval(function(){
			$this.fadeOut(speed, function(){$this.fadeIn(speed);});
		}, time*1000);
	};
	$('#news-item').repeat ("slow", 3); //300ms, 3s

	//konfigurace fancyboxu (slider fotek)
	$(".product-detail-pic").fancybox({
				titlePosition			: 'inside',
				'zoomSpeedIn'			: 300,
				'zoomSpeedOut'			: 300,
			    'zoomOpacity'			: true,
				'hideOnContentClick'	: false
	});
});
*/
$(document).ready(function(){
	$.preloadCssImages();
	$("#virivky").hover(
		function () {
			$("#hp-pic").attr("class", "bg-1");
		}
	);
	$("#vany").hover(
		function () {
			$("#hp-pic").attr("class", "bg-2");
		}
	);
	$("#boxy").hover(
		function () {
			$("#hp-pic").attr("class", "bg-3");
		}
	);
	$("#sauny").hover(
		function () {
			$("#hp-pic").attr("class", "bg-4");
		}
	);
	
	$(".system-detail").fancybox({
		ajax : {
		    type	: "POST"
		    //example	: 'myexample=test'
		},
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack',
		'padding'		: 20,
		'scrolling'		: 'no',
		'titleShow'		: false,
		'overlayOpacity': 0
	});
	//konfigurace fancyboxu (slider fotek)
	$("a[rel=gall-products]").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
				'easingIn'      : 'easeOutBack',
				'easingOut'     : 'easeInBack',
				'padding'		: 0,
				'scrolling'		: 'no',
				'overlayOpacity': 0
	});
	$(".main-pic").fancybox({
				'titlePosition'	: 'over',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
				'easingIn'      : 'easeOutBack',
				'easingOut'     : 'easeInBack',
				'padding'		: 0,
				'scrolling'		: 'no',
				'overlayOpacity': 0
	});

	//repeat blink for homepage news
	$.fn.repeat = function(speed, time){
		var $this = $(this);
		$this.fadeIn(speed);
		setInterval(function(){
			$this.fadeOut(speed, function(){$this.fadeIn(speed);});
		}, time*1000);
	};
	$('#news-item').repeat ("slow", 3); //300ms, 3s	
	// 
	
	
	//$("#sidebar li:nth-child(3)").live("append"), function(){ $("<li> - 2nd!</li>");

});
