﻿$(document).ready(function () {
    positionFooter();

    $(window)
        .scroll(positionFooter)
        .resize(positionFooter);
});

function positionFooter() {
    if ($("#content-wrap").height() + $("#footer-wrap").height() < $(window).height()) {
        $("#footer-wrap").css({ position: "absolute", top: ($(window).scrollTop() + $(window).height() - $("#footer-wrap").height()) + "px" })
    }
    else {
        $("#footer-wrap").css({ position: "static" });
    }
}
