$( function() {

    // abwechselnd hell machen
    $('table.days tr').each( function(c) {
        if ( c % 2 ) {
            $(this).children().addClass('light');
        }
    });

    // Mal was zeittechnisches bereitstellen
    var date = new Date();
    var now = { year: date.getFullYear(), month: date.getMonth() + 1 };

    // Alte Monate entfernen
    $('.month').filter( function() {
        return this.id.match(/^m(20\d\d)-(\d\d)$/)
            && ( RegExp.$1 < now.year || RegExp.$1 == now.year && RegExp.$2 < now.month );
    }).remove();
    
    // Pseudoakkordeon für Eintrittspreise und Spielplan
    //$('.month h2, #preise h2').click( function() {
    $('#preise h2').click( function() {
        $(this).next().slideToggle('slow');
    }).addClass('clickable').next().hide();
    var thisMonthId = 'm' + now.year + '-' + ( now.month < 10 ? '0' : '' ) + ( now.month );
    $( '#' + thisMonthId + ' h2' ).next().show();

});
