$(document).ready(function () {
    // Find all the divs that live with the Extras Tabs
    // and make sure that exlusive is the only one shown for now
    var tabContainers = $('div.stunts > div.tab_content');
    tabContainers.hide().filter(':first').show();
    $('ul.stunt_tabs li:first-child a').addClass('active');

    // setup a Mouseover Event for the Extras Tabs to hide 'em 
    $('div.stunts ul.stunt_tabs a').mouseover(function () {
        tabContainers.hide();
        var h = '#c_'+this.hash.split('#')[1];
        tabContainers.filter(h).show();
        $('div.stunts ul.stunt_tabs a').removeClass('active');
        $(this).addClass('active');

        //and make sure thickbox will do its thing
        // tb_destroy();
        // tb_init();
        
        // return false;
    });
    
    $('div.stunts ul.stunt_tabs a').click(function(event) {
        event.preventDefault();
    });

    // tb_destroy();
    // tb_init();

    // var current_url = document.location.toString();
    // if (current_url.match('#')) { // the URL contains an anchor
    //  // click the navigation item corresponding to the anchor
    //  var myAnchor = '#' + current_url.split('#')[1];
    //  // check the anchor against all 
    //  $('div.stunts ul.stunt_tabs li a[href="' + myAnchor + '"]').click();
    // }
});

