function slideSwitch() {
var $active = $('#front-page-slideshow li.active-slide');
if ( $active.length == 0 ) {
$active = $('#front-page-slideshow li:last');
}
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next()
: $('#front-page-slideshow li:first');
// uncomment the 3 lines below to pull the images in random order
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active-slide');
$next.css({opacity: 0.0})
.addClass('active-slide')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active-slide last-active-slide');
});
}
$(function() {
setInterval( slideSwitch, 5000 );
});
----------------------
#front-page-slideshow {
background-color: #363665;
position: relative;
margin: 0px;
padding: 0px;
height: 212px;
width: 247px;
}
.slideshow-item {
height: 212px;
width: 247px;
overflow: hidden;
visibility: hidden;
position: absolute;
top: 0px;
left: 0px;
}
.active-slide {
visibility: visible;
}