Restarting from beginning after clearInterval
<p><a href="http://dl.dropbox.com/u/2953799/test.html" rel="nofollow">link to test site</a></p>

<p>I want to restart the animation from the beginning once it stops at the last image. I tried the code below but it won't return to the first image. </p>

<pre><code>$(document).ready(function () {
    window.setInterval("slideshow()", 3000);
});

function slideshow() {
    var time = window.setInterval("slideshow()", 3000);
    next = $(".next");
    inside = parseInt($(".inside").css("left"));

    if (inside == -3080) {
        window.clearInterval(time);
        inside == 0;
    }
    else {
        next.trigger("click");
    }
}
</code></pre>
