function resizeImage(img)
{
$(img).removeAttr("width"); $(img).removeAttr("height");
	var window_height = document.body.clientHeight;
	var window_width  = document.body.clientWidth;
	var image_width   = $(img).width();
	var image_height  = $(img).height();
	var height_ratio  = image_height / window_height;
	var width_ratio   = image_width / window_width;
	
	if (height_ratio > width_ratio)
	{
		$(img).css({"width" : "auto"});
		$(img).css({"height" : "100%"});
		alert("here");
	}
	else
	{
		$(img).css({"width" : "100%" });
		$(img).css({"height": "auto"});
		
		
	}
}
