title: JS - jQuery inarray ignoreCase() and contains()
body: <p>well, I am more of a PHP person, and my JS skills are close to none when it comes to any JS other than simple design related operations , so excuse me if I am asking the obvious .</p>
  
  <p>the following operations would be a breeze in PHP (and might also be in JS - but I am fighting with unfamiliar syntax here ...)</p>
  
  <p>It is some sort of input validation</p>
  
  <pre><code>var ar = ["BRS201103-0783-CT-S", "MAGIC WORD", "magic", "Words", "Magic-Word"];
  
      jQuery(document).ready(function() {
          jQuery("form#searchreport").submit(function() {
          if (jQuery.inArray(jQuery("input:first").val(), ar) != -1){ 
                  jQuery("#contentresults").delay(800).show("slow");
  
              return false;
            }
  </code></pre>
  
  <p>This question has 2 parts .</p>
  
  <ul>
  <li>1 - how can I make it possible for the array to be case insensitive ?</li>
  </ul>
  
  <p>E.g. - <code>BRS201103-0783-CT-S</code> will give the same result as <code>brs201103-0783-ct-s</code> AND <code>Brs201103-0783-CT-s</code> or <code>MAGIC magic Magic MaGIc</code></p>
  
  <p>basically i need something like ignoreCase() for array , but I could not find any reference to that in jQuery nor JS...</p>
  
  <p>I tried <code>toLowerCase()</code> - but It is not working on the array (ittirating??) and also, would it resolve the mixed case ? </p>
  
  <ul>
  <li>2 - How can I make the function to recognize only parts or
  combinations of the elements ?</li>
  </ul>
  
  <p>E.g. - if one types only <code>"word"</code> , I would like it to pass as <code>"words"</code> , and also if someone types <code>"some word"</code> it should pass (containing "word" )</p>