
//tabs setup for the main community gateway page
$(document).ready(function(){

    // Set up a listener so that when anything with a class of 'tab' 
    // is clicked, this function is run.
    $('.maintab').click(function () { 

        // Remove the 'active' class from the active tab.
        $('#maintabs_container > .tabs > li.active')
        .removeClass('active');

        // Add the 'active' class to the clicked tab.
        $(this).parent().addClass('active');

        // Remove the 'tab_contents_active' class from the visible tab contents.
        $('#maintabs_container > .maintab_contents_container_comm > .int > div.tab_contents_active')
        .removeClass('tab_contents_active');

        // Add the 'tab_contents_active' class to the associated tab contents.
        $(this.rel).addClass('tab_contents_active');

    });

    //Remove separator class from separator div        
    //    $('#maintabs_container > .maintab_contents_container_comm > .int ul.inbox li.withoutborder').removeClass('withoutborder');
    //    $('#maintabs_container > .maintab_contents_container_comm > .int ul.inbox').removeClass('inbox');
    //    $('#maintabs_container > .maintab_contents_container_comm > .int ul').addClass('tabsquare');    
    $('#maintabs_container > .maintab_contents_container_comm > .int ul.inbox li.withoutborder').removeClass('withoutborder');
    $('#maintabs_container > .maintab_contents_container_comm > .int ul').each(function (index) { if ($(this).hasClass("inbox")) {$(this).removeClass('inbox'); $(this).addClass('tabsquare'); } });
    
});
