$(document).ready(function() { onDocumentLoad(); });
$(window).load(function() { onWindowLoad(); });

//Global Variables

/*
 * Standard page loading functions for prototype / jQuery
 */
function onDocumentLoad(){
	$('#headerContentRightBottom li:last').hide();
	$('#footerContentTop li:last').hide();
}

//Stuff put into this function doesnt run until the entire document is loaded flash and all
function onWindowLoad(){
	heightFix();
}

function heightFix() {
	var winHeight = $(window).height();
	var docHeight = $("#pageWrap").height();
	var headHeight = $("#headerWrap").height();
	var footerHeight = $("#footerWrap").height();
	var subHeight = winHeight - (headHeight + footerHeight) - 20;//20 = mainContentWrapper padding;
	
	if(winHeight >= docHeight){
		$("#mainContentWrapper").height(subHeight);
	}
}