// JavaScript Document

$(function(){
		
		  $('#foreground').css({backgroundPosition: '0px 0px'});
		  $('#midground').css({backgroundPosition: '0px 0px'});
		  $('#background').css({backgroundPosition: '0px 0px'});
		
			$('#foreground').animate({
				backgroundPosition:"(-10000px 0px)" // -10000px outputs the direction to move the image. 0px means it will move in a horizontal pattern
			}, 120000, 'linear'); // The large number outputs the speed that the image will move in thousands of a second
			
			$('#midground').animate({
				backgroundPosition:"(10000px 0px)" 
			}, 340000, 'linear');
			
			$('#background').animate({
				backgroundPosition:"(-10000px -2000px)" // In this example, the -2000px is being ignored per below
			}, 0, 'linear'); // The 0 is moving image at a pace of 0 sec so it's in effect not moving at all
			
		});
