I recommend a generic solution so you don't have to add the code for every form. Use the jquery form plugin (http://jquery.malsup.com/form/) and add this code.
$(function(){
$('form.ajax_submit').submit(function() {
$(this).ajaxSubmit();
//validation and other stuff
return false;
});
});