Cannot get JQuery plugin working on Drupal 7 I am trying to run a Jquery plugin QTip. The problem is that it is not running even though all the files are in the corect folders (plugin is both in info file and attched as a script below) and I took the code below from the plugin's website and pasted in the html section of WYSYWIG editor. Can anyone tell me why this is the case?

&lt;script type="text/javascript" src="/sites/all/themes/bf/js/jquery.qtip.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;// &lt;![CDATA[

// Create the tooltips only on document load
$(document).ready(function() 
 {
// By suppling no content attribute, the library uses each elements title attribute by default
 $('#content a[href]').qtip({
  // Simply use an HTML img tag within the HTML string
  content: 'dfdfdfdfdf'
   });
});
// ]]&gt;&lt;/script&gt;
&lt;div id="content"&gt;
&lt;a href="dddf.html"&gt;Why this not working&lt;/a&gt;
&lt;/div&gt;
From the Drupal 7 upgrade guide:


  Javascript should be made compatible with other libraries than jQuery
  by adding a small wrapper around your existing code:


(function ($) {   
      // Original JavaScript code. 
})(jQuery);



  The $ global will no longer refer to the jquery object. However, with
  this construction, the local variable $ will refer to jquery, allowing
  your code to access jQuery through $ anyway, while the code will not
  conflict with other libraries that use the $ global.


(function ($) {
  // Create the tooltips only on document load
  $(document).ready(function() {
    // By suppling no content attribute, the library uses each elements title attribute by default
    $('#content a[href]').qtip({
      // Simply use an HTML img tag within the HTML string
      content: 'dfdfdfdfdf'
    });
  });
})(jQuery);