
////////////////////////////////////////////////////////////////// INDIC

slider=new Object();
slider.init=function(){
	
	depart=1;
	$("#f1").stop().animate({left: "-27"}, 150);
	ancien=$("#f1");
	
	$('#h1').css("cursor","pointer");
	$('#h2').css("cursor","pointer");
	$('#h3').css("cursor","pointer");
	$('#h4').css("cursor","pointer");
	$('#h5').css("cursor","pointer");
	
	
///////////////////////////////////////////////////////////////// H1
	$('#h1').mouseover(function() {
		if(depart!=1){
			$("#f1").stop().animate({left: "-27"}, 150);
		};
	});
	
	$('#h1').mouseout(function() {
		if(depart!=1){
			$("#f1").stop().animate({left: "0"}, 150);
		};
	});
	
	$('#h1').click(function() {
		if(depart!=1){
			ancien.stop().animate({left: "0"}, 150);
			ancien=$("#f1");
			depart=1;
			$('#IMGS').stop().animate({top: (depart-1)*-270}, 250);
			p=1;
		};
	});
	
///////////////////////////////////////////////////////////////// H2
	$('#h2').mouseover(function() {
		if(depart!=2){
			$("#f2").stop().animate({left: "-27"}, 150);
		};
	});
	
	$('#h2').mouseout(function() {
		if(depart!=2){
			$("#f2").stop().animate({left: "0"}, 150);
		};
	});
	
	$('#h2').click(function() {
		if(depart!=2){
			ancien.stop().animate({left: "0"}, 150);
			ancien=$("#f2");
			depart=2;
			$('#IMGS').stop().animate({top: (depart-1)*-270}, 250);
			p=2;
		};
	});
	
///////////////////////////////////////////////////////////////// H3
	$('#h3').mouseover(function() {
		if(depart!=3){
			$("#f3").stop().animate({left: "-27"}, 150);
		};
	});
	
	$('#h3').mouseout(function() {
		if(depart!=3){
			$("#f3").stop().animate({left: "0"}, 150);
		};
	});
	
	$('#h3').click(function() {
		if(depart!=3){
			ancien.stop().animate({left: "0"}, 150);
			ancien=$("#f3");
			depart=3;
			$('#IMGS').stop().animate({top: (depart-1)*-270}, 250);
			p=3;
		};
	});

///////////////////////////////////////////////////////////////// H4
	$('#h4').mouseover(function() {
		if(depart!=4){
			$("#f4").stop().animate({left: "-27"}, 150);
		};
	});
	
	$('#h4').mouseout(function() {
		if(depart!=4){
			$("#f4").stop().animate({left: "0"}, 150);
		};
	});
	
	$('#h4').click(function() {
		if(depart!=4){
			ancien.stop().animate({left: "0"}, 150);
			ancien=$("#f4");
			depart=4;
			$('#IMGS').stop().animate({top: (depart-1)*-270}, 250);
			p=4;
		};
	});


///////////////////////////////////////////////////////////////// H5
	$('#h5').mouseover(function() {
		if(depart!=5){
			$("#f5").stop().animate({left: "-27"}, 150);
		};
	});
	
	$('#h5').mouseout(function() {
		if(depart!=5){
			$("#f5").stop().animate({left: "0"}, 150);
		};
	});
	
	$('#h5').click(function() {
		if(depart!=5){
			ancien.stop().animate({left: "0"}, 150);
			ancien=$("#f5");
			depart=5;
			$('#IMGS').stop().animate({top: (depart-1)*-270}, 250);
			p=5;
		};
	});
	
};

//////////////////////////////////////////////////////////////////// ROTATOR

rot = new Object;
rot.init = function() {
	
	p=1;
	
	var rotator = setInterval(function rot() { 
		
		p++;
		if(p>=6){
			p=1;
		};
		
		$("#f"+p).stop().animate({left: "-27"}, 250);
		
		ancien.stop().animate({left: "0"}, 150);
		ancien=$("#f"+p);
		
		depart=p;
		$('#IMGS').stop().animate({top: (depart-1)*-270}, 650);
	  
   	}, 3000); 
	
};

