// JavaScript Document
$(document).ready(function() {
	
	i=0;j=0;
	var tableau = new Array();
	var tableau2 = new Array();
	$(".case1 img").hover(function(){
		var  nb = Math.floor(Math.random() * 27);
		tableau[nb]=nb;
			
		taille = tableau.length;
		
		for(k=1;k<taille;k++){
		
			if(typeof tableau[k]!="undefined"){
				if(tableau[k]!=nb){
					valider=true;
				}else{
					valider=false;
				}
			}
		}
	
		if(valider==true){
		
		}else{
			nb=0;	
		}
		
		if(taille<27){
			j=j+1;
		}else{
			j=0;	
		}
		
	
		if(j==5){
			nb=0;
			j=0;	
		}
		if(nb<10){ nb="0"+nb; }
		$(this).attr('src', "img/accueil/imageC_0"+nb);
		return false;
	});		
	$(".case2 img").hover(function(){
		var nb = Math.floor(Math.random() * 40);
	
		
		taille2 = tableau2.length;
		
		if(taille2<40){
			i=i+1;
		}else{
			i=0;	
		}
		
		if(i==5){
			nb=0;
			i=0;	
		}
		if(nb<10){ nb="0"+nb; }
		$(this).attr('src', "img/accueil/imageR_0"+nb);
		return false;
	});		
	
		
	
		
});
