/*
 COMO navigation handling.
 */
try 
{
	var test = COMO.ns;
} 
catch (e) 
{
	COMO = {};
}

COMO.ContentTabExpander = (function($) {

    var ns = 'COMO.ContentTabExpander';
    var description = 'Controls expanding/shrinking of tabs in body content.';

    function init() {
        /*
        set appropriate elements to be active
        CSS will therefore hide the text of the tab only when parent li is active
        */
        $('ul.tabs li').addClass('active');
        /*
        set toggle handlers on the .tabexpanders
        */
        $('ul.tabs .tabexpander').toggle(function() {
            $(this).addClass('open');
            $(this).nextAll('.tabcontent').fadeIn('fast');
        }, function() {
            $(this).removeClass('open');
            $(this).nextAll('.tabcontent').fadeOut('fast');
        });
    }
    
    return {
        ns: ns,
        description: description,
        init: init
    };
} (jQuery));


jQuery(document).ready(COMO.ContentTabExpander.init);

