function slideSwitch(switchSpeed) {
    var $active = $('#slideshow a.active');
         
    if ( $active.length == 0 ) $active = $('#slideshow a:last');

    var $next =  $active.next('a').length ? $active.next('a')
        : $('#slideshow a:first');

    $active.addClass('last-active');
    
    
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, switchSpeed, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
   var playSlideshow = setInterval ( "slideSwitch(1000)", 4000 );
			$('#slideshow').hover(function(){
clearInterval(playSlideshow);
}, function(){
playSlideshow = setInterval ( "slideSwitch()", 4000 );
});

});

