jQuery(document).ready(function( $ ) {
   
    /* 
    var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
    */
  
  
    $("li.page-item-20 a").hover(function() { //When trigger is clicked...  
    
        //Following events are applied to the subnav itself (moving subnav up and down)
        $(this).parent().find("ul.children").slideDown(200).show(); //Drop down the subnav on click  
    
        $(this).parent().hover(function() {  
        }, function(){  
            $(this).parent().find("ul.children").slideUp(200); //When the mouse hovers out of the subnav, move it back up  
        });  
  
        //Following events are applied to the trigger (Hover events for the trigger)  
        }).hover(function() {  
            $(this).addClass("subhover"); //On hover over, add class "subhover"  
        }, function(){  //On Hover Out  
            $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
    }); 
    
    //submenu galerii
    $("li.page-item-16 a").hover(function() { $(this).parent().find("ul.children").slideDown(100).show(); $(this).parent().hover(function() { }, function(){ $(this).parent().find("ul.children").slideUp(100); }); }).hover(function() { $(this).addClass("subhover"); }, function(){ $(this).removeClass("subhover"); });  
    
    
    //cennik promocyjny strony glownej
    /*var vis = 0;
    $('a#zobacz_cennik').click(function(){ 
    	stop();
    	if(vis == 0){
    		$('#cennik_promocyjny').animate({"opacity" : .0}, 1).show(1).animate({"opacity" : .9});
    		vis = 1;
    	} else {
    		$('#cennik_promocyjny').animate({"opacity" : .0}).hide(1);
    		vis = 0;
    	}
    	return false;
    });
    $('a#zamknij_cennik').click(function(){ 
    	stop();
    	if(vis == 1){
    		$('#cennik_promocyjny').animate({"opacity" : 0}).hide(1);
    		vis = 0;
    	}
    	return false;
    });*/

    
    
    //hor menu
    var spd = 200;
    $('#side_menu ul li a').hover(function(e) {
    	$(this).hoverFlow(e.type, { left: 10 }, spd);
  	}, function(e) {
    	$(this).hoverFlow(e.type, { left: 0 }, spd);
  	});
  	
  	
  	$('.flexslider').hover(function(e){
  		$('.flex-direction-nav').fadeIn();
  		$('.flex-control-nav').fadeIn();
  	}, function(e) {
  		$('.flex-direction-nav').fadeOut();
  		$('.flex-control-nav').fadeOut();
  	});
  	
  	  
});  
