function positionFooter() {
var footer = $("#fd");
if ((($(document.body).height() + footer.outerHeight()) < $(window).height() && footer.css("position") == "fixed") || ($(document.body).height() < $(window).height() && footer.css("position") != "fixed")) {
footer.css({
position: "fixed",
bottom: "0",
width: '100%'
});
} else {
footer.css({
position: "static"
});
}
}
function stickFooter() {
$(window).scroll(positionFooter).load(positionFooter).resize(positionFooter);
}
stickFooter();