$(document).ready(function() {

    $("#weather").removeClass('nodisplay');
    $("#noch").removeClass('nodisplay');

    // Countdown
    $(function () {
        var austDay = new Date();
        austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
        $('#countdown').countdown({
            until: new Date("January 6, 2013 10:00:00"),
            //until: new Date("August 14, 2011 00:00:01"),
            compact:true,
            layout: '<span style="font-size:0.7em;margin-left:-3px">&nbsp;&nbsp;Startschuß fällt in&hellip;:</span><br /><b> {dn}T {hnn}{sep}{mnn}{sep}{snn} {desc}</b>',
            //layout: '<span style="font-size:0.7em;margin-left:-17px">Start Online-Anmeldung in&hellip;:</span><br /><b> {dn}T {hnn}{sep}{mnn}{sep}{snn} {desc}</b>',
            description: ''
        });
    });

    // Lazy Load - darf leider erst nach Slideshow...
    //$("img").not('#fuss img').not('#fuss2 img').not('#rechts img').not('#kalenderneu img').lazyload({
    //    placeholder : "graphics/grey.gif"
    //    //, effect : "fadeIn"
    //});


    // prettyPhoto - verträgt sich leider nicht mit LazyLoad
    $("a[rel^='prettyPhoto']").prettyPhoto({
        theme: 'facebook', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
    });

    // Puls
    $('.pulse').add('.pulse td').pulse({
        opacity: [.3,1]
    }, {
            duration: 600,
        times: 9999
    });

});


function onAfter(curr,next,opts) {
        var caption = '<em>Zufallsbild ' + (opts.currSlide + 1) + '/' + opts.slideCount + ':</em><br />' + this.alt;;
        $('#slidecaptionjs').html(caption);
};

function equalHeight(group) {
        var tallest = 0;
        group.each(function() {
                var thisHeight = $(this).height();
                if(thisHeight > tallest) {
                        tallest = thisHeight;
                }
        });
        group.height(tallest);
}
