// JavaScript Document
//This Javascript give the left side navigation height that is equal to div#main-content.
//Taken from http://www.cssnewbie.com/equal-height-columns-with-jquery/
function recalContentWidth() {
    try {
        $('#main-content').width($('.maincontent').width() - $('#left-navigation').width())
    }
    catch (e) { }
}

function equalHeight(group) {
    tallest = 0;
    if (group) {
        group.each(function() {
            thisHeight = $(this).height();
            if (thisHeight > tallest) {
                tallest = thisHeight;
            }
        });
    }
    group.height(tallest);
}

// The left side navigation and the div#main-content have been given the class "column". Whichever is tallest will define the height of the other.
$(document).ready(function() {
    recalContentWidth();
    equalHeight($(".column"));
});

