/* JQuery functionality
*/
function addNavClasses() {
    // Replaces 
    $(".sideNav.light .item:first .title").addClass("top");
    $(".sideNav.dark .item:first .title").addClass("top");

    // Replaces last content bubble with no connector
    $(".sideNav.light .item:last").addClass("border");
    $(".sideNav.dark .item:last").addClass("border");

    $(".siteMapSearchItem:last").addClass("bottomBorder");
}



var FLV_PLAYER_URL = '/public/flv-player.aspx';
var THICKBOX_QUERY_STRING = '&TB_iframe=true&height=308&width=450&modal=false';

// Adds thickbox
function addThickboxToFLVs() {
    // Get all links with ".flv"
    $("a[href*='.flv']").each(function() {
        // Get the base url 
        var head = this.href.substring(0, this.href.indexOf('/media/'));
        
        // Get the flv path
        var tail = this.href.substring(this.href.indexOf('/media/'), this.href.length);

        // Build thickbox string
        this.href = head + FLV_PLAYER_URL + '?url=' + tail + THICKBOX_QUERY_STRING;
       // alert(this.href);
    }).addClass("thickbox");// Finally, add class thickbox 
    return true;
}