(function($) {
    $(document).ready(function() {
        CheckDesignResize();
        $(window).bind("resize", function() { CheckDesignResize() });
    });
})(jQuery);

function CheckDesignResize() {
    var height = 0;
    var heightDivContent;

    heightDivContent = $("#content_holder").css("height").replace("px", "");

    if (heightDivContent == 'auto') { heightDivContent = $("#content_holder").css("min-height").replace("px", ""); }
    if (heightDivContent > $(window).height()) {
        height = $("#menu").css("height").replace("px", "");
        height = parseInt(height) + parseInt($("#signature").css("height").replace("px", ""));
        height = parseInt(height) + parseInt($("#content_holder").css("padding-top").replace("px", "")); //la bordure
        height = parseInt(height) + parseInt($("h1.SiteTitle").css("height").replace("px", ""));

        if (heightDivContent < ($(window).height() - parseInt(height))) {
            heightDivContent = $(window).height() - parseInt(height);
        }
    }
    else {
        $("#content_holder").css("padding-bottom", "50px");
    }

    if ($.browser.name.indexOf('msie') > -1 && $.browser.versionNumber < 7) {
        $("#content_holder").css("height", parseInt(heightDivContent) + "px");
    }
    else {
        $("#content_holder").css("min-height", parseInt(heightDivContent) + "px");
    }

}
