/**
 * @author eforth
 */

$(document).ready(function(){
	positionFooter(); 
	function positionFooter(){
		var margin_top = $("#wrapper-footer").css("margin-top").replace("px", "");
		var page_height = $(document.body).height() - margin_top;
		var window_height = $(window).height();
		var difference = window_height - page_height;
		if (difference < 0) 
			difference = 0;
 
		$("#wrapper-footer").css({
			margin: difference + "px 0 0 0"
		})
	}
 
	$(window)
		.resize(positionFooter)
		.load(positionFooter);
		
});

