		$(window).load(function() {    
				var theWindow        = $(window),
					$bg              = $("#bg"),
					aspectRatio      = $bg.width() / $bg.height()
					contentHeight	 = $("#content").height();
				function resizeBg() {
						if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
							$bg
								.removeClass()
								.addClass('bgheight');
						} else {
							$bg
								.removeClass()
								.addClass('bgwidth');
						}
						$expandableHeight = theWindow.height() - contentHeight - 145;
				}
				theWindow.resize(function() {
						resizeBg();
				}).trigger("resize");
});
