title: Custom jQuery Functions and Arguments
body: <p>I have written this scirpt:</p>
  
  <pre><code> $(document).ready(function () {
     $('#tb1 li').hover(function () {
      var head = $(this).attr("title");
      var image = $(this).find("a").attr("rel");
      $('.aCnt img').attr("src", image);
      $('.aCnt span').html(head);
  
     });
      $('#tb1 li').eq(0).hover();
  }); 
  </code></pre>
  
  <p>I want to make this script global</p>
  
  <pre><code>function interActive(myID, myClass){
      ID = '#' + myID;
      cls = '.' + myClass;
       $('ID li').hover(function () {
      var head = $(this).attr("title");
      var image = $(this).find("a").attr("rel");
      $('cls img').attr("src", image);
      $('cls span').html(head);
  
     });
      $('ID li').eq(0).hover();
  }
  </code></pre>
  
  <p>I know that jQuery function not similar to for example php functions. The <code>interActive</code> functions will not work in jQuery. How can I modify this function for jQuery?
  Thanks in advance.</p>