// places the footer at the bottom on page load, and also sets up that on page resize, the footer gets moved to the bottom again
jQuery(function() {
	moveFooter();
	jQuery(window).unbind('resize').resize(moveFooter);
});

// makes sure that the footer is always at the bottom of the document. in the case where the document is shorter
// than the bounding window, it will put the footer at the bottom of the window.
function moveFooter() {
	jQuery('#footer').hide();
	var docHei = parseInt(jQuery(document).height());
	var winHei = parseInt(jQuery(window).height());
	var footHei = parseInt(jQuery('#footer').height());
	var newTop = Math.max(docHei, winHei) - footHei;
	jQuery('#footer').css({
		position: 'absolute',
		top: newTop + 'px'
	}).show();
}
