$(document).ready(function(){

});

function redraw() {

	$(".photo #content img").each(function() {
		maxHeight = $(window).height() - 140;
		if ($(this).height() != maxHeight) {
			$(this).height(maxHeight);
			$(this).width("auto");
			$("#content").width($(this).width()).css("min-width", 0);
		}
	});

	$(".reel .displayarea object").each(function() {
		ratio = $(this).attr("height") / $(this).attr("width");
		maxHeight = $(window).height() - 140;
		newWidth = Math.round(maxHeight / ratio);
		if ($(this).height() != maxHeight) {
			$(this).height(maxHeight).attr("height", maxHeight);
			$(this).width(newWidth).attr("width", newWidth);
			$("#content").width(newWidth).css("min-width", 0);
		}
	});

}
