$(document).ready(function() {
    var hash = window.location.hash;
    		
	$('#toggleThis') 
		.livequery('', function(event) { 
			(!hash) ?  
        hideAllExcept('#' + $('#toggleThis > div:first').attr('id')) 
            : hideAllExcept(window.location.hash);
    });
			
			
    $('a.toggle').livequery('click', function() {
        var href = $(this).attr('href');
        hideAllExcept(href);
    });
});

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

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

/*                                  2007-03-21
    "hide all except one"
    by charles stuart
    requires jquery (http://jquery.com/)
    ** requires rev 1465 or above **
    ** http://dev.jquery.com/ticket/745 **

    Please keep this url with the script:
    http://enure.net/dev/hide-all-except-one/

*/