jQuery is not defined
<p>I <strong>have to use an external js file, in which I load the jquery</strong>. My js file look like this:</p>

<pre><code>    document.write('&lt;script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"&gt;&lt;/script&gt;');

    (function($) {
        $(document).ready(function() {
            alert('it works!!');
        });
    })(jQuery);
</code></pre>

<p>On the firefox console I get the "jQuery is not defined" and I think it is because the jQuery library is loaded after the $ function from my js file.</p>

<p>Do you have any idea about how can I fix this? If I run the script from the FF console all works fine.</p>
