$(document).ready(
	function() {
		repositionFooter();
       	}
);


function repositionFooter() {
	var IE = document.all ? true : false;
	var footer = document.getElementById('footer');
	var height;
	if (self.innerHeight) {
		height = parseInt(self.innerHeight);
	} else if (document.documentElement && document.documentElement.clientHeight) {
		height = parseInt(document.documentElement.clientHeight);
	} else if (document.body) {
		height = parseInt(document.body.clientHeight);
	} else {
		return;
	}
	var minus = parseInt(footer.offsetHeight);
	var newtop = height - minus;
	
	if (parseInt(footer.offsetTop) < newtop) {
		var wrapper = document.getElementById('wrapper');
		wrapper.style.height = newtop + "px";
	}
	footer.style.visibility = "visible";
}
