title: jQuery doesn't work fully on a Firefox addon
body: <p>I've included jQuery by doing this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE window SYSTEM "chrome://orkutmanager/locale/browser.dtd"&gt;
      &lt;overlay id="omcore" 
           xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&gt;
  
      &lt;script type="application/x-javascript" src="../../jquery-1.4.2.js"/&gt;
      &lt;script type="text/javascript"&gt;jQuery.noConflict();&lt;/script&gt;
  
      &lt;script type="application/x-javascript" src="../../OM.js"/&gt;
  
  &lt;/overlay&gt;
  </code></pre>
  
  <p>Here is my chrome.manifest</p>
  
  <pre><code>content orkutmanager    chrome/content/
  overlay chrome://browser/content/browser.xul chrome://orkutmanager/content/XUL/Browser/Core.xul
  
  skin orkutmanager classic skin/
  
  locale orkutmanager en-US locale/en-US/
  </code></pre>
  
  <p>And then I tried to use</p>
  
  <pre><code>gBrowser.addEventListener('DOMContentLoaded',
      function (e)
      {
          var contentWindow = e.originalTarget.defaultView;
          var contentDocument = contentWindow.document;
  
          var $ = jQuery;
  
          var x = $("a", contentDocument).attr("onclick"); //
          // Error: uncaught exception: unknown (can't convert to string)
  
      }, false);
  </code></pre>
  
  <p>While</p>
  
  <pre><code>$("a", contentDocument).get(0).getAttribute("onclick");
  </code></pre>
  
  <p>Works normal.</p>
  
  <p>Do I have to include jQuery in a different way? How can I make it work as usual?
  Is there another jQuery method to get the value of an attribute?</p>
  
  <p>On a normal case it works, <a href="http://jsfiddle.net/PJ4F5/" rel="nofollow noreferrer">example here</a>.</p>