(function (b) {
    b(document).ready(function () {

        if ($("#assetPanelContainer").css("display") == "none")
            return;

        var g = [],
			f = a("#sideNavContainer", 18),
			c = a("#mainContentContainer"),
			e = a("#assetPanelContainer");

        if (c > f && c > e) {
            var d = c - e;

            if (d > 125)
                d = 125;

            b("#footerContainer").css("margin-top", "-" + d + "px")
        }
    });

    function a(g, d) {
        var a = b(g),
			h = parseInt(a.height()),
			f = parseInt(c(a.css("padding-top"))),
			e = parseInt(c(a.css("padding-bottom"))),
			d = parseInt(d || 0);

        return h + f + e + d
    }

    function c(a) {
        return a.replace("px", "")
    }

})(jQuery);
