;(function($) {
  $.fn.formMail = function() {
    var $form = this.eq(0);

    if (!$form.length) {
      return;
    }

    var formSubmit = function(e) {
      e.preventDefault();

      var url = $form.attr('action');
      var data = $form.serialize();

      $.ajax({
        url: url,
        method: 'post',
        data: data,
        dataType: 'json',
        success: function(data) {
          alert('Your email was sent!');
          $form.trigger('reset');
        },
        error: function(error) {
          alert('Failed to send email');
          console.error(error);
        }
      });
    };

    $form.on('submit', formSubmit);
  };

  $('#contactForm').formMail();
})(jQuery);

@@ -57,131 +57,57 @@
 form
+s
  = this
-.eq(0)
 ;%0A%0A    
-if (!$form.length) %7B%0A      return;%0A    %7D%0A%0A    var formSubmit = function(e) %7B%0A      e.preventDefault();%0A
+var formSubmit = function($form) %7B
 %0A   
@@ -543,37 +543,177 @@
     
-$form.on('submit', formSubmit
+return $forms.each(function() %7B%0A      var $this = $(this);%0A%0A      $this.on('submit', function(e) %7B%0A        e.preventDefault();%0A        formSubmit($this);%0A      %7D);%0A    %7D
 );%0A 

Change jQuery plugin structure