Cufon.replace('#left_menu > li > a', {hover: 'true'});
Cufon.replace('.cufon', {hover: 'true'});
Cufon.replace('.product_options');
Cufon.replace('.bottom_menu > li.bottom_menu_header', {hover: 'true'});
function bookmark(url, title){
   var ret = true;
   if(window.sidebar){
      window.sidebar.addPanel(title, url,"");
      ret = false;
   }
   else if(document.all && window.external){
      window.external.AddFavorite(url, title);
      ret = false;
   } else if(!window.opera){
      alert("Aby dodać stronę do zakładek wybierz menu Zakładki -> Dodaj do zakładek lub wciśnij skrót CTRL + D");
      ret = false;
   }

   return ret;
}
function show_video(){
		$("div#spoty_video").animate({opacity: 'toggle'}); 
}

$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$(".group").fancybox({
    		'width'				: 425,
    		'height'			: 350,
            'autoScale'     	: false,
            'transitionIn'		: 'none',
    		'transitionOut'		: 'none',
    		'type'				: 'iframe'
    	});  
    	
    $("a[rel=grupa]").fancybox({
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'titlePosition' 	: 'over',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				                  return '<span id="fancybox-title-over">Zdjęcie ' + (currentIndex + 1) + ' z ' + currentArray.length + (title.length ? ' &nbsp; &nbsp; ' + title : '') + '</span>';
			}
		});
			  
	$("#wyslij_form").fancybox({
    		'width'				: 450,
    		'height'			: 320,
            'autoScale'     	: false,
            'transitionIn'		: 'none',
    		'transitionOut'		: 'none',
    		'type'				: 'iframe'
    	});
			
				var config = {    
					sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
					interval: 100, // number = milliseconds for onMouseOver polling interval    
					over: makeTall, // function = onMouseOver callback (REQUIRED)    
					timeout: 1500, // number = milliseconds delay before onMouseOut    
					out: makeShort // function = onMouseOut callback (REQUIRED)
				};
				
				$("li.left_menu_subheader").hoverIntent(config);
				
				function makeTall() {
							clearTimeout($(this).data('timeout'));
							$(this).toggleClass("left_menu_subheader").toggleClass("left_menu_subheader_hovered");
							$(this).children(".left_menu_submenu").slideDown(400);
				}
				
				function makeShort() {
							$(this).toggleClass("left_menu_subheader_hovered").toggleClass("left_menu_subheader");
							$(this).children(".left_menu_submenu").slideUp(400);
				}
			
			
});
