$(document).ready(function() { 
	Shadowbox.init({
	    lang: 'pl'
	});
	if ($('.slider').length) {
		$('.slider')._TMS({
			duration:800,
			easing:'easeOutQuad',
			preset:'simpleFade',
			pagination:false,
			slideshow:3000,
			numStatus:false,
			banners:true,
			pauseOnHover:true,
			nextBu:'.next',
			prevBu:'.prev',
			waitBannerAnimation:false,
			bannerShow:function(banner){
				banner
					.hide()
					.fadeIn(500)
			},
			bannerHide:function(banner){
				banner
					.show()
					.fadeOut(500)
			}
		});
	}
	$('ul.menu').superfish({ 
		delay:       600,                            // one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'normal',                          // faster animation speed 
		autoArrows:  false,                           // disable generation of arrow mark-up 
		dropShadows: false                            // disable drop shadows 
	});
/*	$('ul.menu li').each(function () {
	    var menu = $(this).find('ul');
	    var hasMenu = menu.length > 0;
	    if (hasMenu) {
	        var fadeoutMenu = function () {
	            menu.fadeOut();
	        }
	        var fadeoutTimer = null;
	        menu.hide();
	        menu.css('top', 0);
	        menu.css('left', 200);
	        $(this).hover(function () {
	            if (fadeoutTimer) {
	                window.clearTimeout(fadeoutTimer);
	                fadeoutTimer = null;
	            }
	            if (menu.is(':hidden') & !menu.is(':animated')) {
	                menu.fadeIn();
	            }
	        }, function () {
                menu.css('top', 0);
                menu.css('left', 200);
	            fadeoutTimer = window.setTimeout(fadeoutMenu, 500);
	        });
	    }
	});*/
}); 
