Parallax scrolling horizontal
<p>I dont know where to begin. The demo page is here: <a href="http://www.perandersen.no/sandbox/parallax/" rel="nofollow">http://www.perandersen.no/sandbox/parallax/</a></p>

<p>I use jQuery and the plugin scrollTo. Then I attach a function to the window.onscroll. Sorry it's a bit messy, but please help me optimize it. I am new to JavaScript:</p>

<pre><code>function scroll()
{
 var xPos = window.pageXOffset;


 var element = $("#wrapper");
 var newXPos = Math.abs(xPos /1.1);
 element.css( "left", newXPos );

 element = $("#snowboarder");
 var newXPos = Math.abs(xPos /1.5) + snowboarderPos.left;
 element.css( "left", newXPos );

 element = $("#elevator");
 var newXPos = Math.abs(xPos /1.9) + 2800;
 element.css( "left", newXPos );

  var element = $("#ballong");
 var newXPos = Math.abs(xPos /1.2) + balloonPos.left;
 element.css( "left", newXPos );

// $("#xpos").text(window.pageXOffset);
}
</code></pre>

<p>I set the snowboarderPos as a global in the beginning of the script tag som taht it is set before anything happends. On the Elevator object I have hard coded it in this version.</p>

<p>EDIT: Works best in Chrome with a faster processor... so it needs to be optimized.</p>
