(function () {
    if (window.magicJS) {
        return
    }
    var a = {
        version: "v2.5.1",
        UUID: 0,
        storage: {},
        $uuid: function (c) {
            return (c.$J_UUID || (c.$J_UUID = ++$J.UUID))
        },
        getStorage: function (c) {
            return ($J.storage[c] || ($J.storage[c] = {}))
        },
        $F: function () {},
        $false: function () {
            return false
        },
        defined: function (c) {
            return (undefined != c)
        },
        exists: function (c) {
            return !!(c)
        },
        j1: function (c) {
            if (!$J.defined(c)) {
                return false
            }
            if (c.$J_TYPE) {
                return c.$J_TYPE
            }
            if ( !! c.nodeType) {
                if (1 == c.nodeType) {
                    return "element"
                }
                if (3 == c.nodeType) {
                    return "textnode"
                }
            }
            if (c.length && c.item) {
                return "collection"
            }
            if (c.length && c.callee) {
                return "arguments"
            }
            if ((c instanceof window.Object || c instanceof window.Function) && c.constructor === $J.Class) {
                return "class"
            }
            if (c instanceof window.Array) {
                return "array"
            }
            if (c instanceof window.Function) {
                return "function"
            }
            if (c instanceof window.String) {
                return "string"
            }
            if ($J.j21.trident) {
                if ($J.defined(c.cancelBubble)) {
                    return "event"
                }
            } else {
                if (c === window.event || c.constructor == window.Event || c.constructor == window.MouseEvent || c.constructor == window.UIEvent || c.constructor == window.KeyboardEvent || c.constructor == window.KeyEvent) {
                    return "event"
                }
            }
            if (c instanceof window.Date) {
                return "date"
            }
            if (c instanceof window.RegExp) {
                return "regexp"
            }
            if (c === window) {
                return "window"
            }
            if (c === document) {
                return "document"
            }
            return typeof (c)
        },
        extend: function (h, g) {
            if (!(h instanceof window.Array)) {
                h = [h]
            }
            for (var f = 0, d = h.length; f < d; f++) {
                if (!$J.defined(h)) {
                    continue
                }
                for (var e in (g || {})) {
                    try {
                        h[f][e] = g[e]
                    } catch (c) {}
                }
            }
            return h[0]
        },
        implement: function (g, f) {
            if (!(g instanceof window.Array)) {
                g = [g]
            }
            for (var e = 0, c = g.length; e < c; e++) {
                if (!$J.defined(g[e])) {
                    continue
                }
                if (!g[e].prototype) {
                    continue
                }
                for (var d in (f || {})) {
                    if (!g[e].prototype[d]) {
                        g[e].prototype[d] = f[d]
                    }
                }
            }
            return g[0]
        },
        nativize: function (e, d) {
            if (!$J.defined(e)) {
                return e
            }
            for (var c in (d || {})) {
                if (!e[c]) {
                    e[c] = d[c]
                }
            }
            return e
        },
        $try: function () {
            for (var d = 0, c = arguments.length; d < c; d++) {
                try {
                    return arguments[d]()
                } catch (f) {}
            }
            return null
        },
        $A: function (e) {
            if (!$J.defined(e)) {
                return $mjs([])
            }
            if (e.toArray) {
                return $mjs(e.toArray())
            }
            if (e.item) {
                var d = e.length || 0,
                    c = new Array(d);
                while (d--) {
                    c[d] = e[d]
                }
                return $mjs(c)
            }
            return $mjs(Array.prototype.slice.call(e))
        },
        now: function () {
            return new Date().getTime()
        },
        detach: function (g) {
            var e;
            switch ($J.j1(g)) {
            case "object":
                e = {};
                for (var f in g) {
                    e[f] = $J.detach(g[f])
                }
                break;
            case "array":
                e = [];
                for (var d = 0, c = g.length; d < c; d++) {
                    e[d] = $J.detach(g[d])
                }
                break;
            default:
                return g
            }
            return $J.$(e)
        },
        $: function (d) {
            if (!$J.defined(d)) {
                return null
            }
            if (d.$J_EXTENDED) {
                return d
            }
            switch ($J.j1(d)) {
            case "array":
                d = $J.nativize(d, $J.extend($J.Array, {
                    $J_EXTENDED: $J.$F
                }));
                d.j14 = d.forEach;
                return d;
                break;
            case "string":
                var c = document.getElementById(d);
                if ($J.defined(c)) {
                    return $J.$(c)
                }
                return null;
                break;
            case "window":
            case "document":
                $J.$uuid(d);
                d = $J.extend(d, $J.Doc);
                break;
            case "element":
                $J.$uuid(d);
                d = $J.extend(d, $J.Element);
                break;
            case "event":
                d = $J.extend(d, $J.Event);
                break;
            case "textnode":
                return d;
                break;
            case "function":
            case "array":
            case "date":
            default:
                break
            }
            return $J.extend(d, {
                $J_EXTENDED: $J.$F
            })
        },
        $new: function (c, e, d) {
            return $mjs($J.doc.createElement(c)).setProps(e || {}).j6(d || {})
        }
    };
    window.magicJS = window.$J = a;
    window.$mjs = a.$;
    $J.Array = {
        $J_TYPE: "array",
        indexOf: function (f, g) {
            var c = this.length;
            for (var d = this.length, e = (g < 0) ? Math.max(0, d + g) : g || 0; e < d; e++) {
                if (this[e] === f) {
                    return e
                }
            }
            return -1
        },
        contains: function (c, d) {
            return this.indexOf(c, d) != -1
        },
        forEach: function (c, f) {
            for (var e = 0, d = this.length; e < d; e++) {
                if (e in this) {
                    c.call(f, this[e], e, this)
                }
            }
        },
        filter: function (c, h) {
            var g = [];
            for (var f = 0, d = this.length; f < d; f++) {
                if (f in this) {
                    var e = this[f];
                    if (c.call(h, this[f], f, this)) {
                        g.push(e)
                    }
                }
            }
            return g
        },
        map: function (c, g) {
            var f = [];
            for (var e = 0, d = this.length; e < d; e++) {
                if (e in this) {
                    f[e] = c.call(g, this[e], e, this)
                }
            }
            return f
        }
    };
    $J.implement(String, {
        $J_TYPE: "string",
        j26: function () {
            return this.replace(/^\s+|\s+$/g, "")
        },
        trimLeft: function () {
            return this.replace(/^\s+/g, "")
        },
        trimRight: function () {
            return this.replace(/\s+$/g, "")
        },
        j25: function (c) {
            return (this.toString() === c.toString())
        },
        icompare: function (c) {
            return (this.toLowerCase().toString() === c.toLowerCase().toString())
        },
        j22: function () {
            return this.replace(/-\D/g, function (c) {
                return c.charAt(1).toUpperCase()
            })
        },
        dashize: function () {
            return this.replace(/[A-Z]/g, function (c) {
                return ("-" + c.charAt(0).toLowerCase())
            })
        },
        j17: function (c) {
            return parseInt(this, c || 10)
        },
        toFloat: function () {
            return parseFloat(this)
        },
        j18: function () {
            return !this.replace(/true/i, "").j26()
        },
        has: function (d, c) {
            c = c || "";
            return (c + this + c).indexOf(c + d + c) > -1
        }
    });
    a.implement(Function, {
        $J_TYPE: "function",
        j24: function () {
            var d = $J.$A(arguments),
                c = this,
                e = d.shift();
            return function () {
                return c.apply(e || null, d.concat($J.$A(arguments)))
            }
        },
        j16: function () {
            var d = $J.$A(arguments),
                c = this,
                e = d.shift();
            return function (f) {
                return c.apply(e || null, $mjs([f || window.event]).concat(d))
            }
        },
        j27: function () {
            var d = $J.$A(arguments),
                c = this,
                e = d.shift();
            return window.setTimeout(function () {
                return c.apply(c, d)
            }, e || 0)
        },
        j28: function () {
            var d = $J.$A(arguments),
                c = this;
            return function () {
                return c.j27.apply(c, d)
            }
        },
        interval: function () {
            var d = $J.$A(arguments),
                c = this,
                e = d.shift();
            return window.setInterval(function () {
                return c.apply(c, d)
            }, e || 0)
        }
    });
    var b = navigator.userAgent.toLowerCase();
    $J.j21 = {
        features: {
            xpath: !! (document.evaluate),
            air: !! (window.runtime),
            query: !! (document.querySelector)
        },
        engine: (window.opera) ? "presto" : !! (window.ActiveXObject) ? "trident" : (!navigator.taintEnabled) ? "webkit" : (undefined != document.getBoxObjectFor || null != window.mozInnerScreenY) ? "gecko" : "unknown",
        version: "",
        platform: b.match(/ip(?:ad|od|hone)/) ? "ios" : (b.match(/(?:webos|android)/) || navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(),
        backCompat: document.compatMode && "backcompat" == document.compatMode.toLowerCase(),
        getDoc: function () {
            return (document.compatMode && "backcompat" == document.compatMode.toLowerCase()) ? document.body : document.documentElement
        },
        ready: false,
        onready: function () {
            if ($J.j21.ready) {
                return
            }
            $J.j21.ready = true;
            $J.body = $mjs(document.body);
            $J.win = $mjs(window);
            $mjs(document).raiseEvent("domready")
        }
    };
    $J.j21.touchScreen = $J.$A(["ios", "webos", "android"]).contains($J.j21.platform);
    (function () {
        function c() {
            return !!(arguments.callee.caller)
        }
        $J.j21.version = ("presto" == $J.j21.engine) ? !! (document.head) ? 270 : !! (window.applicationCache) ? 260 : !! (window.localStorage) ? 250 : ($J.j21.features.query) ? 220 : ((c()) ? 211 : ((document.getElementsByClassName) ? 210 : 200)) : ("trident" == $J.j21.engine) ? !! (window.msPerformance || window.performance) ? 900 : !! (window.XMLHttpRequest && window.postMessage) ? 6 : ((window.XMLHttpRequest) ? 5 : 4) : ("webkit" == $J.j21.engine) ? (($J.j21.features.xpath) ? (($J.j21.features.query) ? 525 : 420) : 419) : ("gecko" == $J.j21.engine) ? !! (document.head) ? 200 : !! document.readyState ? 192 : !! (window.localStorage) ? 191 : ((document.getElementsByClassName) ? 190 : 181) : "";
        $J.j21[$J.j21.engine] = $J.j21[$J.j21.engine + $J.j21.version] = true;
        if (window.chrome) {
            $J.j21.chrome = true
        }
    })();
    $J.Element = {
        j13: function (c) {
            return this.className.has(c, " ")
        },
        j2: function (c) {
            if (c && !this.j13(c)) {
                this.className += (this.className ? " " : "") + c
            }
            return this
        },
        j3: function (c) {
            c = c || ".*";
            this.className = this.className.replace(new RegExp("(^|\\s)" + c + "(?:\\s|$)"), "$1").j26();
            return this
        },
        j4: function (c) {
            return this.j13(c) ? this.j3(c) : this.j2(c)
        },
        j5: function (e) {
            e = (e == "float" && this.currentStyle) ? "styleFloat" : e.j22();
            var c = null,
                d = null;
            if (this.currentStyle) {
                c = this.currentStyle[e]
            } else {
                if (document.defaultView && document.defaultView.getComputedStyle) {
                    d = document.defaultView.getComputedStyle(this, null);
                    c = d ? d.getPropertyValue([e.dashize()]) : null
                }
            }
            if (!c) {
                c = this.style[e]
            }
            if ("opacity" == e) {
                return $J.defined(c) ? parseFloat(c) : 1
            }
            if (/^(border(Top|Bottom|Left|Right)Width)|((padding|margin)(Top|Bottom|Left|Right))$/.test(e)) {
                c = parseInt(c) ? c : "0px"
            }
            return ("auto" == c ? null : c)
        },
        j6Prop: function (d, c) {
            try {
                if ("opacity" == d) {
                    this.j23(c);
                    return this
                }
                if ("float" == d) {
                    this.style[("undefined" === typeof (this.style.styleFloat)) ? "cssFloat" : "styleFloat"] = c;
                    return this
                }
                this.style[d.j22()] = c + (("number" == $J.j1(c) && !$mjs(["zIndex", "zoom"]).contains(d.j22())) ? "px" : "")
            } catch (f) {}
            return this
        },
        j6: function (d) {
            for (var c in d) {
                this.j6Prop(c, d[c])
            }
            return this
        },
        j19s: function () {
            var c = {};
            $J.$A(arguments).j14(function (d) {
                c[d] = this.j5(d)
            }, this);
            return c
        },
        j23: function (g, d) {
            d = d || false;
            g = parseFloat(g);
            if (d) {
                if (g == 0) {
                    if ("hidden" != this.style.visibility) {
                        this.style.visibility = "hidden"
                    }
                } else {
                    if ("visible" != this.style.visibility) {
                        this.style.visibility = "visible"
                    }
                }
            }
            if ($J.j21.trident) {
                if (!this.currentStyle || !this.currentStyle.hasLayout) {
                    this.style.zoom = 1
                }
                try {
                    var e = this.filters.item("DXImageTransform.Microsoft.Alpha");
                    e.enabled = (1 != g);
                    e.opacity = g * 100
                } catch (c) {
                    this.style.filter += (1 == g) ? "" : "progid:DXImageTransform.Microsoft.Alpha(enabled=true,opacity=" + g * 100 + ")"
                }
            }
            this.style.opacity = g;
            return this
        },
        setProps: function (c) {
            for (var d in c) {
                this.setAttribute(d, "" + c[d])
            }
            return this
        },
        hide: function () {
            return this.j6({
                display: "none",
                visibility: "hidden"
            })
        },
        show: function () {
            return this.j6({
                display: "block",
                visibility: "visible"
            })
        },
        j7: function () {
            return {
                width: this.offsetWidth,
                height: this.offsetHeight
            }
        },
        j10: function () {
            return {
                top: this.scrollTop,
                left: this.scrollLeft
            }
        },
        j11: function () {
            var c = this,
                d = {
                    top: 0,
                    left: 0
                };
            do {
                d.left += c.scrollLeft || 0;
                d.top += c.scrollTop || 0;
                c = c.parentNode
            } while (c);
            return d
        },
        j8: function () {
            if ($J.defined(document.documentElement.getBoundingClientRect)) {
                var c = this.getBoundingClientRect(),
                    e = $mjs(document).j10(),
                    g = $J.j21.getDoc();
                return {
                    top: c.top + e.y - g.clientTop,
                    left: c.left + e.x - g.clientLeft
                }
            }
            var f = this,
                d = t = 0;
            do {
                d += f.offsetLeft || 0;
                t += f.offsetTop || 0;
                f = f.offsetParent
            } while (f && !(/^(?:body|html)$/i).test(f.tagName));
            return {
                top: t,
                left: d
            }
        },
        j9: function () {
            var d = this.j8();
            var c = this.j7();
            return {
                top: d.top,
                bottom: d.top + c.height,
                left: d.left,
                right: d.left + c.width
            }
        },
        update: function (f) {
            try {
                this.innerHTML = f
            } catch (d) {
                this.innerText = f
            }
            return this
        },
        j33: function () {
            return (this.parentNode) ? this.parentNode.removeChild(this) : this
        },
        kill: function () {
            $J.$A(this.childNodes).j14(function (c) {
                if (3 == c.nodeType || 8 == c.nodeType) {
                    return
                }
                $mjs(c).kill()
            });
            this.j33();
            this.je3();
            if (this.$J_UUID) {
                $J.storage[this.$J_UUID] = null;
                delete $J.storage[this.$J_UUID]
            }
            return null
        },
        append: function (e, d) {
            d = d || "bottom";
            var c = this.firstChild;
            ("top" == d && c) ? this.insertBefore(e, c) : this.appendChild(e);
            return this
        },
        j32: function (e, d) {
            var c = $mjs(e).append(this, d);
            return this
        },
        enclose: function (c) {
            this.append(c.parentNode.replaceChild(this, c));
            return this
        },
        hasChild: function (c) {
            if (!(c = $mjs(c))) {
                return false
            }
            return (this == c) ? false : (this.contains && !($J.j21.webkit419)) ? (this.contains(c)) : (this.compareDocumentPosition) ? !! (this.compareDocumentPosition(c) & 16) : $J.$A(this.byTag(c.tagName)).contains(c)
        }
    };
    $J.Element.j19 = $J.Element.j5;
    $J.Element.j20 = $J.Element.j6;
    if (!window.Element) {
        window.Element = $J.$F;
        if ($J.j21.engine.webkit) {
            window.document.createElement("iframe")
        }
        window.Element.prototype = ($J.j21.engine.webkit) ? window["[[DOMElement.prototype]]"] : {}
    }
    $J.implement(window.Element, {
        $J_TYPE: "element"
    });
    $J.Doc = {
        j7: function () {
            if ($J.j21.presto925 || $J.j21.webkit419) {
                return {
                    width: self.innerWidth,
                    height: self.innerHeight
                }
            }
            return {
                width: $J.j21.getDoc().clientWidth,
                height: $J.j21.getDoc().clientHeight
            }
        },
        j10: function () {
            return {
                x: self.pageXOffset || $J.j21.getDoc().scrollLeft,
                y: self.pageYOffset || $J.j21.getDoc().scrollTop
            }
        },
        j12: function () {
            var c = this.j7();
            return {
                width: Math.max($J.j21.getDoc().scrollWidth, c.width),
                height: Math.max($J.j21.getDoc().scrollHeight, c.height)
            }
        }
    };
    $J.extend(document, {
        $J_TYPE: "document"
    });
    $J.extend(window, {
        $J_TYPE: "window"
    });
    $J.extend([$J.Element, $J.Doc], {
        j29: function (f, d) {
            var c = $J.getStorage(this.$J_UUID),
                e = c[f];
            if (undefined != d && undefined == e) {
                e = c[f] = d
            }
            return ($J.defined(e) ? e : null)
        },
        j30: function (e, d) {
            var c = $J.getStorage(this.$J_UUID);
            c[e] = d;
            return this
        },
        j31: function (d) {
            var c = $J.getStorage(this.$J_UUID);
            delete c[d];
            return this
        }
    });
    if (!(window.HTMLElement && window.HTMLElement.prototype && window.HTMLElement.prototype.getElementsByClassName)) {
        $J.extend([$J.Element, $J.Doc], {
            getElementsByClassName: function (c) {
                return $J.$A(this.getElementsByTagName("*")).filter(function (f) {
                    try {
                        return (1 == f.nodeType && f.className.has(c, " "))
                    } catch (d) {}
                })
            }
        })
    }
    $J.extend([$J.Element, $J.Doc], {
        byClass: function () {
            return this.getElementsByClassName(arguments[0])
        },
        byTag: function () {
            return this.getElementsByTagName(arguments[0])
        }
    });
    $J.Event = {
        $J_TYPE: "event",
        stop: function () {
            if (this.stopPropagation) {
                this.stopPropagation()
            } else {
                this.cancelBubble = true
            }
            if (this.preventDefault) {
                this.preventDefault()
            } else {
                this.returnValue = false
            }
            return this
        },
        j15: function () {
            var d, c;
            d = ((/touch/i).test(this.type)) ? this.changedTouches[0] : this;
            return (!$J.defined(d)) ? {
                x: 0,
                y: 0
            } : {
                x: d.pageX || d.clientX + $J.j21.getDoc().scrollLeft,
                y: d.pageY || d.clientY + $J.j21.getDoc().scrollTop
            }
        },
        getTarget: function () {
            var c = this.target || this.srcElement;
            while (c && 3 == c.nodeType) {
                c = c.parentNode
            }
            return c
        },
        getRelated: function () {
            var d = null;
            switch (this.type) {
            case "mouseover":
                d = this.relatedTarget || this.fromElement;
                break;
            case "mouseout":
                d = this.relatedTarget || this.toElement;
                break;
            default:
                return d
            }
            try {
                while (d && 3 == d.nodeType) {
                    d = d.parentNode
                }
            } catch (c) {
                d = null
            }
            return d
        },
        getButton: function () {
            if (!this.which && this.button !== undefined) {
                return (this.button & 1 ? 1 : (this.button & 2 ? 3 : (this.button & 4 ? 2 : 0)))
            }
            return this.which
        }
    };
    $J._event_add_ = "addEventListener";
    $J._event_del_ = "removeEventListener";
    $J._event_prefix_ = "";
    if (!document.addEventListener) {
        $J._event_add_ = "attachEvent";
        $J._event_del_ = "detachEvent";
        $J._event_prefix_ = "on"
    }
    $J.extend([$J.Element, $J.Doc], {
        je1: function (f, e) {
            var h = ("domready" == f) ? false : true,
                d = this.j29("events", {});
            d[f] = d[f] || {};
            if (d[f].hasOwnProperty(e.$J_EUID)) {
                return this
            }
            if (!e.$J_EUID) {
                e.$J_EUID = Math.floor(Math.random() * $J.now())
            }
            var c = this,
                g = function (i) {
                    return e.call(c)
                };
            if ("domready" == f) {
                if ($J.j21.ready) {
                    e.call(this);
                    return this
                }
            }
            if (h) {
                g = function (i) {
                    i = $J.extend(i || window.e, {
                        $J_TYPE: "event"
                    });
                    return e.call(c, $mjs(i))
                };
                this[$J._event_add_]($J._event_prefix_ + f, g, false)
            }
            d[f][e.$J_EUID] = g;
            return this
        },
        je2: function (f) {
            var h = ("domready" == f) ? false : true,
                d = this.j29("events");
            if (!d || !d[f]) {
                return this
            }
            var g = d[f],
                e = arguments[1] || null;
            if (f && !e) {
                for (var c in g) {
                    if (!g.hasOwnProperty(c)) {
                        continue
                    }
                    this.je2(f, c)
                }
                return this
            }
            e = ("function" == $J.j1(e)) ? e.$J_EUID : e;
            if (!g.hasOwnProperty(e)) {
                return this
            }
            if ("domready" == f) {
                h = false
            }
            if (h) {
                this[$J._event_del_]($J._event_prefix_ + f, g[e], false)
            }
            delete g[e];
            return this
        },
        raiseEvent: function (g, d) {
            var l = ("domready" == g) ? false : true,
                j = this,
                i;
            if (!l) {
                var f = this.j29("events");
                if (!f || !f[g]) {
                    return this
                }
                var h = f[g];
                for (var c in h) {
                    if (!h.hasOwnProperty(c)) {
                        continue
                    }
                    h[c].call(this)
                }
                return this
            }
            if (j === document && document.createEvent && !el.dispatchEvent) {
                j = document.documentElement
            }
            if (document.createEvent) {
                i = document.createEvent(g);
                i.initEvent(d, true, true)
            } else {
                i = document.createEventObject();
                i.eventType = g
            }
            if (document.createEvent) {
                j.dispatchEvent(i)
            } else {
                j.fireEvent("on" + d, i)
            }
            return i
        },
        je3: function () {
            var c = this.j29("events");
            if (!c) {
                return this
            }
            for (var d in c) {
                this.je2(d)
            }
            this.j31("events");
            return this
        }
    });
    (function () {
        if ($J.j21.webkit && $J.j21.version < 420) {
            (function () {
                ($mjs(["loaded", "complete"]).contains(document.readyState)) ? $J.j21.onready() : arguments.callee.j27(50)
            })()
        } else {
            if ($J.j21.trident && window == top) {
                (function () {
                    ($J.$try(function () {
                        $J.j21.getDoc().doScroll("left");
                        return true
                    })) ? $J.j21.onready() : arguments.callee.j27(50)
                })()
            } else {
                $mjs(document).je1("DOMContentLoaded", $J.j21.onready);
                $mjs(window).je1("load", $J.j21.onready)
            }
        }
    })();
    $J.Class = function () {
        var g = null,
            d = $J.$A(arguments);
        if ("class" == $J.j1(d[0])) {
            g = d.shift()
        }
        var c = function () {
                for (var j in this) {
                    this[j] = $J.detach(this[j])
                }
                if (this.constructor.$parent) {
                    this.$parent = {};
                    var n = this.constructor.$parent;
                    for (var l in n) {
                        var i = n[l];
                        switch ($J.j1(i)) {
                        case "function":
                            this.$parent[l] = $J.Class.wrap(this, i);
                            break;
                        case "object":
                            this.$parent[l] = $J.detach(i);
                            break;
                        case "array":
                            this.$parent[l] = $J.detach(i);
                            break
                        }
                    }
                }
                var h = (this.init) ? this.init.apply(this, arguments) : this;
                delete this.caller;
                return h
            };
        if (!c.prototype.init) {
            c.prototype.init = $J.$F
        }
        if (g) {
            var f = function () {};
            f.prototype = g.prototype;
            c.prototype = new f;
            c.$parent = {};
            for (var e in g.prototype) {
                c.$parent[e] = g.prototype[e]
            }
        } else {
            c.$parent = null
        }
        c.constructor = $J.Class;
        c.prototype.constructor = c;
        $J.extend(c.prototype, d[0]);
        $J.extend(c, {
            $J_TYPE: "class"
        });
        return c
    };
    a.Class.wrap = function (c, d) {
        return function () {
            var f = this.caller;
            var e = d.apply(c, arguments);
            return e
        }
    };
    $J.win = $mjs(window);
    $J.doc = $mjs(document)
})();
(function (a) {
    if (!a) {
        throw "MagicJS not found";
        return
    }
    if (a.FX) {
        return
    }
    var b = a.$;
    a.FX = new a.Class({
        options: {
            fps: 50,
            duration: 500,
            transition: function (c) {
                return -(Math.cos(Math.PI * c) - 1) / 2
            },
            onStart: a.$F,
            onComplete: a.$F,
            onBeforeRender: a.$F,
            roundCss: true
        },
        styles: null,
        init: function (d, c) {
            this.el = $mjs(d);
            this.options = a.extend(this.options, c);
            this.timer = false
        },
        start: function (c) {
            this.styles = c;
            this.state = 0;
            this.curFrame = 0;
            this.startTime = a.now();
            this.finishTime = this.startTime + this.options.duration;
            this.timer = this.loop.j24(this).interval(Math.round(1000 / this.options.fps));
            this.options.onStart.call();
            return this
        },
        stop: function (c) {
            c = a.defined(c) ? c : false;
            if (this.timer) {
                clearInterval(this.timer);
                this.timer = false
            }
            if (c) {
                this.render(1);
                this.options.onComplete.j27(10)
            }
            return this
        },
        calc: function (e, d, c) {
            return (d - e) * c + e
        },
        loop: function () {
            var d = a.now();
            if (d >= this.finishTime) {
                if (this.timer) {
                    clearInterval(this.timer);
                    this.timer = false
                }
                this.render(1);
                this.options.onComplete.j27(10);
                return this
            }
            var c = this.options.transition((d - this.startTime) / this.options.duration);
            this.render(c)
        },
        render: function (c) {
            var d = {};
            for (var e in this.styles) {
                if ("opacity" === e) {
                    d[e] = Math.round(this.calc(this.styles[e][0], this.styles[e][1], c) * 100) / 100
                } else {
                    d[e] = this.calc(this.styles[e][0], this.styles[e][1], c);
                    if (this.options.roundCss) {
                        d[e] = Math.round(d[e])
                    }
                }
            }
            this.options.onBeforeRender(d);
            this.set(d)
        },
        set: function (c) {
            return this.el.j6(c)
        }
    });
    a.FX.Transition = {
        linear: function (c) {
            return c
        },
        sineIn: function (c) {
            return -(Math.cos(Math.PI * c) - 1) / 2
        },
        sineOut: function (c) {
            return 1 - a.FX.Transition.sineIn(1 - c)
        },
        expoIn: function (c) {
            return Math.pow(2, 8 * (c - 1))
        },
        expoOut: function (c) {
            return 1 - a.FX.Transition.expoIn(1 - c)
        },
        quadIn: function (c) {
            return Math.pow(c, 2)
        },
        quadOut: function (c) {
            return 1 - a.FX.Transition.quadIn(1 - c)
        },
        cubicIn: function (c) {
            return Math.pow(c, 3)
        },
        cubicOut: function (c) {
            return 1 - a.FX.Transition.cubicIn(1 - c)
        },
        backIn: function (d, c) {
            c = c || 1.618;
            return Math.pow(d, 2) * ((c + 1) * d - c)
        },
        backOut: function (d, c) {
            return 1 - a.FX.Transition.backIn(1 - d)
        },
        elasticIn: function (d, c) {
            c = c || [];
            return Math.pow(2, 10 * --d) * Math.cos(20 * d * Math.PI * (c[0] || 1) / 3)
        },
        elasticOut: function (d, c) {
            return 1 - a.FX.Transition.elasticIn(1 - d, c)
        },
        bounceIn: function (e) {
            for (var d = 0, c = 1; 1; d += c, c /= 2) {
                if (e >= (7 - 4 * d) / 11) {
                    return c * c - Math.pow((11 - 6 * d - 11 * e) / 4, 2)
                }
            }
        },
        bounceOut: function (c) {
            return 1 - a.FX.Transition.bounceIn(1 - c)
        },
        none: function (c) {
            return 0
        }
    }
})(magicJS);
(function (a) {
    if (!a) {
        throw "MagicJS not found";
        return
    }
    if (!a.FX) {
        throw "MagicJS.FX not found";
        return
    }
    if (a.FX.Slide) {
        return
    }
    var b = a.$;
    a.FX.Slide = new a.Class(a.FX, {
        options: {
            mode: "vertical"
        },
        init: function (d, c) {
            this.el = $mjs(d);
            this.options = a.extend(this.$parent.options, this.options);
            this.$parent.init(d, c);
            this.wrapper = this.el.j29("slide:wrapper");
            this.wrapper = this.wrapper || a.$new("DIV").j6(a.extend(this.el.j19s("margin-top", "margin-left", "margin-right", "margin-bottom", "position", "top", "float"), {
                overflow: "hidden"
            })).enclose(this.el);
            this.el.j30("slide:wrapper", this.wrapper).j6({
                margin: 0
            })
        },
        vertical: function () {
            this.margin = "margin-top";
            this.layout = "height";
            this.offset = this.el.offsetHeight
        },
        horizontal: function (c) {
            this.margin = "margin-" + (c || "left");
            this.layout = "width";
            this.offset = this.el.offsetWidth
        },
        right: function () {
            this.horizontal()
        },
        left: function () {
            this.horizontal("right")
        },
        start: function (e, h) {
            this[h || this.options.mode]();
            var g = this.el.j5(this.margin).j17(),
                f = this.wrapper.j5(this.layout).j17(),
                c = {},
                i = {},
                d;
            c[this.margin] = [g, 0], c[this.layout] = [0, this.offset], i[this.margin] = [g, -this.offset], i[this.layout] = [f, 0];
            switch (e) {
            case "in":
                d = c;
                break;
            case "out":
                d = i;
                break;
            case "toggle":
                d = (0 == f) ? c : i;
                break
            }
            this.$parent.start(d);
            return this
        },
        set: function (c) {
            this.el.j6Prop(this.margin, c[this.margin]);
            this.wrapper.j6Prop(this.layout, c[this.layout]);
            return this
        },
        slideIn: function (c) {
            return this.start("in", c)
        },
        slideOut: function (c) {
            return this.start("out", c)
        },
        hide: function (d) {
            this[d || this.options.mode]();
            var c = {};
            c[this.layout] = 0, c[this.margin] = -this.offset;
            return this.set(c)
        },
        show: function (d) {
            this[d || this.options.mode]();
            var c = {};
            c[this.layout] = this.offset, c[this.margin] = 0;
            return this.set(c)
        },
        toggle: function (c) {
            return this.start("toggle", c)
        }
    })
})(magicJS);
(function (a) {
    if (!a) {
        throw "MagicJS not found";
        return
    }
    if (a.PFX) {
        return
    }
    var b = a.$;
    a.PFX = new a.Class(a.FX, {
        init: function (c, d) {
            this.el_arr = c;
            this.options = a.extend(this.options, d);
            this.timer = false
        },
        start: function (c) {
            this.$parent.start([]);
            this.styles_arr = c;
            return this
        },
        render: function (c) {
            for (var d = 0; d < this.el_arr.length; d++) {
                this.el = $mjs(this.el_arr[d]);
                this.styles = this.styles_arr[d];
                this.$parent.render(c)
            }
        }
    })
})(magicJS);
var MagicZoomPlus = (function (g) {
    var i = g.$;
    g.$Ff = function (j) {
        $mjs(j).stop();
        return false
    };
    var c = {
        version: "v4.0.3",
        options: {},
        defaults: {
            opacity: 50,
            opacityReverse: false,
            smoothingSpeed: 40,
            fps: 25,
            zoomWidth: 300,
            zoomHeight: 300,
            zoomDistance: 15,
            zoomPosition: "right",
            zoomAlign: "top",
            zoomWindowEffect: "shadow",
            dragMode: false,
            moveOnClick: true,
            alwaysShowZoom: false,
            preservePosition: false,
            x: -1,
            y: -1,
            clickToActivate: false,
            clickToDeactivate: false,
            initializeOn: "load",
            smoothing: true,
            showTitle: "top",
            titleSource: "title",
            zoomFade: true,
            zoomFadeInSpeed: 400,
            zoomFadeOutSpeed: 200,
            hotspots: "",
            hint: true,
            hintText: "Zoom",
            hintPosition: "tl",
            hintOpacity: 75,
            hintClass: "MagicZoomHint",
            showLoading: true,
            loadingMsg: "Loading zoom..",
            loadingOpacity: 75,
            loadingPositionX: -1,
            loadingPositionY: -1,
            selectorsChange: "click",
            selectorsMouseoverDelay: 60,
            selectorsEffect: "dissolve",
            selectorsEffectSpeed: 400,
            preloadSelectorsSmall: true,
            preloadSelectorsBig: false,
            selectorsClass: "",
            fitZoomWindow: true,
            entireImage: false,
            rightClick: false,
            disableZoom: false
        },
        z39: $mjs([/^(opacity)(\s+)?:(\s+)?(\d+)$/i, /^(opacity-reverse)(\s+)?:(\s+)?(true|false)$/i, /^(smoothing\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(fps)(\s+)?:(\s+)?(\d+)$/i, /^(zoom\-width)(\s+)?:(\s+)?(\d+)(px)?/i, /^(zoom\-height)(\s+)?:(\s+)?(\d+)(px)?/i, /^(zoom\-distance)(\s+)?:(\s+)?(\d+)(px)?/i, /^(zoom\-position)(\s+)?:(\s+)?(right|left|top|bottom|custom|inner|#([a-z0-9_\-:\.]+))$/i, /^(zoom\-align)(\s+)?:(\s+)?(right|left|top|bottom|center)$/i, /^(zoom\-window\-effect)(\s+)?:(\s+)?(shadow|glow|false)$/i, /^(drag\-mode)(\s+)?:(\s+)?(true|false)$/i, /^(move\-on\-click)(\s+)?:(\s+)?(true|false)$/i, /^(always\-show\-zoom)(\s+)?:(\s+)?(true|false)$/i, /^(preserve\-position)(\s+)?:(\s+)?(true|false)$/i, /^(x)(\s+)?:(\s+)?([\d.]+)(px)?/i, /^(y)(\s+)?:(\s+)?([\d.]+)(px)?/i, /^(click\-to\-activate)(\s+)?:(\s+)?(true|false)$/i, /^(click\-to\-deactivate)(\s+)?:(\s+)?(true|false)$/i, /^(initialize\-on)(\s+)?:(\s+)?(load|click|mouseover)$/i, /^(click\-to\-initialize)(\s+)?:(\s+)?(true|false)$/i, /^(smoothing)(\s+)?:(\s+)?(true|false)$/i, /^(show\-title)(\s+)?:(\s+)?(true|false|top|bottom)$/i, /^(title\-source)(\s+)?:(\s+)?(title|#([a-z0-9_\-:\.]+))$/i, /^(zoom\-fade)(\s+)?:(\s+)?(true|false)$/i, /^(zoom\-fade\-in\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(zoom\-fade\-out\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(hotspots)(\s+)?:(\s+)?([a-z0-9_\-:\.]+)$/i, /^(hint)(\s+)?:(\s+)?(true|false)/i, /^(hint\-text)(\s+)?:(\s+)?([^;]*)$/i, /^(hint\-opacity)(\s+)?:(\s+)?(\d+)$/i, /^(hint\-position)(\s+)?:(\s+)?(tl|tr|tc|bl|br|bc)/i, /^(show\-loading)(\s+)?:(\s+)?(true|false)$/i, /^(loading\-msg)(\s+)?:(\s+)?([^;]*)$/i, /^(loading\-opacity)(\s+)?:(\s+)?(\d+)$/i, /^(loading\-position\-x)(\s+)?:(\s+)?(\d+)(px)?/i, /^(loading\-position\-y)(\s+)?:(\s+)?(\d+)(px)?/i, /^(thumb\-change)(\s+)?:(\s+)?(click|mouseover)$/i, /^(selectors\-change)(\s+)?:(\s+)?(click|mouseover)$/i, /^(selectors\-mouseover\-delay)(\s+)?:(\s+)?(\d+)$/i, /^(selectors\-effect)(\s+)?:(\s+)?(dissolve|fade|pounce|false)$/i, /^(selectors\-effect\-speed)(\s+)?:(\s+)?(\d+)$/i, /^(selectors\-class)(\s+)?:(\s+)?([a-z0-9_\-:\.]+)$/i, /^(fit\-zoom\-window)(\s+)?:(\s+)?(true|false)$/i, /^(preload\-selectors\-small)(\s+)?:(\s+)?(true|false)$/i, /^(preload\-selectors\-big)(\s+)?:(\s+)?(true|false)$/i, /^(entire\-image)(\s+)?:(\s+)?(true|false)$/i, /^(right\-click)(\s+)?:(\s+)?(true|false)$/i, /^(disable\-zoom)(\s+)?:(\s+)?(true|false)$/i]),
        zooms: $mjs([]),
        z8: function (l) {
            var k = /(click|mouseover)/i;
            for (var j = 0; j < c.zooms.length; j++) {
                if (c.zooms[j].z30 && !c.zooms[j].activatedEx) {
                    c.zooms[j].pause()
                } else {
                    if (k.test(c.zooms[j].options.initializeOn) && c.zooms[j].initMouseEvent) {
                        c.zooms[j].initMouseEvent = l
                    }
                }
            }
        },
        stop: function (j) {
            var e = $mjs([]);
            if (j) {
                if ((j = $mjs(j)) && j.zoom) {
                    e.push(j)
                } else {
                    return false
                }
            } else {
                e = $mjs(g.$A(g.body.byTag("A")).filter(function (k) {
                    return ((" " + k.className + " ").match(/\sMagicZoom\s/) && k.zoom)
                }))
            }
            e.j14(function (k) {
                k.zoom && k.zoom.stop()
            }, this)
        },
        start: function (e) {
            if (0 == arguments.length) {
                c.refresh();
                return true
            }
            e = $mjs(e);
            if (!e || !(" " + e.className + " ").match(/\s(MagicZoom|MagicZoomPlus)\s/)) {
                return false
            }
            if (!e.zoom) {
                var j = null;
                while (j = e.firstChild) {
                    if (j.tagName == "IMG") {
                        break
                    }
                    e.removeChild(j)
                }
                while (j = e.lastChild) {
                    if (j.tagName == "IMG") {
                        break
                    }
                    e.removeChild(j)
                }
                if (!e.firstChild || e.firstChild.tagName != "IMG") {
                    throw "Invalid Magic Zoom"
                }
                c.zooms.push(new c.zoom(e, (arguments.length > 1) ? arguments[1] : undefined))
            } else {
                e.zoom.start()
            }
        },
        update: function (l, e, k, j) {
            if ((l = $mjs(l)) && l.zoom) {
                l.zoom.update(e, k, j);
                return true
            }
            return false
        },
        refresh: function () {
            g.$A(window.document.getElementsByTagName("A")).j14(function (e) {
                if (e.className.has("MagicZoom", " ")) {
                    if (c.stop(e)) {
                        c.start.j27(100, e)
                    } else {
                        c.start(e)
                    }
                }
            }, this)
        },
        show: function (e) {
            if ((e = $mjs(e)) && e.zoom) {
                return e.zoom.activate()
            }
            return false
        },
        getXY: function (e) {
            if ((e = $mjs(e)) && e.zoom) {
                return {
                    x: e.zoom.options.x,
                    y: e.zoom.options.y
                }
            }
        },
        x7: function (k) {
            var j, e;
            j = "";
            for (e = 0; e < k.length; e++) {
                j += String.fromCharCode(14 ^ k.charCodeAt(e))
            }
            return j
        }
    };
    c.z48 = function () {
        this.init.apply(this, arguments)
    };
    c.z48.prototype = {
        init: function (e) {
            this.cb = null;
            this.z9 = null;
            this.onErrorHandler = this.onError.j16(this);
            this.z10 = null;
            this.width = 0;
            this.height = 0;
            this.border = {
                left: 0,
                right: 0,
                top: 0,
                bottom: 0
            };
            this.padding = {
                left: 0,
                right: 0,
                top: 0,
                bottom: 0
            };
            this.ready = false;
            this._tmpp = null;
            if ("string" == g.j1(e)) {
                this._tmpp = g.$new("div").j6({
                    position: "absolute",
                    top: "-10000px",
                    width: "1px",
                    height: "1px",
                    overflow: "hidden"
                }).j32(g.body);
                this.self = g.$new("img").j32(this._tmpp);
                this.z11();
                this.self.src = e
            } else {
                this.self = $mjs(e);
                this.z11();
                this.self.src = e.src
            }
        },
        _cleanup: function () {
            if (this._tmpp) {
                if (this.self.parentNode == this._tmpp) {
                    this.self.j33().j6({
                        position: "static",
                        top: "auto"
                    })
                }
                this._tmpp.kill();
                this._tmpp = null
            }
        },
        onError: function (j) {
            if (j) {
                $mjs(j).stop()
            }
            if (this.cb) {
                this._cleanup();
                this.cb.call(this, false)
            }
            this.unload()
        },
        z11: function (e) {
            this.z9 = null;
            if (e == true || !(this.self.src && (this.self.complete || this.self.readyState == "complete"))) {
                this.z9 = function (j) {
                    if (j) {
                        $mjs(j).stop()
                    }
                    if (this.ready) {
                        return
                    }
                    this.ready = true;
                    this.z13();
                    if (this.cb) {
                        this._cleanup();
                        this.cb.call()
                    }
                }.j16(this);
                this.self.je1("load", this.z9);
                $mjs(["abort", "error"]).j14(function (j) {
                    this.self.je1(j, this.onErrorHandler)
                }, this)
            } else {
                this.ready = true
            }
        },
        update: function (j) {
            this.unload();
            var e = g.$new("a", {
                href: j
            });
            if (this.self.src.has(e.href)) {
                this.ready = true
            } else {
                this.z11(true);
                this.self.src = j
            }
            e = null
        },
        z13: function () {
            this.width = this.self.width;
            this.height = this.self.height;
            if (this.width == 0 && this.height == 0 && g.j21.webkit) {
                this.width = this.self.naturalWidth;
                this.height = this.self.naturalHeight
            }
            $mjs(["Left", "Right", "Top", "Bottom"]).j14(function (j) {
                this.padding[j.toLowerCase()] = this.self.j19("padding" + j).j17();
                this.border[j.toLowerCase()] = this.self.j19("border" + j + "Width").j17()
            }, this);
            if (g.j21.presto || (g.j21.trident && !g.j21.backCompat)) {
                this.width -= this.padding.left + this.padding.right;
                this.height -= this.padding.top + this.padding.bottom
            }
        },
        getBox: function () {
            var e = null;
            e = this.self.j9();
            return {
                top: e.top + this.border.top,
                bottom: e.bottom - this.border.bottom,
                left: e.left + this.border.left,
                right: e.right - this.border.right
            }
        },
        z12: function () {
            if (this.z10) {
                this.z10.src = this.self.src;
                this.self = null;
                this.self = this.z10
            }
        },
        load: function (e) {
            if (this.ready) {
                if (!this.width) {
                    this.z13()
                }
                this._cleanup();
                e.call()
            } else {
                this.cb = e
            }
        },
        unload: function () {
            if (this.z9) {
                this.self.je2("load", this.z9)
            }
            $mjs(["abort", "error"]).j14(function (e) {
                this.self.je2(e, this.onErrorHandler)
            }, this);
            this.z9 = null;
            this.cb = null;
            this.width = null;
            this.ready = false;
            this._new = false
        }
    };
    c.zoom = function () {
        this.construct.apply(this, arguments)
    };
    c.zoom.prototype = {
        construct: function (k, j) {
            var e = {};
            this.z28 = -1;
            this.z30 = false;
            this.ddx = 0;
            this.ddy = 0;
            this.activatedEx = false;
            this.z44 = null;
            this.options = g.detach(c.defaults);
            if (k) {
                this.c = $mjs(k)
            }
            this.divTag = ("div" == this.c.tagName.toLowerCase());
            e = g.extend(e, this.z37());
            e = g.extend(e, this.z37(this.c.rel));
            if (j) {
                e = g.extend(e, this.z37(j))
            }
            if (e.dragMode && undefined === e.alwaysShowZoom) {
                e.alwaysShowZoom = true
            }
            g.extend(this.options, e);
            if ("load" == this.options.initializeOn && g.defined(this.options.clickToInitialize) && "true" == this.options.clickToInitialize.toString()) {
                this.options.initializeOn = "click"
            }
            if (g.defined(this.options.thumbChange) && this.options.thumbChange != this.options.selectorsChange) {
                this.options.selectorsChange = this.options.thumbChange
            }
            if (g.j21.touchScreen) {
                this.options.selectorsChange = "click";
                this.options.initializeOn = ("mouseover" == this.options.initializeOn) ? "click" : this.options.initializeOn;
                this.options.clickToDeactivate = false;
                if (window.screen.height <= 480) {
                    this.options.zoomPosition = "inner"
                }
            }
            if (this.options.disableZoom) {
                this.z30 = false;
                this.options.clickToActivate = true;
                this.options.hint = false
            }
            if (k) {
                this.lastSelector = null;
                this.z14 = this.mousedown.j16(this);
                this.z15 = this.mouseup.j16(this);
                this.z16 = this.show.j24(this, false);
                this.z17 = this.z29.j24(this);
                this.z43Bind = this.z43.j16(this);
                if (g.j21.touchScreen) {
                    this.c.je1("touchstart", this.z14);
                    this.c.je1("touchend", this.z15)
                } else {
                    if (!this.divTag) {
                        this.c.je1("click", function (m) {
                            var l = m.getButton();
                            if (3 == l) {
                                return true
                            }
                            $mjs(m).stop();
                            if (!g.j21.trident) {
                                this.blur()
                            }
                            return false
                        })
                    }
                    this.c.je1("mousedown", this.z14);
                    this.c.je1("mouseup", this.z15);
                    if ("mouseover" == this.options.initializeOn) {
                        this.c.je1("mouseover", this.z14)
                    }
                }
                this.c.unselectable = "on";
                this.c.style.MozUserSelect = "none";
                this.c.je1("selectstart", g.$Ff);
                if (!this.divTag) {
                    this.c.j6({
                        position: "relative",
                        display: "inline-block",
                        textDecoration: "none",
                        outline: "0",
                        cursor: "hand"
                    });
                    if (g.j21.gecko181 || g.j21.presto) {
                        this.c.j6({
                            display: "block"
                        })
                    }
                    if (this.c.j5("textAlign") == "center") {
                        this.c.j6({
                            margin: "auto auto"
                        })
                    }
                }
                this.c.zoom = this
            } else {
                this.options.initializeOn = "load"
            }
            if (!this.options.rightClick) {
                this.c.je1("contextmenu", g.$Ff)
            }
            if ("load" == this.options.initializeOn) {
                this.z18()
            } else {
                if ("" != this.c.id) {
                    this.z26(true)
                }
            }
        },
        z18: function () {
            var l, o, n, m, j;
            j = ["^bko}k.{~i|ojk.za.hga`.ah.Coigm.Taac(-6:6<5", "#ffffff", 10, "bold", "center", "100%"];
            j = ["^bko}k.{~i|ojk.za.hga`.ah.Coigm.Taac.^b{}(-6:6<5", "#ffffff", 10, "bold", "center", "1000%"];
            if (!this.z7) {
                this.z7 = new c.z48(this.c.firstChild);
                this.z1 = new c.z48(this.c.href)
            } else {
                this.z1.update(this.c.href)
            }
            if (!this.z47) {
                this.z47 = {
                    self: $mjs(document.createElement("DIV"))[(this.divTag) ? "j3" : "j2"]("MagicZoomBigImageCont").j6({
                        overflow: "hidden",
                        zIndex: 100,
                        top: "-100000px",
                        position: "absolute",
                        width: this.options.zoomWidth + "px",
                        height: this.options.zoomHeight + "px"
                    }),
                    zoom: this,
                    z21: "0px",
                    initTopPos: 0,
                    initLeftPos: 0
                };
                switch (this.options.zoomWindowEffect) {
                case "shadow":
                    this.z47.self.j2("MagicBoxShadow");
                    break;
                case "glow":
                    this.z47.self.j2("MagicBoxGlow");
                    break;
                default:
                    break
                }
                this.z47.hide = function () {
                    if (this.self.style.top != "-100000px" && this.zoom.z4 && !this.zoom.z4.z38) {
                        this.z21 = this.self.style.top;
                        this.self.style.top = "-100000px"
                    }
                };
                this.z47.z22 = this.z47.hide.j24(this.z47);
                if (g.j21.trident4) {
                    l = $mjs(document.createElement("IFRAME"));
                    l.src = "javascript:''";
                    l.j6({
                        left: "0px",
                        top: "0px",
                        position: "absolute",
                        "z-index": -1
                    }).frameBorder = 0;
                    this.z47.z23 = this.z47.self.appendChild(l)
                }
                this.z47.z41 = $mjs(document.createElement("DIV")).j2("MagicZoomHeader").j6({
                    position: "relative",
                    zIndex: 10,
                    left: "0px",
                    top: "0px",
                    padding: "3px"
                }).hide();
                o = document.createElement("DIV");
                o.style.overflow = "hidden";
                o.appendChild(this.z1.self);
                this.z1.self.j6({
                    padding: "0px",
                    margin: "0px",
                    border: "0px",
                    width: "auto",
                    height: "auto"
                });
                if (this.options.showTitle == "bottom") {
                    this.z47.self.appendChild(o);
                    this.z47.self.appendChild(this.z47.z41)
                } else {
                    this.z47.self.appendChild(this.z47.z41);
                    this.z47.self.appendChild(o)
                }
                if (this.options.zoomPosition == "custom" && $mjs(this.c.id + "-big")) {
                    $mjs(this.c.id + "-big").appendChild(this.z47.self)
                } else {
                    if (this.options.zoomPosition.has("#")) {
                        var q = this.options.zoomPosition.replace(/^#/, "");
                        if ($mjs(q)) {
                            $mjs(q).appendChild(this.z47.self)
                        }
                    } else {
                        this.c.appendChild(this.z47.self)
                    }
                }
                if ("undefined" !== typeof (j)) {
                    this.z47.g = $mjs(document.createElement("div")).j6({
                        color: j[1],
                        fontSize: j[2] + "px",
                        fontWeight: j[3],
                        fontFamily: "Tahoma",
                        position: "absolute",
                        width: j[5],
                        textAlign: j[4],
                        left: "0px"
                    }).update(c.x7(j[0]));
                    this.z47.self.appendChild(this.z47.g)
                }
            }
            if (this.options.showTitle != "false" && this.options.showTitle != false) {
                var k = this.z47.z41;
                k.hide();
                while (n = k.firstChild) {
                    k.removeChild(n)
                }
                if (this.options.titleSource == "title" && "" != this.c.title) {
                    k.appendChild(document.createTextNode(this.c.title));
                    k.show()
                } else {
                    if (this.options.titleSource.has("#")) {
                        var q = this.options.titleSource.replace(/^#/, "");
                        if ($mjs(q)) {
                            k.update($mjs(q).innerHTML);
                            k.show()
                        }
                    }
                }
            } else {
                this.z47.z41.hide()
            }
            this.c.z46 = this.c.title;
            this.c.title = "";
            this.z7.load(this.z19.j24(this))
        },
        z19: function (e) {
            if (!e && e !== undefined) {
                return
            }
            if (!this.options.opacityReverse) {
                this.z7.self.j23(1)
            }
            if (!this.divTag) {
                this.c.j6({
                    width: this.z7.width + "px"
                })
            }
            if (this.options.showLoading) {
                this.z24 = setTimeout(this.z17, 400)
            }
            if (this.options.hotspots != "" && $mjs(this.options.hotspots)) {
                this.z25()
            }
            if (this.c.id != "") {
                this.z26()
            }
            this.z1.load(this.z20.j24(this))
        },
        z20: function (k) {
            var j, e;
            if (!k && k !== undefined) {
                clearTimeout(this.z24);
                if (this.options.showLoading && this.z3) {
                    this.z3.hide()
                }
                return
            }
            if (!this.z7 || !this.z1) {
                return
            }
            e = this.z7.self.j9();
            if (e.bottom == e.top) {
                this.z20.j24(this).j27(500);
                return
            }
            if (this.z7.width == 0 && g.j21.trident) {
                this.z7.z13();
                this.z1.z13();
                !this.divTag && this.c.j6({
                    width: this.z7.width + "px"
                })
            }
            j = this.z47.z41.j7();
            if (this.options.fitZoomWindow || this.options.entireImage) {
                if ((this.z1.width < this.options.zoomWidth) || this.options.entireImage) {
                    this.options.zoomWidth = this.z1.width;
                    this.z47.self.j6({
                        width: this.options.zoomWidth
                    });
                    j = this.z47.z41.j7()
                }
                if ((this.z1.height < this.options.zoomHeight) || this.options.entireImage) {
                    this.options.zoomHeight = this.z1.height + j.height
                }
            }
            switch (this.options.zoomPosition) {
            case "custom":
                break;
            case "right":
                this.z47.self.style.left = e.right - e.left + this.options.zoomDistance + "px";
                break;
            case "left":
                this.z47.self.style.left = "-" + (this.options.zoomDistance + this.options.zoomWidth) + "px";
                break;
            case "top":
                this.z47.z21 = "-" + (this.options.zoomDistance + this.options.zoomHeight) + "px";
                break;
            case "bottom":
                this.z47.z21 = e.bottom - e.top + this.options.zoomDistance + "px";
                break;
            case "inner":
                this.z47.self.j6({
                    left: "0px",
                    height: this.z7.height + "px",
                    width: this.z7.width + "px"
                });
                this.options.zoomWidth = this.z7.width;
                this.options.zoomHeight = this.z7.height;
                this.z47.z21 = "0px";
                break
            }
            if (this.options.showTitle == "bottom") {
                this.z1.self.parentNode.style.height = (this.options.zoomHeight - j.height) + "px"
            }
            this.z47.self.j6({
                height: this.options.zoomHeight + "px",
                width: this.options.zoomWidth + "px"
            }).j23(1);
            if (g.j21.trident4 && this.z47.z23) {
                this.z47.z23.j6({
                    width: this.options.zoomWidth + "px",
                    height: this.options.zoomHeight + "px"
                })
            }
            if (this.options.zoomPosition == "right" || this.options.zoomPosition == "left") {
                if (this.options.zoomAlign == "center") {
                    this.z47.z21 = -1 * (this.options.zoomHeight - e.bottom + e.top) / 2 + "px"
                } else {
                    if (this.options.zoomAlign == "bottom") {
                        this.z47.z21 = -1 * (this.options.zoomHeight - e.bottom + e.top) + "px"
                    } else {
                        this.z47.z21 = "0px"
                    }
                }
            } else {
                if (this.options.zoomPosition == "top" || this.options.zoomPosition == "bottom") {
                    if (this.options.zoomAlign == "center") {
                        this.z47.self.style.left = -1 * (this.options.zoomWidth - e.right + e.left) / 2 + "px"
                    } else {
                        if (this.options.zoomAlign == "right") {
                            this.z47.self.style.left = -1 * (this.options.zoomWidth - e.right + e.left) + "px"
                        } else {
                            this.z47.self.style.left = "0px"
                        }
                    }
                }
            }
            this.z47.initTopPos = parseInt(this.z47.z21, 10);
            this.z47.initLeftPos = parseInt(this.z47.self.style.left, 10);
            this.zoomViewHeight = this.options.zoomHeight - j.height;
            if (this.z47.g) {
                this.z47.g.j6({
                    top: this.options.showTitle == "bottom" ? "0px" : ((this.options.zoomHeight - 20) + "px")
                })
            }
            this.z1.self.j6({
                position: "relative",
                borderWidth: "0px",
                padding: "0px",
                left: "0px",
                top: "0px"
            });
            this.z27();
            if (this.options.alwaysShowZoom) {
                if (this.options.x == -1) {
                    this.options.x = this.z7.width / 2
                }
                if (this.options.y == -1) {
                    this.options.y = this.z7.height / 2
                }
                this.show()
            } else {
                if (this.options.zoomFade) {
                    this.z2 = new g.FX(this.z47.self)
                }
                this.z47.self.j6({
                    top: "-100000px"
                })
            }
            if (this.options.showLoading && this.z3) {
                this.z3.hide()
            }
            if (g.j21.touchScreen) {
                this.c.je1("touchmove", this.z43Bind);
                this.c.je1("touchend", this.z43Bind)
            } else {
                this.c.je1("mousemove", this.z43Bind);
                this.c.je1("mouseout", this.z43Bind)
            }
            this.setupHint();
            if (!this.options.disableZoom && (!this.options.clickToActivate || "click" == this.options.initializeOn)) {
                this.z30 = true
            }
            if ("click" == this.options.initializeOn && this.initMouseEvent) {
                this.z43(this.initMouseEvent)
            }
            if (this.activatedEx) {
                this.activate()
            }
            this.z28 = g.now()
        },
        setupHint: function () {
            var m = /tr|br/i,
                e = /bl|br|bc/i,
                j = /bc|tc/i,
                l = null;
            this.hintVisible = undefined;
            if (!this.options.hint) {
                if (this.hint) {
                    this.hint.kill();
                    this.hint = undefined
                }
                return
            }
            if (!this.hint) {
                this.hint = $mjs(document.createElement("DIV")).j2(this.options.hintClass).j6({
                    display: "block",
                    overflow: "hidden",
                    position: "absolute",
                    visibility: "hidden",
                    "z-index": 1
                });
                if (this.options.hintText != "") {
                    this.hint.appendChild(document.createTextNode(this.options.hintText))
                }
                this.c.appendChild(this.hint)
            } else {
                if (this.options.hintText != "") {
                    l = this.hint[(this.hint.firstChild) ? "replaceChild" : "appendChild"](document.createTextNode(this.options.hintText), this.hint.firstChild);
                    l = null
                }
            }
            this.hint.j6({
                left: "auto",
                right: "auto",
                top: "auto",
                bottom: "auto",
                display: "block",
                opacity: (this.options.hintOpacity / 100),
                "max-width": (this.z7.width - 4)
            });
            var k = this.hint.j7();
            this.hint.j6Prop((m.test(this.options.hintPosition) ? "right" : "left"), (j.test(this.options.hintPosition) ? (this.z7.width - k.width) / 2 : 2)).j6Prop((e.test(this.options.hintPosition) ? "bottom" : "top"), 2);
            this.hintVisible = true;
            this.hint.show()
        },
        z29: function () {
            if (this.z1.ready) {
                return
            }
            this.z3 = $mjs(document.createElement("DIV")).j2("MagicZoomLoading").j23(this.options.loadingOpacity / 100).j6({
                display: "block",
                overflow: "hidden",
                position: "absolute",
                visibility: "hidden",
                "z-index": 20,
                "max-width": (this.z7.width - 4)
            });
            this.z3.appendChild(document.createTextNode(this.options.loadingMsg));
            this.c.appendChild(this.z3);
            var e = this.z3.j7();
            this.z3.j6({
                left: (this.options.loadingPositionX == -1 ? ((this.z7.width - e.width) / 2) : (this.options.loadingPositionX)) + "px",
                top: (this.options.loadingPositionY == -1 ? ((this.z7.height - e.height) / 2) : (this.options.loadingPositionY)) + "px"
            });
            this.z3.show()
        },
        z25: function () {
            $mjs(this.options.hotspots).z31 = $mjs(this.options.hotspots).parentNode;
            $mjs(this.options.hotspots).z32 = $mjs(this.options.hotspots).nextSibling;
            this.c.appendChild($mjs(this.options.hotspots));
            $mjs(this.options.hotspots).j6({
                position: "absolute",
                left: "0px",
                top: "0px",
                width: this.z7.width + "px",
                height: this.z7.height + "px",
                zIndex: 15
            }).show();
            if (g.j21.trident) {
                this.c.z33 = this.c.appendChild($mjs(document.createElement("DIV")).j6({
                    position: "absolute",
                    left: "0px",
                    top: "0px",
                    width: this.z7.width + "px",
                    height: this.z7.height + "px",
                    zIndex: 14,
                    background: "#ccc"
                }).j23(0.00001))
            }
            g.$A($mjs(this.options.hotspots).getElementsByTagName("A")).j14(function (j) {
                var k = j.coords.split(","),
                    e = null;
                $mjs(j).j6({
                    position: "absolute",
                    left: k[0] + "px",
                    top: k[1] + "px",
                    width: (k[2] - k[0]) + "px",
                    height: (k[3] - k[1]) + "px",
                    zIndex: 15
                }).show();
                if (j.j13("MagicThumb")) {
                    if (e = j.j29("thumb")) {
                        e.group = this.options.hotspots
                    } else {
                        j.rel += ";group: " + this.options.hotspots + ";"
                    }
                }
            }, this)
        },
        z26: function (k) {
            var e, l, j = new RegExp("zoom\\-id(\\s+)?:(\\s+)?" + this.c.id + "($|;)");
            this.selectors = $mjs([]);
            g.$A(document.getElementsByTagName("A")).j14(function (n) {
                if (j.test(n.rel)) {
                    if (!$mjs(n).z36) {
                        n.z36 = function (o) {
                            if (!g.j21.trident) {
                                this.blur()
                            }
                            $mjs(o).stop();
                            return false
                        };
                        n.je1("click", n.z36)
                    }
                    if (k) {
                        return
                    }
                    var m = g.$new("a", {
                        href: n.rev
                    });
                    if (this.options.selectorsClass != "" && this.z1.self.src.has(n.href) && this.z7.self.src.has(m.href)) {
                        $mjs(n).j2(this.options.selectorsClass)
                    }
                    m = null;
                    if (!n.z34) {
                        n.z34 = function (p, o) {
                            if (o.hasChild(p.getRelated())) {
                                return
                            }
                            if (p.type == "mouseout") {
                                if (this.z35) {
                                    clearTimeout(this.z35)
                                }
                                this.z35 = false;
                                return
                            }
                            if (o.title != "") {
                                this.c.title = o.title
                            }
                            if (p.type == "mouseover") {
                                this.z35 = setTimeout(this.update.j24(this, o.href, o.rev, o.rel, o), this.options.selectorsMouseoverDelay)
                            } else {
                                this.update(o.href, o.rev, o.rel)
                            }
                        }.j16(this, n);
                        n.je1(this.options.selectorsChange, n.z34);
                        if (this.options.selectorsChange == "mouseover") {
                            n.je1("mouseout", n.z34)
                        }
                    }
                    n.j6({
                        outline: "0",
                        display: "inline-block"
                    });
                    if (this.options.preloadSelectorsSmall) {
                        l = new Image();
                        l.src = n.rev
                    }
                    if (this.options.preloadSelectorsBig) {
                        e = new Image();
                        e.src = n.href
                    }
                    this.selectors.push(n)
                }
            }, this)
        },
        stop: function (j) {
            try {
                this.pause();
                if (g.j21.touchScreen) {
                    this.c.je2("touchmove", this.z43Bind);
                    this.c.je2("touchend", this.z43Bind)
                } else {
                    this.c.je2("mousemove", this.z43Bind);
                    this.c.je2("mouseout", this.z43Bind)
                }
                if (undefined === j && this.z4) {
                    this.z4.self.hide()
                }
                if (this.z2) {
                    this.z2.stop()
                }
                this.z6 = null;
                this.z30 = false;
                if (this.selectors !== undefined) {
                    this.selectors.j14(function (e) {
                        if (this.options.selectorsClass != "") {
                            e.j3(this.options.selectorsClass)
                        }
                        if (undefined === j) {
                            e.je2(this.options.selectorsChange, e.z34);
                            if (this.options.selectorsChange == "mouseover") {
                                e.je2("mouseout", e.z34)
                            }
                            e.z34 = null;
                            e.je2("click", e.z36);
                            e.z36 = null
                        }
                    }, this)
                }
                if (this.options.hotspots != "" && $mjs(this.options.hotspots)) {
                    $mjs(this.options.hotspots).hide();
                    $mjs(this.options.hotspots).z31.insertBefore($mjs(this.options.hotspots), $mjs(this.options.hotspots).z32);
                    if (this.c.z33) {
                        this.c.removeChild(this.c.z33)
                    }
                }
                this.z1.unload();
                if (this.options.opacityReverse) {
                    this.c.j3("MagicZoomPup");
                    this.z7.self.j23(1)
                }
                this.z2 = null;
                if (this.z3) {
                    this.c.removeChild(this.z3)
                }
                if (this.hint) {
                    this.hint.hide()
                }
                if (undefined === j) {
                    if (this.hint) {
                        this.c.removeChild(this.hint)
                    }
                    this.hint = null;
                    this.z7.unload();
                    (this.z4 && this.z4.self) && this.c.removeChild(this.z4.self);
                    (this.z47 && this.z47.self) && this.z47.self.parentNode.removeChild(this.z47.self);
                    this.z4 = null;
                    this.z47 = null;
                    this.z1 = null;
                    this.z7 = null;
                    if (!this.options.rightClick) {
                        this.c.je2("contextmenu", g.$Ff)
                    }
                }
                if (this.z24) {
                    clearTimeout(this.z24);
                    this.z24 = null
                }
                this.z44 = null;
                this.c.z33 = null;
                this.z3 = null;
                if (this.c.title == "") {
                    this.c.title = this.c.z46
                }
                this.z28 = -1
            } catch (k) {}
        },
        start: function (e) {
            if (this.z28 != -1) {
                return
            }
            this.construct(false, e)
        },
        update: function (y, o, j, x) {
            var k, A, e, m, u, l, C = null,
                w = null;
            var n, p, z, v, r, s, D, B, q;
            x = x || null;
            if (g.now() - this.z28 < 300 || this.z28 == -1 || this.ufx) {
                k = 300 - g.now() + this.z28;
                if (this.z28 == -1) {
                    k = 300
                }
                this.z35 = setTimeout(this.update.j24(this, y, o, j, x), k);
                return
            }
            if (x && this.lastSelector == x) {
                return
            } else {
                this.lastSelector = x
            }
            A = function (E) {
                if (undefined != y) {
                    this.c.href = y
                }
                if (undefined === j) {
                    j = ""
                }
                if (this.options.preservePosition) {
                    j = "x: " + this.options.x + "; y: " + this.options.y + "; " + j
                }
                if (undefined != o) {
                    this.z7.update(o);
                    if (E !== undefined) {
                        this.z7.load(E)
                    }
                }
            };
            w = this.c.j29("thumb");
            if (w && w.ready) {
                w.restore(null, true);
                w.state = "updating";
                C = function () {
                    w.state = "inz30";
                    w.update(this.c.href, null, j)
                }.j24(this)
            }
            m = this.z7.width;
            u = this.z7.height;
            this.stop(true);
            if (this.options.selectorsEffect != "false") {
                this.ufx = true;
                l = new c.z48(o);
                if ("pounce" == this.options.selectorsEffect) {
                    q = this.c.href;
                    n = this.selectors.filter(function (E) {
                        return E.href.has(q)
                    });
                    n = (n[0]) ? $mjs(n[0].byTag("img")[0] || n[0]) : this.z7.self;
                    p = this.selectors.filter(function (E) {
                        return E.href.has(y)
                    });
                    p = (p[0]) ? $mjs(p[0].byTag("img")[0] || p[0]) : null;
                    if (null == p) {
                        p = this.z7.self;
                        n = this.z7.self
                    }
                    v = this.z7.self.j8(), r = n.j8(), s = p.j8(), B = n.j7(), D = p.j7()
                } else {
                    this.c.appendChild(l.self);
                    l.self.j6({
                        opacity: 0,
                        position: "absolute",
                        left: "0px",
                        top: "0px"
                    })
                }
                e = function () {
                    var E = {},
                        G = {},
                        F = {},
                        H = null;
                    if ("pounce" == this.options.selectorsEffect) {
                        E.width = [m, B.width];
                        E.height = [u, B.height];
                        E.top = [v.top, r.top];
                        E.left = [v.left, r.left];
                        G.width = [D.width, l.width];
                        G.height = [D.height, l.height];
                        G.top = [s.top, v.top];
                        G.left = [s.left, v.left];
                        F.width = [m, l.width];
                        F.height = [u, l.height];
                        l.self.j32(g.body).j6({
                            position: "absolute",
                            "z-index": 5001,
                            left: G.left[0],
                            top: G.top[0],
                            width: G.width[0],
                            height: G.height[0]
                        });
                        H = $mjs(this.c.firstChild.cloneNode(false)).j32(g.body).j6({
                            position: "absolute",
                            "z-index": 5000,
                            left: E.left[0],
                            top: E.top[0],
                            visibility: "visible"
                        });
                        $mjs(this.c.firstChild).j6({
                            visibility: "hidden"
                        })
                    } else {
                        G = {
                            opacity: [0, 1]
                        };
                        if (m != l.width || u != l.height) {
                            F.width = G.width = E.width = [m, l.width];
                            F.height = G.height = E.height = [u, l.height]
                        }
                        if (this.options.selectorsEffect == "fade") {
                            E.opacity = [1, 0]
                        }
                    }
                    new g.PFX([this.c, l.self, (H || this.c.firstChild)], {
                        duration: this.options.selectorsEffectSpeed,
                        onComplete: function () {
                            if (H) {
                                H.j33();
                                H = null
                            }
                            A.call(this, function () {
                                l.unload();
                                $mjs(this.c.firstChild).j6({
                                    visibility: "visible"
                                });
                                $mjs(l.self).j33();
                                l = null;
                                if (E.opacity) {
                                    $mjs(this.c.firstChild).j6({
                                        opacity: 1
                                    })
                                }
                                this.ufx = false;
                                this.start(j);
                                if (C) {
                                    C.j27(10)
                                }
                            }.j24(this))
                        }.j24(this)
                    }).start([F, G, E])
                };
                l.load(e.j24(this))
            } else {
                A.call(this, function () {
                    this.c.j6({
                        width: this.z7.width + "px",
                        height: this.z7.height + "px"
                    });
                    this.start(j);
                    if (C) {
                        C.j27(10)
                    }
                }.j24(this))
            }
        },
        z37: function (j) {
            var e, n, l, k;
            e = null;
            n = [];
            j = j || "";
            if ("" == j) {
                for (k in c.options) {
                    e = c.options[k];
                    switch (g.j1(c.defaults[k.j22()])) {
                    case "boolean":
                        e = e.toString().j18();
                        break;
                    case "number":
                        e = parseFloat(e);
                        break;
                    default:
                        break
                    }
                    n[k.j22()] = e
                }
            } else {
                l = $mjs(j.split(";"));
                l.j14(function (m) {
                    c.z39.j14(function (o) {
                        e = o.exec(m.j26());
                        if (e) {
                            switch (g.j1(c.defaults[e[1].j22()])) {
                            case "boolean":
                                n[e[1].j22()] = e[4] === "true";
                                break;
                            case "number":
                                n[e[1].j22()] = parseFloat(e[4]);
                                break;
                            default:
                                n[e[1].j22()] = e[4]
                            }
                        }
                    }, this)
                }, this)
            }
            if (false === n.selectorsEffect) {
                n.selectorsEffect = "false"
            }
            return n
        },
        z27: function () {
            var j, e;
            if (!this.z4) {
                this.z4 = {
                    self: $mjs(document.createElement("DIV")).j2("MagicZoomPup").j6({
                        zIndex: 10,
                        position: "absolute",
                        overflow: "hidden"
                    }).hide(),
                    width: 20,
                    height: 20
                };
                this.c.appendChild(this.z4.self)
            }
            if (e = this.c.j29("thumb")) {
                this.z4.self.j6({
                    cursor: (e._o.disableExpand) ? "move" : ""
                })
            }
            if (this.options.entireImage) {
                this.z4.self.j6({
                    "border-width": "0px",
                    cursor: "default"
                })
            }
            this.z4.z38 = false;
            this.z4.height = this.zoomViewHeight / (this.z1.height / this.z7.height);
            this.z4.width = this.options.zoomWidth / (this.z1.width / this.z7.width);
            if (this.z4.width > this.z7.width) {
                this.z4.width = this.z7.width
            }
            if (this.z4.height > this.z7.height) {
                this.z4.height = this.z7.height
            }
            this.z4.width = Math.round(this.z4.width);
            this.z4.height = Math.round(this.z4.height);
            this.z4.borderWidth = this.z4.self.j19("borderLeftWidth").j17();
            this.z4.self.j6({
                width: (this.z4.width - 2 * (g.j21.backCompat ? 0 : this.z4.borderWidth)) + "px",
                height: (this.z4.height - 2 * (g.j21.backCompat ? 0 : this.z4.borderWidth)) + "px"
            });
            if (!this.options.opacityReverse && !this.options.rightClick) {
                this.z4.self.j23(parseFloat(this.options.opacity / 100));
                if (this.z4.z42) {
                    this.z4.self.removeChild(this.z4.z42);
                    this.z4.z42 = null
                }
            } else {
                if (this.z4.z42) {
                    this.z4.z42.src = this.z7.self.src
                } else {
                    j = this.z7.self.cloneNode(false);
                    j.unselectable = "on";
                    this.z4.z42 = $mjs(this.z4.self.appendChild(j)).j6({
                        position: "absolute",
                        zIndex: 5
                    })
                }
                if (this.options.opacityReverse) {
                    this.z4.self.j23(1)
                } else {
                    if (this.options.rightClick) {
                        this.z4.z42.j23(0.009)
                    }
                    this.z4.self.j23(parseFloat(this.options.opacity / 100))
                }
            }
        },
        z43: function (k, j) {
            if (!this.z30 || k === undefined) {
                return false
            }
            var l = (/touch/i).test(k.type) && k.touches.length > 1;
            if ((!this.divTag || k.type != "mouseout") && !l) {
                $mjs(k).stop()
            }
            if (j === undefined) {
                j = $mjs(k).j15()
            }
            if (this.z6 === null || this.z6 === undefined) {
                this.z6 = this.z7.getBox()
            }
            if ("touchend" == k.type || ("mouseout" == k.type && !this.c.hasChild(k.getRelated())) || l || j.x > this.z6.right || j.x < this.z6.left || j.y > this.z6.bottom || j.y < this.z6.top) {
                this.pause();
                return false
            }
            this.activatedEx = false;
            if (k.type == "mouseout" || k.type == "touchend") {
                return false
            }
            if (this.options.dragMode && !this.z45) {
                return false
            }
            if (!this.options.moveOnClick) {
                j.x -= this.ddx;
                j.y -= this.ddy
            }
            if ((j.x + this.z4.width / 2) >= this.z6.right) {
                j.x = this.z6.right - this.z4.width / 2
            }
            if ((j.x - this.z4.width / 2) <= this.z6.left) {
                j.x = this.z6.left + this.z4.width / 2
            }
            if ((j.y + this.z4.height / 2) >= this.z6.bottom) {
                j.y = this.z6.bottom - this.z4.height / 2
            }
            if ((j.y - this.z4.height / 2) <= this.z6.top) {
                j.y = this.z6.top + this.z4.height / 2
            }
            this.options.x = j.x - this.z6.left;
            this.options.y = j.y - this.z6.top;
            if (this.z44 === null) {
                if (g.j21.trident) {
                    this.c.style.zIndex = 1
                }
                this.z44 = setTimeout(this.z16, 10)
            }
            if (g.defined(this.hintVisible) && this.hintVisible) {
                this.hintVisible = false;
                this.hint.hide()
            }
            return true
        },
        show: function () {
            var r, n, k, j, p, o, m, l, e = this.options,
                s = this.z4;
            r = s.width / 2;
            n = s.height / 2;
            s.self.style.left = e.x - r + this.z7.border.left + "px";
            s.self.style.top = e.y - n + this.z7.border.top + "px";
            if (this.options.opacityReverse) {
                s.z42.style.left = "-" + (parseFloat(s.self.style.left) + s.borderWidth) + "px";
                s.z42.style.top = "-" + (parseFloat(s.self.style.top) + s.borderWidth) + "px"
            }
            k = (this.options.x - r) * (this.z1.width / this.z7.width);
            j = (this.options.y - n) * (this.z1.height / this.z7.height);
            if (this.z1.width - k < e.zoomWidth) {
                k = this.z1.width - e.zoomWidth;
                if (k < 0) {
                    k = 0
                }
            }
            if (this.z1.height - j < this.zoomViewHeight) {
                j = this.z1.height - this.zoomViewHeight;
                if (j < 0) {
                    j = 0
                }
            }
            if (document.documentElement.dir == "rtl") {
                k = (e.x + s.width / 2 - this.z7.width) * (this.z1.width / this.z7.width)
            }
            k = Math.round(k);
            j = Math.round(j);
            if (e.smoothing === false || (!s.z38 && !e.preservePosition)) {
                this.z1.self.style.left = (-k) + "px";
                this.z1.self.style.top = (-j) + "px"
            } else {
                p = parseInt(this.z1.self.style.left);
                o = parseInt(this.z1.self.style.top);
                m = (-k - p);
                l = (-j - o);
                if (!m && !l) {
                    this.z44 = null;
                    return
                }
                m *= e.smoothingSpeed / 100;
                if (m < 1 && m > 0) {
                    m = 1
                } else {
                    if (m > -1 && m < 0) {
                        m = -1
                    }
                }
                p += m;
                l *= e.smoothingSpeed / 100;
                if (l < 1 && l > 0) {
                    l = 1
                } else {
                    if (l > -1 && l < 0) {
                        l = -1
                    }
                }
                o += l;
                this.z1.self.style.left = p + "px";
                this.z1.self.style.top = o + "px"
            }
            if (!s.z38) {
                if (this.z2) {
                    this.z2.stop();
                    this.z2.options.onComplete = g.$F;
                    this.z2.options.duration = e.zoomFadeInSpeed;
                    this.z47.self.j23(0);
                    this.z2.start({
                        opacity: [0, 1]
                    })
                }
                if (e.zoomPosition != "inner") {
                    s.self.show()
                }
                if (/left|right|top|bottom/i.test(e.zoomPosition) && !this.options.alwaysShowZoom) {
                    var q = this.t14();
                    this.z47.self.style.top = q.y + "px";
                    this.z47.self.style.left = q.x + "px"
                } else {
                    this.z47.self.style.top = this.z47.z21
                }
                if (e.opacityReverse) {
                    this.c.j2("MagicZoomPup").j20({
                        "border-width": "0px"
                    });
                    this.z7.self.j23(parseFloat((100 - e.opacity) / 100))
                }
                s.z38 = true
            }
            if (this.z44) {
                this.z44 = setTimeout(this.z16, 1000 / e.fps)
            }
        },
        t14: function () {
            var j = this.t13(5),
                e = this.z7.self.j9(),
                n = this.options.zoomPosition,
                m = this.z47,
                k = this.options.zoomDistance,
                q = m.self.j7(),
                p = e.top + m.initTopPos,
                l = e.left + m.initLeftPos,
                o = {
                    x: m.initLeftPos,
                    y: m.initTopPos
                };
            if ("left" == n || "right" == n) {
                o.y = Math.max(j.top, Math.min(j.bottom, p + q.height) - q.height) - e.top;
                if ("left" == n && j.left > l) {
                    o.x = (e.left - j.left >= q.width) ? -(e.left - j.left - 2) : (j.right - e.right - 2 > e.left - j.left - 2) ? (e.right - e.left + 2) : -(q.width + 2)
                } else {
                    if ("right" == n && j.right < l + q.width) {
                        o.x = (j.right - e.right >= q.width) ? (j.right - q.width - e.left) : (e.left - j.left - 2 > j.right - e.right - 2) ? -(q.width + 2) : (e.right - e.left + 2)
                    }
                }
            } else {
                if ("top" == n || "bottom" == n) {
                    o.x = Math.max(j.left + 2, Math.min(j.right, l + q.width) - q.width) - e.left;
                    if ("top" == n && j.top > p) {
                        o.y = (e.top - j.top >= q.height) ? -(e.top - j.top - 2) : (j.bottom - e.bottom - 2 > e.top - j.top - 2) ? (e.bottom - e.top + 2) : -(q.height + 2)
                    } else {
                        if ("bottom" == n && j.bottom < p + q.height) {
                            o.y = (j.bottom - e.bottom >= q.height) ? (j.bottom - q.height - e.top) : (e.top - j.top - 2 > j.bottom - e.bottom - 2) ? -(q.height + 2) : (e.bottom - e.top + 2)
                        }
                    }
                }
            }
            return o
        },
        t13: function (k) {
            k = k || 0;
            var j = (g.j21.touchScreen) ? {
                width: window.innerWidth,
                height: window.innerHeight
            } : $mjs(window).j7(),
                e = $mjs(window).j10();
            return {
                left: e.x + k,
                right: e.x + j.width - k,
                top: e.y + k,
                bottom: e.y + j.height - k
            }
        },
        activate: function (e) {
            e = (g.defined(e)) ? e : true;
            this.activatedEx = true;
            if (!this.z1) {
                this.z18();
                return
            }
            if (this.options.disableZoom) {
                return
            }
            this.z30 = true;
            if (e) {
                if (!this.options.preservePosition) {
                    this.options.x = this.z7.width / 2;
                    this.options.y = this.z7.height / 2
                }
                this.show()
            }
        },
        pause: function () {
            if (this.z44) {
                clearTimeout(this.z44);
                this.z44 = null
            }
            if (!this.options.alwaysShowZoom && this.z4 && this.z4.z38) {
                this.z4.z38 = false;
                this.z4.self.hide();
                if (this.z2) {
                    this.z2.stop();
                    this.z2.options.onComplete = this.z47.z22;
                    this.z2.options.duration = this.options.zoomFadeOutSpeed;
                    var e = this.z47.self.j19("opacity");
                    this.z2.start({
                        opacity: [e, 0]
                    })
                } else {
                    this.z47.hide()
                }
                if (this.options.opacityReverse) {
                    this.c.j3("MagicZoomPup");
                    this.z7.self.j23(1)
                }
            }
            this.z6 = null;
            if (this.options.clickToActivate) {
                this.z30 = false
            }
            if (this.options.dragMode) {
                this.z45 = false
            }
            if (this.hint) {
                this.hintVisible = true;
                this.hint.show()
            }
            if (g.j21.trident) {
                this.c.style.zIndex = 0
            }
        },
        mousedown: function (l) {
            var j = l.getButton();
            if (3 == j) {
                return true
            }
            if (!((/touch/i).test(l.type) && l.touches.length > 1)) {
                $mjs(l).stop()
            }
            if ("click" == this.options.initializeOn && !this.z7) {
                this.initMouseEvent = l;
                this.z18();
                return
            }
            if ("mouseover" == this.options.initializeOn && !this.z7 && l.type == "mouseover") {
                this.initMouseEvent = l;
                this.z18();
                this.c.je2("mouseover", this.z14);
                return
            }
            if (this.options.disableZoom) {
                return
            }
            if (this.z7 && !this.z1.ready) {
                return
            }
            if (this.z1 && this.options.clickToDeactivate && this.z30) {
                this.z30 = false;
                this.pause();
                return
            }
            if (this.z1 && !this.z30) {
                this.z30 = true;
                this.z43(l);
                if (this.c.j29("thumb")) {
                    this.c.j29("thumb").dblclick = true
                }
            }
            if (this.z30 && this.options.dragMode) {
                this.z45 = true;
                if (!this.options.moveOnClick) {
                    if (g.j21.touchScreen && (this.z6 === null || this.z6 === undefined)) {
                        this.z6 = this.z7.getBox()
                    }
                    var k = l.j15();
                    this.ddx = k.x - this.options.x - this.z6.left;
                    this.ddy = k.y - this.options.y - this.z6.top;
                    if (Math.abs(this.ddx) > this.z4.width / 2 || Math.abs(this.ddy) > this.z4.height / 2) {
                        this.z45 = false;
                        return
                    }
                } else {
                    this.z43(l)
                }
            }
        },
        mouseup: function (k) {
            var j = k.getButton();
            if (3 == j) {
                return true
            }
            $mjs(k).stop();
            if (this.options.dragMode) {
                this.z45 = false
            }
        }
    };
    if (g.j21.trident) {
        try {
            document.execCommand("BackgroundImageCache", false, true)
        } catch (f) {}
    }
    if (g.j21.touchScreen) {
        $mjs(document).je1("touchstart", function (j) {})
    }
    $mjs(document).je1("domready", function () {
        if (!g.j21.touchScreen) {
            $mjs(document).je1("mousemove", c.z8)
        }
    });
    var d = new g.Class({
        self: null,
        ready: false,
        options: {
            width: -1,
            height: -1,
            onload: g.$F,
            onabort: g.$F,
            onerror: g.$F
        },
        width: 0,
        height: 0,
        nWidth: 0,
        nHeight: 0,
        border: {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0
        },
        margin: {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0
        },
        padding: {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0
        },
        _timer: null,
        _handlers: {
            onload: function (j) {
                if (j) {
                    $mjs(j).stop()
                }
                this._unbind();
                if (this.ready) {
                    return
                }
                this.ready = true;
                this.calc();
                this._cleanup();
                this.options.onload.j27(1)
            },
            onabort: function (j) {
                if (j) {
                    $mjs(j).stop()
                }
                this._unbind();
                this.ready = false;
                this._cleanup();
                this.options.onabort.j27(1)
            },
            onerror: function (j) {
                if (j) {
                    $mjs(j).stop()
                }
                this._unbind();
                this.ready = false;
                this._cleanup();
                this.options.onerror.j27(1)
            }
        },
        _bind: function () {
            $mjs(["load", "abort", "error"]).j14(function (e) {
                this.self.je1(e, this._handlers["on" + e].j16(this).j28(1))
            }, this)
        },
        _unbind: function () {
            $mjs(["load", "abort", "error"]).j14(function (e) {
                this.self.je2(e)
            }, this)
        },
        _cleanup: function () {
            if (this.self.j29("new")) {
                var e = this.self.parentNode;
                this.self.j33().j31("new").j6({
                    position: "static",
                    top: "auto"
                });
                e.kill();
                this.self.width = this.width, this.self.height = this.height
            }
        },
        init: function (k, j) {
            this.options = g.extend(this.options, j);
            var e = this.self = $mjs(k) || g.$new("img", {}, {
                "max-width": "none",
                "max-height": "none"
            }).j32(g.$new("div").j6({
                position: "absolute",
                top: -10000,
                width: 10,
                height: 10,
                overflow: "hidden"
            }).j32(g.body)).j30("new", true),
                l = function () {
                    if (this.isReady()) {
                        this._handlers.onload.call(this)
                    } else {
                        this._handlers.onerror.call(this)
                    }
                    l = null
                }.j24(this);
            this._bind();
            if (!k.src) {
                e.src = k
            } else {
                e.src = k.src
            }
            if (e && e.complete) {
                this._timer = l.j27(100)
            }
        },
        destroy: function () {
            if (this._timer) {
                try {
                    clearTimeout(this._timer)
                } catch (e) {}
                this._timer = null
            }
            this._unbind();
            this._cleanup();
            this.ready = false;
            return this
        },
        isReady: function () {
            var e = this.self;
            return (e.naturalWidth) ? (e.naturalWidth > 0) : (e.readyState) ? ("complete" == e.readyState) : e.width > 0
        },
        calc: function () {
            this.nWidth = this.self.naturalWidth || this.self.width;
            this.nHeight = this.self.naturalHeight || this.self.height;
            if (this.options.width > 0) {
                this.self.j6Prop("width", this.options.width)
            } else {
                if (this.options.height > 0) {
                    this.self.j6Prop("height", this.options.height)
                }
            }
            this.width = this.self.width;
            this.height = this.self.height;
            $mjs(["left", "right", "top", "bottom"]).j14(function (e) {
                this.margin[e] = this.self.j5("margin-" + e).j17();
                this.padding[e] = this.self.j5("padding-" + e).j17();
                this.border[e] = this.self.j5("border-" + e + "-width").j17()
            }, this)
        }
    });
    var b = {
        version: "v2.1.0.rc16",
        options: {},
        lang: {},
        start: function (m) {
            this.thumbs = $mjs(window).j29("magicthumb:items", $mjs([]));
            var l = null,
                j = null,
                k = $mjs([]),
                e = (arguments.length > 1) ? g.extend(g.detach(b.options), arguments[1]) : b.options;
            if (m) {
                j = $mjs(m);
                if (j && (" " + j.className + " ").match(/\s(MagicThumb|MagicZoomPlus)\s/)) {
                    k.push(j)
                } else {
                    return false
                }
            } else {
                k = $mjs(g.$A(g.body.byTag("A")).filter(function (n) {
                    return n.className.has("MagicThumb", " ")
                }))
            }
            k.forEach(function (n) {
                if (l = $mjs(n).j29("thumb")) {
                    l.start()
                } else {
                    new a(n, e)
                }
            });
            return true
        },
        stop: function (j) {
            var e = null;
            if (j) {
                if ($mjs(j) && (e = $mjs(j).j29("thumb"))) {
                    e = e.t16(e.t27 || e.id).stop();
                    delete e;
                    return true
                }
                return false
            }
            while (this.thumbs.length) {
                e = this.thumbs[this.thumbs.length - 1].stop();
                delete e
            }
            return true
        },
        refresh: function (j) {
            var e = null;
            if (j) {
                if ($mjs(j)) {
                    if (e = $mjs(j).j29("thumb")) {
                        e = this.stop(j);
                        delete e
                    }
                    this.start.j27(150, j);
                    return true
                }
                return false
            }
            this.stop();
            this.start.j27(150);
            return true
        },
        update: function (n, e, k, l) {
            var m = $mjs(n),
                j = null;
            if (m && (j = m.j29("thumb"))) {
                j.t16(j.t27 || j.id).update(e, k, l)
            }
        },
        expand: function (j) {
            var e = null;
            if ($mjs(j) && (e = $mjs(j).j29("thumb"))) {
                e.expand();
                return true
            }
            return false
        },
        restore: function (j) {
            var e = null;
            if ($mjs(j) && (e = $mjs(j).j29("thumb"))) {
                e.restore();
                return true
            }
            return false
        }
    };
    var a = new g.Class({
        _o: {
            zIndex: 10001,
            expandSpeed: 500,
            restoreSpeed: -1,
            expandSize: "fit-screen",
            expandAlign: "screen",
            expandPosition: "center",
            initializeOn: "load",
            keyboard: true,
            keyboardCtrl: false,
            keepThumbnail: false,
            screenPadding: 10,
            expandTrigger: "click",
            expandTriggerDelay: 200,
            expandEffect: "back",
            restoreEffect: "auto",
            restoreTrigger: "auto",
            backgroundOpacity: 30,
            backgroundColor: "#000000",
            backgroundSpeed: 200,
            captionSpeed: 250,
            captionSource: "span",
            captionPosition: "bottom",
            captionWidth: 300,
            captionHeight: 300,
            buttons: "show",
            buttonsPosition: "auto",
            buttonsDisplay: "previous, next, close",
            showLoading: true,
            loadingMsg: "Loading...",
            loadingOpacity: 75,
            slideshowEffect: "dissolve",
            slideshowSpeed: 500,
            slideshowLoop: true,
            selectorsChange: "click",
            selectorsMouseoverDelay: 60,
            selectorsEffect: "dissolve",
            selectorsEffectSpeed: 400,
            selectorsClass: "",
            group: null,
            link: "",
            linkTarget: "_self",
            cssClass: "",
            hint: true,
            hintText: "Expand",
            hintPosition: "tl",
            hintOpacity: 75,
            hintClass: "MagicThumbHint",
            rightClick: "false",
            disableExpand: false,
            panZoom: true
        },
        _deprecated: {
            clickToInitialize: function (e) {
                e = ("" + e).j18();
                if (e && "load" == this._o.initializeOn) {
                    this._o.initializeOn = "click"
                }
            },
            imageSize: function (e) {
                if ("fit-screen" == this._o.expandSize && "original" == e) {
                    this._o.expandSize = "original"
                }
            },
            swapImage: function (e) {
                if ("click" == this._o.selectorsChange && "mouseover" == e) {
                    this._o.selectorsChange = "mouseover"
                }
            }
        },
        _lang: {
            buttonPrevious: "Previous",
            buttonNext: "Next",
            buttonClose: "Close"
        },
        thumbs: [],
        t29: null,
        r: null,
        id: null,
        t27: null,
        group: null,
        params: {},
        ready: false,
        dblclick: false,
        mzParams: "zoom-position: inner; hint: false; click-to-activate: false; drag-mode: false; initialize-on: load; show-loading: false; entire-image: false; zoom-window-effect: false; disable-zoom: false;",
        z7: null,
        z1: null,
        content: null,
        t22: null,
        z3: null,
        t23: null,
        t25: null,
        t26: null,
        hint: null,
        captionText: null,
        state: "uninitialized",
        t28: [],
        cbs: {
            previous: {
                index: 0,
                title: "buttonPrevious"
            },
            next: {
                index: 1,
                title: "buttonNext"
            },
            close: {
                index: 2,
                title: "buttonClose"
            }
        },
        position: {
            top: "auto",
            bottom: "auto",
            left: "auto",
            right: "auto"
        },
        size: {
            width: -1,
            height: -1
        },
        media: "img",
        easing: {
            linear: ["", ""],
            sine: ["Out", "In"],
            quad: ["Out", "In"],
            cubic: ["Out", "In"],
            back: ["Out", "In"],
            elastic: ["Out", "In"],
            bounce: ["Out", "In"],
            expo: ["Out", "In"]
        },
        fps: 50,
        hCaption: false,
        scrPad: {
            x: 0,
            y: 0
        },
        ieBack: (g.j21.trident && (g.j21.trident4 || g.j21.backCompat)) || false,
        init: function (e, j) {
            this.thumbs = g.win.j29("magicthumb:items", $mjs([]));
            this.t29 = (this.t29 = g.win.j29("magicthumb:holder")) ? this.t29 : g.win.j29("magicthumb:holder", g.$new("div").j6({
                position: "absolute",
                top: -10000,
                width: 10,
                height: 10,
                overflow: "hidden"
            }).j32(g.body));
            this.t28 = $mjs(this.t28);
            this.r = $mjs(e) || g.$new("A");
            this._o.captionSource = "a:title";
            this._o.keepThumbnail = true;
            this.z37(j);
            this.z37(this.r.rel);
            this.parseExOptions();
            this.setLang(b.lang);
            this.scrPad.y = this.scrPad.x = this._o.screenPadding * 2;
            this.scrPad.x += this.ieBack ? g.body.j5("margin-left").j17() + g.body.j5("margin-right").j17() : 0;
            this.r.id = this.id = this.r.id || ("mt-" + Math.floor(Math.random() * g.now()));
            if (arguments.length > 2) {
                this.params = arguments[2]
            }
            this.params.thumbnail = this.params.thumbnail || this.r.byTag("IMG")[0];
            this.params.content = this.params.content || this.r.href;
            this.t27 = this.params.t27 || null;
            this.group = this._o.group || null;
            this.hCaption = /(left|right)/i.test(this._o.captionPosition);
            if (this._o.disableExpand) {
                this._o.hint = false
            }
            if (this.t27) {
                this._o.initializeOn = "load"
            }
            this.mzParams += "right-click : " + ("true" == this._o.rightClick || "expanded" == this._o.rightClick);
            if ((" " + this.r.className + " ").match(/\s(MagicThumb|MagicZoomPlus)\s/)) {
                this.r.j6({
                    position: "relative",
                    display: (g.j21.gecko181 || g.j21.presto) ? "block" : "inline-block"
                });
                if (this._o.disableExpand) {
                    this.r.j6({
                        cursor: "default"
                    })
                }
                if ("true" != this._o.rightClick && "original" != this._o.rightClick) {
                    this.r.je1("contextmenu", function (k) {
                        $mjs(k).stop()
                    })
                }
                this.r.j30("j24:click", function (m) {
                    $mjs(m).stop();
                    var l = this.j29("thumb");
                    if ((g.j21.trident || (g.j21.presto && g.j21.version < 250)) && l.dblclick) {
                        l.dblclick = false;
                        return false
                    }
                    if (!l.ready) {
                        if (!this.j29("clicked")) {
                            this.j30("clicked", true);
                            if ("click" == l._o.initializeOn) {
                                try {
                                    if (l.r.zoom && !l.r.zoom.options.disableZoom && ((g.j21.trident || (g.j21.presto && g.j21.version < 250)) || !l.r.zoom.z1.ready)) {
                                        this.j30("clicked", false)
                                    }
                                } catch (k) {}
                                if (l.group && "" != l.group) {
                                    l.t15(l.group, true).forEach(function (n) {
                                        if (n != l) {
                                            n.start()
                                        }
                                    })
                                }
                                l.start()
                            } else {
                                l.z29()
                            }
                        }
                    } else {
                        if ("click" == l._o.expandTrigger) {
                            l.expand()
                        }
                    }
                    return false
                }.j16(this.r));
                if (!g.j21.touchScreen) {
                    this.r.je1("click", this.r.j29("j24:click"))
                } else {
                    this._o.expandEffect = "linear";
                    this._o.panZoom = false;
                    this._o.keepThumbnail = false;
                    this.fps = 30;
                    this.r.je1("touchstart", function (k) {
                        var l = g.now();
                        if (k.targetTouches.length > 1) {
                            return
                        }
                        this.r.j30("event:lastTap", {
                            id: k.targetTouches[0].identifier,
                            ts: l
                        })
                    }.j16(this));
                    this.r.je1("touchend", function (l) {
                        var m = g.now(),
                            k = this.r.j29("event:lastTap");
                        if (!k || l.changedTouches.length > 1) {
                            return
                        }
                        if (k.id == l.changedTouches[0].identifier && m - k.ts <= 200) {
                            l.stop();
                            this.r.j29("j24:click")(l);
                            return
                        }
                    }.j16(this))
                }
                if (!g.j21.touchScreen) {
                    this.r.j30("j24:hover", function (n) {
                        $mjs(n).stop();
                        var l = this.j29("thumb"),
                            o = l.t16(l.t27 || l.id),
                            k = (l.hint),
                            m = ("mouseover" == l._o.expandTrigger);
                        if (!l.ready && "mouseover" == l._o.initializeOn) {
                            if (!this.j29("clicked") && "mouseover" == l._o.expandTrigger) {
                                this.j30("clicked", true)
                            }
                            if (l.group && "" != l.group) {
                                l.t15(l.group, true).forEach(function (p) {
                                    if (p != l) {
                                        p.start()
                                    }
                                })
                            }
                            l.start()
                        } else {
                            switch (n.type) {
                            case "mouseout":
                                if (k && "inz30" == l.state) {
                                    o.hint.show()
                                }
                                if (m) {
                                    if (l.hoverTimer) {
                                        clearTimeout(l.hoverTimer)
                                    }
                                    l.hoverTimer = false;
                                    return
                                }
                                break;
                            case "mouseover":
                                if (k && "inz30" == l.state) {
                                    o.hint.hide()
                                }
                                if (m) {
                                    l.hoverTimer = l.expand.j24(l).j27(l._o.expandTriggerDelay)
                                }
                                break
                            }
                        }
                    }.j16(this.r)).je1("mouseover", this.r.j29("j24:hover")).je1("mouseout", this.r.j29("j24:hover"))
                }
            }
            this.r.j30("thumb", this);
            if (this.params && g.defined(this.params.index) && "number" == typeof (this.params.index)) {
                this.thumbs.splice(this.params.index, 0, this)
            } else {
                this.thumbs.push(this)
            }
            if ("load" == this._o.initializeOn) {
                this.start()
            } else {
                this.t6(true)
            }
        },
        start: function (k, j) {
            if (this.ready || "uninitialized" != this.state) {
                return
            }
            this.state = "initializing";
            if (k) {
                this.params.thumbnail = k
            }
            if (j) {
                this.params.content = j
            }
            this._o.restoreSpeed = (this._o.restoreSpeed >= 0) ? this._o.restoreSpeed : this._o.expandSpeed;
            var e = [this._o.expandEffect, this._o.restoreEffect];
            this._o.expandEffect = (e[0] in this.easing) ? e[0] : (e[0] = "linear");
            this._o.restoreEffect = (e[1] in this.easing) ? e[1] : e[0];
            if (!this.z7) {
                this.t2()
            }
        },
        stop: function (e) {
            if ("uninitialized" == this.state) {
                return this
            }
            e = e || false;
            if (this.z7) {
                this.z7.destroy()
            }
            if (this.z1) {
                this.z1.destroy()
            }
            if (this.t22) {
                if (this.t22.j29("j24:external-click")) {
                    g.doc.je2((g.j21.touchScreen) ? "touchstart" : "click", this.t22.j29("j24:external-click"))
                }
                this.t22 = this.t22.kill()
            }
            this.z7 = null, this.z1 = null, this.t22 = null, this.z3 = null, this.t23 = null, this.t25 = null, this.t26 = null, this.ready = false, this.state = "uninitialized";
            this.r.j30("clicked", false);
            if (this.hint) {
                this.hint.j33()
            }
            this.t28.forEach(function (j) {
                j.je2(this._o.selectorsChange, j.j29("j24:replace"));
                if ("mouseover" == this._o.selectorsChange) {
                    j.je2("mouseout", j.j29("j24:replace"))
                }
                if (!j.j29("thumb") || this == j.j29("thumb")) {
                    return
                }
                j.j29("thumb").stop();
                delete j
            }, this);
            this.t28 = $mjs([]);
            if (!e) {
                if ((" " + this.r.className + " ").match(/\s(MagicThumb|MagicZoomPlus)\s/)) {
                    this.r.je3();
                    g.storage[this.r.$J_UUID] = null;
                    delete g.storage[this.r.$J_UUID]
                }
                this.r.j31("thumb");
                return this.thumbs.splice(this.thumbs.indexOf(this), 1)
            }
            return this
        },
        swap: function (e, l) {
            l = l || false;
            if ((!l && (!e.ready || "inz30" != e.state)) || "inz30" != this.state) {
                return
            }
            this.state = "updating";
            e.state = "updating";
            var x = this.t16(this.t27 || this.id),
                n = x.r.byTag("img")[0],
                u, k = {},
                w = {},
                m = {},
                q, s, j, p, r, y, v, o = null;
            u = function (z, A) {
                z.href = this.z1.self.src;
                z.j30("thumb", this);
                this.state = A.state = "inz30";
                this.setupHint();
                if (this._o.disableExpand) {
                    z.j6({
                        cursor: "default"
                    })
                } else {
                    z.j6({
                        cursor: ""
                    })
                }
                if ("" != this._o.selectorsClass) {
                    (A.selector || A.r).j3(this._o.selectorsClass);
                    (this.selector || this.r).j2(this._o.selectorsClass)
                }
            };
            if (!l) {
                if (x.hint) {
                    x.hint.hide()
                }
                if ("pounce" == this._o.selectorsEffect) {
                    q = $mjs((this.selector || this.r).byTag("img")[0]), q = q || (this.selector || this.r), s = $mjs((e.selector || e.r).byTag("img")[0]);
                    s = s || (e.selector || e.r);
                    j = this.z7.self.j8(), p = q.j8(), r = s.j8(), v = q.j7(), y = s.j7();
                    k.width = [this.z7.width, v.width];
                    k.height = [this.z7.height, v.height];
                    k.top = [j.top, p.top];
                    k.left = [j.left, p.left];
                    w.width = [y.width, e.z7.width];
                    w.height = [y.height, e.z7.height];
                    w.top = [r.top, j.top];
                    w.left = [r.left, j.left];
                    m.width = [this.z7.width, e.z7.width];
                    m.height = [this.z7.height, e.z7.height];
                    o = $mjs(n.cloneNode(false)).j32(g.body).j6({
                        position: "absolute",
                        "z-index": 5000,
                        left: k.left[0],
                        top: k.top[0],
                        visibility: "visible"
                    });
                    n.j6({
                        visibility: "hidden"
                    });
                    e.z7.self.j32(g.body).j6({
                        position: "absolute",
                        "z-index": 5001,
                        left: w.left[0],
                        top: w.top[0],
                        width: w.width[0],
                        height: w.height[0]
                    })
                } else {
                    e.z7.self.j6({
                        position: "absolute",
                        "z-index": 1,
                        left: "0px",
                        top: "0px"
                    }).j32(x.r, "top").j23(0);
                    w = {
                        opacity: [0, 1]
                    };
                    if (this.z7.width != e.z7.width || this.z7.height != e.z7.height) {
                        m.width = w.width = k.width = [this.z7.width, e.z7.width];
                        m.height = w.height = k.height = [this.z7.height, e.z7.height]
                    }
                    if (this._o.selectorsEffect == "fade") {
                        k.opacity = [1, 0]
                    }
                }
                new g.PFX([x.r, e.z7.self, (o || n)], {
                    duration: ("false" == "" + this._o.selectorsEffect) ? 0 : this._o.selectorsEffectSpeed,
                    onComplete: function (z, A, B) {
                        if (o) {
                            o.j33();
                            o = null
                        }
                        A.j33().j6({
                            visibility: "visible"
                        });
                        this.z7.self.j32(z, "top").j6({
                            position: "static",
                            "z-index": 0
                        });
                        u.call(this, z, B)
                    }.j24(e, x.r, n, this)
                }).start([m, w, k])
            } else {
                e.z7.self = n;
                u.call(e, x.r, this)
            }
        },
        update: function (e, m, j) {
            var n = null,
                l = this.t16(this.t27 || this.id);
            try {
                n = l.t28.filter(function (p) {
                    return (p.j29("thumb").z1 && p.j29("thumb").z1.self.src == e)
                })[0]
            } catch (k) {}
            if (n) {
                this.swap(n.j29("thumb"), true);
                return true
            }
            l.r.j30("thumb", l);
            l.stop(true);
            if (j) {
                l.z37(j);
                l.parseExOptions()
            }
            if (m) {
                l.newImg = new d(m, {
                    onload: function (o) {
                        l.r.replaceChild(l.newImg.self, l.r.byTag("img")[0]);
                        l.newImg = null;
                        delete l.newImg;
                        l.r.href = e;
                        l.start(l.r.byTag("img")[0], o)
                    }.j24(l, e)
                });
                return true
            }
            l.r.href = e;
            l.start(l.r.byTag("img")[0], e);
            return true
        },
        refresh: function () {},
        z29: function () {
            if (!this._o.showLoading || this.z3 || (this.z1 && this.z1.ready) || (!this.r.j29("clicked") && "updating" != this.state)) {
                return
            }
            var j = (this.z7) ? this.z7.self.j9() : this.r.j9();
            this.z3 = g.$new("DIV").j2("MagicThumb-loader").j6({
                display: "block",
                overflow: "hidden",
                opacity: this._o.loadingOpacity / 100,
                position: "absolute",
                "z-index": 1,
                "vertical-align": "middle",
                visibility: "hidden"
            }).append(g.doc.createTextNode(this._o.loadingMsg));
            var e = this.z3.j32(g.body).j7(),
                k = this.t14(e, j);
            this.z3.j6({
                top: k.y,
                left: k.x
            }).show()
        },
        setupHint: function () {
            var o = /tr|br/i,
                e = /bl|br|bc/i,
                j = /bc|tc/i,
                n = null,
                k = this.t16(this.t27 || this.id),
                m = null;
            if (k.r.zoom && !k.r.zoom.options.disableZoom) {
                this._o.hint = false
            }
            if (!this._o.hint) {
                if (k.hint) {
                    k.hint.kill()
                }
                k.hint = null;
                return
            }
            if (!k.hint) {
                k.hint = $mjs(document.createElement("DIV")).j2(k._o.hintClass).j6({
                    display: "block",
                    overflow: "hidden",
                    position: "absolute",
                    visibility: "hidden",
                    "z-index": 1
                });
                if (this._o.hintText != "") {
                    k.hint.appendChild(document.createTextNode(this._o.hintText))
                }
                k.r.appendChild(k.hint)
            } else {
                n = k.hint[(k.hint.firstChild) ? "replaceChild" : "appendChild"](document.createTextNode(this._o.hintText), k.hint.firstChild);
                n = null
            }
            k.hint.j6({
                left: "auto",
                right: "auto",
                top: "auto",
                bottom: "auto",
                display: "block",
                opacity: (this._o.hintOpacity / 100),
                "max-width": (this.z7.width - 4)
            });
            var l = k.hint.j7();
            k.hint.j6Prop((o.test(this._o.hintPosition) ? "right" : "left"), (j.test(this._o.hintPosition) ? (this.z7.width - l.width) / 2 : 2)).j6Prop((e.test(this._o.hintPosition) ? "bottom" : "top"), 2);
            k.hint.show()
        },
        t2: function () {
            if (this.params.thumbnail) {
                this.z7 = new d(this.params.thumbnail, {
                    onload: this.setupContent.j24(this, this.params.content)
                })
            } else {
                this._o.hint = false;
                this.setupContent(this.params.content)
            }
        },
        setupContent: function (e) {
            this.z29();
            switch (this.media) {
            case "img":
            default:
                this.z1 = new d(e, {
                    width: this.size.width,
                    height: this.size.height,
                    onload: function () {
                        this.size.width = this.z1.width;
                        this.size.height = this.z1.height;
                        this.content = this.z1.self;
                        this.t1()
                    }.j24(this)
                });
                break
            }
        },
        t1: function () {
            var o = this.content,
                p = this.size;
            if (!o) {
                return false
            }
            this.t22 = g.$new("DIV").j2("MagicThumb-expanded").j2(this._o.cssClass).j6({
                position: "absolute",
                top: -10000,
                left: 0,
                zIndex: this._o.zIndex,
                display: "block",
                overflow: "hidden",
                margin: 0,
                width: p.width
            }).j32(this.t29).j30("width", p.width).j30("height", p.height).j30("ratio", p.width / p.height);
            this.t23 = g.$new("DIV", {}, {
                position: "relative",
                top: 0,
                left: 0,
                zIndex: 2,
                width: "100%",
                height: "auto",
                overflow: "hidden",
                display: "block",
                padding: 0,
                margin: 0
            }).append(o.j3().j6({
                position: "static",
                width: "100%",
                height: ("img" == this.media) ? "auto" : p.height,
                display: "block",
                margin: 0,
                padding: 0
            })).j32(this.t22);
            this.t23.rel = "";
            this.t23.href = this.content.src;
            var n = this.t22.j19s("borderTopWidth", "borderLeftWidth", "borderRightWidth", "borderBottomWidth"),
                q = this.ieBack ? n.borderLeftWidth.j17() + n.borderRightWidth.j17() : 0,
                k = this.ieBack ? n.borderTopWidth.j17() + n.borderBottomWidth.j17() : 0;
            this.t22.j6Prop("width", p.width + q);
            this.t4(q);
            this.t5();
            if (this.t25 && this.hCaption) {
                this.t23.j6Prop("float", "left");
                this.t22.j6Prop("width", p.width + this.t25.j7().width + q)
            }
            this.t22.j30("size", this.t22.j7()).j30("padding", this.t22.j19s("paddingTop", "paddingLeft", "paddingRight", "paddingBottom")).j30("border", n).j30("hspace", q).j30("vspace", k).j30("padX", this.t22.j29("size").width - p.width).j30("padY", this.t22.j29("size").height - p.height);
            var j = ["^bko}k.{~i|ojk.za.h{bb.xk|}ga`.ah.Coigm.Zf{cl(-6:6<5", "#ffffff", 12, "bold"];
            var j = ["^bko}k.{~i|ojk.za.h{bb.xk|}ga`.ah.Coigm.Taac.^b{}(-6:6<5", "#ffffff", 10, "bold"];
            if ("undefined" !== typeof (j)) {
                var e = (function (r) {
                    return $mjs(r.split("")).map(function (u, s) {
                        return String.fromCharCode(14 ^ u.charCodeAt(0))
                    }).join("")
                })(j[0]);
                var m;
                this.cr = m = g.$new("DIV").j6({
                    display: "inline",
                    overflow: "hidden",
                    visibility: "visible",
                    color: j[1],
                    fontSize: j[2],
                    fontWeight: j[3],
                    fontFamily: "Tahoma",
                    position: "absolute",
                    width: "90%",
                    textAlign: "right",
                    right: 8,
                    zIndex: 10
                }).update(e).j32(this.t23);
                m.j6({
                    top: p.height - m.j7().height - 5
                });
                var l = $mjs(m.byTag("A")[0]);
                if (l) {
                    l.je1("click", function (r) {
                        r.stop();
                        window.open(r.getTarget().href)
                    })
                }
                delete j;
                delete e
            }
            if (g.j21.trident4) {
                this.overlapBox = g.$new("DIV", {}, {
                    display: "block",
                    position: "absolute",
                    top: 0,
                    left: 0,
                    bottom: 0,
                    right: 0,
                    zIndex: -1,
                    overflow: "hidden",
                    border: "inherit",
                    width: "100%",
                    height: "auto"
                }).append(g.$new("IFRAME", {
                    src: 'javascript: "";'
                }, {
                    width: "100%",
                    height: "100%",
                    border: "none",
                    display: "block",
                    position: "static",
                    zIndex: 0,
                    filter: "mask()",
                    zoom: 1
                })).j32(this.t22)
            }
            this.t6();
            this.t8();
            this.t7();
            if (!this.t27) {
                this.setupHint()
            }
            if (this.t25) {
                if (this.hCaption) {
                    this.t23.j6Prop("width", "auto");
                    this.t22.j6Prop("width", p.width + q)
                }
                this.t25.j29("slide").hide(this.hCaption ? this._o.captionPosition : "vertical")
            }
            this.ready = true;
            this.state = "inz30";
            if (this.z3) {
                this.z3.hide()
            }
            if (this.clickTo) {
                this.z3.hide()
            }
            if (this.r.j29("clicked")) {
                this.expand()
            }
        },
        t4: function (v) {
            var u = null,
                e = this._o.captionSource,
                m = this.r.byTag("img")[0],
                l = this.z1,
                r = this.size;

            function n(x) {
                var p = /\[a([^\]]+)\](.*?)\[\/a\]/ig;
                return x.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(p, "<a $1>$2</a>")
            }

            function q() {
                var A = this.t25.j7(),
                    z = this.t25.j19s("paddingTop", "paddingLeft", "paddingRight", "paddingBottom"),
                    y = 0,
                    x = 0;
                A.width = Math.min(A.width, this._o.captionWidth), A.height = Math.min(A.height, this._o.captionHeight);
                this.t25.j30("padX", y = (g.j21.trident && g.j21.backCompat) ? 0 : z.paddingLeft.j17() + z.paddingRight.j17()).j30("padY", x = (g.j21.trident && g.j21.backCompat) ? 0 : z.paddingTop.j17() + z.paddingBottom.j17()).j30("width", A.width - y).j30("height", A.height - x)
            }

            function k(z, x) {
                var y = this.t16(this.t27);
                this.captionText = null;
                if (z.getAttributeNode(x)) {
                    this.captionText = z.getAttribute(x)
                } else {
                    if (g.defined(z[x])) {
                        this.captionText = z[x]
                    } else {
                        if (y) {
                            this.captionText = y.captionText
                        }
                    }
                }
            }
            var o = {
                left: function () {
                    this.t25.j6({
                        width: this.t25.j29("width")
                    })
                },
                bottom: function () {
                    this.t25.j6({
                        height: this.t25.j29("height"),
                        width: "auto"
                    })
                }
            };
            o.right = o.left;
            switch (e.toLowerCase()) {
            case "img:alt":
                k.call(this, m, "alt");
                break;
            case "img:title":
                k.call(this, m, "title");
                break;
            case "a:title":
                k.call(this, this.r, "title");
                if (!this.captionText) {
                    k.call(this, this.r, "z46")
                }
                break;
            case "span":
                var w = this.r.byTag("span");
                this.captionText = (w && w.length) ? w[0].innerHTML : (this.t16(this.t27)) ? this.t16(this.t27).captionText : null;
                break;
            default:
                this.captionText = (e.match(/^#/)) ? (e = $mjs(e.replace(/^#/, ""))) ? e.innerHTML : "" : ""
            }
            if (this.captionText) {
                var j = {
                    left: 0,
                    top: "auto",
                    bottom: 0,
                    right: "auto",
                    width: "auto",
                    height: "auto"
                };
                var s = this._o.captionPosition.toLowerCase();
                switch (s) {
                case "left":
                    j.top = 0, j.left = 0, j["float"] = "left";
                    this.t23.j6Prop("width", r.width);
                    j.height = r.height;
                    break;
                case "right":
                    j.top = 0, j.right = 0, j["float"] = "left";
                    this.t23.j6Prop("width", r.width);
                    j.height = r.height;
                    break;
                case "bottom":
                default:
                    s = "bottom"
                }
                this.t25 = g.$new("DIV").j2("MagicThumb-caption").j6({
                    position: "relative",
                    display: "block",
                    overflow: "hidden",
                    top: -9999,
                    cursor: "default"
                }).update(n(this.captionText)).j32(this.t22, ("left" == s) ? "top" : "bottom").j6(j);
                q.call(this);
                o[s].call(this);
                this.t25.j30("slide", new g.FX.Slide(this.t25, {
                    duration: this._o.captionSpeed,
                    onStart: function () {
                        this.t25.j6Prop("overflow-y", "hidden")
                    }.j24(this),
                    onComplete: function () {
                        this.t25.j6Prop("overflow-y", "auto");
                        if (g.j21.trident4) {
                            this.overlapBox.j6Prop("height", this.t22.offsetHeight)
                        }
                    }.j24(this)
                }));
                if (this.hCaption) {
                    this.t25.j29("slide").options.onBeforeRender = function (y, C, B, x, z) {
                        var A = {};
                        if (!B) {
                            A.width = y + z.width
                        }
                        if (x) {
                            A.left = this.curLeft - z.width + C
                        }
                        this.t22.j6(A)
                    }.j24(this, r.width + v, this.ieBack ? 0 : this._o.screenPadding, ("fit-screen" == this._o.expandSize), "left" == s)
                } else {
                    if (this.ieBack) {
                        this.t25.j29("slide").wrapper.j6Prop("height", "100%")
                    }
                }
            }
        },
        t5: function () {
            if ("hide" == this._o.buttons) {
                return
            }
            var j = this._o.buttonsPosition;
            pad = this.t22.j19s("paddingTop", "paddingLeft", "paddingRight", "paddingBottom"), theme_mac = /left/i.test(j) || ("auto" == this._o.buttonsPosition && "mac" == g.j21.platform);
            this.t26 = g.$new("DIV").j2("MagicThumb-buttons").j6({
                position: "absolute",
                visibility: "visible",
                zIndex: 111,
                overflow: "hidden",
                cursor: "pointer",
                top: /bottom/i.test(j) ? "auto" : 5 + pad.paddingTop.j17(),
                bottom: /bottom/i.test(j) ? 5 + pad.paddingBottom.j17() : "auto",
                right: (/right/i.test(j) || !theme_mac) ? 5 + pad.paddingRight.j17() : "auto",
                left: (/left/i.test(j) || theme_mac) ? 5 + pad.paddingLeft.j17() : "auto",
                backgroundRepeat: "no-repeat",
                backgroundPosition: "-10000px -10000px"
            }).j32(this.t23);
            var e = this.t26.j5("background-image").replace(/url\s*\(\s*\"{0,1}([^\"]*)\"{0,1}\s*\)/i, "$1");
            $mjs($mjs(this._o.buttonsDisplay.replace(/\s/ig, "").split(",")).filter(function (k) {
                return this.cbs.hasOwnProperty(k)
            }.j24(this)).sort(function (l, k) {
                var m = this.cbs[l].index - this.cbs[k].index;
                return (theme_mac) ? ("close" == l) ? -1 : ("close" == k) ? 1 : m : m
            }.j24(this))).forEach(function (k) {
                k = k.j26();
                var m = g.$new("A", {
                    title: this._lang[this.cbs[k].title],
                    href: "#",
                    rel: k
                }, {
                    display: "block",
                    "float": "left"
                }).j32(this.t26),
                    l = (l = m.j5("width")) ? l.j17() : 0,
                    q = (q = m.j5("height")) ? q.j17() : 0;
                m.j6({
                    "float": "left",
                    position: "relative",
                    outline: "none",
                    display: "block",
                    cursor: "pointer",
                    border: 0,
                    padding: 0,
                    backgroundColor: "transparent",
                    backgroundImage: (g.j21.trident4) ? "none" : "inherit",
                    backgroundPosition: "" + -(this.cbs[k].index * l) + "px 0px"
                });
                if (g.j21.trident && (g.j21.version > 4)) {
                    m.j6(this.t26.j19s("background-image"))
                }
                if (g.j21.trident4) {
                    this.t26.j6Prop("background-image", "none");
                    try {
                        if (!g.doc.namespaces.length || !g.doc.namespaces.item("mt_vml_")) {
                            g.doc.namespaces.add("mt_vml_", "urn:schemas-microsoft-com:vml")
                        }
                    } catch (o) {
                        try {
                            g.doc.namespaces.add("mt_vml_", "urn:schemas-microsoft-com:vml")
                        } catch (o) {}
                    }
                    if (!g.doc.styleSheets.magicthumb_ie_ex) {
                        var p = g.doc.createStyleSheet();
                        p.owningElement.id = "magicthumb_ie_ex";
                        p.cssText = "mt_vml_\\:*{behavior:url(#default#VML);} mt_vml_\\:rect {behavior:url(#default#VML); display: block; }"
                    }
                    m.j6({
                        backgroundImage: "none",
                        overflow: "hidden",
                        display: "block"
                    });
                    var n = '<mt_vml_:rect stroked="false"><mt_vml_:fill type="tile" src="' + e + '"></mt_vml_:fill></mt_vml_:rect>';
                    m.insertAdjacentHTML("beforeEnd", n);
                    $mjs(m.firstChild).j6({
                        display: "block",
                        width: (l * 3) + "px",
                        height: q * 2
                    });
                    m.scrollLeft = (this.cbs[k].index * l) + 1;
                    m.scrollTop = 1;
                    m.j30("bg-position", {
                        l: m.scrollLeft,
                        t: m.scrollTop
                    })
                }
            }, this)
        },
        t6: function (e) {
            var j = this.thumbs.indexOf(this);
            $mjs(g.$A(g.doc.byTag("A")).filter(function (l) {
                var k = new RegExp("(^|;)\\s*(zoom|thumb)\\-id\\s*:\\s*" + this.id.replace(/\-/, "-") + "(;|$)");
                return k.test(l.rel.j26())
            }, this)).forEach(function (m, k) {
                this.group = this.id;
                m = $mjs(m);
                if (!$mjs(m).j29("j24:prevent")) {
                    $mjs(m).j30("j24:prevent", function (n) {
                        $mjs(n).stop();
                        return false
                    }).je1("click", m.j29("j24:prevent"))
                }
                if (e) {
                    return
                }
                $mjs(m).j30("j24:replace", function (r, n) {
                    var p = this.j29("thumb"),
                        o = n.j29("thumb"),
                        q = p.t16(p.t27 || p.id);
                    if (((" " + q.r.className + " ").match(/\sMagicZoom(?:Plus){0,1}\s/)) && q.r.zoom) {
                        return true
                    }
                    $mjs(r).stop();
                    if (!p.ready || "inz30" != p.state || !o.ready || "inz30" != o.state || p == o) {
                        return
                    }
                    switch (r.type) {
                    case "mouseout":
                        if (p.swapTimer) {
                            clearTimeout(p.swapTimer)
                        }
                        p.swapTimer = false;
                        return;
                        break;
                    case "mouseover":
                        p.swapTimer = p.swap.j24(p, o).j27(p._o.selectorsMouseoverDelay);
                        break;
                    default:
                        p.swap(o);
                        return
                    }
                }.j16(this.r, m)).je1(this._o.selectorsChange, m.j29("j24:replace"));
                if ("mouseover" == this._o.selectorsChange) {
                    m.je1("mouseout", m.j29("j24:replace"))
                }
                if (m.href != this.z1.self.src) {
                    var l = $mjs(this.thumbs.filter(function (n) {
                        return (m.href == n.params.content && this.group == n.group)
                    }, this))[0];
                    if (l) {
                        m.j30("thumb", l)
                    } else {
                        new a(m, g.extend(g.detach(this._o), {
                            initializeOn: "load",
                            group: this.group
                        }), {
                            thumbnail: m.rev,
                            t27: this.id,
                            index: j + k
                        })
                    }
                } else {
                    this.selector = m;
                    m.j30("thumb", this);
                    if ("" != this._o.selectorsClass) {
                        m.j2(this._o.selectorsClass)
                    }
                }
                m.j6({
                    outline: "none"
                }).j2("MagicThumb-swap");
                this.t28.push(m)
            }, this)
        },
        t7: function () {
            var e;
            if ("true" != this._o.rightClick && "expanded" != this._o.rightClick) {
                this.content.je1("contextmenu", function (m) {
                    $mjs(m).stop()
                })
            }
            if (("auto" == this._o.restoreTrigger && "mouseover" == this._o.expandTrigger && "image" == this._o.expandAlign) || "mouseout" == this._o.restoreTrigger) {
                this.t22.je1("mouseout", function (n) {
                    var m = $mjs(n).stop().getTarget();
                    if ("expanded" != this.state) {
                        return
                    }
                    if (this.t22 == n.getRelated() || this.t22.hasChild(n.getRelated())) {
                        return
                    }
                    this.restore(null)
                }.j16(this))
            }
            if (!g.j21.touchScreen) {
                this.t23.je1("mouseup", function (n) {
                    var m = n.getButton();
                    if (3 == m) {
                        return
                    }
                    if (this._o.link) {
                        $mjs(n).stop();
                        g.win.open(this._o.link, (2 == m) ? "_blank" : this._o.linkTarget)
                    } else {
                        if (1 == m && "img" == this.media) {
                            $mjs(n).stop();
                            this.restore(null)
                        }
                    }
                }.j16(this))
            } else {
                this.t23.je1("touchstart", function (m) {
                    var o = g.now();
                    if (m.targetTouches.length > 1) {
                        return
                    }
                    this.t23.j30("event:lastTap", {
                        id: m.targetTouches[0].identifier,
                        ts: o
                    })
                }.j16(this));
                this.t23.je1("touchend", function (o) {
                    var p = g.now(),
                        m = this.t23.j29("event:lastTap");
                    if (!m || o.touches.length > 1) {
                        return
                    }
                    if (m.id == o.changedTouches[0].identifier && p - m.ts <= 300) {
                        if (this._o.link) {
                            $mjs(o).stop();
                            g.win.open(this._o.link, this._o.linkTarget);
                            return
                        }
                        o.stop();
                        this.restore(null);
                        return
                    }
                }.j16(this))
            }
            if (this.t26) {
                var k, l, j;
                this.t26.j30("j24:hover", k = this.cbHover.j16(this)).j30("j24:click", l = this.cbClick.j16(this));
                this.t26.je1("mouseover", k).je1("mouseout", k).je1((g.j21.touchScreen) ? "touchend" : "mouseup", l).je1("click", function (m) {
                    $mjs(m).stop()
                });
                if ("autohide" == this._o.buttons) {
                    this.t22.j30("j24:cbhover", j = function (n) {
                        var m = $mjs(n).stop().getTarget();
                        if ("expanded" != this.state) {
                            return
                        }
                        if (this.t22 == n.getRelated() || this.t22.hasChild(n.getRelated())) {
                            return
                        }
                        this.t10(("mouseout" == n.type))
                    }.j16(this)).je1("mouseover", j).je1("mouseout", j)
                }
            }
            if (!g.j21.touchScreen) {
                this.t22.j30("j24:external-click", e = function (m) {
                    if (this.t22.hasChild(m.getTarget())) {
                        return
                    }
                    if ((/touch/i).test(m.type) || ((1 == m.getButton() || 0 == m.getButton()) && "expanded" == this.state)) {
                        this.restore(null, true)
                    }
                }.j16(this));
                g.doc.je1((g.j21.touchScreen) ? "touchstart" : "click", e)
            }
        },
        t8: function () {
            this.t30 = new g.FX(this.t22, {
                transition: g.FX.Transition[this._o.expandEffect + this.easing[this._o.expandEffect][0]],
                duration: this._o.expandSpeed,
                fps: this.fps,
                onStart: function () {
                    var l = this.t16(this.t27 || this.id);
                    this.t22.j6Prop("width", this.t30.styles.width[0]);
                    this.t22.j32(g.body);
                    if (!g.j21.touchScreen) {
                        this.toggleMZ(false)
                    }
                    this.t10(true, true);
                    if (this.t26 && g.j21.trident && g.j21.version < 6) {
                        this.t26.hide()
                    }
                    if (!this._o.keepThumbnail && !(this.prevItem && "expand" != this._o.slideshowEffect)) {
                        var j = {};
                        for (var e in this.t30.styles) {
                            j[e] = this.t30.styles[e][0]
                        }
                        this.t22.j6(j);
                        if ((" " + l.r.className + " ").match(/\s(MagicThumb|MagicZoomPlus)\s/)) {
                            l.r.j23(0, true)
                        }
                    }
                    if (this.t25) {
                        if (g.j21.trident && g.j21.backCompat && this.hCaption) {
                            this.t25.j6Prop("display", "none")
                        }
                        this.t25.parentNode.j6Prop("height", 0)
                    }
                    this.t22.j6({
                        zIndex: this._o.zIndex + 1,
                        opacity: 1
                    })
                }.j24(this),
                onComplete: function () {
                    var j = this.t16(this.t27 || this.id);
                    if (this._o.link) {
                        this.t22.j6({
                            cursor: "pointer"
                        })
                    }
                    if (!(this.prevItem && "expand" != this._o.slideshowEffect)) {
                        j.r.j2("MagicThumb-expanded-thumbnail")
                    }
                    if ("hide" != this._o.buttons) {
                        if (this.t26 && g.j21.trident && g.j21.version < 6) {
                            this.t26.show();
                            if (g.j21.trident4) {
                                g.$A(this.t26.byTag("A")).j14(function (l) {
                                    var m = l.j29("bg-position");
                                    l.scrollLeft = m.l;
                                    l.scrollTop = m.t
                                })
                            }
                        }
                        this.t10()
                    }
                    if (this.t25) {
                        if (this.hCaption) {
                            var e = this.t22.j29("border"),
                                k = this.adjBorder(this.t22, this.t22.j7().height, e.borderTopWidth.j17() + e.borderBottomWidth.j17());
                            this.t23.j6(this.t22.j19s("width"));
                            this.t25.j6Prop("height", k - this.t25.j29("padY")).parentNode.j6Prop("height", k);
                            this.t22.j6Prop("width", "auto");
                            this.curLeft = this.t22.j8().left
                        }
                        this.t25.j6Prop("display", "block");
                        this.t12()
                    }
                    this.state = "expanded";
                    g.doc.je1("keydown", this.onKey.j16(this));
                    if (this._o.panZoom && this.t23.j7().width < this.z1.nWidth) {
                        if (!this.t23.zoom) {
                            this.zoomItem = new c.zoom(this.t23, this.mzParams)
                        } else {
                            this.t23.zoom.start(this.mzParams)
                        }
                    }
                }.j24(this)
            });
            this.t31 = new g.FX(this.t22, {
                transition: g.FX.Transition.linear,
                duration: this._o.restoreSpeed,
                fps: this.fps,
                onStart: function () {
                    if (this._o.panZoom) {
                        c.stop(this.t23)
                    }
                    this.t10(true, true);
                    if (this.t26 && g.j21.trident4) {
                        this.t26.hide()
                    }
                    this.t22.j6({
                        zIndex: this._o.zIndex
                    });
                    if (this.t25 && this.hCaption) {
                        this.t22.j6(this.t23.j19s("width"));
                        this.t23.j6Prop("width", "auto")
                    }
                }.j24(this),
                onComplete: function () {
                    if (!this.prevItem || (this.prevItem && !this.t27 && !this.t28.length)) {
                        var e = this.t16(this.t27 || this.id);
                        e.toggleMZ(true);
                        e.r.j3("MagicThumb-expanded-thumbnail").j23(1, true);
                        if (e.hint) {
                            e.hint.show()
                        }
                    }
                    this.t22.j6({
                        top: -10000
                    }).j32(this.t29);
                    this.state = "inz30"
                }.j24(this)
            });
            if (g.j21.trident4) {
                this.t30.options.onBeforeRender = this.t31.options.onBeforeRender = function (l, e, m, k) {
                    var j = k.width + e;
                    this.overlapBox.j6({
                        width: j,
                        height: Math.ceil(j / l) + m
                    });
                    if (k.opacity) {
                        this.t23.j23(k.opacity)
                    }
                }.j24(this, this.t22.j29("ratio"), this.t22.j29("padX"), this.t22.j29("padY"))
            }
        },
        expand: function (w, q) {
            if (this._o.disableExpand) {
                return
            }
            if ("inz30" != this.state) {
                if ("uninitialized" == this.state) {
                    this.r.j30("clicked", true);
                    this.start()
                }
                return
            }
            this.state = "busy-expand";
            this.prevItem = w = w || false;
            this.t21().forEach(function (p) {
                if (p == this || this.prevItem) {
                    return
                }
                switch (p.state) {
                case "busy-restore":
                    p.t31.stop(true);
                    break;
                case "busy-expand":
                    p.t30.stop();
                    p.state = "expanded";
                default:
                    p.restore(null, true)
                }
            }, this);
            var z = this.t16(this.t27 || this.id).r.j29("thumb"),
                e = (z.z7) ? z.z7.self.j9() : z.r.j9(),
                v = (z.z7) ? z.z7.self.j8() : z.r.j8(),
                x = ("fit-screen" == this._o.expandSize) ? this.resize() : {
                    width: this.t22.j29("size").width - this.t22.j29("padX") + this.t22.j29("hspace"),
                    height: this.t22.j29("size").height - this.t22.j29("padY") + this.t22.j29("vspace")
                },
                r = {
                    width: x.width + this.t22.j29("padX"),
                    height: x.height + this.t22.j29("padY")
                },
                s = {},
                l = [this.t22.j19s("paddingTop", "paddingLeft", "paddingRight", "paddingBottom"), this.t22.j29("padding")],
                k = {
                    width: [e.right - e.left, x.width]
                };
            $mjs(["Top", "Bottom", "Left", "Right"]).forEach(function (p) {
                k["padding" + p] = [l[0]["padding" + p].j17(), l[1]["padding" + p].j17()]
            });
            var j = this.position;
            var y = ("image" == this._o.expandAlign) ? e : this.t13();
            switch (this._o.expandPosition) {
            case "center":
                s = this.t14(r, y);
                break;
            default:
                if ("fit-screen" == this._o.expandSize) {
                    x = this.resize({
                        x: (parseInt(j.left)) ? 0 + j.left : (parseInt(j.right)) ? 0 + j.right : 0,
                        y: (parseInt(j.top)) ? 0 + j.top : (parseInt(j.bottom)) ? 0 + j.bottom : 0
                    });
                    r = {
                        width: x.width + this.t22.j29("padX"),
                        height: x.height + this.t22.j29("padY")
                    };
                    k.width[1] = x.width
                }
                y.top = (y.top += parseInt(j.top)) ? y.top : (y.bottom -= parseInt(j.bottom)) ? y.bottom - r.height : y.top;
                y.bottom = y.top + r.height;
                y.left = (y.left += parseInt(j.left)) ? y.left : (y.right -= parseInt(j.right)) ? y.right - r.width : y.left;
                y.right = y.left + r.width;
                s = this.t14(r, y);
                break
            }
            k.top = [v.top, s.y];
            k.left = [v.left, s.x + ((this.t25 && "left" == this._o.captionPosition) ? this.t25.j29("width") : 0)];
            if (w && "expand" != this._o.slideshowEffect) {
                k.width = [x.width, x.width];
                k.top[0] = k.top[1];
                k.left[0] = k.left[1];
                k.opacity = [0, 1];
                this.t30.options.duration = this._o.slideshowSpeed;
                this.t30.options.transition = g.FX.Transition.linear
            } else {
                this.t30.options.transition = g.FX.Transition[this._o.expandEffect + this.easing[this._o.expandEffect][0]];
                this.t30.options.duration = this._o.expandSpeed;
                if (g.j21.trident4) {
                    this.t23.j23(1)
                }
                if (this._o.keepThumbnail) {
                    k.opacity = [0, 1]
                }
            }
            if (this.t26) {
                g.$A(this.t26.byTag("A")).forEach(function (A) {
                    var p = A.j5("background-position").split(" ");
                    if (g.j21.trident4) {
                        A.scrollTop = 1
                    } else {
                        p[1] = "0px";
                        A.j6({
                            "background-position": p.join(" ")
                        })
                    }
                });
                var m = g.$A(this.t26.byTag("A")).filter(function (p) {
                    return "previous" == p.rel
                })[0],
                    o = g.$A(this.t26.byTag("A")).filter(function (p) {
                        return "next" == p.rel
                    })[0],
                    u = this.t19(this.group),
                    n = this.t20(this.group);
                if (m) {
                    (this == u && (u == n || !this._o.slideshowLoop)) ? m.hide() : m.show()
                }
                if (o) {
                    (this == n && (u == n || !this._o.slideshowLoop)) ? o.hide() : o.show()
                }
            }
            this.t30.start(k);
            this.t11()
        },
        restore: function (e, n) {
            if ("expanded" != this.state) {
                return
            }
            this.state = "busy-restore";
            this.prevItem = e = e || null;
            n = n || false;
            g.doc.je2("keydown");
            var p = this.t22.j9();
            if (this.t25) {
                this.t12("hide");
                this.t25.parentNode.j6Prop("height", 0);
                if (g.j21.trident && g.j21.backCompat && this.hCaption) {
                    this.t25.j6Prop("display", "none")
                }
            }
            var m = {};
            if (e && "expand" != this._o.slideshowEffect) {
                if ("fade" == this._o.slideshowEffect) {
                    m.opacity = [1, 0]
                }
                m.width = [this.t30.styles.width[1], this.t30.styles.width[1]];
                m.top = [this.t30.styles.top[1], this.t30.styles.top[1]];
                m.left = [this.t30.styles.left[1], this.t30.styles.left[1]];
                this.t31.options.duration = this._o.slideshowSpeed;
                this.t31.options.transition = g.FX.Transition.linear
            } else {
                this.t31.options.duration = (n) ? 0 : this._o.restoreSpeed;
                this.t31.options.transition = g.FX.Transition[this._o.restoreEffect + this.easing[this._o.restoreEffect][1]];
                m = g.detach(this.t30.styles);
                for (var j in m) {
                    if ("array" != g.j1(m[j])) {
                        continue
                    }
                    m[j].reverse()
                }
                if (!this._o.keepThumbnail) {
                    delete m.opacity
                }
                var l = this.t16(this.t27 || this.id).r.j29("thumb"),
                    q = (l.z7) ? l.z7.self : l.r;
                m.width[1] = [q.j7().width];
                m.top[1] = q.j8().top;
                m.left[1] = q.j8().left
            }
            this.t31.start(m);
            if (e) {
                e.expand(this, p)
            }
            var o = g.doc.j29("bg:t32");
            if (!e && o) {
                if ("hidden" != o.el.j5("visibility")) {
                    this.t11(true)
                }
            }
        },
        t12: function (j) {
            if (!this.t25) {
                return
            }
            var e = this.t25.j29("slide");
            this.t25.j6Prop("overflow-y", "hidden");
            e.stop();
            e[j || "toggle"](this.hCaption ? this._o.captionPosition : "vertical")
        },
        t10: function (j, l) {
            var n = this.t26;
            if (!n) {
                return
            }
            j = j || false;
            l = l || false;
            var k = n.j29("cb:t32"),
                e = {};
            if (!k) {
                n.j30("cb:t32", k = new g.FX(n, {
                    transition: g.FX.Transition.linear,
                    duration: 250
                }))
            } else {
                k.stop()
            }
            if (l) {
                n.j6Prop("opacity", (j) ? 0 : 1);
                return
            }
            var m = n.j5("opacity");
            e = (j) ? {
                opacity: [m, 0]
            } : {
                opacity: [m, 1]
            };
            k.start(e)
        },
        cbHover: function (m) {
            var k = $mjs(m).stop().getTarget();
            if ("expanded" != this.state) {
                return
            }
            try {
                while ("a" != k.tagName.toLowerCase() && k != this.t26) {
                    k = k.parentNode
                }
                if ("a" != k.tagName.toLowerCase() || k.hasChild(m.getRelated())) {
                    return
                }
            } catch (l) {
                return
            }
            var j = k.j5("background-position").split(" ");
            switch (m.type) {
            case "mouseover":
                j[1] = k.j5("height");
                break;
            case "mouseout":
                j[1] = "0px";
                break
            }
            if (g.j21.trident4) {
                k.scrollTop = j[1].j17() + 1
            } else {
                k.j6({
                    "background-position": j.join(" ")
                })
            }
        },
        cbClick: function (k) {
            var j = $mjs(k).stop().getTarget();
            while ("a" != j.tagName.toLowerCase() && j != this.t26) {
                j = j.parentNode
            }
            if ("a" != j.tagName.toLowerCase()) {
                return
            }
            switch (j.rel) {
            case "previous":
                this.restore(this.t18(this, this._o.slideshowLoop));
                break;
            case "next":
                this.restore(this.t17(this, this._o.slideshowLoop));
                break;
            case "close":
                this.restore(null);
                break
            }
        },
        t11: function (j) {
            j = j || false;
            var k = g.doc.j29("bg:t32"),
                e = {},
                m = 0;
            if (!k) {
                var l = g.$new("DIV").j2("MagicThumb-background").j6({
                    position: "fixed",
                    display: "block",
                    top: 0,
                    bottom: 0,
                    left: 0,
                    right: 0,
                    zIndex: (this._o.zIndex - 1),
                    overflow: "hidden",
                    backgroundColor: this._o.backgroundColor,
                    opacity: 0,
                    border: 0,
                    margin: 0,
                    padding: 0
                }).j32(g.body).hide();
                if (g.j21.trident4) {
                    l.append(g.$new("IFRAME", {
                        src: 'javascript:"";'
                    }, {
                        width: "100%",
                        height: "100%",
                        display: "block",
                        filter: "mask()",
                        top: 0,
                        lef: 0,
                        position: "absolute",
                        zIndex: -1,
                        border: "none"
                    }))
                }
                g.doc.j30("bg:t32", k = new g.FX(l, {
                    transition: g.FX.Transition.linear,
                    duration: this._o.backgroundSpeed,
                    onStart: function (n) {
                        if (n) {
                            this.j6(g.extend(g.doc.j12(), {
                                position: "absolute"
                            }))
                        }
                    }.j24(l, this.ieBack || g.j21.touchScreen),
                    onComplete: function () {
                        this.j23(this.j5("opacity"), true)
                    }.j24(l)
                }));
                e = {
                    opacity: [0, this._o.backgroundOpacity / 100]
                }
            } else {
                k.stop();
                m = k.el.j5("opacity");
                k.el.j6Prop("background-color", this._o.backgroundColor);
                e = (j) ? {
                    opacity: [m, 0]
                } : {
                    opacity: [m, this._o.backgroundOpacity / 100]
                };
                k.options.duration = this._o.backgroundSpeed
            }
            k.el.show();
            k.start(e)
        },
        toggleMZ: function (j) {
            j = j || false;
            var e = this.t16(this.t27 || this.id);
            if (e.r.zoom && -1 != e.r.zoom.z28) {
                if (!j) {
                    e.r.zoom.pause();
                    e.r.zoom.z30 = false;
                    e.r.zoom.z4.z38 = false;
                    e.r.zoom.z4.self.hide();
                    e.r.zoom.z47.hide()
                } else {
                    e.r.zoom.activate(false)
                }
            }
        },
        t13: function (k) {
            k = k || 0;
            var j = (g.j21.touchScreen) ? {
                width: window.innerWidth,
                height: window.innerHeight
            } : $mjs(window).j7(),
                e = $mjs(window).j10();
            return {
                left: e.x + k,
                right: e.x + j.width - k,
                top: e.y + k,
                bottom: e.y + j.height - k
            }
        },
        t14: function (k, l) {
            var j = this.t13(this._o.screenPadding),
                e = $mjs(window).j12();
            l = l || j;
            return {
                y: Math.max(j.top, Math.min(("fit-screen" == this._o.expandSize) ? j.bottom : e.height + k.height, l.bottom - (l.bottom - l.top - k.height) / 2) - k.height),
                x: Math.max(j.left, Math.min(j.right, l.right - (l.right - l.left - k.width) / 2) - k.width)
            }
        },
        resize: function (l) {
            var m = (g.j21.touchScreen) ? {
                width: window.innerWidth,
                height: window.innerHeight
            } : $mjs(window).j7(),
                r = this.t22.j29("size"),
                n = this.t22.j29("ratio"),
                k = this.t22.j29("padX"),
                e = this.t22.j29("padY"),
                q = this.t22.j29("hspace"),
                j = this.t22.j29("vspace"),
                p = 0,
                o = 0;
            if (l) {
                m.width -= l.x;
                m.height -= l.y
            }
            if (this.hCaption) {
                p = Math.min(this.size.width + q, Math.min(r.width, m.width - k - this.scrPad.x)), o = Math.min(this.size.height + j, Math.min(r.height, m.height - this.scrPad.y))
            } else {
                p = Math.min(this.size.width + q, Math.min(r.width, m.width - this.scrPad.x)), o = Math.min(this.size.height + j, Math.min(r.height, m.height - e - this.scrPad.y))
            }
            if (p / o > n) {
                p = o * n
            } else {
                if (p / o < n) {
                    o = p / n
                }
            }
            this.t22.j6Prop("width", p);
            if (this.cr) {
                this.cr.j6({
                    top: (this.z1.self.j7().height - this.cr.j7().height)
                })
            }
            return {
                width: Math.ceil(p),
                height: Math.ceil(o)
            }
        },
        adjBorder: function (l, j, e) {
            var k = false;
            switch (g.j21.engine) {
            case "gecko":
                k = "content-box" != (l.j5("box-sizing") || l.j5("-moz-box-sizing"));
                break;
            case "webkit":
                k = "content-box" != (l.j5("box-sizing") || l.j5("-webkit-box-sizing"));
                break;
            case "trident":
                k = g.j21.backCompat || "content-box" != (l.j5("box-sizing") || l.j5("-ms-box-sizing") || "content-box");
                break;
            default:
                k = "content-box" != l.j5("box-sizing");
                break
            }
            return (k) ? j : j - e
        },
        z37: function (o) {
            function l(r) {
                var q = [];
                if ("string" == g.j1(r)) {
                    return r
                }
                for (var m in r) {
                    q.push(m.dashize() + ":" + r[m])
                }
                return q.join(";")
            }
            var k = l(o).j26(),
                p = $mjs(k.split(";")),
                n = null,
                j = null;
            p.forEach(function (q) {
                for (var m in this._o) {
                    j = new RegExp("^" + m.dashize().replace(/\-/, "\\-") + "\\s*:\\s*([^;]" + (("hintText" == m) ? "*" : "+") + ")$", "i").exec(q.j26());
                    if (j) {
                        switch (g.j1(this._o[m])) {
                        case "boolean":
                            this._o[m] = j[1].j18();
                            break;
                        case "number":
                            this._o[m] = (j[1].has(".")) ? (j[1].toFloat() * ((m.toLowerCase().has("opacity")) ? 100 : 1000)) : j[1].j17();
                            break;
                        default:
                            this._o[m] = j[1].j26()
                        }
                    }
                }
            }, this);
            for (var e in this._deprecated) {
                if (!this._deprecated.hasOwnProperty(e)) {
                    continue
                }
                j = new RegExp("(^|;)\\s*" + e.dashize().replace(/\-/, "\\-") + "\\s*:\\s*([^;]+)\\s*(;|$)", "i").exec(k);
                if (j) {
                    this._deprecated[e].call(this, j[2])
                }
            }
        },
        parseExOptions: function () {
            var e = null,
                l = this.position,
                k = this.size;
            for (var j in l) {
                e = new RegExp("" + j + "\\s*=\\s*([^,]+)", "i").exec(this._o.expandPosition);
                if (e) {
                    l[j] = (isFinite(l[j] = e[1].j17())) ? l[j] : "auto"
                }
            }
            if ((isNaN(l.top) && isNaN(l.bottom)) || (isNaN(l.left) && isNaN(l.right))) {
                this._o.expandPosition = "center"
            }
            if (!$mjs(["fit-screen", "original"]).contains(this._o.expandSize)) {
                for (var j in k) {
                    e = new RegExp("" + j + "\\s*=\\s*([^,]+)", "i").exec(this._o.expandSize);
                    if (e) {
                        k[j] = (isFinite(k[j] = e[1].j17())) ? k[j] : -1
                    }
                }
                if (isNaN(k.width) && isNaN(k.height)) {
                    this._o.expandSize = "fit-screen"
                }
            }
        },
        setLang: function (e) {
            var j, l;
            for (var j in e) {
                if (this._lang.hasOwnProperty(l = j.j22())) {
                    this._lang[l] = e[j]
                }
            }
        },
        t16: function (e) {
            return $mjs(this.thumbs.filter(function (j) {
                return (e == j.id)
            }))[0]
        },
        t15: function (e, j) {
            e = e || null;
            j = j || false;
            return $mjs(this.thumbs.filter(function (k) {
                return (e == k.group && (j || k.ready) && (j || "uninitialized" != k.state) && (j || !k._o.disableExpand))
            }))
        },
        t17: function (m, e) {
            e = e || false;
            var j = this.t15(m.group),
                k = j.indexOf(m) + 1;
            return (k >= j.length) ? (!e || 1 >= j.length) ? undefined : j[0] : j[k]
        },
        t18: function (m, e) {
            e = e || false;
            var j = this.t15(m.group),
                k = j.indexOf(m) - 1;
            return (k < 0) ? (!e || 1 >= j.length) ? undefined : j[j.length - 1] : j[k]
        },
        t19: function (j) {
            j = j || null;
            var e = this.t15(j, true);
            return (e.length) ? e[0] : undefined
        },
        t20: function (j) {
            j = j || null;
            var e = this.t15(j, true);
            return (e.length) ? e[e.length - 1] : undefined
        },
        t21: function () {
            return $mjs(this.thumbs.filter(function (e) {
                return ("expanded" == e.state || "busy-expand" == e.state || "busy-restore" == e.state)
            }))
        },
        onKey: function (k) {
            var j = this._o.slideshowLoop,
                m = null;
            if (!this._o.keyboard) {
                g.doc.je2("keydown");
                return true
            }
            k = $mjs(k);
            if (this._o.keyboardCtrl && !(k.ctrlKey || k.metaKey)) {
                return false
            }
            switch (k.keyCode) {
            case 27:
                k.stop();
                this.restore(null);
                break;
            case 32:
            case 34:
            case 39:
            case 40:
                m = this.t17(this, j || 32 == k.keyCode);
                break;
            case 33:
            case 37:
            case 38:
                m = this.t18(this, j);
                break;
            default:
            }
            if (m) {
                k.stop();
                this.restore(m)
            }
        }
    });
    var h = {
        version: "v4.0.7",
        options: {},
        lang: {},
        _o: {
            disableZoom: false,
            disableExpand: false,
            hintClass: "MagicZoomPlusHint",
            hintText: "Zoom",
            rightClick: "false"
        },
        start: function (l) {
            this.items = $mjs(window).j29("magiczoomplus:items", $mjs([]));
            var e = null,
                j = $mjs([]),
                k = {};
            this._o = g.extend(this._o, this._z37());
            c.options = g.detach(this._o);
            b.options = g.detach(this._o);
            c.options.rightClick = ("original" == this._o.rightClick || "true" == this._o.rightClick);
            b.lang = this.lang;
            if (l) {
                e = $mjs(l);
                if (e && (" " + e.className + " ").match(/\s(MagicZoom(?:Plus){0,1}|MagicThumb)\s/)) {
                    j.push(e)
                } else {
                    return false
                }
            } else {
                j = $mjs(g.$A(g.body.byTag("A")).filter(function (m) {
                    return (" " + m.className + " ").match(/\s(MagicZoom(?:Plus){0,1}|MagicThumb)\s/)
                }))
            }
            j.forEach(function (p) {
                p = $mjs(p);
                var m = p.byTag("span"),
                    n = null;
                k = g.extend(g.detach(this._o), this._z37(p.rel || " "));
                if (p.j13("MagicZoom") || (p.j13("MagicZoomPlus"))) {
                    if (m && m.length) {
                        n = p.removeChild(m[0])
                    }
                    c.start(p, "right-click: " + ("original" == k.rightClick || "true" == k.rightClick));
                    if (n) {
                        p.append(n)
                    }
                }
                if (p.j13("MagicThumb") || (p.j13("MagicZoomPlus"))) {
                    b.start(p)
                } else {
                    p.style.cursor = "pointer"
                }
                this.items.push(p)
            }, this);
            return true
        },
        stop: function (m) {
            var e = null,
                l = null,
                j = $mjs([]);
            if (m) {
                e = $mjs(m);
                if (e && (" " + e.className + " ").match(/\s(MagicZoom(?:Plus){0,1}|MagicThumb)\s/)) {
                    j = $mjs(this.items.splice(this.items.indexOf(e), 1))
                } else {
                    return false
                }
            } else {
                j = $mjs(this.items)
            }
            while (j.length) {
                l = $mjs(j[j.length - 1]);
                if (l.zoom) {
                    l.zoom.stop();
                    c.zooms.splice(c.zooms.indexOf(l.zoom), 1);
                    l.zoom = undefined
                }
                b.stop(l);
                var k = j.splice(j.indexOf(l), 1);
                delete k
            }
            return true
        },
        refresh: function (j) {
            var e = null;
            if (j) {
                this.stop(j);
                this.start.j24(this).j27(150, j)
            } else {
                this.stop();
                this.start.j24(this).j27(150)
            }
            return true
        },
        update: function (n, e, k, l) {
            var m = $mjs(n),
                j = null;
            if (m) {
                if ((j = m.j29("thumb"))) {
                    j.t16(j.t27 || j.id).state = "updating"
                }
                if (!c.update(m, e, k, l)) {
                    b.update(m, e, k, l)
                }
            }
        },
        expand: function (e) {
            return b.expand(e)
        },
        restore: function (e) {
            return b.restore(e)
        },
        _z37: function (j) {
            var e, p, l, k, n;
            e = null;
            p = {};
            n = [];
            if (j) {
                l = $mjs(j.split(";"));
                l.j14(function (o) {
                    for (var m in this._o) {
                        e = new RegExp("^" + m.dashize().replace(/\-/, "\\-") + "\\s*:\\s*([^;]+)$", "i").exec(o.j26());
                        if (e) {
                            switch (g.j1(this._o[m])) {
                            case "boolean":
                                p[m] = e[1].j18();
                                break;
                            case "number":
                                p[m] = parseFloat(e[1]);
                                break;
                            default:
                                p[m] = e[1].j26()
                            }
                        }
                    }
                }, this)
            } else {
                for (k in this.options) {
                    e = this.options[k];
                    switch (g.j1(this._o[k.j22()])) {
                    case "boolean":
                        e = e.toString().j18();
                        break;
                    case "number":
                        e = parseFloat(e);
                        break;
                    default:
                        break
                    }
                    p[k.j22()] = e
                }
            }
            return p
        }
    };
    $mjs(document).je1("domready", function () {
        h.start()
    });
    return h
})(magicJS);
