	var active = -1;
	var lock = 0;
function replie(active, suivant){
	lock = 1;
	$('.texteSpe').each(function(){
	if (this.numero == active){
	$(this).fadeOut("slow", function(){
			$('.carreSpe').each(function(){
				if (this.numero == active){
					$(this).animate({marginRight:"31.5em"},0);
					$('#spectacles3tout').animate({marginLeft:"17em"},'slow');
					$(this).animate({marginRight:"0.5em"},'slow', function(){
							if (suivant != 0){
									deplie(suivant);
								} else {
								lock = 0;
								active = -1;
								}
							});
						}
				});
			});
		}
	});	
}
function deplie(i){
$('.carreSpe').each(function(){
	if (this.numero == i){
		$('#spectacles3tout').animate({marginLeft:"2em"},'slow');
		$(this).animate({marginRight:"31.5em"},'slow', function(){
				lock = 0;
				active = i;
				$(this).animate({marginRight:"0.5em"},0, function(){
					$('.texteSpe').each(function(){
					if (this.numero == i){
							$(this).fadeIn("slow");
						}
					});
				});
			});
		}
	});
}
$(function(){
	var i = 1;
	$('.carreSpe').each(function(){
		this.numero = i;
		i++;
		});
	var i = 1;
	$('.texteSpe').each(function(){
		
		this.numero = i;
		i++;
		});
	$('.carreSpe').mouseover(function(){
		if (lock != 1 && active != -1 && active != this.numero){
			replie(active, this.numero);
			} else if (lock != 1 && active == -1) {
			lock = 1;
				deplie(this.numero);
				}
		});
	});

