/* Modified version of http://jonraasch.com/blog/a-simple-jquery-slideshow to show slideshow in two separate places */

function slideSwitch(switchSpeed,activeClass) {

var $active = $('#slideshow li.' + activeClass);

var $startPosition = ( activeClass == 'active1' ) ? $('#slideshow li:first')
: $('#slideshow li:nth-child(2)');

if ( $active.length == 0 ) $active = $startPosition;

var $next = $active.next('li').next('li').length ? $active.next('li').next('li')
: $startPosition

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

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

$(function() {
/* setInterval ( "slideSwitch(FADE_DURATION,'CSS-CLASS')", DELAY ); */
setInterval ( "slideSwitch(1000,'active2')", 3000 );
setInterval ( "slideSwitch(1000,'active1')", 3000 );
});

