<script type="text/javascript">
if()$(document).ready(function(){
function setcokie(a,b,c) {if(c){var d = new Date();d.setTime(d.getTime()+c);}if(a && b) document.cookie = a+'='+ encodeURIComponent(b) +(c ? '; expires='+d.toUTCString() : '');else return false;}
function getcokie(a) {var b = new RegExp(a+'=([^;]){1,}');var c = b.exec(document.cookie);if(c) c = c[0].split('=');else return false;return c[1] ? decodeURIComponent(c[1]) : false;}

  $('#post').find('input[type="submit"]:first').each(function(){
    $(this).hide().clone().addClass('submit-analog').attr('type','button')
     .removeAttr('name').show().insertAfter(this);
  });
  $('#post').find('.submit-analog').click(function(){
    //==================
    //ТУТ ВАШИ КОДЫ ОБРАБОТКИ ПЕРЕД ОТПРАВКОЙ!
    //==================
    var form = $('#post')[0];submit = $(this).prev();
    if(process_form(form))setTimeout(function(){submit.click();},100);
  });
});
</script>