function promoSlideSwitch() {
    var $active = $('#promoslideshow DIV.promo-active');

    if ( $active.length == 0 ) $active = $('#promoslideshow DIV:last');

    var $next =  $active.next().length ? $active.next()
        : $('#promoslideshow DIV:first');

    $active.addClass('promo-last-active');

    $next.css({opacity: 0.0})
        .addClass('promo-active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('promo-active promo-last-active');
        });
}

function promoSlideSwitch2() {
    var $active = $('#promoslideshow2 DIV.promo-active');

    if ( $active.length == 0 ) $active = $('#promoslideshow2 DIV:last');

    var $next =  $active.next().length ? $active.next()
        : $('#promoslideshow2 DIV:first');

    $active.addClass('promo-last-active');

    $next.css({opacity: 0.0})
        .addClass('promo-active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('promo-active promo-last-active');
        });
}

$(function() {
    setInterval( "promoSlideSwitch()", 4000 );
    setInterval( "promoSlideSwitch2()", 4000 );
});

