Edit on
<container>
	<div class="clouds">
	  <img src="https://dl.dropboxusercontent.com/u/6801572/clouds.png" alt="" width="2400" height="305" />
	</div>
	
	<div class="terrain">
	  <img src="https://dl.dropboxusercontent.com/u/6801572/terrain.png" alt="" width="2400" height="305" />
	</div>
</container>
<script>
  // Scripts will all go here, after other HTML markup
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://whowasthere.co/jquery.animateSprite.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.16.1/TweenMax.min.js"></script>
body { margin: 0; padding: 0; background: #000;}
container { display: block; margin: 0 auto; padding:0; background: #a9daf8;}

.terrain, .clouds{
    z-index: 50;
    position: absolute;
    top: 200px;
    left:0px;
    white-space: nowrap;
}
.terrain img, .clouds img{
    margin: 0 -.125em;
    padding: 0;
}
.clouds{
    z-index: 5;
    top: 0px;
}

.mark {
    height: 70px;
    width: 24px;
    background-image: url(https://dl.dropboxusercontent.com/u/6801572/mark.png);
    z-index: 100;
    position: absolute;
    top:360px;
    left:100px;
}
var $body, $screen;

$(function(){
  $body = $("body");
  $screen = $("container");

  $(window).on("resize", function(){
    updateScreen();
  });

  $(window).on("keypress", function(event){
    handleKeyPress(event);
  });

  updateScreen();
  init();
});

function updateScreen(){
	$screen.css({'width':window.innerWidth, 'height': window.innerHeight});
}

function init(){
	$body.append("<div class=mark></div>");
	
	$(".mark").animateSprite({
		fps: 5,
		animations: {
			walkRight: [0,1,2,3,4,5 ],
			walkLeft:  [6,7,8,9,10,11 ]
		},
		loop: true
	});
	
	$(".mark").animateSprite('play', 'walkRight');
	
	$('.terrain img').clone().appendTo(".terrain");
	$('.clouds img').clone().appendTo(".clouds");
	
	scrollStart();
}

function scrollStart(){
	TweenMax.to( $(".terrain"), 35, 
		{
		 x: "-2400px", 
		 ease: Linear.easeNone,
		 repeat: -1
		}
	);
	
	TweenMax.to( $(".clouds"), 75, 
		{
		 x: "-2400px", 
		 ease: Linear.easeNone,
		 repeat: -1
		}
	);
}

function handleKeyPress(event){
	var keycode = (event.keyCode ? event.keyCode : event.which);
	log("Key pressed was " + String.fromCharCode(keycode));
}
Rerun