$(function(){
	$(".demhome a").hover(function(){
	
		survoled = $(".demhome a").index(this);
		to_left = survoled * 200 + 50;
		
		$('.fl_3').stop().animate({
		  "margin-left": to_left
		});

		$(this).children("span").fadeOut();
	}, function(){
		$(this).children("span").fadeIn();
	})		
});




 
var to_value = 1;
 
	function go(val){
	
		var nb_answers = $(".one_actu").length;;
				
		if (val==-1) to_value = to_value+1; else if (val>0) { to_value=val; clearTimeout(for_next); }
		
		if (to_value>nb_answers) to_value=1;
		
		if (val=="purge") {
		
		$(".one_actu").hide();
		$(".actu1").show();
		
		} else {
		$(".one_actu").fadeOut();
		next = ".actu"+to_value;
		$(next).fadeIn();
		}
 
		cas = "#c"+to_value;
		$("#actu_switch a").removeClass("active");
		$(cas).addClass("active");
		
		for_next = setTimeout("go(-1)", 5000);
	}
	
	
$(document).ready(function(){
	go("purge");
});
 

