$(document).ready(go);
var background=null;
var slide=null;
var current=2;

function go(){

	
	
	/*init(current);
	
	$('.slideImg').hover(function(){
	
		if(current != $(this).children('a').html()){
			init2(current);
			current=$(this).children('a').html();
			setTimeout(function(){
	    		 init(current);
			},200);
		}
	
	});
	*/
	$('.bouton-menu').hover(BtnH,BtnO);
	//$('.slide').click(rouleSlide);

}

function BtnH(){
	background =$(this).css('background-image')
	$(this).css('background-image','none');
	$(this).css('background-color','#77003e');
	$(this).children('a').css('color','#FFF');
}

function BtnO(){
	$(this).css('background-image',background);
	$(this).css('background-color','inherit');
	$(this).children('a').css('color','#333');
}

/*function rouleSlide(){
	slide=$(this);
	$('.slide').animate({width:'100px'},200,derouleSlide);
	
}

function derouleSlide(){
	slide.animate({width:'552px'},300);
}
*/

function init(pos){

	$('.jimgMenu ul li').each(function(){
	
	if($(this).children('a').html()==pos){
		deroule($(this));
	}
	
	});
}

function init2(pos){

	$('.jimgMenu ul li').each(function(){
	
	if($(this).children('a').html()==pos){
		enroule($(this));
	}
	
	});
}


function deroule(who){
	who.children('a').animate({width:'550px'},500);
}

function enroule(who){
	who.children('a').animate({width:'157px'},500);
}
