var contentVerticalMargin = 204;

var originalContentHeight = -1;

$(document).ready(function() {
	resizeContent();
	$(window).resize(resizeContent);
	$.get("/benjamin_miller/odds_ends/sidebar.html", function(xmlData) {$('#controls').append(xmlData);});
	setupZoom();
});


function resizeContent() {
	contentVerticalMargin = 204 + $('#footer').height();
	
	var windowHeight;
	if (self.innerHeight) {
		windowHeight = self.innerHeight; // all except Explorer
	} else if (document.documentElement && document.documentElement.clientHeight) {
		windowHeight = document.documentElement.clientHeight; // Explorer 6 Strict Mode
	} else if (document.body) {
		windowHeight = document.body.clientHeight; // other Explorers
	}
	if (originalContentHeight == -1) originalContentHeight = $('#content').height() + contentVerticalMargin;
		if (originalContentHeight < windowHeight) {
		$('#content').height((windowHeight-contentVerticalMargin)+'px');
	}
}



