jQuery(document).ready(function() {
// target _blank
   jQuery('.blank').click(function(){
 		window.open(jQuery(this).attr("href"));
 		return false;
 	});
 	
// tips carousel
	jQuery(function() {
		jQuery('#tips-carousel').carouFredSel({
			scroll: 1,
			auto: {
			delay: 0,
			pauseDuration: 1000,
			pauseOnHover: 'resume'
			}
		});
	})

// lightbox
	/*
	function formatTitle(title, currentArray, currentIndex, currentOpts) {
	return '<div id="lightbox-title"><span><a href="javascript:;" onclick="jQuery.fancybox.close();" class="close"></a></span><div class="clear"></div></div>';
	}
	
	jQuery("a[rel=lightbox]").fancybox({
		'showCloseButton'	: false,
    	'titlePosition' 	: 'inside',
		'titleFormat'		: formatTitle
	});
	*/
	
	
	//$('input.poznamka').mouseenter(function(){$('.ulozit').addClass('shadow').css("border", "1px solid black")}).mouseleave(function(){$('.ulozit').removeClass('shadow').css("border", "none")});
   	
	
	$("input.poznamka").click(function(){$(".ulozit").css({color: '#fff'}).addClass('shadow').boxShadow(0, 0, 25, "#6CF")});
   
 	
	
	
// cart img hover thumbnail
	jQuery("#cart .img, #pokladna .img").hover(function() {
		jQuery(this).css({'z-index':'9999', position:'relative'});
		jQuery(this).find('img').css({border: '1px solid #333', background: '#fff'}).addClass("hover").stop()
			.animate({
				marginTop: '-90px',
				marginLeft: '-80px',
				top: '50%',
				left: '50%',
				height: '225px',
				maxHeight: '225px',
				maxWidth: '500px',
				padding: '5px'
			}, 200);
	
		} , function() {
		jQuery(this).css({'z-index':'0',});
		jQuery(this).find('img').css({border: '0'}).removeClass("hover").stop()
			.animate({
				marginTop: '0',
				marginLeft: '0',
				top: '0',
				left: '0', 
				maxHeight: '65px',
				maxWidth: '90px',
				padding: '0px'
			}, 400);
	});
	
// 	
	jQuery(".jqhide").hide();
	jQuery("input.shodna").click(function () {
		jQuery(".fadresa").toggle("slow");
	});
			
	jQuery("input.ne").click(function () {
		jQuery(".dph").hide("fast");
	});
	jQuery("input.ano").click(function () {
		jQuery(".dph").show("fast");
	});
	
// cufon
	Cufon.replace('.cenas')('#products h2')('#menu ul .active a', {textShadow: '#fff 0px 0px 0px',hover: {textShadow: '#fff 0px 0px 0px', color: 'red'}})('#menu ul li a', {textShadow: '#000 0px 2px 0px', hover: {textShadow: '#fff 0px 2px 0px', color: 'red'}})('#menu ul .active a', {textShadow: '#fff 0px 0px 0px', hover: {textShadow: '#fff 0px 0px 0px', color: 'red'}})('.tips-top span', {textShadow: '#003366 0px 1px 0px'})('.cart-top span', {textShadow: '#003366 0px 1px 0px'})('.products-top-left span', {textShadow: '#003366 0px 1px 0px'});
	
});
