Broken Foursquare like animate feed
<p>HI, </p>

<p>For some reason, the function 'shift()' is not being defined properly according to the firebug console tab.  I took this directly from a tutorial, not sure what I'm doing wrong here. </p>

<pre><code>//animate post feed cycle
 var delay = 2000; // you can change it
  var count = 3; // How much items to animate
  var showing = 2; //How much items to show at a time
  var i = 0;
  function move(i) {
    return function() {
      $('.feed'+i).remove().css('display', 'none').prependTo('#recent_listings');
    }
  }
  function shift() {
    var toShow = (i + showing) % count;
    $('.feed'+toShow).slideDown(1000, move(i));
    $('.feed'+i).slideUp(1000, move(i));
    i = (i + 1) % count;
    setTimeout('shift()', delay);
  }    

 setTimeout('shift()', delay);
</code></pre>

<p>The markup looks like this (the double brackets are django context variables)</p>

<pre><code>    &lt;div id="recent_listings"&gt;
    &lt;h2&gt;Recent Listings&lt;/h2&gt;
    {% for post in posts %}
        &lt;div class="entries feed{{forloop.counter}}"&gt;
        &lt;a href="{{post.get_absolute_url}}"&gt;
        &lt;div class="photo"&gt;
        &lt;img src="{{site}}media/no-image.png"&gt;&lt;/img&gt;
        &lt;/div&gt;
        &lt;div class="listings"&gt;
            &lt;div class="title"&gt;
            &lt;h3&gt;{{post.title|truncatewords:5}}&lt;/h3&gt;
             &lt;/div&gt;
       &lt;/div&gt;
           &lt;/div&gt;
{% endfor %}
&lt;/div&gt;
</code></pre>

<p>Thanks for the help!</p>
