$(function(){
    // fixes the "about us" menu item for both IE and non-IE browsers
    if($.browser.msie) {
        $('.mega-submenu').last().css({'margin-left': '-7px'});
    } else {
        $('#about_us').css({'width': '103px'});
        $('.mega-submenu').last().css('margin-left', '-4px');
    }
});


/*
 * function to call thickbox for videos
 */
function showVideo(video_id, title) {
	if (title == "undefined" || title == "") { title = "Video"; }
	var url = '/library/video/play/' + video_id + '/?';
	tb_show(title, url);
}

// show content on the right of the submenu of the top nav bar
function showMegaSubMenu(submenu_id){
    $(".submenu-content").hide();
    $(submenu_id).show();
}


// show content of boxes on home page
function showBoxContent(parentElement, content_id, link){
    var liElem = $(parentElement).children('.box-content-nav').children('ul').children('li');
    
    liElem.removeClass('active');
    $(link).parent('li').addClass('active');
    $(parentElement).children(".box-content").hide();
    $(parentElement).children("#box-content"+content_id).show();
    return false;
}
