jQuery(document).ready(function(){
// if the height is very less let's position it at center.
	if($(window).height() > $('#my_body').height()){
		diff=$(window).height()-$('#my_body').height();
		diff=parseInt(diff/2)-2
		$('#my_body').attr("style","margin-top:"+ diff +"px")
	}
// poition drucken button
pos=$('#my_body').height();
pos=pos-200;
//$("#highlights a.link_print").attr("style","text-transform:uppercase;position:absolute;top:"+pos+"px")
	jQuery("ul.highlight_link li a.main_link").click(function() { 
	
	if(jQuery(":animated").length){return false}

	jQuery("ul.highlight_link li a.main_link").animate({
						 height:'16px'
	})

	jQuery("ul.highlight_link li ul.sub").slideUp('slow');
	jQuery(this).parent().find("ul.sub").slideDown('slow'); 
	jQuery(this).animate({
						 height:'26px'
	})
	//jQuery(this).attr("href",#);
	return false;});
	
	// Left menu
	jQuery("#left_menu li").hover(function() {
		return false; 
                if(!jQuery(this).find("ul.left_sub_menu").length){return false}
 		jQuery("#left_menu li").find("ul.left_sub_menu").hide()
		jQuery(this).find("ul.left_sub_menu").show()
		h=jQuery(this).find("ul.left_sub_menu").height();
                jQuery("#left_menu").attr({style:"top:"+ (curTop-h-16) +"px"})
									   
		return true;
	});



jQuery("#left_menu li").mouseout(function(){

})

	

showCurrentItem()
});
	var current_item
var curTop=300
function showCurrentItem(){
		jQuery("#left_menu li").find("ul.left_sub_menu").hide()
        	current_item=jQuery("#left_menu li.selected")
		jQuery(current_item).find("ul.left_sub_menu").show();
		
		if(!jQuery(current_item).find("ul.left_sub_menu").length){return false;} // there is no submenu so return;
		h=jQuery(current_item).find("ul.left_sub_menu").height();
        jQuery("#left_menu").attr({style:"top:"+ (curTop-h-16-16) +"px"})
		jQuery("#left_menu li.selected>a.selected").attr({style:"padding-top:16px"})
	}

function showSection(divContentId){
	jQuery("#"+divContentId).slideToggle("slow");
}