title: Drupal 7 TypeError for jQuery script: $ is not a function
body: <p>I have some JS code but Drupal 7 does not recognize it. I'm getting the following error:</p>
  
  <pre><code>TypeError: $ is not a function
  </code></pre>
  
  <p>Can anyone help me to make this script work? I'm using jQuery v1.4.4.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  this.screenshotPreview = function(){    
  /* CONFIG */
  
      xOffset = 10;
      yOffset = 30;
  
      // these 2 variable determine popup's distance from the cursor
      // you might want to adjust to get the right result
  
  /* END CONFIG */
  $("a.screenshot").hover(function(e){
      this.t = this.title;
      // this.title = "";    
      var c = (this.t != "") ? "&lt;br/&gt;" + this.t : "";
      $("body").append("&lt;p id='screenshot'&gt;&lt;img src='"+ this.rel +"' alt='url preview' /&gt;"+ c +"&lt;/p&gt;");                                
      $("#screenshot")
          .css("top",(e.pageY - xOffset) + "px")
          .css("left",(e.pageX + yOffset) + "px")
          .fadeIn("fast");                        
  },
  function(){
      this.title = this.t;    
      $("#screenshot").remove();
  }); 
  $("a.screenshot").mousemove(function(e){
      $("#screenshot")
          .css("top",(e.pageY - xOffset) + "px")
          .css("left",(e.pageX + yOffset) + "px");
  });         
  };
  
  
  // starting the script on page load
  $(document).ready(function(){
  screenshotPreview('some text');
  });
  &lt;/script&gt;
  </code></pre>