/* ==============================================
    Avoid `console` errors in browsers that lack a console.
=============================================== */
(function() {
    var method;
    var noop = function() {};
    var methods = [
        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
        'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
    ];
    var length = methods.length;
    var console = (window.console = window.console || {});

    while (length--) {
        method = methods[length];

        // Only stub undefined methods.
        if (!console[method]) {
            console[method] = noop;
        }
    }
}());

/* ==============================================
    ire function once
=============================================== */
function once(fn, context) { 
    var result;

    return function() { 
        if(fn) {
            result = fn.apply(context || this, arguments);
            fn = null;
        }

        return result;
    };
}
/* ==============================================
    Detect if mobile device
=============================================== */

// var isMobile = false; //initiate as false
// // device detection
// if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0, 4))) isMobile = true;

! function(a) {
    var b = /iPhone/i,
        c = /iPod/i,
        d = /iPad/i,
        e = /(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,
        f = /Android/i,
        g = /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,
        h = /(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,
        i = /IEMobile/i,
        j = /(?=.*\bWindows\b)(?=.*\bARM\b)/i,
        k = /BlackBerry/i,
        l = /BB10/i,
        m = /Opera Mini/i,
        n = /(CriOS|Chrome)(?=.*\bMobile\b)/i,
        o = /(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,
        p = new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)", "i"),
        q = function(a, b) {
            return a.test(b)
        },
        r = function(a) {
            var r = a || navigator.userAgent,
                s = r.split("[FBAN");
            return "undefined" != typeof s[1] && (r = s[0]), this.apple = {
                phone: q(b, r),
                ipod: q(c, r),
                tablet: !q(b, r) && q(d, r),
                device: q(b, r) || q(c, r) || q(d, r)
            }, this.amazon = {
                phone: q(g, r),
                tablet: !q(g, r) && q(h, r),
                device: q(g, r) || q(h, r)
            }, this.android = {
                phone: q(g, r) || q(e, r),
                tablet: !q(g, r) && !q(e, r) && (q(h, r) || q(f, r)),
                device: q(g, r) || q(h, r) || q(e, r) || q(f, r)
            }, this.windows = {
                phone: q(i, r),
                tablet: q(j, r),
                device: q(i, r) || q(j, r)
            }, this.other = {
                blackberry: q(k, r),
                blackberry10: q(l, r),
                opera: q(m, r),
                firefox: q(o, r),
                chrome: q(n, r),
                device: q(k, r) || q(l, r) || q(m, r) || q(o, r) || q(n, r)
            }, this.seven_inch = q(p, r), this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch, this.phone = this.apple.phone || this.android.phone || this.windows.phone, this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet, "undefined" == typeof window ? this : void 0
        },
        s = function() {
            var a = new r;
            return a.Class = r, a
        };
    "undefined" != typeof module && module.exports && "undefined" == typeof window ? module.exports = r : "undefined" != typeof module && module.exports && "undefined" != typeof window ? module.exports = s() : "function" == typeof define && define.amd ? define("isMobile", [], a.isMobile = s()) : a.isMobile = s()
}(this);


/* ==============================================
    matchMedia() polyfill - Test a CSS media
    type/query in JS. Authors & copyright (c) 2012
=============================================== */

window.matchMedia || (window.matchMedia = function() {
    "use strict";

    // For browsers that support matchMedium api such as IE 9 and webkit
    var styleMedia = (window.styleMedia || window.media);

    // For those that don't support matchMedium
    if (!styleMedia) {
        var style = document.createElement('style'),
            script = document.getElementsByTagName('script')[0],
            info = null;

        style.type = 'text/css';
        style.id = 'matchmediajs-test';

        script.parentNode.insertBefore(style, script);

        // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
        info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;

        styleMedia = {
            matchMedium: function(media) {
                var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';

                // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
                if (style.styleSheet) {
                    style.styleSheet.cssText = text;
                } else {
                    style.textContent = text;
                }

                // Test if media query is true or false
                return info.width === '1px';
            }
        };
    }

    return function(media) {
        return {
            matches: styleMedia.matchMedium(media || 'all'),
            media: media || 'all'
        };
    };
}());

/* ==============================================
    detect IE
    returns version of IE or false, if browser is not Internet Explorer
=============================================== */
function detectIE() {
    var ua = window.navigator.userAgent;

    var msie = ua.indexOf('MSIE ');
    if (msie > 0) {
        // IE 10 or older => return version number
        return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
    }

    var trident = ua.indexOf('Trident/');
    if (trident > 0) {
        // IE 11 => return version number
        var rv = ua.indexOf('rv:');
        return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
    }

    var edge = ua.indexOf('Edge/');
    if (edge > 0) {
       // IE 12 => return version number
       return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
    }

    // other browser
    return false;
}

/* ==============================================
    Check for WebGL support
=============================================== */
(function(root) {

    var webglDetect = (function() {
        var canvas = document.createElement('canvas');
        var contextNames = ['webgl', 'experimental-webgl', 'moz-webgl', 'webkit-3d'];
        var context;

        if (~navigator.userAgent.indexOf('MSIE')) {
            try {
                context = WebGLHelper.CreateGLContext(canvas, 'canvas');
            } catch (e) {}
        } else {
            for (var i = 0; i < contextNames.length; i++) {
                try {
                    context = canvas.getContext(contextNames[i]);
                    if (context) {
                        break;
                    }
                } catch (e) {}
            }
        }

        return !!context;
    })();

    if (typeof exports !== 'undefined') {
        if (typeof module !== 'undefined' && module.exports) {
            exports = module.exports = webglDetect;
        }
        exports.webglDetect = webglDetect;
    } else if (typeof define === 'function' && define.amd) {
        define([], function() {
            return webglDetect;
        });
    } else {
        root.webglDetect = webglDetect;
    }

})(this);


/* ==============================================
    Check for HTML5 getUserMedia support
=============================================== */
var getUserMedia = navigator.getUserMedia ||
    navigator.mozGetUserMedia ||
    navigator.webkitGetUserMedia;

// The module pattern
var jsReady;
var flashLoaded = false;

function getAssetFromJS() {
    flashLoaded = true;

    var hex;

    if (localStorage.getItem("color")) {
        hex = localStorage.getItem("color");
        document.getElementById("flashHolder").apply(hex);
    }
}

var flashModule = (function() {

    /* ==============================================
    Detect flash
    =============================================== */

    var detectflash = function() {
        if (navigator.plugins !== null && navigator.plugins.length > 0) {
            return navigator.plugins["Shockwave Flash"] && true;
        }
        if (~navigator.userAgent.toLowerCase().indexOf("webtv")) {
            return true;
        }
        if (~navigator.appVersion.indexOf("MSIE") && !~navigator.userAgent.indexOf("Opera")) {
            try {
                return new ActiveXObject("ShockwaveFlash.ShockwaveFlash") && true;
            } catch (e) {}
        }
        return false;
    };

    /* ==============================================
    Flash App - Responsive
=============================================== */
    var tube = [];
    var rebuild;

    var flashResize = function() {
        clearTimeout(rebuild);
        rebuild = setTimeout(function() {
            $.each(tube, function(i) {
                tube[i].element.height(tube[i].element.width() / tube[i].width * tube[i].height);
            });
        }, 100);
    };

    var flashLoaded = function() {
        $('object[type="application/x-shockwave-flash"]').each(function() {
            tube.push({
                element: $(this),
                height: $(this).attr('height'),
                width: $(this).attr('width')
            });
        });
        flashResize();
    };

    /* ==============================================
        loadSWF - swfobject plugin
    =============================================== */
    var loadSWF = function(url, targetID) {

        //Check for existing SWF
        if (!$('#' + targetID + '').length) {
            $("#uploadError").after("<div id='" + targetID + "'></div>");

            $('#' + targetID + '').fadeIn("fast");
        }

        //Embed SWF
        if (swfobject.hasFlashPlayerVersion("11.1")) {
            var attributes = {
                id: "flashHolder",
                name: "flashHolder",
                data: url,
                width: "525",
                height: "525"
            };
            var params = {
                quality: "high",
                //scale: "noscale",
                wmode: "opaque",
                allowscriptaccess: "always",
                bgcolor: "#FBFBFB",
                seamlessTabbing: "false"
            };

            var obj = swfobject.createSWF(attributes, params, targetID);

            flashLoaded();
        }
    };

    function isReady() {
        return true;
    };

    function flashInit() {
        jsReady = true;
    };

    flashInit();

    // Public API
    return {
        load: loadSWF,
        detect: detectflash,
        resize: flashResize
    };
})();

/*!    SWFObject v2.3.20130521 <http://github.com/swfobject/swfobject>
    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
    var D = "undefined",
        r = "object",
        T = "Shockwave Flash",
        Z = "ShockwaveFlash.ShockwaveFlash",
        q = "application/x-shockwave-flash",
        S = "SWFObjectExprInst",
        x = "onreadystatechange",
        Q = window,
        h = document,
        t = navigator,
        V = false,
        X = [],
        o = [],
        P = [],
        K = [],
        I, p, E, B, L = false,
        a = false,
        m, G, j = true,
        l = false,
        O = function() {
            var ad = typeof h.getElementById != D && typeof h.getElementsByTagName != D && typeof h.createElement != D,
                ak = t.userAgent.toLowerCase(),
                ab = t.platform.toLowerCase(),
                ah = ab ? /win/.test(ab) : /win/.test(ak),
                af = ab ? /mac/.test(ab) : /mac/.test(ak),
                ai = /webkit/.test(ak) ? parseFloat(ak.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
                aa = t.appName === "Microsoft Internet Explorer",
                aj = [0, 0, 0],
                ae = null;
            if (typeof t.plugins != D && typeof t.plugins[T] == r) {
                ae = t.plugins[T].description;
                if (ae && (typeof t.mimeTypes != D && t.mimeTypes[q] && t.mimeTypes[q].enabledPlugin)) {
                    V = true;
                    aa = false;
                    ae = ae.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
                    aj[0] = n(ae.replace(/^(.*)\..*$/, "$1"));
                    aj[1] = n(ae.replace(/^.*\.(.*)\s.*$/, "$1"));
                    aj[2] = /[a-zA-Z]/.test(ae) ? n(ae.replace(/^.*[a-zA-Z]+(.*)$/, "$1")) : 0
                }
            } else {
                if (typeof Q.ActiveXObject != D) {
                    try {
                        var ag = new ActiveXObject(Z);
                        if (ag) {
                            ae = ag.GetVariable("$version");
                            if (ae) {
                                aa = true;
                                ae = ae.split(" ")[1].split(",");
                                aj = [n(ae[0]), n(ae[1]), n(ae[2])]
                            }
                        }
                    } catch (ac) {}
                }
            }
            return {
                w3: ad,
                pv: aj,
                wk: ai,
                ie: aa,
                win: ah,
                mac: af
            }
        }(),
        i = function() {
            if (!O.w3) {
                return
            }
            if ((typeof h.readyState != D && (h.readyState === "complete" || h.readyState === "interactive")) || (typeof h.readyState == D && (h.getElementsByTagName("body")[0] || h.body))) {
                f()
            }
            if (!L) {
                if (typeof h.addEventListener != D) {
                    h.addEventListener("DOMContentLoaded", f, false)
                }
                if (O.ie) {
                    h.attachEvent(x, function aa() {
                        if (h.readyState == "complete") {
                            h.detachEvent(x, aa);
                            f()
                        }
                    });
                    if (Q == top) {
                        (function ac() {
                            if (L) {
                                return
                            }
                            try {
                                h.documentElement.doScroll("left")
                            } catch (ad) {
                                setTimeout(ac, 0);
                                return
                            }
                            f()
                        }())
                    }
                }
                if (O.wk) {
                    (function ab() {
                        if (L) {
                            return
                        }
                        if (!/loaded|complete/.test(h.readyState)) {
                            setTimeout(ab, 0);
                            return
                        }
                        f()
                    }())
                }
            }
        }();

    function f() {
        if (L || !document.getElementsByTagName("body")[0]) {
            return
        }
        try {
            var ac, ad = C("span");
            ad.style.display = "none";
            ac = h.getElementsByTagName("body")[0].appendChild(ad);
            ac.parentNode.removeChild(ac);
            ac = null;
            ad = null
        } catch (ae) {
            return
        }
        L = true;
        var aa = X.length;
        for (var ab = 0; ab < aa; ab++) {
            X[ab]()
        }
    }

    function M(aa) {
        if (L) {
            aa()
        } else {
            X[X.length] = aa
        }
    }

    function s(ab) {
        if (typeof Q.addEventListener != D) {
            Q.addEventListener("load", ab, false)
        } else {
            if (typeof h.addEventListener != D) {
                h.addEventListener("load", ab, false)
            } else {
                if (typeof Q.attachEvent != D) {
                    g(Q, "onload", ab)
                } else {
                    if (typeof Q.onload == "function") {
                        var aa = Q.onload;
                        Q.onload = function() {
                            aa();
                            ab()
                        }
                    } else {
                        Q.onload = ab
                    }
                }
            }
        }
    }

    function Y() {
        var aa = h.getElementsByTagName("body")[0];
        var ae = C(r);
        ae.setAttribute("style", "visibility: hidden;");
        ae.setAttribute("type", q);
        var ad = aa.appendChild(ae);
        if (ad) {
            var ac = 0;
            (function ab() {
                if (typeof ad.GetVariable != D) {
                    try {
                        var ag = ad.GetVariable("$version");
                        if (ag) {
                            ag = ag.split(" ")[1].split(",");
                            O.pv = [n(ag[0]), n(ag[1]), n(ag[2])]
                        }
                    } catch (af) {
                        O.pv = [8, 0, 0]
                    }
                } else {
                    if (ac < 10) {
                        ac++;
                        setTimeout(ab, 10);
                        return
                    }
                }
                aa.removeChild(ae);
                ad = null;
                H()
            }())
        } else {
            H()
        }
    }

    function H() {
        var aj = o.length;
        if (aj > 0) {
            for (var ai = 0; ai < aj; ai++) {
                var ab = o[ai].id;
                var ae = o[ai].callbackFn;
                var ad = {
                    success: false,
                    id: ab
                };
                if (O.pv[0] > 0) {
                    var ah = c(ab);
                    if (ah) {
                        if (F(o[ai].swfVersion) && !(O.wk && O.wk < 312)) {
                            w(ab, true);
                            if (ae) {
                                ad.success = true;
                                ad.ref = z(ab);
                                ad.id = ab;
                                ae(ad)
                            }
                        } else {
                            if (o[ai].expressInstall && A()) {
                                var al = {};
                                al.data = o[ai].expressInstall;
                                al.width = ah.getAttribute("width") || "0";
                                al.height = ah.getAttribute("height") || "0";
                                if (ah.getAttribute("class")) {
                                    al.styleclass = ah.getAttribute("class")
                                }
                                if (ah.getAttribute("align")) {
                                    al.align = ah.getAttribute("align")
                                }
                                var ak = {};
                                var aa = ah.getElementsByTagName("param");
                                var af = aa.length;
                                for (var ag = 0; ag < af; ag++) {
                                    if (aa[ag].getAttribute("name").toLowerCase() != "movie") {
                                        ak[aa[ag].getAttribute("name")] = aa[ag].getAttribute("value")
                                    }
                                }
                                R(al, ak, ab, ae)
                            } else {
                                b(ah);
                                if (ae) {
                                    ae(ad)
                                }
                            }
                        }
                    }
                } else {
                    w(ab, true);
                    if (ae) {
                        var ac = z(ab);
                        if (ac && typeof ac.SetVariable != D) {
                            ad.success = true;
                            ad.ref = ac;
                            ad.id = ac.id
                        }
                        ae(ad)
                    }
                }
            }
        }
    }
    X[0] = function() {
        if (V) {
            Y()
        } else {
            H()
        }
    };

    function z(ac) {
        var aa = null,
            ab = c(ac);
        if (ab && ab.nodeName.toUpperCase() === "OBJECT") {
            if (typeof ab.SetVariable !== D) {
                aa = ab
            } else {
                aa = ab.getElementsByTagName(r)[0] || ab
            }
        }
        return aa
    }

    function A() {
        return !a && F("6.0.65") && (O.win || O.mac) && !(O.wk && O.wk < 312)
    }

    function R(ad, ae, aa, ac) {
        var ah = c(aa);
        aa = W(aa);
        a = true;
        E = ac || null;
        B = {
            success: false,
            id: aa
        };
        if (ah) {
            if (ah.nodeName.toUpperCase() == "OBJECT") {
                I = J(ah);
                p = null
            } else {
                I = ah;
                p = aa
            }
            ad.id = S;
            if (typeof ad.width == D || (!/%$/.test(ad.width) && n(ad.width) < 310)) {
                ad.width = "310"
            }
            if (typeof ad.height == D || (!/%$/.test(ad.height) && n(ad.height) < 137)) {
                ad.height = "137"
            }
            var ag = O.ie ? "ActiveX" : "PlugIn",
                af = "MMredirectURL=" + encodeURIComponent(Q.location.toString().replace(/&/g, "%26")) + "&MMplayerType=" + ag + "&MMdoctitle=" + encodeURIComponent(h.title.slice(0, 47) + " - Flash Player Installation");
            if (typeof ae.flashvars != D) {
                ae.flashvars += "&" + af
            } else {
                ae.flashvars = af
            }
            if (O.ie && ah.readyState != 4) {
                var ab = C("div");
                aa += "SWFObjectNew";
                ab.setAttribute("id", aa);
                ah.parentNode.insertBefore(ab, ah);
                ah.style.display = "none";
                y(ah)
            }
            u(ad, ae, aa)
        }
    }

    function b(ab) {
        if (O.ie && ab.readyState != 4) {
            ab.style.display = "none";
            var aa = C("div");
            ab.parentNode.insertBefore(aa, ab);
            aa.parentNode.replaceChild(J(ab), aa);
            y(ab)
        } else {
            ab.parentNode.replaceChild(J(ab), ab)
        }
    }

    function J(af) {
        var ae = C("div");
        if (O.win && O.ie) {
            ae.innerHTML = af.innerHTML
        } else {
            var ab = af.getElementsByTagName(r)[0];
            if (ab) {
                var ag = ab.childNodes;
                if (ag) {
                    var aa = ag.length;
                    for (var ad = 0; ad < aa; ad++) {
                        if (!(ag[ad].nodeType == 1 && ag[ad].nodeName == "PARAM") && !(ag[ad].nodeType == 8)) {
                            ae.appendChild(ag[ad].cloneNode(true))
                        }
                    }
                }
            }
        }
        return ae
    }

    function k(aa, ab) {
        var ac = C("div");
        ac.innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='" + aa + "'>" + ab + "</object>";
        return ac.firstChild
    }

    function u(ai, ag, ab) {
        var aa, ad = c(ab);
        ab = W(ab);
        if (O.wk && O.wk < 312) {
            return aa
        }
        if (ad) {
            var ac = (O.ie) ? C("div") : C(r),
                af, ah, ae;
            if (typeof ai.id == D) {
                ai.id = ab
            }
            for (ae in ag) {
                if (ag.hasOwnProperty(ae) && ae.toLowerCase() !== "movie") {
                    e(ac, ae, ag[ae])
                }
            }
            if (O.ie) {
                ac = k(ai.data, ac.innerHTML)
            }
            for (af in ai) {
                if (ai.hasOwnProperty(af)) {
                    ah = af.toLowerCase();
                    if (ah === "styleclass") {
                        ac.setAttribute("class", ai[af])
                    } else {
                        if (ah !== "classid" && ah !== "data") {
                            ac.setAttribute(af, ai[af])
                        }
                    }
                }
            }
            if (O.ie) {
                P[P.length] = ai.id
            } else {
                ac.setAttribute("type", q);
                ac.setAttribute("data", ai.data)
            }
            ad.parentNode.replaceChild(ac, ad);
            aa = ac
        }
        return aa
    }

    function e(ac, aa, ab) {
        var ad = C("param");
        ad.setAttribute("name", aa);
        ad.setAttribute("value", ab);
        ac.appendChild(ad)
    }

    function y(ac) {
        var ab = c(ac);
        if (ab && ab.nodeName.toUpperCase() == "OBJECT") {
            if (O.ie) {
                ab.style.display = "none";
                (function aa() {
                    if (ab.readyState == 4) {
                        for (var ad in ab) {
                            if (typeof ab[ad] == "function") {
                                ab[ad] = null
                            }
                        }
                        ab.parentNode.removeChild(ab)
                    } else {
                        setTimeout(aa, 10)
                    }
                }())
            } else {
                ab.parentNode.removeChild(ab)
            }
        }
    }

    function U(aa) {
        return (aa && aa.nodeType && aa.nodeType === 1)
    }

    function W(aa) {
        return (U(aa)) ? aa.id : aa
    }

    function c(ac) {
        if (U(ac)) {
            return ac
        }
        var aa = null;
        try {
            aa = h.getElementById(ac)
        } catch (ab) {}
        return aa
    }

    function C(aa) {
        return h.createElement(aa)
    }

    function n(aa) {
        return parseInt(aa, 10)
    }

    function g(ac, aa, ab) {
        ac.attachEvent(aa, ab);
        K[K.length] = [ac, aa, ab]
    }

    function F(ac) {
        ac += "";
        var ab = O.pv,
            aa = ac.split(".");
        aa[0] = n(aa[0]);
        aa[1] = n(aa[1]) || 0;
        aa[2] = n(aa[2]) || 0;
        return (ab[0] > aa[0] || (ab[0] == aa[0] && ab[1] > aa[1]) || (ab[0] == aa[0] && ab[1] == aa[1] && ab[2] >= aa[2])) ? true : false
    }

    function v(af, ab, ag, ae) {
        var ad = h.getElementsByTagName("head")[0];
        if (!ad) {
            return
        }
        var aa = (typeof ag == "string") ? ag : "screen";
        if (ae) {
            m = null;
            G = null
        }
        if (!m || G != aa) {
            var ac = C("style");
            ac.setAttribute("type", "text/css");
            ac.setAttribute("media", aa);
            m = ad.appendChild(ac);
            if (O.ie && typeof h.styleSheets != D && h.styleSheets.length > 0) {
                m = h.styleSheets[h.styleSheets.length - 1]
            }
            G = aa
        }
        if (m) {
            if (typeof m.addRule != D) {
                m.addRule(af, ab)
            } else {
                if (typeof h.createTextNode != D) {
                    m.appendChild(h.createTextNode(af + " {" + ab + "}"))
                }
            }
        }
    }

    function w(ad, aa) {
        if (!j) {
            return
        }
        var ab = aa ? "visible" : "hidden",
            ac = c(ad);
        if (L && ac) {
            ac.style.visibility = ab
        } else {
            if (typeof ad === "string") {
                v("#" + ad, "visibility:" + ab)
            }
        }
    }

    function N(ab) {
        var ac = /[\\\"<>\.;]/;
        var aa = ac.exec(ab) != null;
        return aa && typeof encodeURIComponent != D ? encodeURIComponent(ab) : ab
    }
    var d = function() {
        if (O.ie) {
            window.attachEvent("onunload", function() {
                var af = K.length;
                for (var ae = 0; ae < af; ae++) {
                    K[ae][0].detachEvent(K[ae][1], K[ae][2])
                }
                var ac = P.length;
                for (var ad = 0; ad < ac; ad++) {
                    y(P[ad])
                }
                for (var ab in O) {
                    O[ab] = null
                }
                O = null;
                for (var aa in swfobject) {
                    swfobject[aa] = null
                }
                swfobject = null
            })
        }
    }();
    return {
        registerObject: function(ae, aa, ad, ac) {
            if (O.w3 && ae && aa) {
                var ab = {};
                ab.id = ae;
                ab.swfVersion = aa;
                ab.expressInstall = ad;
                ab.callbackFn = ac;
                o[o.length] = ab;
                w(ae, false)
            } else {
                if (ac) {
                    ac({
                        success: false,
                        id: ae
                    })
                }
            }
        },
        getObjectById: function(aa) {
            if (O.w3) {
                return z(aa)
            }
        },
        embedSWF: function(af, al, ai, ak, ab, ae, ad, ah, aj, ag) {
            var ac = W(al),
                aa = {
                    success: false,
                    id: ac
                };
            if (O.w3 && !(O.wk && O.wk < 312) && af && al && ai && ak && ab) {
                w(ac, false);
                M(function() {
                    ai += "";
                    ak += "";
                    var an = {};
                    if (aj && typeof aj === r) {
                        for (var aq in aj) {
                            an[aq] = aj[aq]
                        }
                    }
                    an.data = af;
                    an.width = ai;
                    an.height = ak;
                    var ar = {};
                    if (ah && typeof ah === r) {
                        for (var ao in ah) {
                            ar[ao] = ah[ao]
                        }
                    }
                    if (ad && typeof ad === r) {
                        for (var am in ad) {
                            if (ad.hasOwnProperty(am)) {
                                var ap = (l) ? encodeURIComponent(am) : am,
                                    at = (l) ? encodeURIComponent(ad[am]) : ad[am];
                                if (typeof ar.flashvars != D) {
                                    ar.flashvars += "&" + ap + "=" + at
                                } else {
                                    ar.flashvars = ap + "=" + at
                                }
                            }
                        }
                    }
                    if (F(ab)) {
                        var au = u(an, ar, al);
                        if (an.id == ac) {
                            w(ac, true)
                        }
                        aa.success = true;
                        aa.ref = au;
                        aa.id = au.id
                    } else {
                        if (ae && A()) {
                            an.data = ae;
                            R(an, ar, al, ag);
                            return
                        } else {
                            w(ac, true)
                        }
                    }
                    if (ag) {
                        ag(aa)
                    }
                })
            } else {
                if (ag) {
                    ag(aa)
                }
            }
        },
        switchOffAutoHideShow: function() {
            j = false
        },
        enableUriEncoding: function(aa) {
            l = (typeof aa === D) ? true : aa
        },
        ua: O,
        getFlashPlayerVersion: function() {
            return {
                major: O.pv[0],
                minor: O.pv[1],
                release: O.pv[2]
            }
        },
        hasFlashPlayerVersion: F,
        createSWF: function(ac, ab, aa) {
            if (O.w3) {
                return u(ac, ab, aa)
            } else {
                return undefined
            }
        },
        showExpressInstall: function(ac, ad, aa, ab) {
            if (O.w3 && A()) {
                R(ac, ad, aa, ab)
            }
        },
        removeSWF: function(aa) {
            if (O.w3) {
                y(aa)
            }
        },
        createCSS: function(ad, ac, ab, aa) {
            if (O.w3) {
                v(ad, ac, ab, aa)
            }
        },
        addDomLoadEvent: M,
        addLoadEvent: s,
        getQueryParamValue: function(ad) {
            var ac = h.location.search || h.location.hash;
            if (ac) {
                if (/\?/.test(ac)) {
                    ac = ac.split("?")[1]
                }
                if (ad == null) {
                    return N(ac)
                }
                var ab = ac.split("&");
                for (var aa = 0; aa < ab.length; aa++) {
                    if (ab[aa].substring(0, ab[aa].indexOf("=")) == ad) {
                        return N(ab[aa].substring((ab[aa].indexOf("=") + 1)))
                    }
                }
            }
            return ""
        },
        expressInstallCallback: function() {
            if (a) {
                var aa = c(S);
                if (aa && I) {
                    aa.parentNode.replaceChild(I, aa);
                    if (p) {
                        w(p, true);
                        if (O.ie) {
                            I.style.display = "block"
                        }
                    }
                    if (E) {
                        E(B)
                    }
                }
                a = false
            }
        },
        version: "2.3"
    }
}();
/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com

Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/

/*
 * Generate a random uuid.
 *
 * USAGE: Math.uuid(length, radix)
 *   length - the desired number of characters
 *   radix  - the number of allowable values for each character.
 *
 * EXAMPLES:
 *   // No arguments  - returns RFC4122, version 4 ID
 *   >>> Math.uuid()
 *   "92329D39-6F5C-4520-ABFC-AAB64544E172"
 *
 *   // One argument - returns ID of the specified length
 *   >>> Math.uuid(15)     // 15 character ID (default base=62)
 *   "VcydxgltxrVZSTV"
 *
 *   // Two arguments - returns ID of the specified length, and radix. (Radix must be <= 62)
 *   >>> Math.uuid(8, 2)  // 8 character ID (base=2)
 *   "01001010"
 *   >>> Math.uuid(8, 10) // 8 character ID (base=10)
 *   "47473046"
 *   >>> Math.uuid(8, 16) // 8 character ID (base=16)
 *   "098F4D35"
 */

! function() {
    var x = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
    Math.uuid = function(r, n) {
        var t, a = x,
            o = [];
        if (n = n || a.length, r)
            for (t = 0; r > t; t++) o[t] = a[0 | Math.random() * n];
        else {
            var u;
            for (o[8] = o[13] = o[18] = o[23] = "-", o[14] = "4", t = 0; 36 > t; t++) o[t] || (u = 0 | 16 * Math.random(), o[t] = a[19 == t ? 3 & u | 8 : u])
        }
        return o.join("")
    }, Math.uuidFast = function() {
        for (var r, n = x, t = new Array(36), a = 0, o = 0; 36 > o; o++) 8 == o || 13 == o || 18 == o || 23 == o ? t[o] = "-" : 14 == o ? t[o] = "4" : (2 >= a && (a = 33554432 + 16777216 * Math.random() | 0), r = 15 & a, a >>= 4, t[o] = n[19 == o ? 3 & r | 8 : r]);
        return t.join("")
    }, Math.uuidCompact = function() {
        return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(x) {
            var r = 16 * Math.random() | 0,
                n = "x" == x ? r : 3 & r | 8;
            return n.toString(16)
        })
    }
}();


/*
 * jQuery Cryptography Plug-in
 * version: 1.0.0 (24 Sep 2008)
 * copyright 2008 Scott Thompson http://www.itsyndicate.ca - scott@itsyndicate.ca
 * http://www.opensource.org/licenses/mit-license.php
 *
 * A set of functions to do some basic cryptography encoding/decoding
 * I compiled from some javascripts I found into a jQuery plug-in.
 * Thanks go out to the original authors.
 *
 * Also a big thanks to Wade W. Hedgren http://homepages.uc.edu/~hedgreww
 * for the 1.1.1 upgrade to conform correctly to RFC4648 Sec5 url save base64
 *
 * Changelog: 1.1.0
 * - rewrote plugin to use only one item in the namespace
 *
 * Changelog: 1.1.1
 * - added code to base64 to allow URL and Filename Safe Alphabet (RFC4648 Sec5) 
 *
 * --- Base64 Encoding and Decoding code was written by
 *
 * Base64 code from Tyler Akins -- http://rumkin.com
 * and is placed in the public domain
 *
 *
 * --- MD5 and SHA1 Functions based upon Paul Johnston's javascript libraries.
 * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
 * Digest Algorithm, as defined in RFC 1321.
 * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for more info.
 *
 * xTea Encrypt and Decrypt
 * copyright 2000-2005 Chris Veness
 * http://www.movable-type.co.uk
 *
 *
 * Examples:
 *
        var md5 = $().crypt({method:"md5",source:$("#phrase").val()});
        var sha1 = $().crypt({method:"sha1",source:$("#phrase").val()});
        var b64 = $().crypt({method:"b64enc",source:$("#phrase").val()});
        var b64dec = $().crypt({method:"b64dec",source:b64});
        var xtea = $().crypt({method:"xteaenc",source:$("#phrase").val(),keyPass:$("#passPhrase").val()});
        var xteadec = $().crypt({method:"xteadec",source:xtea,keyPass:$("#passPhrase").val()});
        var xteab64 = $().crypt({method:"xteab64enc",source:$("#phrase").val(),keyPass:$("#passPhrase").val()});
        var xteab64dec = $().crypt({method:"xteab64dec",source:xteab64,keyPass:$("#passPhrase").val()});

    You can also pass source this way.
    var md5 = $("#idOfSource").crypt({method:"md5"});
 *
 */
! function(r) {
    r.fn.crypt = function(e) {
        function t(r) {
            var e, t, n, c, o, u, a, f = "",
                h = 0;
            do e = r.source.charCodeAt(h++), t = r.source.charCodeAt(h++), n = r.source.charCodeAt(h++), c = e >> 2, o = (3 & e) << 4 | t >> 4, u = (15 & t) << 2 | n >> 6, a = 63 & n, isNaN(t) ? u = a = 64 : isNaN(n) && (a = 64), f += r.b64Str.charAt(c) + r.b64Str.charAt(o) + r.b64Str.charAt(u) + r.b64Str.charAt(a); while (h < r.source.length);
            return f
        }

        function n(r) {
            var e, t, n, c, o, u, a, f = "",
                h = 0,
                i = new RegExp("[^A-Za-z0-9" + r.b64Str.substr(-3) + "]", "g");
            r.source = r.source.replace(i, "");
            do c = r.b64Str.indexOf(r.source.charAt(h++)), o = r.b64Str.indexOf(r.source.charAt(h++)), u = r.b64Str.indexOf(r.source.charAt(h++)), a = r.b64Str.indexOf(r.source.charAt(h++)), e = c << 2 | o >> 4, t = (15 & o) << 4 | u >> 2, n = (3 & u) << 6 | a, f += String.fromCharCode(e), 64 != u && (f += String.fromCharCode(t)), 64 != a && (f += String.fromCharCode(n)); while (h < r.source.length);
            return f
        }

        function c(r) {
            function e(e) {
                for (var t = r.hexcase ? "0123456789ABCDEF" : "0123456789abcdef", n = "", c = 0; c < 4 * e.length; c++) n += t.charAt(e[c >> 2] >> c % 4 * 8 + 4 & 15) + t.charAt(e[c >> 2] >> c % 4 * 8 & 15);
                return n
            }

            function t(e) {
                for (var t = Array(), n = (1 << r.chrsz) - 1, c = 0; c < e.length * r.chrsz; c += r.chrsz) t[c >> 5] |= (e.charCodeAt(c / r.chrsz) & n) << c % 32;
                return t
            }

            function n(r, e) {
                return r << e | r >>> 32 - e
            }

            function c(r, e, t, c, u, a) {
                return o(n(o(o(e, r), o(c, a)), u), t)
            }

            function u(r, e, t, n, o, u, a) {
                return c(e & t | ~e & n, r, e, o, u, a)
            }

            function a(r, e, t, n, o, u, a) {
                return c(e & n | t & ~n, r, e, o, u, a)
            }

            function f(r, e, t, n, o, u, a) {
                return c(e ^ t ^ n, r, e, o, u, a)
            }

            function h(r, e, t, n, o, u, a) {
                return c(t ^ (e | ~n), r, e, o, u, a)
            }

            function i(r, e) {
                r[e >> 5] |= 128 << e % 32, r[(e + 64 >>> 9 << 4) + 14] = e;
                for (var t = 1732584193, n = -271733879, c = -1732584194, i = 271733878, s = 0; s < r.length; s += 16) {
                    var d = t,
                        l = n,
                        A = c,
                        v = i;
                    t = u(t, n, c, i, r[s + 0], 7, -680876936), i = u(i, t, n, c, r[s + 1], 12, -389564586), c = u(c, i, t, n, r[s + 2], 17, 606105819), n = u(n, c, i, t, r[s + 3], 22, -1044525330), t = u(t, n, c, i, r[s + 4], 7, -176418897), i = u(i, t, n, c, r[s + 5], 12, 1200080426), c = u(c, i, t, n, r[s + 6], 17, -1473231341), n = u(n, c, i, t, r[s + 7], 22, -45705983), t = u(t, n, c, i, r[s + 8], 7, 1770035416), i = u(i, t, n, c, r[s + 9], 12, -1958414417), c = u(c, i, t, n, r[s + 10], 17, -42063), n = u(n, c, i, t, r[s + 11], 22, -1990404162), t = u(t, n, c, i, r[s + 12], 7, 1804603682), i = u(i, t, n, c, r[s + 13], 12, -40341101), c = u(c, i, t, n, r[s + 14], 17, -1502002290), n = u(n, c, i, t, r[s + 15], 22, 1236535329), t = a(t, n, c, i, r[s + 1], 5, -165796510), i = a(i, t, n, c, r[s + 6], 9, -1069501632), c = a(c, i, t, n, r[s + 11], 14, 643717713), n = a(n, c, i, t, r[s + 0], 20, -373897302), t = a(t, n, c, i, r[s + 5], 5, -701558691), i = a(i, t, n, c, r[s + 10], 9, 38016083), c = a(c, i, t, n, r[s + 15], 14, -660478335), n = a(n, c, i, t, r[s + 4], 20, -405537848), t = a(t, n, c, i, r[s + 9], 5, 568446438), i = a(i, t, n, c, r[s + 14], 9, -1019803690), c = a(c, i, t, n, r[s + 3], 14, -187363961), n = a(n, c, i, t, r[s + 8], 20, 1163531501), t = a(t, n, c, i, r[s + 13], 5, -1444681467), i = a(i, t, n, c, r[s + 2], 9, -51403784), c = a(c, i, t, n, r[s + 7], 14, 1735328473), n = a(n, c, i, t, r[s + 12], 20, -1926607734), t = f(t, n, c, i, r[s + 5], 4, -378558), i = f(i, t, n, c, r[s + 8], 11, -2022574463), c = f(c, i, t, n, r[s + 11], 16, 1839030562), n = f(n, c, i, t, r[s + 14], 23, -35309556), t = f(t, n, c, i, r[s + 1], 4, -1530992060), i = f(i, t, n, c, r[s + 4], 11, 1272893353), c = f(c, i, t, n, r[s + 7], 16, -155497632), n = f(n, c, i, t, r[s + 10], 23, -1094730640), t = f(t, n, c, i, r[s + 13], 4, 681279174), i = f(i, t, n, c, r[s + 0], 11, -358537222), c = f(c, i, t, n, r[s + 3], 16, -722521979), n = f(n, c, i, t, r[s + 6], 23, 76029189), t = f(t, n, c, i, r[s + 9], 4, -640364487), i = f(i, t, n, c, r[s + 12], 11, -421815835), c = f(c, i, t, n, r[s + 15], 16, 530742520), n = f(n, c, i, t, r[s + 2], 23, -995338651), t = h(t, n, c, i, r[s + 0], 6, -198630844), i = h(i, t, n, c, r[s + 7], 10, 1126891415), c = h(c, i, t, n, r[s + 14], 15, -1416354905), n = h(n, c, i, t, r[s + 5], 21, -57434055), t = h(t, n, c, i, r[s + 12], 6, 1700485571), i = h(i, t, n, c, r[s + 3], 10, -1894986606), c = h(c, i, t, n, r[s + 10], 15, -1051523), n = h(n, c, i, t, r[s + 1], 21, -2054922799), t = h(t, n, c, i, r[s + 8], 6, 1873313359), i = h(i, t, n, c, r[s + 15], 10, -30611744), c = h(c, i, t, n, r[s + 6], 15, -1560198380), n = h(n, c, i, t, r[s + 13], 21, 1309151649), t = h(t, n, c, i, r[s + 4], 6, -145523070), i = h(i, t, n, c, r[s + 11], 10, -1120210379), c = h(c, i, t, n, r[s + 2], 15, 718787259), n = h(n, c, i, t, r[s + 9], 21, -343485551), t = o(t, d), n = o(n, l), c = o(c, A), i = o(i, v)
                }
                return Array(t, n, c, i)
            }
            return e(i(t(r.source), r.source.length * r.chrsz))
        }

        function o(r, e) {
            var t = (65535 & r) + (65535 & e),
                n = (r >> 16) + (e >> 16) + (t >> 16);
            return n << 16 | 65535 & t
        }

        function u(r) {
            function e(r, e) {
                r[e >> 5] |= 128 << 24 - e % 32, r[(e + 64 >> 9 << 4) + 15] = e;
                for (var u = Array(80), a = 1732584193, f = -271733879, h = -1732584194, i = 271733878, s = -1009589776, d = 0; d < r.length; d += 16) {
                    for (var l = a, A = f, v = h, g = i, b = s, m = 0; 80 > m; m++) {
                        u[m] = 16 > m ? r[d + m] : t(u[m - 3] ^ u[m - 8] ^ u[m - 14] ^ u[m - 16], 1);
                        var x = o(o(t(a, 5), c(m, f, h, i)), o(o(s, u[m]), n(m)));
                        s = i, i = h, h = t(f, 30), f = a, a = x
                    }
                    a = o(a, l), f = o(f, A), h = o(h, v), i = o(i, g), s = o(s, b)
                }
                return Array(a, f, h, i, s)
            }

            function t(r, e) {
                return r << e | r >>> 32 - e
            }

            function n(r) {
                return 20 > r ? 1518500249 : 40 > r ? 1859775393 : 60 > r ? -1894007588 : -899497514
            }

            function c(r, e, t, n) {
                return 20 > r ? e & t | ~e & n : 40 > r ? e ^ t ^ n : 60 > r ? e & t | e & n | t & n : e ^ t ^ n
            }

            function u(e) {
                for (var t = r.hexcase ? "0123456789ABCDEF" : "0123456789abcdef", n = "", c = 0; c < 4 * e.length; c++) n += t.charAt(e[c >> 2] >> 8 * (3 - c % 4) + 4 & 15) + t.charAt(e[c >> 2] >> 8 * (3 - c % 4) & 15);
                return n
            }

            function a(e) {
                for (var t = Array(), n = (1 << r.chrsz) - 1, c = 0; c < e.length * r.chrsz; c += r.chrsz) t[c >> 5] |= (e.charCodeAt(c / r.chrsz) & n) << 32 - r.chrsz - c % 32;
                return t
            }
            return u(e(a(r.source), r.source.length * r.chrsz))
        }

        function a(r) {
            function e(r, e) {
                for (var t = r[0], n = r[1], c = 2654435769, o = 32 * c, u = 0; u != o;) t += (n << 4 ^ n >>> 5) + n ^ u + e[3 & u], u += c, n += (t << 4 ^ t >>> 5) + t ^ u + e[u >>> 11 & 3];
                r[0] = t, r[1] = n
            }
            var t, n = new Array(2),
                c = new Array(4),
                o = "";
            r.source = escape(r.source);
            for (var t = 0; 4 > t; t++) c[t] = h(r.strKey.slice(4 * t, 4 * (t + 1)));
            for (t = 0; t < r.source.length; t += 8) n[0] = h(r.source.slice(t, t + 4)), n[1] = h(r.source.slice(t + 4, t + 8)), e(n, c), o += i(n[0]) + i(n[1]);
            return s(o)
        }

        function f(r) {
            function e(r, e) {
                for (var t = r[0], n = r[1], c = 2654435769, o = 32 * c; 0 != o;) n -= (t << 4 ^ t >>> 5) + t ^ o + e[o >>> 11 & 3], o -= c, t -= (n << 4 ^ n >>> 5) + n ^ o + e[3 & o];
                r[0] = t, r[1] = n
            }
            for (var t, n = new Array(2), c = new Array(4), o = "", t = 0; 4 > t; t++) c[t] = h(r.strKey.slice(4 * t, 4 * (t + 1)));
            for (ciphertext = d(r.source), t = 0; t < ciphertext.length; t += 8) n[0] = h(ciphertext.slice(t, t + 4)), n[1] = h(ciphertext.slice(t + 4, t + 8)), e(n, c), o += i(n[0]) + i(n[1]);
            return o = o.replace(/\0+$/, ""), unescape(o)
        }

        function h(r) {
            for (var e = 0, t = 0; 4 > t; t++) e |= r.charCodeAt(t) << 8 * t;
            return isNaN(e) ? 0 : e
        }

        function i(r) {
            var e = String.fromCharCode(255 & r, r >> 8 & 255, r >> 16 & 255, r >> 24 & 255);
            return e
        }

        function s(r) {
            return r.replace(/[\0\t\n\v\f\r\xa0'"!]/g, function(r) {
                return "!" + r.charCodeAt(0) + "!"
            })
        }

        function d(r) {
            return r.replace(/!\d\d?\d?!/g, function(r) {
                return String.fromCharCode(r.slice(1, -1))
            })
        }
        var l = {
            b64Str: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
            strKey: "123",
            method: "md5",
            source: "",
            chrsz: 8,
            hexcase: 0
        };
        "undefined" == typeof e.urlsafe ? (l.b64Str += "+/=", e.urlsafe = !1) : l.b64Str += e.urlsafe ? "-_=" : "+/=";
        var A = r.extend(l, e);
        if (!A.source) {
            var v = r(this);
            if (v.html()) A.source = v.html();
            else {
                if (!v.val()) return alert("Please provide source text"), !1;
                A.source = v.val()
            }
        }
        if ("md5" == A.method) return c(A);
        if ("sha1" == A.method) return u(A);
        if ("b64enc" == A.method) return t(A);
        if ("b64dec" == A.method) return n(A);
        if ("xteaenc" == A.method) return a(A);
        if ("xteadec" == A.method) return f(A);
        if ("xteab64enc" == A.method) {
            var g = a(A);
            return A.method = "b64enc", A.source = g, t(A)
        }
        if ("xteab64dec" == A.method) {
            var b = n(A);
            return A.method = "xteadec", A.source = b, f(A)
        }
    }
}(jQuery);
