Load jquery if its not already loaded and use local version if no connection is avalible
<pre><code>&lt;script type="text/javascript"&gt;
if (typeof jQuery == 'undefined') {
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
&lt;/script&gt;
</code></pre>

<p>Here is my current code. Is there any way to load a local copy of the jquery lib, if <code>script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"</code> fails? And is this script loaded asynchronous? Or will it freeze the ui thread until loaded?</p>
