$(document).ready(function(){
	
	if ($("body").attr("id") == 'inner') {
		var pageid = '1'; 
	}
	else {
		var pageid = '0'; 
	}
	
	$("#menu li").hover(function(){
		
			var h = 36;
		
		$(this).children("div").css({display: "block", marginTop: h+'px'});
		$(this).children("a").css({backgroundColor: "#d7e85b"});
	},function(){
		$(this).children("div").css({display: "none"});
		$(this).children("a").css({background: "transparent"});
	});
	
	
	menuUlLeft ();

	$(window).resize(function(){
		menuUlLeft ();
	});
	
	function menuUlLeft (){
		var mw = document.body.clientWidth;
		var uw = $("#menu ul").width();
		var lw = (mw - uw)/2;
		if ($.browser.msie && $.browser.version < 7 ) {
			var lw = lw /2;
		}
		$("#menu ul").css({marginLeft: lw+'px'});
	}
	
	$(".slidedown h5").toggle(function(){
	  $(this).parent(".slidedown").children("div").slideDown("fast");
	},function(){
	  $(this).parent(".slidedown").children("div").slideUp("fast");
	});
	
	
	$(".bigphoto").clone().prependTo("#sidebar2");
	$(".bigphoto").eq(0).css({display: "none"});
	
	//$("#catalog li").eq('1').after('<div style="clear:left; width:100%; height:1px;"></div>');
	
	$("#catalog li").each(function(i){
	  if ((i+1)%2==0) {
		$(this).after('<div style="clear:left; overflow:hidden; width:100%; height:1px;"></div>');
	  }
	});
	
	
});




