title: if statement echo out different links for different codes
body: <p>I am using this code </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="message"&gt;some message&lt;/div&gt;
  &lt;input type="text" id="myInput" /&gt;​    
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>$(function() {
  $("#message").hide();
  $("#fail").hide();
  
  var prefix = ['HX', 'HD', 'BD', 'LS']
  
  $('#myInput').keyup(function(e) {
      var value = $(this).val();
      var firstTwo = value.substr(0,2);
      var firstTwoUpper = firstTwo.toUpperCase();
  
      if(firstTwo != firstTwoUpper) {
          $(this).val( value.replace(/^\w\w/, firstTwoUpper) );
      }
      if(value.length &gt; 1) {
          if($.inArray(firstTwoUpper, prefix) &gt;= 0) {
              $("#fail").hide();
              $("#message:hidden").fadeIn();
          } else {
              $("#message").hide();
              $("#fail:hidden").fadeIn();
          }
      } else {
          $("#message").hide();
          $("#fail").hide();
      }
   });
  });
  </code></pre>
  
  <p>​
  To be a post code check.  I got the above code from      here:    <a href="https://stackoverflow.com/questions/2896418/jquery-check-array-perform-function/24780023#24780023">Jquery check array perform function</a> and it works just fine but I want to display a message containing a link which all differ from one another. For example I want code 'HX' to link to facebook and I want 'BD' to link to the BBC.  How would I write the if statement correctly? I have tried various ways but I am not achieving what I need.</p>
  
  <p>Could someone give me a little guideance please?</p>
  
  <p>Thanks,</p>
  
  <p>Ben.</p>