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

    $('a.toggle').hover(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');
    
}

