/* Utility function to load scripts that could not be retrieved from the cdn */ var siteUtil = { backupLoader : function siteUtil_backupLoader(testProperty, scriptUri) { if (window[testProperty] == null) { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'scripts/' + scriptUri; var ref = siteUtil.backupLoader.ref = siteUtil.backupLoader.ref || document.getElementById('backuploader'); ref.parentNode.insertBefore(script, ref); } } }; /* If the cdns for these don't work, whatever the reason, * we load the local versions ... */ siteUtil.backupLoader('jQuery', 'jquery-1.9.1.min.js');