'use strict'; Ox.load.UI = function(options, callback) { options = Ox.extend({ hideScreen: true, loadImages: true, showScreen: false, theme: 'classic' }, options); var browsers = [ { name: 'Chrome Frame', url: 'http://www.google.com/chromeframe/' }, { name: 'Chrome', regexp: /Chrome\/(\d+)\./, url: 'http://www.google.com/chrome/', version: 10 }, { name: 'Firefox', regexp: /Firefox\/(\d+)\./, url: 'http://www.mozilla.org/firefox/', version: 4 }, { name: 'Safari', regexp: /Version\/(\d+).*? Safari/, url: 'http://www.apple.com/safari/', version: 5 }, { name: 'Internet Explorer', url: 'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', version: 9 } ], browserSupported = false, imageNames = {}, imageURLs = {}, isInternetExplorer = /MSIE/.test(navigator.userAgent), loadingInterval; browsers.forEach(function(browser) { var match = browser.regexp && browser.regexp.exec(navigator.userAgent); if (match && match[1] >= browser.version) { browserSupported = true; } }); Ox.documentReady(function() { Ox.$('body').addClass( 'OxTheme' + Ox.toTitleCase(options.theme || 'classic') ); options.showScreen && showScreen(); }); loadFiles(); function showScreen() { var body = Ox.$('body'), css = { position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, margin: 'auto', MozUserSelect: 'none', WebkitUserSelect: 'none' }, div = Ox.$('