function slideSwitch() {
    var $active = $('#slideshow_imgs img.active');
    if ($active.length == 0) {
		$active = $('#slideshow_imgs IMG:last');
	}
    var $next = $active.next().length ? $active.next()
        : $('#slideshow_imgs IMG:first');
    $active.addClass('last-active');
	$next.addClass('active');
//	$('#slideshow_text_block').text($next.attr('alt'));
//	alert($next.attr('alt'));
	slideid = $next.attr('id').replace('slideimg_','');
	$('#slideshow_text_block').fadeOut('fast', function() {$('#slideshow_text_block').html($('#slide_'+slideid).html()).fadeIn('slow');});
	
	$active.fadeOut('fast',function() {
		$next.fadeIn('slow');
		$active.removeClass('active last-active');
	});
}

$(document).ready(function() {
    window.setInterval( "slideSwitch()", 5000 );
});
