jQuery(document).ready(function() {
    var hash = window.location.hash;
    
    (!hash) ?  
        hideAllExcept('#' + jQuery('#toggleThis > div:first').attr('id')) 
            : hideAllExcept(window.location.hash);

    jQuery('a.toggle').click(function() {
        var href = jQuery(this).attr('href');
        hideAllExcept(href);
        return false;
    });
});

function hideAllExcept(el) {
    jQuery('#toggleThis div').addClass('hide');
    jQuery(el).removeClass('hide');

    jQuery('a.toggle').removeClass('active');
    jQuery('a[href="' + el + '"]').addClass('active');
}

/*                                  2009-03-04
    "hide all except one"
    by charles stuart
    requires jquery (http://jquery.com/)
    ** requires rev 1465 or above **
    ** http://dev.jquery.com/ticket/745 **
    
    Keep this url with the script:
    http://enure.net/dev/hide-all-except-one/
*/
