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')
		}
	});
	
	$('#flashune ul.titres li').mouseover(function(){
		num = parseInt($(this).attr('id').substr(1));
		Une_Show(num, 'fast');
		$.stopTimer('Une_Timer');
	});
	$('#flashune ul.titres li').mouseout(function(){
		$.runTimer('Une_Timer');
	});
});



function Une_Show(n, speed) 
{
	if (Une_Current != n) {
		$('#flashune ul.titres li').removeClass('selected');
		$('#t'+n).addClass('selected');
	
		$('#i'+Une_Current).fadeOut(speed);
		$('#i'+n).fadeIn(speed);
	} else {
		$('#t'+n).addClass('selected');
	}
	Une_Current = n;
}
