Load event called way too often
<p>I want to reload an image once it has been loaded. Here is my code:</p>

<pre><code>$(function () {
    function reload() {
        console.log('Inside reload');
        var srcImage = 'http://cam2.camvine.com/axis-cgi/jpg/image.cgi?resolution=320x240' + '&amp;d=' + (new Date()).getTime();

        $('img')
            .attr('src', srcImage)
            .load(function () {
                setTimeout(reload, 500);
            })
            .error(function () {
                setTimeout(reload, 1000);
            });
    }

    reload();
});
</code></pre>

<p>For some reason, the <code>load</code> event gets called tens of times per second, eventually freezing my browser. <a href="http://jsfiddle.net/kdHD4/1/" rel="nofollow">Here</a> is a fiddle. What am I doing wrong?</p>
