﻿
//Portrait, groß
function SlideSwitch() {
    var $active = $('#Slideshow IMG.active');

    if ($active.length == 0) $active = $('#Slideshow IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#Slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 2000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitch()", 3159);
});

//Portrait, klein
function SlideSwitchSmall() {
    var $active = $('#Slideshow2 IMG.active');

    if ($active.length == 0) $active = $('#Slideshow2 IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#Slideshow2 IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitchSmall()", 7129);
});

//Portrait, unten
function SlideSwitchSub() {
    var $active = $('#Slideshow5 IMG.active');

    if ($active.length == 0) $active = $('#Slideshow5 IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#Slideshow5 IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitchSub()", 5129);
});

//Startseite
function SlideSwitchStart() {
    var $active = $('#SlideshowStart IMG.active');

    if ($active.length == 0) $active = $('#SlideshowStart IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#SlideshowStart IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 4000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitchStart()", 6129);
});

//Startseite Jasba
function SlideSwitchJasbaStart() {
    var $active = $('#SlideshowJasbaStart IMG.active');

    if ($active.length == 0) $active = $('#SlideshowJasbaStart IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#SlideshowJasbaStart IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 4000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitchJasbaStart()", 6129);
});


//GFK oben
function SlideSwitch3() {
    var $active = $('#Slideshow3 IMG.active');

    if ($active.length == 0) $active = $('#Slideshow3 IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#Slideshow3 IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 2000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitch3()", 5159);
});

//GFK unten

function SlideSwitch4() {
    var $active = $('#Slideshow4 IMG.active');

    if ($active.length == 0) $active = $('#Slideshow4 IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#Slideshow4 IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 2000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitch4()", 4000);
});


//Marilyn
function SlideSwitchMarily() {
    var $active = $('#Slideshow6 IMG.active');

    if ($active.length == 0) $active = $('#Slideshow6 IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#Slideshow6 IMG:first');

    $active.addClass('last-active');

    $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval("SlideSwitchMarily()", 5129);
});

$(document).ready(function() {
    $("a[rel^='prettyPhoto']").prettyPhoto({
        animationSpeed: 'normal', /* fast/slow/normal */
        padding: 40, /* padding for each side of the picture */
        opacity: 0.75, /* Value betwee 0 and 1 */
        showTitle: true, /* true/false */
        allowresize: true, /* true/false */
        counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
        theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
        callback: function() { }
    });

});
