jQuery(document).ready(function(){		
	/* Presentator */
	$("#slider").easySlider({
		auto: true,
		pause: 7000,
		speed: 1600,
		controlsShow: false,
		continuous: true
	});
	
	var slider_two = $("#titles").easySlider({
		auto: false,
		controlsShow: true,
		continuous: false,
		vertical: true,
		start_stop_button: 'startstop',
		start_stop_pause: 600,
		speed: 800
	});
	
	var status = 0;
	var _innerhtml_0 = '<span></span><img src="img/media-playback-start.png" title="C\'est parti!" /> C\'est parti!</a>';
	var _innerhtml_1 = '<span></span><img src="img/media-playback-stop.png" title="J\'en ai vu assez!" /> J\'en ai vu assez!</a>';
	
	var mask = $("#mask");
	var mask_content = mask.find("ul");
	mask_content.css("opacity",0);
	
	$("#startstop").click(function(el){		
		if(status == 0){
			status = 1;
			$(this).animate(
				{ marginLeft: 254 }, 
				{ queue:false, duration: 800 }
			);
			mask.animate(
				{ marginLeft: 236 },			
				{ queue:false, duration: 800 }
			);			
			mask_content.animate(
				{ opacity: 1 },			
				{ queue:false, duration: 1000 }
			);
			$(this).find("li a").html(_innerhtml_1);
		}else{
			status = 0;
			mask.animate(
				{ marginLeft: 440 },			
				{ queue:false, duration: 800 }
			);
			mask_content.animate(
				{ opacity: 0 },			
				{ queue:false, duration: 600 }
			);
			$(this).animate(
				{ marginLeft: 456 }, 
				{ queue:false, duration: 800 }
			);
			$(this).find("li a").html(_innerhtml_0);
		}
	});
});
