jQuery Tools Validation and double submit
<p>I am trying to prevent a double submit with jQuery Tools Validation and, given the onFail we are using here, I am having some trouble. Any ideas? Tried using a timer/timeout, but that's really just a terrible solution.</p>

<pre><code>$("form").submit(function(){
    $('input[type=submit]').click(function(event){
        event.preventDefault();
    });
});

$("form").bind("onFail", function(e, errors)  {
    // we are only doing stuff when the form is submitted
    if (e.originalEvent.type == 'submit') {
        // loop through Error objects and add the border color
        $.each(errors, function()  {
            var input = this.input;
            input.stop(true).effect("shake", { times:3 }, 75);
            input.css({borderColor: '#D94E27'}).focus(function()  {
                input.css({borderColor: '#444'});
            });
        });
    }
});


$("form").validator({
    message: '&lt;div class="errormessages"&gt;&lt;/div&gt;',
    position: 'center right',
    offset: [0, 0]
});
</code></pre>
