
$(document).ready(function()
{
    SetSubContentBoxHeight();
    AddNavigationEvents();
});

function SetSubContentBoxHeight()
{
    var height = 0;
    var divs = $('#ContentSub div.GreyBox');
    for (x=0; x<divs.length; x++)
    {
        //alert(divs[x].offsetHeight);
        if(divs[x].offsetHeight > height)
            height = divs[x].offsetHeight;
    }
    if(height > 0) $('#ContentSub div.GreyBox').height(height);
}

function AddNavigationEvents()
{
    $('#nav li').hover(
        function(){$(this).addClass('hover');},
        function(){$(this).removeClass('hover');});
}