$( function() {

    // Pseudoakkordeon für Stücke
    $('.stueck h3').click( function() {
        $(this).next().slideToggle('slow');
    }).addClass('clickable').next().hide();

    // abwechselnd hell machen
    $('.stueck').each( function(c) {
        if ( c % 2 ) {
            $(this).addClass('light');
        }
    });
    
    // TODO aufklappen, was im URL steht und hingehen.
    var urlparts = document.URL.split('#');
    if ( urlparts[0].match(/repertoire\.html$/) && urlparts[1] ) {
        var h = $( '#' + urlparts[1] );
        h.next().show();
        window.scrollTo( h.offset().left, h.offset().top - 20 );
    }

});
