function slideshow() {

    var $active=$("DIV[id^=slideshow] DIV.active");
	//console.debug($active.length);
    if ( $active.length == 0 ) $active = $("DIV[id^=slideshow]  DIV:last-child");
	    // use this to pull the divs in the order they appear in the markup
	//console.debug("next"+$active.next().length);
	var $next=$active.next();
	//console.debug("last elements attribute:"+$("DIV.slideshow>:last").attr("class"));
	if($("DIV[id^=slideshow]> DIV:last-child").attr("class")=="active")
	   {
	  	   		$next=$("DIV[id^=slideshow]  DIV:first-child");
	   }
	   
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}
