jQuery.noConflict();
jQuery(document).ready(function(){
	
	jQuery('#headerfoto').addClass('active');
	jQuery('#navi').hover(function(){
		jQuery('#headerfoto').removeClass('active');
	},	function(){
		jQuery('#headerfoto').addClass('active');
	})
	
	// IE does not support :hover for other elements than anchors.
	// So we have to supply a JS based alternative for the navigation.
	if(jQuery.browser.msie) {
		jQuery('#navi #m1 ul li').hover(
      function () {
				jQuery(this).toggleClass('current');
        jQuery('ul.l2', jQuery(this)).css('display', 'block');
      }, 
      function () {
				 jQuery(this).toggleClass('current');
         jQuery('ul.l2', jQuery(this)).css('display', 'none');
      }
    )
	}
	
	// If the DIV #nebeninfo has a greater height than the main content DIV 
	// we set the height of the DIV #inhalt_mitte accordingly and push the footer 
	// navigation to the bottom.
	if(jQuery('#nebeninfo').height() > jQuery('#inhalt_mitte').height()) {
		var contentHeight =   jQuery('#nebeninfo').height() 
												- jQuery('#inhalt_oben').height() 
												- jQuery('#inhalt_unten').height();
		jQuery('#inhalt_mitte').height(contentHeight);
		jQuery('#inhalt_fusszeile').css('position', 'absolute');
		jQuery('#inhalt_fusszeile').css('bottom', '-7px');
	}
	
});
