/**
 * @author Steve Clason steve@steveclason.com
 */

$(document).ready(function() {
  // validate contact form on keyup and submit
    var validateForm = $("#contactUs").validate({
    rules: {
      email: {
        required: true,
        email: true },
      message: "required"
    },
    messages:{
      email: "<br />Please enter a vaild email address.",
      message: "<br />Surely you have more to say than that."
    },
    errorPlacement: function(error, element) {
      error.appendTo(element.parent());
    },
    submitHandler: function() {
      // Use the alert handler for testing.
      //alert("Submitted!");
      document.contactUs.submit();
    }
  });
});
