/* |------------------------------------------| | MelonHTML5 - Royal Preloader | |------------------------------------------| | @author: Lee Le (lee@melonhtml5.com) | | @version: 1.07 (22 Feb 2014) | | @website: www.melonhtml5.com | |------------------------------------------| */ window.requestAnimFrame = function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { window.setTimeout(a, 1E3 / 60) } }(); var Royal_Preloader = { _overlay: null, _overlay_bg: null, _loader: null, _name: null, _percentage: null, _on_complete: null, _text_loader: null, _text_loader_overlay: null, _logo_loader: null, _logo_loader_meter: null, _total: 0, _loaded: 0, _image_queue: [], _percentage_loaded: 0, _mode: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._mode ? Royal_Preloader._mode : "number" }(), _text: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._text ? Royal_Preloader._text : "loading..." }(), _opacity: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._opacity ? Royal_Preloader._opacity : 1 }(), _images: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._images ? Royal_Preloader._images : {} }(), _show_info: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._show_info ? Royal_Preloader._show_info : !0 }(), _show_percentage: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._show_percentage ? Royal_Preloader._show_percentage : !0 }(), _background: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._background ? Royal_Preloader._background : ["#000000"] }(), _logo: function() { return "undefined" !== typeof Royal_Preloader && "undefined" !== typeof Royal_Preloader._logo ? Royal_Preloader._logo : "none" }(), _timeout: 10, _use_css_animation: !0, _css3SupportDetect: function() { var a = document.body.style; if ("string" == typeof a.transition) return Royal_Preloader._use_css_animation = !0; for (var b = ["Webkit", "Moz", "Khtml", "O", "ms"], c = 0; c < b.length; c++) if ("string" == typeof a[b[c] + "Transition"]) return Royal_Preloader._use_css_animation = !0; return Royal_Preloader._use_css_animation = !1 }, _init: function() { Royal_Preloader._css3SupportDetect(); Royal_Preloader._total = 0; $.each(Royal_Preloader._images, function() { Royal_Preloader._total++ }); Royal_Preloader._build(); Royal_Preloader._load() }, _build: function() { this._overlay = $("