Html5 Boilerplate uses the following trick for fallback to locally stored JQuery if grabbing it from Google CDN fails:
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.2.js"%3E%3C/script%3E'))</script>
How would you implement this trick to perform the same trick for jQuery UI?