	function hide_show_menu(id){
		
		$('.liste_service').each(function(){
      
  		if ($(this).attr('id') == id)
  			$(this).show();
  		else
  			$(this).hide();
    });

	}

	$(document).ready(function(){

		$('.mini_1').hover(function(){
				$(".img_1", this).stop().animate({top:'-119px', left:'-376px'},{queue:false,duration:300});  
			}, function() {  
				$(".img_1", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});  
			});

	});
	
	$(document).ready(function(){

		$('.mini_2').hover(function(){
				$(".img_2", this).stop().animate({top:'-119px', right:'-376px'},{queue:false,duration:300});  
			}, function() {  
				$(".img_2", this).stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});  
			});

	});
	
	$(document).ready(function(){

		$('.mini_3').hover(function(){
				$(".img_3", this).stop().animate({top:'0px', left:'-376px'},{queue:false,duration:300});  
			}, function() {  
				$(".img_3", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});  
			});

	});
	
	$(document).ready(function(){

		$('.mini_4').hover(function(){
				$(".img_4", this).stop().animate({top:'0px', right:'-376px'},{queue:false,duration:300});  
			}, function() {  
				$(".img_4", this).stop().animate({top:'0px', right:'0px'},{queue:false,duration:300});  
			});

	});
	
	$(document).ready(function(){

		$('.mini_5').hover(function(){
				$(".img_5", this).stop().animate({bottom:'-119px', left:'-376px'},{queue:false,duration:300});  
			}, function() {  
				$(".img_5", this).stop().animate({bottom:'-2px', left:'0px'},{queue:false,duration:300});  
			});

	});
	
	$(document).ready(function(){

		$('.mini_6').hover(function(){
				$(".img_6", this).stop().animate({bottom:'-119px', right:'-376px'},{queue:false,duration:300});  
			}, function() {  
				$(".img_6", this).stop().animate({bottom:'-2px', right:'0px'},{queue:false,duration:300});  
			});

	});

/*********  Galerie slide horizontal *************/
var indexGalerie = 0;
var nbNodes = 0;
var maxNodesInDisplay = 0;
var largeur_bloc = 0;

$(document).ready(function(){
	nbNodes = $('.videos_secondaire_bloc').length;
	maxNodesInDisplay = nbNodes - 3;
  largeur_bloc = $('.videos_secondaire_bloc').eq(0).outerWidth();
	$('#videos_secondaire_content').width(nbNodes * largeur_bloc);
	
	moveGalerieTo();
});

function moveGalerieTo (direction){
	if(direction == "left") 
		indexGalerie--;
	else if(direction == "right") 
		indexGalerie++;
	
	if(indexGalerie <= 0){
		indexGalerie = 0;
		$('#left_slide > img').fadeOut();
		$('#right_slide > img').fadeIn();
	} else if(indexGalerie >= maxNodesInDisplay){
		indexGalerie = maxNodesInDisplay;
		$('#right_slide > img').fadeOut();
		$('#left_slide > img').fadeIn();
	} else {
		$('#left_slide > img').fadeIn(); 
		$('#right_slide > img').fadeIn();
	}
	
	$('#videos_secondaire_content').animate({'left': -1*indexGalerie * largeur_bloc + 'px'}, 200, 'swing');
}


/**************** Affichage des onglets de pages Instituts de formation *****************/
function displayDesc(id){
  var nbOnglet = 5;
  for(i=1;i<=nbOnglet;i++){
    if(i == id){
      $('#corps_onglet_'+i).show();
      $('#menu_onglet_'+i).addClass('li_selected');
    }else{
      $('#corps_onglet_'+i).hide();
      $('#menu_onglet_'+i).removeClass('li_selected');
    }
  }
}
