function slideSwitch() {
    var active = $('#slideshow img.active');

    if (active.length == 0) active = $('#slideshow img:last');

    var next =  active.next().length ? active.next() : $('#slideshow img:first');

	next.fadeIn(800)
	next.removeClass('last-active');
	next.addClass('active');
	active.fadeOut(500);
	active.removeClass('active');
	active.addClass('last-active');
}
$(function() {
    setInterval( "slideSwitch()", 5000 );
});
