jQuery(function($) {
    $("#sidebar").pngfix({
				sizingMethod: "scale"
			});
	 $(".box-logo,#stopka img, #menus ul li,#head-logo img,#head-box img, #head-box2, #back img, #top img , #content").pngfix();		
			
		var menuss = $('#menus ul li').children('ul');
		menuss.css('display','none');	
		
		
		menuss.parent().hover(function() {
  			menuss.show('slow');
			//return false;	
			
		})
		
		
		$("a.lightbox").lightBox({fixedNavigation:false});
		
$("#box-center a.lightbox img").css({'float':'left', 'padding':'5px'})
		
		var tempA =  $('#promocje ul li a');
		
		tempA.each(function(index) {
		
		var t = '<div class="promo">' +(index +1 )+ '</div>';
		 $(this).before(t)
 		 });
		 
		 
		
		var tempb = $('#promo-mini ul li a');
			 tempb.each(function(index) {
					
						
			var t = index +1;
			$(this).attr("title",$(this).text() )	
				
			$(this).text(t);
			});
	
		 
		 
		 $(".toggle_container").hide(); 




	$("h2.trigger").click(function(){



		$(this).toggleClass("active").next().slideToggle("slow");



	});

		 
		 
});


var site = function() {
	this.navLi = $('#nav li').children('ul').hide().end();
	this.init();
};

site.prototype = {
 	
 	init : function() {
 		this.setMenu();
 	},
 	
 	// Enables the slidedown menu, and adds support for IE6
 	
 	setMenu : function() {
 	
 	$.each(this.navLi, function() {
 		if ( $(this).children('ul')[0] ) {
 			$(this).append('<span class="hasChildren" />');
 		}
 	});
 	
 		this.navLi.hover(function() {
 			// mouseover
			$(this).find('> ul').stop(true, true).slideDown('slow', 'easeOutBounce');
 		}, function() {
 			// mouseout
 			$(this).find('> ul').stop(true, true).hide(); 		
		});
 		
 	}
 
}


new site();




