﻿
// Must be called BEFORE the DOM is ready
JQ("html").addClass("hide-footer");

JQ(document).ready(function() {
    autoMarginFooter();
    JQ("html").removeClass("hide-footer");
});

// This is a function so that it can be called during resizing events
function autoMarginFooter() {
    try {
        var heightDiff = JQ(window).height() - JQ("#outer").height();
        if (heightDiff > 0) {
            JQ("#footer").css("margin-top", heightDiff - 2);
        }
    }
    catch (e) {
        // Ignore any errors
    }
}
