$(function(){
			var theWindow = $(window),
			$bg = $(".bg-area img"),
			aspectRatio = $bg.width() / $bg.height();
		function resizeBg(){
				if ((theWindow.width() / theWindow.height()) < aspectRatio ){
					$bg.removeClass('bgwidth').addClass('bgheight');
				}else{
					$bg.removeClass('bgheight').addClass('bgwidth');
				}
		}
		theWindow.resize(function(){
			resizeBg();
		}).trigger("resize");
});
