/* */
var report_count = 0;
var report_total = 0;
var report_array = new Array();

$(document).ready(function(){	
	if( $('.report-slideshow').length > 0 )
	{
		$.each($('.report-slideshow'), function(i,item){
			report_id = $(item).attr('id');
			report_id = report_id.split( '-' );
			report_id = report_id[1];
			//alert(id);
			report_array.push(report_id);
		 });
	}
	report_total = report_array.length;
	//alert( 'Reports '+report_total );
	gallery_report_slideshow();
	if( report_total > 1 )
	{
		window.setInterval('gallery_report_slideshow()', 4000 );
	}
	//alert( report_array.toString() );
});

function gallery_report_slideshow(){
	$('.report-slideshow').hide();
	$('#report-'+report_array[report_count]).fadeIn('slow');
	
	report_count++;
	if( report_count >= report_total ) report_count = 0;
}

