function backgroundScale()
{
	var imageRatio       = 1.75;
	var windowHeight     = document.body.clientHeight;
	var windowWidth      = document.body.clientWidth;
	var windowScale      = windowWidth / windowHeight;
	var targetWidth      = windowHeight * imageRatio;
	var targetWidthFull  = windowWidth;
	var leftPos          = - (targetWidth - windowWidth) / 2;
	var leftPosFull      = 0;

	if (windowScale <= imageRatio)
	{
		$('.background img').attr("width", targetWidth);
		$('.background').css("left", leftPos);
	} 
	else
	{
		$('.background img').attr("width", targetWidthFull);
		$('.background').css("left", leftPosFull);
	}
}

$(window).resize(function()
{
	var imageRatio       = 1.75;
	var windowHeight     = document.body.clientHeight;
	var windowWidth      = document.body.clientWidth;
	var windowScale      = windowWidth / windowHeight;
	var targetWidth      = windowHeight * imageRatio;
	var targetWidthFull  = windowWidth;
	var leftPos          = - (targetWidth - windowWidth) / 2;
	var leftPosFull      = 0;

	if (windowScale <= imageRatio)
	{
		$('.background img').attr("width", targetWidth);
		$('.background').css("left", leftPos);
	} 
	else 
	{
		$('.background img').attr("width", targetWidthFull);
		$('.background').css("left", leftPosFull);
	}
	
	backgroundScale()
});
$(function()
{	var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
	if (badBrowser)
	{	var h = $("#outer-Div").height();
		var w = $("#outer-Div").width();
		$(".background").css({"height":h,"width":w});
		var Bg = $('.background img').attr("src");
		$('.background').css({"background":"url(" + Bg +") repeat left centre"});
	}
});
