title: conditional loading of jquery and jquery UI issues
body: <p>The following works perfectly:</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;!window.jQuery &amp;&amp; document.write(unescape('%3Cscript src="/scripts/jquery-1.6.2.min.js"%3E%3C/script%3E'))&lt;/script&gt;
  </code></pre>
  
  <p>However, doing the same for Jquery UI (but with the change to window.ui - this should be right but I'm not 100% sure) does not work - actually it loads the local version every time not just when CDN file is not available (per Firebug):</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;!window.ui &amp;&amp; document.write(unescape('%3Cscript src="/scripts/jquery-ui-1.8.14.min.js"%3E%3C/script%3E'))&lt;/script&gt;
  </code></pre>
  
  <p>It does load the local version when network is unavailable but also when the CDN version is loaded (which means unnecessary double loading).</p>
  
  <p>?</p>