Loading new version of jQuery without removing all bound to $ functions in async way
<pre><code>(function($){
    if(typeof $=='undefined' || $.fn.jquery!='1.6.4') {

        // Save jQuery
        var old_jquery=window.jQuery;               

        var head=document.getElementsByTagName('head')[0];
        var script=document.createElement('script');
        script.type='text/javascript';
        // script.async=true;
        script.src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js';
        head.appendChild(script);
        var loaded=false;
        script.onload=script.onreadystatechange=function(){
            if(loaded) {
                return;
            }
            loaded=true;
            // console.log('old jQuery:',old_jquery,old_jquery.fn.jquery);

            // Avoid conflicts and previous functions erase
            $=window.widget$=window.$.noConflict();
            window.jQuery=window.$=old_jquery;

            // console.log('new jquery version:',window.widget$.fn.jquery);

            self.init();
        }
    }
})((typeof jQuery=='undefined') ? undefined : jQuery);
</code></pre>

<p>Here is sync example of doing it, but how to do it in async way? Is there a way to do some stuff before jQuery will take it's jQuery variable and $ as well? If only it could support some flags, so that it won't overwrite current $ and jQuery if there is a variable set as a flag.</p>
