$(document).ready(function(){
	$(document).pngFix();
	
	if(current != null) {
		$("#menu_content > .submenu").eq(current-1).slideDown('slow',function (){
			$('#content').css('height',$('#content').height()+$(this).height());
		});	
		$('#content').css('height',$('#content').height()+$("#menu_content > .submenu").eq(current-1).height());		
	}
	$('#content').css('height',($('#right_content').height()>$('#inner').height() ? $('#right_content').height() : $('#inner').height()));
	$('#menu_content > a').click(function() {
		$('.submenu').slideUp();
		$(this).next().slideDown();
		$('#content').css('height',$('#content').height()+$(this).next().height());
		if($("a",$(this).next()).attr('href') != '#') {
			window.location = $("a",$(this).next()).attr('href');
		}
	})
	bg = (($(window).width()-924)/2);
	if($.browser.msie) {
		$('#wrapper').css('backgroundPosition',bg+'px 0px')			
	}
	else {
		$('#wrapper').css('backgroundPosition',(bg-1)+'px 0px')
	}

	if($('#inner').height() < $('#left_content').height()) {
		$('#content').css('height',$('#left_content').height());
	}
	

});
	
