$(document).ready(function() {
  $("#contactForm").submit(function() {
    // validate the first and last name fields before submission
    var f = $("#fname").val() ;
    var l = $("#lname").val() ;
    
    var e = "" ;
    
    if (f == "") e += "\nFirst name is a required field" ;
    if (l == "") e += "\nLast name is a required field" ;
    
    if (e != "") {
      e = "Whoops!\n\nWe detected the following issue(s):\n" + e + "\n\nPlease "
         + "correct the issue(s) listed and re-submit the form."  ;
      alert(e) ;
      return false ;
    }
    return true ;
  });
  
  var x = $("#secQuestion label span").html() ;
  if (x != null) {
    var y = x.replace("How do you spell", "Spell") ;
    y = y.replace("?", ":") ;
    $("#secQuestion label span").html(y) ;
  }
});
