bgneal@45: /*** 
bgneal@45:     Simple jQuery Slideshow Script
bgneal@45:     Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc.  Please link out to me if you like it :)
bgneal@45: ***/
bgneal@45: // Modified by Brian Neal.
bgneal@45: 
bgneal@45: function slideSwitch() {
bgneal@45:     var $active = $('#slideshow img.active');
bgneal@45: 
bgneal@45:     if ( $active.length == 0 ) $active = $('#slideshow img:last');
bgneal@45: 
bgneal@45:     // use this to pull the images in the order they appear in the markup
bgneal@45:     var $next =  $active.next().length ? $active.next()
bgneal@45:         : $('#slideshow img:first');
bgneal@45: 
bgneal@45:     $active.addClass('last-active');
bgneal@45: 
bgneal@45:     $next.css({opacity: 0.0})
bgneal@45:         .addClass('active')
bgneal@45:         .animate({opacity: 1.0}, 1000, function() {
bgneal@45:             $active.removeClass('active last-active');
bgneal@45:         });
bgneal@45: }
bgneal@45: 
bgneal@45: $(function() {
bgneal@45:     setInterval( "slideSwitch()", 5000 );
bgneal@45: });