title: Check if correct e-mail was entered
body: <p>I have a field for users to write their e-mail address in. It is optional, so I need to first check if something was entered in the field, if nothing was entered then do nothing, but if something was entered than check if it is an e-mail.</p>
  
  <p>Right now I'm at this point</p>
  
  <pre><code>var email = $("input#sc_email").val();  
  if (email == "") {                
      // If e-mail field is empty do nothing
  } else {                          
       // If something was entered
      // [CODE HERE] Check if valid e-mail was entered, if not show error message
      $("label#email_error").show(); //error message
      $("input#sc_email").focus();   //focus on email field
      return false;  
  } 
  </code></pre>
  
  <p>I'm not even sure if that is right, but I think it is. Right now I need help with gaps in code, I marked them as <code>[CODE HERE]</code>. Could anyone suggest a solution please.</p>