var PointsGlobal = {
    containerHeight: 0,
    containerPaddingBtm: 45,
    footerHeight: 0,
    init: function() {
        this.containerHeight = $('#container').height();
        this.footerHeight = $('#footer').height() + parseInt($('#footer').css('padding-bottom'));
        this.positionFooter();
    },
    resetContainerHeight: function() {
        this.containerHeight = $('#header').height() + $('#content').height();
    },
    positionFooter: function() {
        var myObj = this;
        var minHeight = myObj.footerHeight + myObj.containerHeight + myObj.containerPaddingBtm;
        $('#container').css({'height': $(window).height() + 'px'});
         
        if ($(window).height() < minHeight) {
            $('#container').css({'height': minHeight + 'px'});
        }
    }
};

$(function () {
    
    //Don't apply the footer positioning system for the content listing page.
    if (!document.getElementById('node-admin-filter')) {
        PointsGlobal.init();
        $(window).bind('resize', function() {
            PointsGlobal.positionFooter();
        });
    } else {
        $('#footer').css({'position': 'static'});
    }
});

