title: cycling an array of images is stopped after the first cycle
body: <pre><code>var arr = $("#w01 &gt; img").toArray(); // array created from images in a div
  $('.btns .next').click(function(){
      var first = arr[0];
      arr.push(arr.shift(first)); //moves the first image at the bottom of the stack
      $(arr[0]).show(); //shows the next image
  });
  </code></pre>
  
  <p>It works, but when the last image is reached, the process is stopped, instead of displaying the first image again, in an endless cycle !?</p>