jQuery(function() {
	jQuery('#header-parallax').jparallax(
		{},		//Parallax options
		{},		//Layer header_ciel options
		{},		//Layer header_nuages_petits options
		{yparallax: false, xparallax: false},		//Layer header_logo options
		{},		//Layer header_montagne options							
		{}		//Layer header_nuages_gros options
	);
	jQuery('#header-parallax li').css('-moz-border-radius', '50px 50px 0 0');
	
	var parallaxAutoAnim = function() {
		var nuagesPetitsLeft = function() {
				jQuery('#header_nuages_petits img').animate({
					left: '850px'
				}, 100000, 'linear', function() {
					nuagesPetitsRight();
				});
			},
			nuagesPetitsRight = function() {
				jQuery('#header_nuages_petits img').css('left', '-650px');
				
				nuagesPetitsLeft();
			},
			nuagesGrosLeft = function() {
				jQuery('#header_nuages_gros img').css('left', '850px');
				
				nuagesGrosRight();
			},
			nuagesGrosRight = function() {
				jQuery('#header_nuages_gros img').animate({
					left: '-930px'
				}, 100000, 'linear', function() {
					nuagesGrosLeft();
				});
			},
			groundLeft = function() {
				jQuery('#header_ground img').css('left', '-850px');
				
				groundRight();
			},
			groundRight = function() {
				jQuery('#header_ground img').animate({
					left: '800px'
				}, 100000, 'linear', function() {
					groundLeft();
				});
			};
			
		nuagesPetitsLeft();
		nuagesGrosRight();														
		groundRight();
	};
	
	new parallaxAutoAnim();				
});
