	function justdoit()	
	{
		var halfcourt = $(window).width();
		var freethrow = $(window).height();
	
		if ((halfcourt/freethrow) >= 1.6)
		{
			$("img").css("width", halfcourt + "px");
			$("img").css("height", (halfcourt/1.6)  + "px");
			
			if ((halfcourt/1.6) > freethrow)
			{
				var layupjump = (freethrow - (halfcourt/1.6)) / 2;
				$("img").css("top", layupjump + "px");
			}
			else
			{
				$("img").css("top", "0");
			}
			
			$("img").css("left", "0");
		}
		else
		{
			$("img").css("height", freethrow + "px");
			$("img").css("width", (freethrow*1.6) + "px");
			
			if ((freethrow*1.6) > halfcourt)
			{
				var layupjump = (halfcourt - (freethrow*1.6)) / 2;
				$("img").css("left", layupjump + "px");
			}
			else
			{
				$("img").css("left", "0");
			}
			
			$("img").css("top", "0");
		}					
	}		
	
	$(document).ready(function() 
	{
		justdoit();	
	});

	$(window).resize(function() 
	{
		justdoit();
	});