var Une_Current = 1;

$(document).ready(function() {
	$.timer({name:"Une_Timer", interval: 4 }, function(){
		if (Une_Current+1 > Une_Max) {
			Une_Show(1, 'slow');
		} else {
			Une_Show(Une_Current+1, 'slow')
		}
	});
	
	$('#flash_actus table.title_actus td.t').mouseover(function(){
		num = parseInt($(this).attr('id').substr(1));
		Une_Show(num, 'fast');
		$.stopTimer('Une_Timer');
	});
	$('#flash_actus table.title_actus td.t').mouseout(function(){
		$.runTimer('Une_Timer');
	});
});


function Une_Show(n, speed) 
{
	if (Une_Current != n) {
		$('#flash_actus table.title_actus td.t').removeClass('selected');
		$('#t'+n).addClass('selected');
		/*
		$('#ia'+Une_Current).fadeOut(speed, function(){
			$('#ia'+n).fadeIn(speed);
		});
		*/
		$('#ia'+Une_Current).hide();
		$('#ia'+n).show();
	} else {
		$('#t'+n).addClass('selected');
	}
	Une_Current = n;
}
