Need to change jquery from random image to sequence
<p>so it's pre loading images</p>

<pre><code>  var headerImages = [
       'images/logoa.png',
       'images/logob.png',
       'images/logoc.png',
       'images/logod.png',
       'images/logoe.png',
       'images/logog.png',
       'images/logoh.png',
       /* 'images/logoi.png', */
       'images/test/logoa.png',
       'images/test/logob.png'];
</code></pre>

<p>and then picking a random one on each page scroll, how do I make it  in sequence, meaning from top to bottom of the pre load?</p>

<pre><code>....

jQuery.preLoadImages(headerImages);


jQuery(window).scroll(function() {
  jQuery('#sidebar').css('backgroundImage', 'url(' +
headerImages[Math.floor(Math.random()*headerImages.length)] + ')');
});
</code></pre>

<p>So I guess it's this part <code>Math.floor(Math.random()*headerImages.length)</code> but I have no idea what to do..</p>

<p>Thanks a lot for your help!</p>
