// Background Postion Fix

$(document).ready(resizeWindow);
$(window).bind("resize", resizeWindow);
	function resizeWindow( e ) {
	var body_width = $('body').width()
	var body_width = $('body').width();
	var body_height = $('body').height();
	var window_height = $(window).height();   // returns height of browser viewport
	var document_height  = $("div#entire_whole_site_container").outerHeight(); // returns height of HTML document
	var subnav_height = $('div#sub_navigation').height();
	var subnav_height = subnav_height + 391; 
	var subnav_differance = subnav_height - 550;
	//alert (body_height);

	if (body_width <= 1000)
	  {
	  		$("div#div#whole_site_container, div#footer_container").css({'background-position':'500px 0px', 'width' : '1000px' });
	  }
	else
	  {
			$("div#total_entire_whole_site_container, div#whole_site_container, div#footer_container").css({'background-position':'center top', 'width' : '100%'});
		}

	if ( $("#whole_site_container").hasClass("home") ) {
	// Homepage Rules
		if (body_height >= 750){
			$("div#whole_site_container").css('height', body_height )

			if (body_width <= 1000)
			  {
					$("div#div#whole_site_container").css({'background-position':'500px 0px', 'width' : '1000px', 'height' : body_height });
			  }
			
		} 
	}


}	 










// NORMAL RULES

$(document).ready(function() {
 // put all your jQuery goodness in here.
});
