Changing Background Image with set Interval
<p>I've got the following function which changes that background image of 4 classes so one background goes green and then another making a loading bar:</p>

<pre><code>clearInterval(start);
var i = 0;
function boxes() {

    in_loading = ".in_loading:eq("  + i + ")";

    $(".in_loading").css("background", "url(images/load_bar_green.png)  no-repeat");    
    $(in_loading).css("background", "url(images/load_bar_blue.png)  no-repeat");        

    if(i == 3) {
        i = 0;
    } else {
        i++;
    }

}
var start = setInterval(function() {
    boxes();
}, 350);
</code></pre>

<p>When I keep clicking the submit button the 'flashing' alters as if their is 2 or more functions going at once. I've tried using remove() and display() but what I think I need is something to delay the start of the function and to 'clear' the function so multiple clicks doesn't screw it up!</p>

<p>Cheers
Sam</p>
