//var $j = jQuery.noConflict();

jQuery(function(){    
	/* First, set a compensation value to fix browser differences and an overall 
	misalignment with this method */
	if (jQuery.browser.msie || jQuery.browser.safari) { 
		var bfacompensate = 41; 
	} else { 
		var bfacompensate = 21; 
	}

	/* Then, fix a jQuery/Opera 9.5+ bug with determining the window height */
	var windowheight = jQuery.browser.opera && jQuery.browser.version > "9.5" &&
	jQuery.fn.jquery <= "1.2.6" ? document.documentElement["clientHeight"] : jQuery(window).height();

	/* Top and bottom padding may have been set on the BODY */
	var paddingtop = parseInt(jQuery("body").css("padding-top"));
	var paddingbottom = parseInt(jQuery("body").css("padding-bottom"));

	/* Get the height of the header, footer, and the layout as a whole */
	var headerheight = jQuery("#header").height();
	var footerheight = jQuery("#footer").height();
	
	if(jQuery.browser.chrome)
	{
		console.log(jQuery("div#wrapper#container#content").height());
		var layoutheight = jQuery("div#wrapper#container#content").height();
	}else{
		var layoutheight = jQuery("div#wrapper").height();
	}


	/* Adjust height of middle column if (layout height + body padding-top + body padding-bottom) is smaller than 
	height of browser viewport */

	var newmiddleheight = layoutheight - footerheight - headerheight;
	jQuery("#container").css({height: newmiddleheight + "px"});
});

