(function () {
    if (window.magicJS) {
        return
    }
    var _1 = {
        version: "2.3.11",
        UUID: 0,
        storage: {},
        $uuid: function (o) {
            return (o.$J_UUID || (o.$J_UUID = ++$J.UUID))
        },
        getStorage: function (_2) {
            return ($J.storage[_2] || ($J.storage[_2] = {}))
        },
        $F: function () {},
        $false: function () {
            return false
        },
        defined: function (o) {
            return (undefined != o)
        },
        exists: function (o) {
            return !!(o)
        },
        j1: function (o) {
            if (!$J.defined(o)) {
                return false
            }
            if (o.$J_TYPE) {
                return o.$J_TYPE
            }
            if ( !! o.nodeType) {
                if (1 == o.nodeType) {
                    return "element"
                }
                if (3 == o.nodeType) {
                    return "textnode"
                }
            }
            if (o.length && o.item) {
                return "collection"
            }
            if (o.length && o.callee) {
                return "arguments"
            }
            if ((o instanceof window.Object || o instanceof window.Function) && o.constructor === $J.Class) {
                return "class"
            }
            if (o instanceof window.Array) {
                return "array"
            }
            if (o instanceof window.Function) {
                return "function"
            }
            if (o instanceof window.String) {
                return "string"
            }
            if ($J.v.trident) {
                if ($J.defined(o.cancelBubble)) {
                    return "event"
                }
            } else {
                if (o instanceof window.Event || o === window.event || o.constructor == window.MouseEvent) {
                    return "event"
                }
            }
            if (o instanceof window.Date) {
                return "date"
            }
            if (o instanceof window.RegExp) {
                return "regexp"
            }
            if (o === window) {
                return "window"
            }
            if (o === document) {
                return "document"
            }
            return typeof(o)
        },
        extend: function (o, p) {
            if (!(o instanceof window.Array)) {
                o = [o]
            }
            for (var i = 0, l = o.length; i < l; i++) {
                if (!$J.defined(o)) {
                    continue
                }
                for (var k in (p || {})) {
                    try {
                        o[i][k] = p[k]
                    } catch (x) {}
                }
            }
            return o[0]
        },
        implement: function (o, p) {
            if (!(o instanceof window.Array)) {
                o = [o]
            }
            for (var i = 0, l = o.length; i < l; i++) {
                if (!$J.defined(o[i])) {
                    continue
                }
                if (!o[i].prototype) {
                    continue
                }
                for (var k in (p || {})) {
                    if (!o[i].prototype[k]) {
                        o[i].prototype[k] = p[k]
                    }
                }
            }
            return o[0]
        },
        nativize: function (o, p) {
            if (!$J.defined(o)) {
                return o
            }
            for (var k in (p || {})) {
                if (!o[k]) {
                    o[k] = p[k]
                }
            }
            return o
        },
        $try: function () {
            for (var i = 0, l = arguments.length; i < l; i++) {
                try {
                    return arguments[i]()
                } catch (e) {}
            }
            return null
        },
        $A: function (o) {
            if (!$J.defined(o)) {
                return $J.$([])
            }
            if (o.toArray) {
                return $J.$(o.toArray())
            }
            if (o.item) {
                var l = o.length || 0,
                    a = new Array(l);
                while (l--) {
                    a[l] = o[l]
                }
                return $J.$(a)
            }
            return $J.$(Array.prototype.slice.call(o))
        },
        now: function () {
            return new Date().getTime()
        },
        detach: function (o) {
            var r;
            switch ($J.j1(o)) {
            case "object":
                r = {};
                for (var p in o) {
                    r[p] = $J.detach(o[p])
                }
                break;
            case "array":
                r = [];
                for (var i = 0, l = o.length; i < l; i++) {
                    r[i] = $J.detach(o[i])
                }
                break;
            default:
                return o
            }
            return r
        },
        $: function (o) {
            if (!$J.defined(o)) {
                return null
            }
            if (o.$J_EXTENDED) {
                return o
            }
            switch ($J.j1(o)) {
            case "array":
                o = $J.nativize(o, $J.extend($J.Array, {
                    $J_EXTENDED: true
                }));
                o["j14"] = o["forEach"];
                return o;
                break;
            case "string":
                var el = document.getElementById(o);
                if ($J.defined(el)) {
                    return $J.$(el)
                }
                return null;
                break;
            case "window":
            case "document":
                $J.$uuid(o);
                o = $J.extend(o, $J.Doc);
                break;
            case "element":
                $J.$uuid(o);
                o = $J.extend(o, $J.Element);
                break;
            case "event":
                o = $J.extend(o, $J.Event);
                break;
            case "textnode":
                return o;
                break;
            case "function":
            case "array":
            case "date":
            default:
                break
            }
            return $J.extend(o, {
                $J_EXTENDED: true
            })
        },
        $new: function (_3, _4, _5) {
            return $J.$($J.doc.createElement(_3)).setProps(_4).j6(_5)
        }
    };
    window.magicJS = window.$J = _1;
    window.$j = _1.$;
    $J.Array = {
        $J_TYPE: "array",
        indexOf: function (_6, _7) {
            var _8 = this.length;
            for (var l = this.length, i = (_7 < 0) ? Math.max(0, l + _7) : _7 || 0; i < l; i++) {
                if (this[i] === _6) {
                    return i
                }
            }
            return -1
        },
        contains: function (_9, _a) {
            return this.indexOf(_9, _a) != -1
        },
        forEach: function (cb, o) {
            for (var i = 0, l = this.length; i < l; i++) {
                if (i in this) {
                    cb.call(o, this[i], i, this)
                }
            }
        },
        filter: function (cb, o) {
            var r = [];
            for (var i = 0, l = this.length; i < l; i++) {
                if (i in this) {
                    var v = this[i];
                    if (cb.call(o, this[i], i, this)) {
                        r.push(v)
                    }
                }
            }
            return r
        },
        map: function (cb, o) {
            var r = [];
            for (var i = 0, l = this.length; i < l; i++) {
                if (i in this) {
                    r[i] = cb.call(o, this[i], i, this)
                }
            }
            return r
        }
    };
    $J.implement(String, {
        $J_TYPE: "string",
        j21: function () {
            return this.replace(/^\s+|\s+$/g, "")
        },
        trimLeft: function () {
            return this.replace(/^\s+/g, "")
        },
        trimRight: function () {
            return this.replace(/\s+$/g, "")
        },
        j20: function (s) {
            return (this.toString() === s.toString())
        },
        icompare: function (s) {
            return (this.toLowerCase().toString() === s.toLowerCase().toString())
        },
        k: function () {
            return this.replace(/-\D/g, function (m) {
                return m.charAt(1).toUpperCase()
            })
        },
        dashize: function () {
            return this.replace(/[A-Z]/g, function (m) {
                return ("-" + m.charAt(0).toLowerCase())
            })
        },
        j22: function (b) {
            return parseInt(this, b || 10)
        },
        toFloat: function () {
            return parseFloat(this)
        },
        j23: function () {
            return !this.replace(/true/i, "").j21()
        },
        has: function (_b, _c) {
            _c = _c || "";
            return (_c + this + _c).indexOf(_c + _b + _c) > -1
        }
    });
    _1.implement(Function, {
        $J_TYPE: "function",
        j19: function () {
            var _d = $J.$A(arguments),
                m = this,
                o = _d.shift();
            return function () {
                return m.apply(o || null, _d.concat($J.$A(arguments)))
            }
        },
        j18: function () {
            var _e = $J.$A(arguments),
                m = this,
                o = _e.shift();
            return function (_f) {
                return m.apply(o || null, $J.$([_f || window.event]).concat(_e))
            }
        },
        j32: function () {
            var _10 = $J.$A(arguments),
                m = this,
                t = _10.shift();
            return window.setTimeout(function () {
                return m.apply(m, _10)
            }, t || 0)
        },
        j33: function () {
            var _11 = $J.$A(arguments),
                m = this;
            return function () {
                return m.j32.apply(m, _11)
            }
        },
        interval: function () {
            var _12 = $J.$A(arguments),
                m = this,
                t = _12.shift();
            return window.setInterval(function () {
                return m.apply(m, _12)
            }, t || 0)
        }
    });
    $J.v = {
        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: ($J.defined(window.orientation)) ? "ipod" : (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.v.ready) {
                return
            }
            $J.v.ready = true;
            $J.body = $J.$(document.body);
            $J.$(document).raiseEvent("domready")
        }
    };
    (function () {
        function _13() {
            return !!(arguments.callee.caller)
        };
        $J.v.version = ("presto" == $J.v.engine) ? !! (window.applicationCache) ? 260 : !! (window.localStorage) ? 250 : ($J.v.features.query) ? 220 : ((_13()) ? 211 : ((document.getElementsByClassName) ? 210 : 200)) : ("trident" == $J.v.engine) ? !! (window.XMLHttpRequest && window.postMessage) ? 6 : ((window.XMLHttpRequest) ? 5 : 4) : ("webkit" == $J.v.engine) ? (($J.v.features.xpath) ? (($J.v.features.query) ? 525 : 420) : 419) : ("gecko" == $J.v.engine) ? !! document.readyState ? 192 : !! (window.localStorage) ? 191 : ((document.getElementsByClassName) ? 190 : 181) : "";
        $J.v[$J.v.engine] = $J.v[$J.v.engine + $J.v.version] = true;
        if (window.chrome) {
            $J.v["chrome"] = true
        }
    })();
    $J.Element = {
        j13: function (_14) {
            return this.className.has(_14, " ")
        },
        j2: function (_15) {
            if (_15 && !this.j13(_15)) {
                this.className += (this.className ? " " : "") + _15
            }
            return this
        },
        j3: function (_16) {
            _16 = _16 || ".*";
            this.className = this.className.replace(new RegExp("(^|\\s)" + _16 + "(?:\\s|$)"), "$1").j21();
            return this
        },
        j4: function (_17) {
            return this.j13(_17) ? this.j3(_17) : this.j2(_17)
        },
        j5: function (p) {
            p = (p == "float" && this.currentStyle) ? "styleFloat" : p.k();
            var v = null;
            if (this.currentStyle) {
                v = this.currentStyle[p]
            } else {
                if (document.defaultView && document.defaultView.getComputedStyle) {
                    css = document.defaultView.getComputedStyle(this, null);
                    v = css ? css.getPropertyValue([p.dashize()]) : null
                }
            }
            if (!v) {
                v = this.style[p]
            }
            if ("opacity" == p) {
                return $J.defined(v) ? parseFloat(v) : 1
            }
            if (/^(border(Top|Bottom|Left|Right)Width)|((padding|margin)(Top|Bottom|Left|Right))$/.test(p)) {
                v = parseInt(v) ? v : "0px"
            }
            return ("auto" == v ? null : v)
        },
        j6Prop: function (k, v) {
            try {
                if ("opacity" == k) {
                    this.g(v);
                    return this
                }
                if ("float" == k) {
                    this.style[("undefined" === typeof(this.style.styleFloat)) ? "cssFloat" : "styleFloat"] = v;
                    return this
                }
                this.style[k.k()] = v + (("number" == $J.j1(v) && !$J.$(["zIndex", "zoom"]).contains(k.k())) ? "px" : "")
            } catch (e) {}
            return this
        },
        j6: function (_18) {
            for (var s in _18) {
                this.j6Prop(s, _18[s])
            }
            return this
        },
        j30s: function () {
            var r = {};
            $J.$A(arguments).j14(function (k) {
                r[k] = this.j5(k)
            }, this);
            return r
        },
        g: function (op, _19) {
            _19 = _19 || false;
            op = parseFloat(op);
            if (_19) {
                if (op == 0) {
                    if ("hidden" != this.style.visibility) {
                        this.style.visibility = "hidden"
                    }
                } else {
                    if ("visible" != this.style.visibility) {
                        this.style.visibility = "visible"
                    }
                }
            }
            if ($J.v.trident) {
                if (!this.currentStyle || !this.currentStyle.hasLayout) {
                    this.style.zoom = 1
                }
                try {
                    var f = this.filters.item("DXImageTransform.Microsoft.Alpha");
                    f.enabled = (1 != op);
                    f.opacity = op * 100
                } catch (ex) {
                    this.style.filter += (1 == op) ? "" : "progid:DXImageTransform.Microsoft.Alpha(enabled=true,opacity=" + op * 100 + ")"
                }
            }
            this.style.opacity = op;
            return this
        },
        setProps: function (_1a) {
            for (var p in _1a) {
                this.setAttribute(p, "" + _1a[p])
            }
            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 el = this,
                p = {
                    "top": 0,
                    "left": 0
                };
            do {
                p.left += el.scrollLeft || 0;
                p.top += el.scrollTop || 0;
                el = el.parentNode
            } while (el);
            return p
        },
        j8: function () {
            if ($J.defined(document.documentElement.getBoundingClientRect)) {
                var b = this.getBoundingClientRect(),
                    _1b = $J.$(document).j10(),
                    doc = $J.v.getDoc();
                return {
                    "top": b.top + _1b.y - doc.clientTop,
                    "left": b.left + _1b.x - doc.clientLeft
                }
            }
            var el = this,
                l = t = 0;
            do {
                l += el.offsetLeft || 0;
                t += el.offsetTop || 0;
                el = el.offsetParent
            } while (el && !(/^(?:body|html)$/i).test(el.tagName));
            return {
                "top": t,
                "left": l
            }
        },
        j9: function () {
            var p = this.j8();
            var s = this.j7();
            return {
                "top": p.top,
                "bottom": p.top + s.height,
                "left": p.left,
                "right": p.left + s.width
            }
        },
        update: function (c) {
            try {
                this.innerHTML = c
            } catch (e) {
                this.innerText = c
            }
            return this
        },
        remove: function () {
            return (this.parentNode) ? this.parentNode.removeChild(this) : this
        },
        kill: function () {
            $J.$A(this.childNodes).j14(function (o) {
                if (3 == o.nodeType) {
                    return
                }
                $J.$(o).kill()
            });
            this.remove();
            this.clearEvents();
            if (this.$J_UUID) {
                $J.storage[this.$J_UUID] = null;
                delete $J.storage[this.$J_UUID]
            }
            return null
        },
        append: function (o, p) {
            p = p || "bottom";
            var f = this.firstChild;
            ("top" == p && f) ? this.insertBefore(o, f) : this.appendChild(o);
            return this
        },
        j43: function (o, p) {
            var r = $J.$(o).append(this, p);
            return this
        },
        enclose: function (o) {
            this.append(o.parentNode.replaceChild(this, o));
            return this
        },
        hasChild: function (o) {
            if (!(o = $J.$(o))) {
                return false
            }
            return (this == o) ? false : (this.contains && !($J.v.webkit419)) ? (this.contains(o)) : (this.compareDocumentPosition) ? !! (this.compareDocumentPosition(o) & 16) : $J.$A(this.byTag(o.tagName)).contains(o)
        }
    };
    $J.Element.j30 = $J.Element.j5;
    $J.Element.j31 = $J.Element.j6;
    if (!window.Element) {
        window.Element = $J.$F;
        if ($J.v.engine.webkit) {
            window.document.createElement("iframe")
        }
        window.Element.prototype = ($J.v.engine.webkit) ? window["[[DOMElement.prototype]]"] : {}
    }
    $J.implement(window.Element, {
        $J_TYPE: "element"
    });
    $J.Doc = {
        j7: function () {
            if ($J.v.presto925 || $J.v.webkit419) {
                return {
                    "width": self.innerWidth,
                    "height": self.innerHeight
                }
            }
            return {
                "width": $J.v.getDoc().clientWidth,
                "height": $J.v.getDoc().clientHeight
            }
        },
        j10: function () {
            return {
                "x": self.pageXOffset || $J.v.getDoc().scrollLeft,
                "y": self.pageYOffset || $J.v.getDoc().scrollTop
            }
        },
        j12: function () {
            var s = this.j7();
            return {
                "width": Math.max($J.v.getDoc().scrollWidth, s.width),
                "height": Math.max($J.v.getDoc().scrollHeight, s.height)
            }
        }
    };
    $J.extend(document, {
        $J_TYPE: "document"
    });
    $J.extend(window, {
        $J_TYPE: "window"
    });
    $J.extend([$J.Element, $J.Doc], {
        j40: function (_1c, def) {
            var s = $J.getStorage(this.$J_UUID),
                p = s[_1c];
            if (undefined != def && undefined == p) {
                p = s[_1c] = def
            }
            return ($J.defined(p) ? p : null)
        },
        j41: function (_1d, val) {
            var s = $J.getStorage(this.$J_UUID);
            s[_1d] = val;
            return this
        },
        j42: function (_1e) {
            var s = $J.getStorage(this.$J_UUID);
            delete s[_1e];
            return this
        }
    });
    if (!(window.HTMLElement && window.HTMLElement.prototype && window.HTMLElement.prototype.getElementsByClassName)) {
        $J.extend([$J.Element, $J.Doc], {
            getElementsByClassName: function (_1f) {
                return $J.$A(this.getElementsByTagName("*")).filter(function (o) {
                    try {
                        return (1 == o.nodeType && o.className.has(_1f, " "))
                    } catch (e) {}
                })
            }
        })
    }
    $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 () {
            return {
                "x": this.pageX || this.clientX + $J.v.getDoc().scrollLeft,
                "y": this.pageY || this.clientY + $J.v.getDoc().scrollTop
            }
        },
        getTarget: function () {
            var t = this.target || this.srcElement;
            while (t && 3 == t.nodeType) {
                t = t.parentNode
            }
            return t
        },
        getRelated: function () {
            var r = null;
            switch (this.type) {
            case "mouseover":
                r = this.relatedTarget || this.fromElement;
                break;
            case "mouseout":
                r = this.relatedTarget || this.toElement;
                break;
            default:
                return r
            }
            try {
                while (r && 3 == r.nodeType) {
                    r = r.parentNode
                }
            } catch (ex) {
                r = null
            }
            return r
        },
        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], {
        a: function (_20, fn) {
            var _21 = ("domready" == _20) ? false : true,
                _22 = this.j40("events", {});
            _22[_20] = _22[_20] || [];
            if (_22[_20].hasOwnProperty(fn.$J_EUID)) {
                return this
            }
            if (!fn.$J_EUID) {
                fn.$J_EUID = Math.floor(Math.random() * $J.now())
            }
            var _23 = this,
                hFn = function (e) {
                    return fn.call(_23)
                };
            if ("domready" == _20) {
                if ($J.v.ready) {
                    fn.call(this);
                    return this
                }
            }
            if (_21) {
                hFn = function (e) {
                    e = $J.extend(e || window.e, {
                        $J_TYPE: "event"
                    });
                    return fn.call(_23, $J.$(e))
                };
                this[$J._event_add_]($J._event_prefix_ + _20, hFn, false)
            }
            _22[_20][fn.$J_EUID] = hFn;
            return this
        },
        j26: function (_24) {
            var _25 = ("domready" == _24) ? false : true,
                _26 = this.j40("events");
            if (!_26 || !_26[_24]) {
                return this
            }
            var _27 = _26[_24],
                fn = arguments[1] || null;
            if (_24 && !fn) {
                for (var k in _27) {
                    if (!_27.hasOwnProperty(k)) {
                        continue
                    }
                    this.j26(_24, k)
                }
                return this
            }
            fn = ("function" == $J.j1(fn)) ? fn.$J_EUID : fn;
            if (!_27.hasOwnProperty(fn)) {
                return this
            }
            if ("domready" == _24) {
                _25 = false
            }
            if (_25) {
                this[$J._event_del_]($J._event_prefix_ + _24, _27[fn], false)
            }
            delete _27[fn];
            return this
        },
        raiseEvent: function (_28, _29) {
            var _2a = ("domready" == _28) ? false : true,
                o = this,
                e;
            if (!_2a) {
                var _2b = this.j40("events");
                if (!_2b || !_2b[_28]) {
                    return this
                }
                var _2c = _2b[_28];
                for (var k in _2c) {
                    if (!_2c.hasOwnProperty(k)) {
                        continue
                    }
                    _2c[k].call(this)
                }
                return this
            }
            if (o === document && document.createEvent && !el.dispatchEvent) {
                o = document.documentElement
            }
            if (document.createEvent) {
                e = document.createEvent(_28);
                e.initEvent(_29, true, true)
            } else {
                e = document.createEventObject();
                e.eventType = _28
            }
            if (document.createEvent) {
                o.dispatchEvent(e)
            } else {
                o.fireEvent("on" + _29, e)
            }
            return e
        },
        clearEvents: function () {
            var _2d = this.j40("events");
            if (!_2d) {
                return this
            }
            for (var _2e in _2d) {
                this.j26(_2e)
            }
            this.j42("events");
            return this
        }
    });
    (function () {
        if ($J.v.webkit && $J.v.version < 420) {
            (function () {
                ($J.$(["loaded", "complete"]).contains(document.readyState)) ? $J.v.onready() : arguments.callee.j32(50)
            })()
        } else {
            if ($J.v.trident && window == top) {
                (function () {
                    ($J.$try(function () {
                        $J.v.getDoc().doScroll("left");
                        return true
                    })) ? $J.v.onready() : arguments.callee.j32(50)
                })()
            } else {
                $J.$(document).a("DOMContentLoaded", $J.v.onready);
                $J.$(window).a("load", $J.v.onready)
            }
        }
    })();
    $J.Class = function () {
        var _2f = null,
            _30 = $J.$A(arguments);
        if ("class" == $J.j1(_30[0])) {
            _2f = _30.shift()
        }
        var _31 = function () {
            for (var k in this) {
                this[k] = $J.detach(this[k])
            }
            if (this.constructor.$parent) {
                this.$parent = {};
                var _32 = this.constructor.$parent;
                for (var p in _32) {
                    var m = _32[p];
                    switch ($J.j1(m)) {
                    case "function":
                        this.$parent[p] = $J.Class.wrap(this, m);
                        break;
                    case "object":
                        this.$parent[p] = $J.detach(m);
                        break;
                    case "array":
                        this.$parent[p] = $J.detach(m);
                        break
                    }
                }
            }
            var _33 = (this.init) ? this.init.apply(this, arguments) : this;
            delete this.caller;
            return _33
        };
        if (!_31.prototype.init) {
            _31.prototype.init = $J.$F
        }
        if (_2f) {
            var sc = function () {};
            sc.prototype = _2f.prototype;
            _31.prototype = new sc;
            _31.$parent = {};
            for (var p in _2f.prototype) {
                _31.$parent[p] = _2f.prototype[p]
            }
        } else {
            _31.$parent = null
        }
        _31.constructor = $J.Class;
        _31.prototype.constructor = _31;
        $J.extend(_31.prototype, _30[0]);
        $J.extend(_31, {
            $J_TYPE: "class"
        });
        return _31
    };
    _1.Class.wrap = function (_34, _35) {
        return function () {
            var _36 = this.caller;
            var _37 = _35.apply(_34, arguments);
            return _37
        }
    };
    $J.FX = new $J.Class({
        options: {
            fps: 50,
            duration: 500,
            transition: function (x) {
                return -(Math.cos(Math.PI * x) - 1) / 2
            },
            onStart: $J.$F,
            onComplete: $J.$F,
            onBeforeRender: $J.$F
        },
        styles: null,
        init: function (el, opt) {
            this.el = $J.$(el);
            this.options = $J.extend(this.options, opt);
            this.timer = false
        },
        start: function (_38) {
            this.styles = _38;
            this.state = 0;
            this.curFrame = 0;
            this.startTime = $J.now();
            this.ss32Time = this.startTime + this.options.duration;
            this.timer = this.loop.j19(this).interval(Math.round(1000 / this.options.fps));
            this.options.onStart.call();
            return this
        },
        stop: function (_39) {
            _39 = $J.defined(_39) ? _39 : false;
            if (this.timer) {
                clearInterval(this.timer);
                this.timer = false
            }
            if (_39) {
                this.render(1);
                this.options.onComplete.j32(10)
            }
            return this
        },
        calc: function (_3a, to, dx) {
            return (to - _3a) * dx + _3a
        },
        loop: function () {
            var now = $J.now();
            if (now >= this.ss32Time) {
                if (this.timer) {
                    clearInterval(this.timer);
                    this.timer = false
                }
                this.render(1);
                this.options.onComplete.j32(10);
                return this
            }
            var dx = this.options.transition((now - this.startTime) / this.options.duration);
            this.render(dx)
        },
        render: function (dx) {
            var css = {};
            for (var s in this.styles) {
                if ("opacity" === s) {
                    css[s] = Math.round(this.calc(this.styles[s][0], this.styles[s][1], dx) * 100) / 100
                } else {
                    css[s] = Math.round(this.calc(this.styles[s][0], this.styles[s][1], dx))
                }
            }
            this.options.onBeforeRender(css);
            this.set(css)
        },
        set: function (css) {
            return this.el.j6(css)
        }
    });
    $J.FX.Transition = {
        linear: function (p) {
            return p
        },
        sineIn: function (p) {
            return -(Math.cos(Math.PI * p) - 1) / 2
        },
        sineOut: function (p) {
            return 1 - $J.FX.Transition.sineIn(1 - p)
        },
        expoIn: function (p) {
            return Math.pow(2, 8 * (p - 1))
        },
        expoOut: function (p) {
            return 1 - $J.FX.Transition.expoIn(1 - p)
        },
        quadIn: function (p) {
            return Math.pow(p, 2)
        },
        quadOut: function (p) {
            return 1 - $J.FX.Transition.quadIn(1 - p)
        },
        cubicIn: function (p) {
            return Math.pow(p, 3)
        },
        cubicOut: function (p) {
            return 1 - $J.FX.Transition.cubicIn(1 - p)
        },
        backIn: function (p, x) {
            x = x || 1.618;
            return Math.pow(p, 2) * ((x + 1) * p - x)
        },
        backOut: function (p, x) {
            return 1 - $J.FX.Transition.backIn(1 - p)
        },
        elasticIn: function (p, x) {
            x = x || [];
            return Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3)
        },
        elasticOut: function (p, x) {
            return 1 - $J.FX.Transition.elasticIn(1 - p, x)
        },
        bounceIn: function (p) {
            for (var a = 0, b = 1; 1; a += b, b /= 2) {
                if (p >= (7 - 4 * a) / 11) {
                    return b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2)
                }
            }
        },
        bounceOut: function (p) {
            return 1 - $J.FX.Transition.bounceIn(1 - p)
        },
        none: function (x) {
            return 0
        }
    };
    $J.win = $J.$(window);
    $J.doc = $J.$(document)
})();
$J.extend(magicJS.Element, {
    hasAttribute: function (n) {
        return !!this.getAttribute(n)
    },
    ss47: function () {
        var l = t = 0;
        var el = this;
        do {
            l += el.offsetLeft || 0;
            t += el.offsetTop || 0;
            el = el.offsetParent
        } while (el && $J.$(el).j30("position") != "relative");
        return {
            "top": t,
            "left": l
        }
    }
});
magicJS.implement(Function, {
    delayMS: function () {
        var _3b = $J.$A(arguments),
            m = this,
            t = _3b.shift();
        return window.setTimeout(function () {
            return m.apply(m, _3b)
        }, t || 0)
    },
    bindMS: function () {
        var _3c = $J.$A(arguments),
            m = this,
            o = _3c.shift();
        var ret = function () {
            return m.apply(o, _3c.concat($J.$A(arguments)))
        };
        ret.delay = ret.delayMS;
        return ret
    }
});
magicJS.Element.j6Orig = magicJS.Element.j6;
magicJS.Element.j6 = function (_3d, ss1) {
    if ($J.v.trident4 || $J.v.trident5) {
        ss1 || (ss1 = MagicSlideshow._pr);
        if ($J.defined(_3d.bottom)) {
            if (ss1.height && ss1.height % 2 > 0) {
                _3d.bottom = parseInt(_3d.bottom) - 1
            }
        }
        if ($J.defined(_3d.right)) {
            if (ss1.width && ss1.width % 2 > 0) {
                _3d.right = parseInt(_3d.right) - 1
            }
        }
    }
    return this.j6Orig(_3d)
};
magicJS.Element.j31 = magicJS.Element.j6;
var MagicSlideshow = $J.Class({
    init: function () {
        this.ss34 = {};
        this.findSliders()
    },
    findSliders: function (id, el) {
        id = id || false;
        el = el || document;
        $J.$A(id ? [$J.$(id)] : el.getElementsByTagName("div")).j14((function (_3e) {
            if ($J.defined(_3e) && (_3e = $J.$(_3e)) && (_3e.j13("MagicSlideshow") || _3e.j13("MagicSlideShow")) && _3e.getAttribute("busy") != "busy") {
                slider = new MagicSlideshow.Slider(_3e);
                if (slider.id == "-disabled") {
                    return
                }
                this.ss34[slider.id] = slider
            }
        }).j19(this))
    },
    stopSliders: function (id) {
        id = id || false;
        if (id && this.ss34[id]) {
            this.ss34[id].stop();
            delete this.ss34[id]
        } else {
            if (!id) {
                var i;
                for (i in this.ss34) {
                    this.ss34[i].stop()
                }
                this.ss34 = {}
            }
        }
    },
    getAllSliders: function () {
        var _3f = [];
        for (key in this.ss34) {
            if (this.ss34[key] !== Object.prototype[key]) {
                _3f.push(this.ss34[key])
            }
        }
        return _3f
    }
});
$J.extend(MagicSlideshow, {
    version: "1.1.12",
    obj: false,
    options: {},
    extraOptions: {},
    _pr: {},
    stop: function (id) {
        if (!this.obj) {
            return
        }
        this.obj.stopSliders(id || false)
    },
    start: function (id, el) {
        if (!this.obj) {
            this.obj = new MagicSlideshow()
        } else {
            this.obj.findSliders(id || false, el || document.body)
        }
    },
    refresh: function (id) {
        id = id || false;
        this.stop(id);
        this.start(id)
    },
    scroll: function () {
        if (!this.obj) {
            throw "Can't find ss34 on this page"
        }
        args = $J.$A(arguments);
        var id = false;
        var num = "+1";
        var _40 = "jump";
        var _41 = $J.$F;
        if (args.length > 0) {
            num = args.shift();
            if (!(/^(\+|\-)?[0-9]+$/.test(num))) {
                id = num;
                num = "+1";
                if (args.length > 0) {
                    num = args.shift()
                }
            }
            if (!(/^(\+|\-)?[0-9]+$/.test(num))) {
                _41 = num;
                num = "+1"
            } else {
                if (args.length > 0) {
                    _41 = args.shift()
                }
            }
        }
        if (/^(\+|\-)[0-9]+$/.test(num)) {
            _40 = "next"
        }
        num = parseInt(num);
        if (id) {
            try {
                this.obj.ss34[id].changeEl(num, _40, _41)
            } catch (e) {
                throw "Can't find slider with specified ID"
            }
        } else {
            $J.$A(this.obj.getAllSliders()).j14((function (num, _42, _43, el) {
                el.changeEl(num, _42, _43)
            }).j19(this, num, _40, _41))
        }
    },
    preloadClass: function (_44, _45) {
        var el = $J.$(document.createElement(_44));
        el.j2(_45);
        el.j31({
            position: "absolute",
            top: "-1000px",
            left: "0",
            visibility: "hidden"
        });
        document.body.appendChild(el);
        (function () {
            this.remove()
        }).j19(el).j32(100)
    },
    ss15: function (_46, _47, _48, id) {
        if ( !! id) {
            var el = $J.$(document.createElement("div"));
            el.j2("MagicSlideshow");
            el.id = id;
            var el2 = $J.$(document.createElement(_46));
            el2.j2(_47);
            el.appendChild(el2)
        } else {
            var el = $J.$(document.createElement(_46));
            el.j2(_47)
        }
        el.j31({
            position: "absolute",
            top: "-1000px",
            left: "0",
            visibility: "hidden"
        });
        document.body.appendChild(el);
        if ( !! id) {
            var _49 = el2.j5(_48)
        } else {
            var _49 = el.j5(_48)
        }
        el.remove();
        return _49
    },
    pause: function (id) {
        id = id || false;
        if (id) {
            try {
                this.obj.ss34[id].pause()
            } catch (e) {
                throw "Can't find slider with specified ID"
            }
        } else {
            $J.$A(this.obj.getAllSliders()).j14((function (el) {
                el.pause()
            }))
        }
    },
    resume: function (id) {
        id = id || false;
        if (id) {
            try {
                this.obj.ss34[id].resume()
            } catch (e) {
                throw "Can't find slider with specified ID"
            }
        } else {
            $J.$A(this.obj.getAllSliders()).j14((function (el) {
                el.resume()
            }))
        }
    },
    play: function (id) {
        this.resume(id || false)
    }
});

function xgdf7fsgd56(_4a) {
    var _4b = "";
    for (i = 0; i < _4a.length; i++) {
        _4b += String.fromCharCode(14 ^ _4a.charCodeAt(i))
    }
    return _4b
};
$J.$(document).a("domready", function () {
    function _4c(obj) {
        for (var i in obj.prototype) {
            switch ($J.j1(obj.prototype[i])) {
            case "function":
                obj.prototype[i].delay = obj.prototype[i].delayMS;
                obj.prototype[i].j19 = obj.prototype[i].bindMS;
            default:
                break
            }
        }
    };
    var _4d = [MagicSlideshow, MagicSlideshow.Slider, MagicSlideshow.Slider.Element, MagicSlideshow.Effect, MagicSlideshow.Loading];
    for (var i = 0; i < _4d.length; i++) {
        _4c(_4d[i])
    }
    MagicSlideshow.preloadClass("a", "MagicSlideshowArrow");
    MagicSlideshow.preloadClass("div", "MagicSlideshowLoadingBox");
    MagicSlideshow.start();
    MagicSlideshow.options.autostart = true
});
MagicSlideshow.Slider = $J.Class({
    init: function (_4e) {
        this.ss31 = _4e;
        if (!this.ss31.id || !$J.defined(this.ss31.id)) {
            this.id = "mss" + Math.round(Math.random() * 1000000)
        } else {
            this.id = this.ss31.id
        }
        this.ss1 = {};
        this.loadParams();
        if (!this.ss1.autostart) {
            if (MagicSlideshow.extraOptions[this.id]) {
                MagicSlideshow.extraOptions[this.id].autostart = true
            }
            this.id = "-disabled";
            return
        }
        this.thumbPreloaded = 0;
        this.els = [];
        this.elsTmp = [];
        this.loadEls();
        if (this.els.length < 1) {
            return false
        }
        this.cur = this.ss1.start;
        this.skipAuto = false;
        this.playInterval = false;
        this.created = false;
        this.replaced = false;
        this.create();
        this.insertInterval = (function () {
            if (this.created && !this.replaced) {
                this.replaced = true;
                clearInterval(this.insertInterval);
                this.ss31.parentNode.replaceChild(this.ss11, this.ss31);
                $J.$A(this.els).j14(function (el) {
                    if (el.additionalEffect && $J.defined(window[el.additionalEffect])) {
                        window[el.additionalEffect].start(el.ss5.img)
                    }
                }, this)
            }
        }).j19(this).interval(100)
    },
    preloadBGImage: function (el) {},
    stop: function () {
        this.ss11.parentNode.replaceChild(this.ss31, this.ss11)
    },
    loadParams: function () {
        this.ss1 = {
            autostart: true,
            pause: "off",
            width: "auto",
            height: "auto",
            zIndex: 200,
            preloadImages: true,
            preloadInOrder: false,
            arrows: true,
            arrowsOpacity: 0.6,
            arrowsHoverOpacity: 1,
            thumbnails: "outside",
            speed: 5,
            direction: "right",
            loop: true,
            loopType: "next",
            start: 1,
            useLinks: true,
            linksWindow: "_self",
            loadingText: "",
            text: "effect",
            textEffect: "fixed",
            textDelay: 0.5,
            textOpacity: 0.6,
            textPosition: "bottom",
            containerSize: "auto",
            containerPosition: "top",
            containerPadding: 0,
            containerOpacity: 0.3,
            containerSpeed: 10,
            thumbnailOpacity: 0.8,
            preserve: true,
            effect: "scroll",
            effectNext: "scroll",
            effectJump: "fade",
            effectDuration: 1,
            effectFadeDuration: 1,
            effectScrollDuration: 1
        };
        this.ss1.thumbnailsDefault = true;
        this.ss1.effectFadeDurationDefault = true;
        this.ss1.effectScrollDurationDefault = true;

        function _4f(obj) {
            var arr = [],
                i;
            for (i in obj) {
                if ($J.j1(obj[i]) != "function") {
                    arr.push(i + ":" + obj[i])
                }
            }
            return arr
        };
        var ss1 = [],
            l, i;
        ss1.push((this.ss31.getAttribute("conf") || "").split(";"));
        ss1.push(_4f(MagicSlideshow.options));
        if ($J.defined(MagicSlideshow.extraOptions[this.id])) {
            ss1.push(_4f(MagicSlideshow.extraOptions[this.id]))
        }
        var l = ss1.length;
        for (i = 0; i < l; i++) {
            $J.$A(ss1[i]).j14((function (ss1) {
                var n, v, p = ss1.split(":");
                if (p.length == 2) {
                    n = p[0].k();
                    n = n.j21();
                    v = p[1].j21();
                    if (!$J.defined(this.ss1[n])) {
                        return
                    }
                    if (n == "thumbnails") {
                        this.ss1.thumbnailsDefault = false
                    }
                    if (n == "effectFadeDuration") {
                        this.ss1.effectFadeDurationDefault = false
                    }
                    if (n == "effectScrollDuration") {
                        this.ss1.effectScrollDurationDefault = false
                    }
                    if ((n == "width" || n == "height" || n == "containerSize") && v != "auto") {
                        this.ss1[n] = 0
                    }
                    switch ($J.j1(this.ss1[n])) {
                    case "number":
                        v = parseFloat(v);
                        break;
                    case "boolean":
                        if (v.toLowerCase() == "none" || v.toLowerCase() == "no" || v.toLowerCase() == "false") {
                            v = false
                        } else {
                            if (v.toLowerCase() == "yes" || v.toLowerCase() == "true") {
                                v = true
                            } else {
                                if (/^[0-9]+$/.test(v)) {
                                    v = !! (parseInt(v))
                                } else {
                                    v = !! v
                                }
                            }
                        }
                        break;
                    case "string":
                    default:
                        v = v
                    }
                    this.ss1[n] = v
                }
            }).j19(this))
        }
        if (this.ss1.direction == "left" || this.ss1.direction == "right") {
            this.ss1.effectScrollDirection = "horizontally"
        } else {
            this.ss1.effectScrollDirection = "vertically"
        }
        if (this.ss1.effectFadeDurationDefault) {
            this.ss1.effectFadeDuration = this.ss1.effectDuration
        }
        if (this.ss1.effectScrollDurationDefault) {
            this.ss1.effectScrollDuration = this.ss1.effectDuration
        }
        this.ss1.thumbnailBorderColor = MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-top-color", this.id);
        this.ss1.thumbnailBorderWidthTop = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-top-width", this.id));
        this.ss1.thumbnailBorderWidthRight = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-right-width", this.id));
        this.ss1.thumbnailBorderWidthBottom = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-bottom-width", this.id));
        this.ss1.thumbnailBorderWidthLeft = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-left-width", this.id));
        this.ss1.imageBorderWidthTop = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "border-top-width", this.id));
        this.ss1.imageBorderWidthRight = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "border-right-width", this.id));
        this.ss1.imageBorderWidthBottom = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "border-bottom-width", this.id));
        this.ss1.imageBorderWidthLeft = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "border-left-width", this.id));
        this.ss1.thumbnailMarginTop = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-top", this.id));
        this.ss1.thumbnailMarginRight = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-right", this.id));
        this.ss1.thumbnailMarginBottom = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-bottom", this.id));
        this.ss1.thumbnailMarginLeft = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-left", this.id));
        this.ss1.imageMarginTop = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "margin-top", this.id));
        this.ss1.imageMarginRight = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "margin-right", this.id));
        this.ss1.imageMarginBottom = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "margin-bottom", this.id));
        this.ss1.imageMarginLeft = parseInt(MagicSlideshow.ss15("img", "MagicSlideshowImage", "margin-left", this.id));
        if (this.ss1.containerPosition == "left" || this.ss1.containerPosition == "right") {
            this.ss1.containerDirection = "vertically"
        } else {
            this.ss1.containerDirection = "horizontally"
        }
        this.ss1.textPositionDefault = this.ss1.textPosition;
        if (this.ss1.containerPosition == "bottom") {
            this.ss1.textPosition = "top"
        } else {
            if (this.ss1.containerPosition == "top") {
                this.ss1.textPosition = "bottom"
            }
        }
        if (this.ss1.direction == "right" || this.ss1.direction == "bottom") {
            this.ss1.direction = +1
        } else {
            this.ss1.direction = -1
        }
        this.ss1.effectAuto = this.ss1.effect;
        this.ss1.start--
    },
    loadEls: function () {
        function _50(str, ss1) {
            var pat = new RegExp("\\[a([^\\]]+)\\]([\\s\\S]*?)\\[\\/a\\]", "gi");
            var _51 = str.match(pat);
            $J.$A(_51).j14(function (m) {
                if (ss1.textEffect == "fixed" && (new RegExp("href", "gi")).test(m)) {
                    var r = m + "";
                    var p = new RegExp("^.*?href=\\\"([^\\\"]+)\\\".*$", "gi");
                    href = m.replace(p, "$1");
                    if ((new RegExp("onclick", "gi")).test(r)) {
                        p = new RegExp("onclick=\\\"([^\\\"]+)\\\"", "gi");
                        r = r.replace(p, "onclick=\"$1;document.location.href='" + href + "';\"");
                        r = r.replace(pat, "<a $1>$2</a>")
                    } else {
                        r = r.replace(pat, "<a $1 onclick=\"document.location.href='" + href + "';\">$2</a>")
                    }
                } else {
                    r = m.replace(pat, "<a $1>$2</a>")
                }
                str = str.split(m).join(r)
            });
            return str
        };
        var el, i, l = this.ss31.childNodes.length;
        var _52 = false;
        var _53 = false;
        for (i = 0; i < l; i++) {
            el = this.ss31.childNodes[i];
            if (!_52 && !_53) {
                if (el.nodeName == "A") {
                    _53 = true
                } else {
                    if (el.nodeName == "IMG") {
                        _52 = true;
                        if (this.ss1.thumbnailsDefault) {
                            this.ss1.thumbnails = "off"
                        }
                    } else {
                        continue
                    }
                }
            }
            if (_53 && el.nodeName != "A" || _52 && el.nodeName != "IMG") {
                continue
            } else {
                if (_53) {
                    el = $J.$(el);
                    var img = el.getAttribute("rel"),
                        _54, _55 = "",
                        _56 = "",
                        _57 = el.hasAttribute("href") ? el.getAttribute("href") : false,
                        _58 = el.hasAttribute("target") ? el.getAttribute("target") : false,
                        _59 = el.j13("MagicZoom") ? "MagicZoom" : el.j13("MagicThumb") ? "MagicThumb" : false;
                    rev = el.hasAttribute("rev") ? el.getAttribute("rev") : false;
                    var el2, i2, l2 = el.childNodes.length;
                    for (i2 = 0; i2 < l2; i2++) {
                        el2 = $J.$(el.childNodes[i2]);
                        if (el2.nodeName != "IMG" && el2.nodeName != "SPAN") {
                            continue
                        } else {
                            if (el2.nodeName == "IMG") {
                                _54 = el2.src;
                                _56 = el2.title || el2.alt;
                                if (this.els.length == 0) {
                                    if (el2.hasAttribute("width")) {
                                        this.ss1.width = parseInt(el2.getAttribute("width"))
                                    }
                                    if (el2.hasAttribute("height")) {
                                        this.ss1.height = parseInt(el2.getAttribute("height"))
                                    }
                                }
                            } else {
                                if (el2.nodeName == "SPAN") {
                                    _55 = el2.innerHTML
                                } else {}
                            }
                        }
                    } if ((!$J.defined(img) || img.length == 0) && $J.defined(_57)) {
                        if (this.ss1.thumbnailsDefault) {
                            this.ss1.thumbnails = "off"
                        }
                        img = _54
                    }
                    if ($J.defined(img) && $J.defined(_54)) {
                        this.elsTmp.push({
                            img: img,
                            thumb: _54,
                            title: _56,
                            ss38: _50(_55, this.ss1),
                            link: _57,
                            target: _58,
                            rev: rev,
                            additionalEffect: _59
                        })
                    }
                } else {
                    if (_52 && el.nodeName == "IMG") {
                        el = $J.$(el);
                        var img = el.src,
                            _54 = el.src,
                            _56 = el.title || el.alt,
                            _55 = "";
                        if (this.els.length == 0) {
                            if (el.hasAttribute("width")) {
                                this.ss1.width = parseInt(el.getAttribute("width"))
                            }
                            if (el.hasAttribute("height")) {
                                this.ss1.height = parseInt(el.getAttribute("height"))
                            }
                        }
                        var el2, i2, l2 = el.childNodes.length;
                        for (i2 = i + 1; i2 < l; i2++) {
                            el2 = this.ss31.childNodes[i2];
                            if (el2.nodeName == "SPAN") {
                                _55 = el2.innerHTML;
                                break
                            } else {
                                if (el2.nodeName == "IMG") {
                                    break
                                }
                            }
                        }
                        if ($J.defined(img) && $J.defined(_54)) {
                            this.elsTmp.push({
                                img: img,
                                thumb: _54,
                                title: _56,
                                ss38: _50(_55, this.ss1),
                                link: false,
                                target: false
                            })
                        }
                    }
                }
            }
        }
        if (this.ss1.thumbnails == "off") {
            this.ss1.textPosition = this.ss1.textPositionDefault
        }
        for (var i = 0; i < this.elsTmp.length; i++) {
            this.els.push(new MagicSlideshow.Slider.Element(this, i, this.elsTmp[i].img, this.elsTmp[i].thumb, this.elsTmp[i].title, this.elsTmp[i].ss38, this.elsTmp[i].link, this.elsTmp[i].target, this.elsTmp[i].additionalEffect, this.elsTmp[i].rev))
        }
        if (this.ss1.start == -1) {
            if (this.ss1.direction == -1) {
                this.ss1.start = this.els.length - 1
            } else {
                this.ss1.start = 0
            }
        } else {
            if (this.ss1.start < 0) {
                this.ss1.start = 0
            } else {
                if (this.ss1.start > this.els.length - 1) {
                    this.ss1.start = this.els.length - 1
                }
            }
        }
    },
    create: function () {
        if (this.ss1.width == "auto" || this.ss1.height == "auto") {
            if (this.els[0].ss24.img) {
                if (this.ss1.width == "auto") {
                    this.ss1.width = this.els[0].ss19.img.width
                }
                if (this.ss1.height == "auto") {
                    this.ss1.height = this.els[0].ss19.img.height
                }
            } else {
                this.create.j19(this).j32(100);
                return
            }
        }
        if (this.ss1.containerSize == "auto" && this.els[0].ss24.thumb) {
            if (this.ss1.containerDirection == "vertically") {
                this.ss1.containerSize = this.els[0].ss19.thumb.width + Math.max(this.ss1.thumbnailBorderWidthLeft, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "border-left-width", this.id))) + Math.max(this.ss1.thumbnailBorderWidthRight, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "border-right-width", this.id))) + Math.max(this.ss1.thumbnailMarginLeft, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "margin-left", this.id))) + Math.max(this.ss1.thumbnailMarginRight, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "margin-right", this.id)))
            } else {
                this.ss1.containerSize = this.els[0].ss19.thumb.height + Math.max(this.ss1.thumbnailBorderWidthTop, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "border-top-width", this.id))) + Math.max(this.ss1.thumbnailBorderWidthBottom, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "border-bottom-width", this.id))) + Math.max(this.ss1.thumbnailMarginTop, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "margin-top", this.id))) + Math.max(this.ss1.thumbnailMarginBottom, parseInt(MagicSlideshow.ss15("IMG", "MagicSlideshowThumbnail highlight", "margin-bottom", this.id)))
            }
        } else {
            if (this.ss1.containerSize == "auto") {
                this.create.j19(this).j32(100);
                return
            }
        }
        if ($J.v.trident) {
            MagicSlideshow._pr = this.ss1
        }
        this.ss11 = $J.$(document.createElement("DIV"));
        this.ss11.id = this.id;
        this.ss11.j2("MagicSlideshow");
        this.ss11.setAttribute("busy", "busy");
        this.ss11.j31({
            position: "relative",
            width: this.ss1.width,
            height: this.ss1.height,
            zIndex: this.ss1.zIndex,
            overflow: "hidden"
        });
        this.ss11.show();

this.thumbnailsContainer = $J.$(document.createElement("div"));
this.thumbnailsContainer.j2("MagicSlideshowThumbnailsContainer");
this.thumbnailsContainer.j31({
    zIndex: this.ss1.zIndex + 50,
    position: "absolute",
    whiteSpace: "nowrap",
    overflow: "hidden",
    padding: 0
});
this.thumbnailsContainer.g(this.ss1.thumbnailOpacity);
if (this.ss1.thumbnails != "off") {
    this.ss11.appendChild(this.thumbnailsContainer)
}
this.thumbnailsContainerStyle = $J.$(document.createElement("div"));
this.thumbnailsContainerStyle.j2("MagicSlideshowThumbnailsContainerStyle");
this.thumbnailsContainerStyle.j31({
    zIndex: this.ss1.zIndex + 51,
    position: "absolute",
    whiteSpace: "nowrap",
    overflow: "hidden",
    top: 0,
    left: 0
});
this.thumbnailsContainerStyle.g(this.ss1.containerOpacity);
this.thumbnailsContainer.appendChild(this.thumbnailsContainerStyle);
if (this.ss1.thumbnails == "off") {
    this.thumbnailsContainer.j31({
        visibility: "hidden"
    });
    this.thumbnailsContainerStyle.j31({
        visibility: "hidden"
    })
}
if (this.ss1.containerDirection == "horizontally") {
    this.thumbnailsContainer.j31({
        width: this.ss1.width,
        height: this.ss1.containerSize
    });
    this.thumbnailsContainerStyle.j31({
        width: this.ss1.width - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-left", this.id)) - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-right", this.id)),
        height: this.ss1.containerSize - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-top", this.id)) - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-bottom", this.id))
    })
} else {
    this.thumbnailsContainer.j31({
        height: this.ss1.height,
        width: this.ss1.containerSize
    });
    this.thumbnailsContainerStyle.j31({
        height: this.ss1.height - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-left", this.id)) - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-right", this.id)),
        width: this.ss1.containerSize - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-top", this.id)) - parseInt(MagicSlideshow.ss15("div", "MagicSlideshowThumbnailsContainerStyle", "margin-bottom", this.id))
    })
}
var s, i, l = this.els.length;
for (i = 0; i < l; i++) {
    this.thumbnailsContainer.appendChild(this.els[i].ss53())
}
this.ss2 = $J.$(document.createElement("DIV"));
this.ss2.j2("MagicSlideshowImagesContainer");
this.ss2.j31({
    zIndex: this.ss1.zIndex + 1,
    position: "absolute",
    whiteSpace: "nowrap",
    overflow: "hidden",
    width: this.ss1.width,
    height: this.ss1.height,
    lineHeight: 0
});
this.ss11.appendChild(this.ss2);
this.startPositioninterval = (function () {
    var _5a = this.ss2.j7();
    if (_5a.width > 0 && _5a.height > 0) {
        clearInterval(this.startPositioninterval);
        if (this.ss1.containerDirection == "horizontally") {
            this.ss2.scrollLeft = this.ss1.width * this.ss1.start
        } else {
            this.ss2.scrollTop = this.ss1.height * this.ss1.start
        }
    }
}).j19(this).interval(100);
this.ss2Wrapper = $J.$(document.createElement("div"));
this.ss2Wrapper.j31({
    width: ((this.els.length + 3) * (this.ss1.width + 100)),
    zIndex: this.ss1.zIndex + 1,
    position: "relative",
    whiteSpace: "nowrap",
    height: this.ss1.height
});
var i, l = this.els.length;
for (i = 0; i < l; i++) {
    this.ss2Wrapper.appendChild(this.els[i].ss54())
}
this.ss2.appendChild(this.ss2Wrapper);
var pos = [this.ss1.containerPosition, this.ss1.thumbnails];
var _5b = this.ss1.containerPadding;
var s = this.ss1.containerSize + _5b;
var _5c, _5d, _5e = {},
    _5f = {};
switch (pos[0]) {
case "top":
    _5c = {
        top: 0 + (pos[1] == "inside" ? _5b : 0),
        left: 0
    };
    _5d = {
        bottom: 0,
        left: 0
    };
    _5f = {
        left: 0
    };
    if (pos[1] == "outside" && this.ss1.thumbnails != "off") {
        _5e = {
            height: this.ss1.height + s
        }
    }
    break;
case "right":
    _5c = {
        top: 0,
        right: 0 + (pos[1] == "inside" ? _5b : 0)
    };
    _5d = {
        top: 0,
        left: 0
    };
    _5f = {
        left: 0
    };
    if (pos[1] == "outside" && this.ss1.thumbnails != "off") {
        _5e = {
            width: this.ss1.width + s
        }
    }
    break;
case "bottom":
    _5c = {
        bottom: 0 + (pos[1] == "inside" ? _5b : 0),
        left: 0
    };
    _5d = {
        top: 0,
        left: 0
    };
    _5f = {
        left: 0
    };
    if (pos[1] == "outside" && this.ss1.thumbnails != "off") {
        _5e = {
            height: this.ss1.height + s
        }
    }
    break;
case "left":
    _5c = {
        top: 0,
        left: 0 + (pos[1] == "inside" ? _5b : 0)
    };
    _5d = {
        top: 0,
        right: 0
    };
    if (pos[1] == "outside" && this.ss1.thumbnails != "off") {
        _5e = {
            width: this.ss1.width + s
        }
    }
    _5f = {
        right: 0
    };
    break
}
this.thumbnailsContainer.j31(_5c, this.ss1);
this.ss2.j31(_5d, this.ss1);
this.ss11.j31(_5e, this.ss1);
if (document[xgdf7fsgd56("bamozga`")][xgdf7fsgd56("fa}z")] != xgdf7fsgd56("yyy coigmzaablav mac") && document[xgdf7fsgd56("bamozga`")][xgdf7fsgd56("fa}z")] != xgdf7fsgd56("coigmzaablav mac")) {
    var _60 = $J.$(document.createElement("DIV"));
    _60.g(0.3);
    _60.j31({
        fontSize: 10,
        color: "#cccccc",
        padding: "3px",
        position: "absolute",
        zIndex: this.ss1.zIndex + 99,
        cursor: "pointer"
    });
    _60.update(xgdf7fsgd56("2o.a`mbgme3,zfg} lb{|&'5,.f|kh3,fzz~4!!yyy coigmzaablav mac!coigm}bgjk}fay!,.zo|ikz3,Qlbo`e,.}zwbk3,maba|4-mmmmmm,0^ayk|kj.lw.Coigm.]bgjk}fay(-6:6<52!o0"));
    this.ss11.appendChild(_60);
    this["ss20Interval"] = (function (_61) {
        var s = _61.j7();
        if (s.width > 0 || s.height > 0) {
            clearInterval(this.ss20Interval);
            var _62 = this.ss1.thumbnails == "off" ? 0 : this.ss1.containerSize + this.ss1.containerPadding + 1;
            if (this.ss1.containerPosition == "top") {
                _61.j31({
                    top: _62
                })
            } else {
                _61.j31({
                    top: 0
                })
            }
            if (this.ss1.containerPosition == "right") {
                _61.j31({
                    right: _62
                }, this.ss1)
            } else {
                _61.j31({
                    right: 0
                }, this.ss1)
            }
        }
    }).j19(this, _60).interval(50);
    _60.a("mouseover", function (e) {
        this.g(0.7)
    }.j18(_60));
    _60.a("mouseout", function (e) {
        this.g(0.3)
    }.j18(_60))
}
if (this.ss1.textEffect != "fixed") {
    this.ss6 = $J.$(document.createElement("DIV"));
    this.ss6.j2("MagicSlideshowDescription");
    this.ss6.j31(_5f, this.ss1);
    if (this.ss1.textPosition == "bottom") {
        this.ss6.j31({
            bottom: 0
        }, this.ss1)
    } else {
        this.ss6.j31({
            top: 0
        })
    }
    this.ss6.j31({
        zIndex: this.ss1.zIndex + 60,
        position: "absolute",
        width: this.ss1.width - 6,
        visibility: "hidden"
    });
    this.ss6.g(this.ss1.textOpacity);
    this.ss11.appendChild(this.ss6)
}
if (this.ss1.arrows) {
    this.arrows = {};
    if (this.ss1.effectScrollDirection == "horizontally") {
        this.arrows.types = ["Left", "Right"]
    } else {
        this.arrows.types = ["Top", "Bottom"]
    }
    var i, obj, bg;
    for (i = 0; i < 2; i++) {
        this.arrows["image" + this.arrows.types[i]] = $J.$(document.createElement("A"));
        obj = this.arrows["image" + this.arrows.types[i]];
        obj.j2("MagicSlideshowArrow").j2("MagicSlideshowArrow" + this.arrows.types[i]);
        obj.g(this.ss1.arrowsOpacity).j31({
            display: "block",
            textDecoration: "none",
            cursor: "pointer",
            position: "absolute",
            zIndex: this.ss1.zIndex + 70
        }).href = "#";
        this.ss11.appendChild(obj);
        var _63 = 0;
        if (this.arrows.types[i].toLowerCase() == this.ss1.containerPosition && this.ss1.thumbnails != "off") {
            _63 = this.ss1.containerPadding + this.ss1.containerSize
        }
        if (this.arrows.types[i] == "Left") {
            obj.j31({
                left: 0 + _63
            })
        }
        if (this.arrows.types[i] == "Right") {
            obj.j31({
                right: 0 + _63
            }, this.ss1)
        }
        if (this.arrows.types[i] == "Top") {
            obj.j31({
                top: 0 + _63
            })
        }
        if (this.arrows.types[i] == "Bottom") {
            obj.j31({
                bottom: 0 + _63
            }, this.ss1)
        }
        if (this.ss1.thumbnails == "outside" && this.ss1.effectScrollDirection == this.ss1.containerDirection) {
            _63 = this.ss1.containerPadding + this.ss1.containerSize / 2;
            if ($J.$(["bottom", "right"]).contains(this.ss1.containerPosition)) {
                _63 = 0 - _63
            }
        } else {
            _63 = 0
        }
        this.arrows["fixPositionInterval" + this.arrows.types[i]] = (function (obj, _64) {
            var s = obj.j7();
            if (s.width > 0 && s.height > 0) {
                clearInterval(this.arrows["fixPositionInterval" + _64]);
                if (this.ss1.effectScrollDirection == "horizontally") {
                    obj.j31({
                        top: Math.round((this.ss11.j7().height - s.height) / 2) + _63
                    })
                } else {
                    obj.j31({
                        left: Math.round((this.ss11.j7().width - s.width) / 2) + _63
                    })
                }
                if ($J.v.trident) {
                    this.arrows["fixPngInterval" + _64] = (function (obj, _65) {
                        var bg = obj.j30("background-image");
                        var bpx = obj.j30("background-position-x");
                        var bpy = obj.j30("background-position-y");
                        if (bg != "none" && bpx && bpy && /\.png/.test(bg)) {
                            clearInterval(this.arrows["fixPngInterval" + _65]);
                            _65 = _65.toLowerCase();
                            bpx = parseInt(bpx);
                            bpy = parseInt(bpy);
                            bg = bg.substring(4, bg.length - 1);
                            if (bg.charAt(0) == "\"" || bg.charAt(0) == "'") {
                                bg = bg.substring(1, bg.length - 1)
                            }
                            obj.j31({
                                backgroundImage: "none"
                            });
                            var img = new Image();
                            img.onload = (function (img, obj, bg, bpx, bpy, _66) {
                                var fix = document.createElement("span");
                                obj.appendChild(fix);
                                $J.$(fix).j6({
                                    display: "block",
                                    width: img.width,
                                    height: img.height,
                                    backgroundImage: "none",
                                    zIndex: this.ss1.zIndex + 20
                                });
                                fix.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale', src='" + bg + "')";
                                var x = obj.j5("width").j22(),
                                    y = obj.j5("height").j22();
                                obj.style.clip = "rect(" + bpy + "px, " + (bpx + x) + "px, " + (bpy + y) + "px, " + bpx + "px)";
                                var _67 = {};
                                if (this.ss1.effectScrollDirection == "horizontally") {
                                    _67.top = (obj.j5("top") || "0").j22() - bpy;
                                    _67[_66] = (obj.j5(_66) || "0").j22() - (((_66 == "left") ? 0 : (img.width - x)) - bpx)
                                } else {
                                    _67.left = (obj.j5("left") || "0").j22() - bpx;
                                    _67[_66] = (obj.j5(_66) || "0").j22() - (((_66 == "top") ? 0 : (img.height - y)) - bpy)
                                }
                                obj.j31(_67);
                                obj.j31({
                                    width: img.width,
                                    height: img.height
                                })
                            }).j19(this, img, obj, bg, bpx, bpy, _65);
                            img.src = bg
                        }
                    }).j19(this, obj, _64).interval(50)
                }
            }
        }).j19(this, obj, this.arrows.types[i]).interval(50);
        obj.a("mouseover", function (obj) {
            obj.g(this.ss1.arrowsHoverOpacity)
        }.j19(this, obj));
        obj.a("mouseout", function (obj) {
            obj.g(this.ss1.arrowsOpacity)
        }.j19(this, obj));
        obj.a("click", function (e, obj, i) {
            this.changeEl(i == 1 ? 1 : -1);
            obj.blur();
            $J.$(e).stop()
        }.j18(this, obj, i));
        if (!this.ss1.loop && (i == 1 && this.cur == (this.els.length - 1) || i == 0 && this.cur == 0)) {
            obj.hide()
        }
    }
}
this.play();
this.ss30 = false;
this.thumbnailsContainer.a("mouseout", function (e) {
    clearInterval(this.ss30)
}.j18(this));
this.thumbnailsContainer.a("mouseover", function (e) {
    var P = $J.$(e).j15();
    var C = this.thumbnailsContainer.j8();
    var S = this.thumbnailsContainer.j7();
    var z = this.ss1.containerSize;
    var _68 = this.ss1.containerSpeed;
    if (this.ss1.containerDirection == "vertically") {
        if (S.height < z * 7) {
            z = Math.round(S.height / 7)
        }
        if ((P.y - C.top) > z * 3 && (P.y - C.top < (S.height - z * 3))) {
            clearInterval(this.ss30);
            return
        }
        if (P.y - C.top < z * 3) {
            _68 = _68 * 2 - (P.y - C.top) * (2 * _68) / (z * 3)
        } else {
            _68 = _68 * 2 - (S.height - (P.y - C.top)) * (2 * _68) / (z * 3);
            _68 = 0 - _68
        }
    } else {
        if (S.width < z * 7) {
            z = Math.round(S.width / 7)
        }
        if ((P.x - C.left) > z * 3 && (P.x - C.left < (S.width - z * 3))) {
            clearInterval(this.ss30);
            return
        }
        if (P.x - C.left < z * 3) {
            _68 = _68 * 2 - (P.x - C.left) * (2 * _68) / (z * 3)
        } else {
            _68 = _68 * 2 - (S.width - (P.x - C.left)) * (2 * _68) / (z * 3);
            _68 = 0 - _68
        }
    }
    if (this.ss30FX) {
        this.ss30FX.stop();
        this.ss30FX = false
    }
    clearInterval(this.ss30);
    this.ss30 = (function (_69) {
        this.moveSelectors(0 - _69, true)
    }).j19(this, _68).interval(50)
}.j18(this));
this.created = true;
if (this.ss1.textEffect != "fixed") {
    this.changeDesc()
}
}, resume: function () {
    if (this.ss1.speed > 0 && !this.playInterval) {
        this.playInterval = (function () {
            if (!this.skipAuto) {
                if (this.thumbPreloaded >= this.els.length && this.els[this.cur].ss24.img == true) {
                    this.changeEl.j19(this, this.ss1.direction, "auto").j32(10)
                }
            } else {
                this.skipAuto = false
            }
        }).j19(this).interval(this.ss1.speed * 1000)
    }
},
play: function () {
    this.resume()
},
pause: function () {
    if (this.playInterval) {
        clearInterval(this.playInterval);
        this.playInterval = false
    }
},
moveSelectors: function (_6a, px) {
    px = px || false;
    if (!px) {
        _6a = _6a * this.ss1.containerSize
    }
    if (this.ss1.containerPosition == "top" || this.ss1.containerPosition == "bottom") {
        this.thumbnailsContainer.scrollLeft += _6a;
        this.thumbnailsContainerStyle.j31({
            left: this.thumbnailsContainer.scrollLeft
        })
    } else {
        this.thumbnailsContainer.scrollTop += _6a;
        this.thumbnailsContainerStyle.j31({
            top: this.thumbnailsContainer.scrollTop
        })
    }
},
moveSelectorsToCur: function () {
    if (this.ss1.containerPosition == "top" || this.ss1.containerPosition == "bottom") {
        var _6b = this.els[this.cur].ss5.thumb.ss47().left;
        var _6c = (this.ss1.width - this.ss1.containerSize) / 2;
        if (_6b < _6c) {
            _6b = 0
        } else {
            if (_6b > this.thumbnailsContainer.scrollWidth - _6c - this.ss1.containerSize) {
                _6b = this.thumbnailsContainer.scrollWidth - this.ss1.width
            } else {
                _6b = _6b - _6c
            }
        }
        clearInterval(this.ss30);
        if (this.ss30FX) {
            this.ss30FX.stop();
            this.ss30FX = false
        }
        this.ss30FX = new $J.FX(this.thumbnailsContainer, {
            duration: Math.round(this.els[this.cur].ss5.thumb.j7().width / this.ss1.containerSpeed * 50),
            onBeforeRender: (function (t) {
                this.thumbnailsContainer.scrollLeft = t.z;
                this.thumbnailsContainerStyle.j31({
                    left: t.z
                })
            }).j19(this)
        }).start({
            "z": [this.thumbnailsContainer.scrollLeft, _6b]
        })
    } else {
        var _6b = this.els[this.cur].ss5.thumb.ss47().top;
        var _6c = (this.ss1.height - this.ss1.containerSize) / 2;
        if (_6b < _6c) {
            _6b = 0
        } else {
            if (_6b > this.thumbnailsContainer.scrollHeight - _6c - this.ss1.containerSize) {
                _6b = this.thumbnailsContainer.scrollHeight - this.ss1.height
            } else {
                _6b = _6b - _6c
            }
        }
        clearInterval(this.ss30);
        if (this.ss30FX) {
            this.ss30FX.stop();
            this.ss30FX = false
        }
        this.ss30FX = new $J.FX(this.thumbnailsContainer, {
            duration: Math.round(this.els[this.cur].ss5.thumb.j7().height / this.ss1.containerSpeed * 50),
            onBeforeRender: (function (t) {
                this.thumbnailsContainer.scrollTop = t.z;
                this.thumbnailsContainerStyle.j31({
                    top: t.z
                })
            }).j19(this)
        }).start({
            "z": [this.thumbnailsContainer.scrollTop, _6b]
        })
    }
},
changeEl: function (num, _6d, _6e) {
    _6e = _6e || $J.$F;
    _6d = _6d || "next";
    if (_6d != "auto") {
        this.skipAuto = true
    }
    this.resume();
    num = ($J.defined(num) ? num : 1);
    var _6f = {
        num: num,
        type: _6d
    };
    if (_6d == "next" || _6d == "auto") {
        num = this.cur + num
    }
    if (!this.effectClass || !$J.defined(this.effectClass)) {
        this.effectClass = new MagicSlideshow.Effect(this)
    }
    if (!this.ss1.loop && ((num == this.els.length && this.ss1.direction > 0) || (num == -1 && this.ss1.direction < 0))) {
        return
    }
    if (num == this.els.length) {
        num = 0
    }
    if (num == -1) {
        num = this.els.length - 1
    }
    if (_6d == "auto" && !this.els[num].ss24.img) {
        return
    }
    if (num == this.cur) {
        return
    }
    this.effectClass.goTo(this.cur, num, _6d, _6e, _6f);
    this.els[this.cur].highlight(false);
    this.els[num].highlight(true);
    this.cur = num;
    this.moveSelectorsToCur();
    if (this.ss1.arrows && !this.ss1.loop) {
        this.arrows["image" + this.arrows.types[0]].show();
        this.arrows["image" + this.arrows.types[1]].show();
        if (this.cur == this.els.length - 1) {
            this.arrows["image" + this.arrows.types[1]].hide()
        } else {
            if (this.cur == 0) {
                this.arrows["image" + this.arrows.types[0]].hide()
            }
        }
    }
    if (this.ss1.textEffect != "fixed") {
        this.changeDesc()
    }
},
changeDesc: function () {
    var _70 = "";
    if (this.els[this.cur].title != "") {
        _70 = "<b>" + this.els[this.cur].title + "</b><br />"
    }
    if (this.els[this.cur].ss38 != "") {
        _70 = _70 + this.els[this.cur].ss38
    }
    if (this.ss1.text == "always") {
        if (_70 == "") {
            this.ss6.j31({
                visibility: "hidden"
            })
        } else {
            this.ss6.update(_70);
            this.ss6.j31({
                visibility: "visible"
            })
        }
    } else {
        if (this.ss22) {
            clearInterval(this.ss22)
        }
        if (this.ss222) {
            clearInterval(this.ss222)
        }
        if (this.ss38Timeout) {
            clearTimeout(this.ss38Timeout)
        }
        this["changeDesc_" + this.ss1.textEffect](_70)
    }
},
changeDesc_slide: function (_71) {
    var s = this.ss6.j7();
    var mD = 50;
    var C = this.ss1.textDelay * 1000 / mD;
    var S = s.height / C;
    var N = 0 - s.height;
    this.ss38B = 0;
    if (this.ss1.textPosition == "bottom") {
        this.ss6.j31({
            bottom: this.ss38B
        }, this.ss1)
    } else {
        this.ss6.j31({
            top: this.ss38B
        })
    }
    this.ss22 = (function (S, N) {
        this.ss38B = this.ss38B - S;
        if (this.ss38B < N) {
            this.ss38B = N
        }
        if (this.ss1.textPosition == "bottom") {
            this.ss6.j31({
                bottom: this.ss38B
            }, this.ss1)
        } else {
            this.ss6.j31({
                top: this.ss38B
            })
        }
        if (this.ss38B == N) {
            clearInterval(this.ss22);
            this.ss22 = false;
            this.ss6.j31({
                visibility: "hidden"
            })
        }
    }).j19(this, S, N).interval(mD);
    if (_71 != "") {
        this.ss222 = (function (s, mD, C, S, _72) {
            if (!this.ss22) {
                clearInterval(this.ss222);
                this.ss6.update(_72);
                this.ss38Timeout = (function (s, mD, C, S) {
                    clearTimeout(this.ss38Timeout);
                    var N = 0;
                    this.ss38B = 0 - s.height;
                    if (this.ss1.textPosition == "bottom") {
                        this.ss6.j31({
                            bottom: this.ss38B
                        }, this.ss1)
                    } else {
                        this.ss6.j31({
                            top: this.ss38B
                        })
                    }
                    this.ss6.j31({
                        visibility: "visible"
                    });
                    this.ss22 = (function (S, N) {
                        this.ss38B = this.ss38B + S;
                        if (this.ss38B > N) {
                            this.ss38B = N
                        }
                        if (this.ss1.textPosition == "bottom") {
                            this.ss6.j31({
                                bottom: this.ss38B
                            }, this.ss1)
                        } else {
                            this.ss6.j31({
                                top: this.ss38B
                            })
                        }
                        if (this.ss38B == N) {
                            clearInterval(this.ss22);
                            this.ss22 = false
                        }
                    }).j19(this, S, N).interval(mD)
                }).j19(this, s, mD, C, S).j32(200)
            }
        }).j19(this, s, mD, C, S, _71).interval(mD)
    }
},
changeDesc_fade: function (_73) {
    var mD = 50;
    var C = this.ss1.textDelay * 1000 / mD;
    var S = this.ss1.textOpacity * 100 / C;
    this.ss38O = this.ss1.textOpacity * 100;
    this.ss22 = (function (S) {
        if (this.ss38O < 0) {
            this.ss38O = 0
        }
        this.ss6.g(this.ss38O / 100);
        if (this.ss38O == 0) {
            clearInterval(this.ss22);
            this.ss22 = false;
            this.ss6.j31({
                visibility: "hidden"
            })
        }
        this.ss38O = this.ss38O - S
    }).j19(this, S).interval(mD);
    if (_73 != "") {
        this.ss222 = (function (mD, C, S) {
            if (!this.ss22) {
                clearInterval(this.ss222);
                this.ss6.update(_73);
                (function (mD, C, S) {
                    this.ss38O = 0;
                    this.ss6.j31({
                        visibility: "visible"
                    });
                    this.ss22 = (function (S) {
                        if (this.ss38O > this.ss1.textOpacity * 100) {
                            this.ss38O = this.ss1.textOpacity * 100
                        }
                        this.ss6.g(this.ss38O / 100);
                        if (this.ss38O == this.ss1.textOpacity * 100) {
                            clearInterval(this.ss22);
                            this.ss22 = false
                        }
                        this.ss38O = this.ss38O + S
                    }).j19(this, S).interval(mD)
                }).j19(this, mD, C, S).j32(50)
            }
        }).j19(this, mD, C, S).interval(mD)
    }
}
});MagicSlideshow.Slider.Element = $J.Class({
    init: function (_74, id, img, _75, _76, _77, _78, _79, _7a, rev) {
        this.parent = _74;
        this.id = id;
        this.img = img;
        this.thumb = _75;
        this.title = _76;
        this.ss38 = _77;
        this.link = _78 || false;
        this.target = _79 || false;
        this.additionalEffect = _7a || false;
        this.rev = rev || false;
        this.ss1 = this.parent.ss1;
        this.ss24 = {
            thumb: false,
            img: false
        };
        this.loading = {
            thumb: false,
            img: false
        };
        this.tmp = {};
        this.ss19 = {
            thumb: {
                width: 0,
                height: 0
            },
            img: {
                width: 0,
                height: 0
            }
        };
        this.preload("thumb");
        if (this.ss1.preloadImages) {
            this.preload("img")
        }
        this.ss14 = {};
        this.ss14Interval = {};
        this.ss5 = {};
        this.ss3 = {};
        this.ss23 = false;
        this.sizesChecked = false
    },
    checkSizes: function (_7b) {
        if (this.sizesChecked && (!$J.defined(_7b) || !_7b)) {
            return
        }
        this.sizesChecked = true;
        firstOffsetLeft = 0;
        lastOffsetRight = 0;
        firstOffsetTop = 0;
        lastOffsetBottom = 0;
        this.ss12 = {
            thumb: {
                width: this.ss1.containerSize - this.ss1.thumbnailBorderWidthLeft - this.ss1.thumbnailBorderWidthRight - this.ss1.thumbnailMarginLeft - this.ss1.thumbnailMarginRight,
                height: this.ss1.containerSize - this.ss1.thumbnailBorderWidthTop - this.ss1.thumbnailBorderWidthBottom - this.ss1.thumbnailMarginTop - this.ss1.thumbnailMarginBottom,
                marginTop: this.ss1.thumbnailMarginTop + firstOffsetTop,
                marginBottom: this.ss1.thumbnailMarginBottom + lastOffsetBottom,
                marginLeft: this.ss1.thumbnailMarginLeft + firstOffsetLeft,
                marginRight: this.ss1.thumbnailMarginRight + lastOffsetRight
            },
            img: {
                width: this.ss1.width - this.ss1.imageBorderWidthLeft - this.ss1.imageBorderWidthRight,
                height: this.ss1.height - this.ss1.imageBorderWidthTop - this.ss1.imageBorderWidthBottom,
                marginTop: 0,
                marginBottom: 0,
                marginLeft: 0,
                marginRight: 0
            }
        };
        this.sizeNeed = {
            thumb: {
                width: 0,
                height: 0
            },
            img: {
                width: 0,
                height: 0
            }
        };
        this.ss13 = {
            thumb: $J.extend({}, this.ss12.thumb),
            img: $J.extend({}, this.ss12.img)
        }
    },
    ss55: function (key) {
        this.checkSizes();
        if ($J.defined(this.ss3["img"]) && $J.defined(this.ss3["thumb"]) && $J.defined(this.ss5["img"]) && $J.defined(this.ss5["thumb"])) {
            return
        }
        this.ss3[key] = $J.$(document.createElement("IMG"));
        this.ss3[key].src = this[key];
        this.ss3[key].j31(this.ss13[key]);
        this.ss3[key].j31({
            zIndex: this.ss1.zIndex + 10 + (key == "thumb" ? 50 : 0),
            display: "inline",
            visibility: "hidden",
            padding: 0,
            margin: 0
        });
        (function (key) {
            if (!this.ss14[key] || !$J.defined(this.ss14[key])) {
                this.ss14[key] = new MagicSlideshow.Loading(this.ss3[key], this.ss1)
            }
            this.ss14[key].show()
        }).j19(this, key).j32();
        this.ss5[key] = $J.$(document.createElement("A"));
        this.ss5[key].j31({
            position: "relative",
            outline: 0,
            textDecoration: "none",
            zIndex: this.ss1.zIndex + 5 + (key == "thumb" ? 50 : 0),
            display: "inline",
            padding: 0,
            margin: 0,
            textAlign: "left"
        });
        if (key == "img") {
            this.ss5[key].j31({
                display: "block",
                "float": "left"
            })
        } else {
            this.ss5[key].j31({
                display: "inline-block",
                height: this.ss1.containerSize
            })
        }
        if (this.ss1.useLinks && this.link && key == "img") {
            this.ss5[key].href = this.link;
            this.ss5[key].setAttribute("target", this.target || this.ss1.linksWindow)
        } else {
            this.ss5[key].href = "#"
        }
        this.ss5[key].appendChild(this.ss3[key])
    },
    ss53: function () {
        if (!$J.defined(this.ss5["thumb"])) {
            this.ss55("thumb");
            if (this.ss1.thumbnailOpacity < 1) {
                this.ss3.thumb.g(0.99)
            }
            this.ss3.thumb.j2("MagicSlideshowThumbnail");
            if (this.ss1.containerDirection == "vertically") {
                this.ss3.thumb.j31({
                    display: "block"
                });
                this.ss5.thumb.j31({
                    display: "block",
                    height: "auto"
                })
            }
            this.ss5.thumb.a("click", function (e) {
                this.parent.changeEl(this.id, "jump");
                this.ss5.thumb.blur();
                if (this.ss1.pause == "thumbnail-click") {
                    this.parent.pause()
                }
                $J.$(e).stop()
            }.j18(this));
            this.setImage("thumb")
        }
        if (this.parent.cur == this.id) {
            this.highlight()
        }
        return this.ss5.thumb
    },
    ss54: function () {
        if (!$J.defined(this.ss5["img"])) {
            this.ss55("img");
            this.ss3.img.j2("MagicSlideshowImage");
            if (this.additionalEffect) {
                this.ss5.img.j2(this.additionalEffect);
                this.ss5.img.href = this.rev;
                var rel = "";
                if (this.additionalEffect == "MagicThumb") {
                    rel = "group:" + this.parent.id + "-" + this.id + ";";
                    if (this.ss1.useLinks && this.link) {
                        rel += "link:" + this.link + ";link-target:" + this.target
                    }
                }
                this.ss5.img.rel = rel;
                this.ss5.img.j41("MagicSlideshow", this.parent.id)
            }
            this.ss3.img.j31({
                width: this.ss1.width,
                height: this.ss1.height
            });
            if (this.ss1.textEffect == "fixed" && (this.ss38 || this.title)) {
                this.ss23 = $J.$(document.createElement("SPAN"));
                this.ss23.j2("MagicSlideshowDescription");
                if (this.ss1.thumbnails == "left") {
                    this.ss23.j31({
                        right: 0
                    }, this.ss1)
                } else {
                    this.ss23.j31({
                        left: 0
                    })
                }
                if (this.ss1.textPosition == "bottom") {
                    this.ss23.j31({
                        bottom: 0
                    }, this.ss1)
                } else {
                    this.ss23.j31({
                        top: 0
                    })
                }
                var w = this.ss1.width;
                if (!($J.v.trident && $J.v.backCompat)) {
                    w = w - parseInt(MagicSlideshow.ss15("span", "MagicSlideshowDescription", "padding-left", this.parent.id)) - parseInt(MagicSlideshow.ss15("span", "MagicSlideshowDescription", "padding-right", this.parent.id))
                }
                this.ss23.j31({
                    cursor: "default",
                    zIndex: this.ss1.zIndex + 70,
                    position: "absolute",
                    width: w,
                    whiteSpace: "normal",
                    display: "block !important"
                });
                this.ss23.g(this.ss1.textOpacity);
                var _7c = "";
                if (this.title != "") {
                    _7c = "<b>" + this.title + "</b><br />"
                }
                if (this.ss38 != "") {
                    _7c = _7c + this.ss38
                }
                this.ss23.update(_7c);
                this.ss23.update(_7c);
                this.ss23.a("click", function (e) {
                    this.blur();
                    $J.$(e).stop()
                }.j18(this.ss23));
                if (false && $J.v.engine == "presto") {
                    this.ss23Wrapper = $J.$(document.createElement("span"));
                    this.ss23Wrapper.j6({
                        position: "absolute",
                        top: 0,
                        left: 0,
                        display: "block !important",
                        zIndex: this.ss1.zIndex + 70
                    });
                    this.ss23Wrapper.appendChild(this.ss23);
                    this.ss5["img"].appendChild(this.ss23Wrapper)
                } else {
                    this.ss5["img"].appendChild(this.ss23)
                }
            }
            if (!this.additionalEffect && (!this.ss1.useLinks || !this.link)) {
                this.ss3.img.j31({
                    cursor: "default"
                });
                this.ss5.img.a("click", function (e) {
                    $J.$(e).stop()
                })
            }
            if (this.ss1.pause == "hover") {
                this.ss5.img.a("mouseover", (function (e) {
                    this.parent.pause()
                }).j19(this));
                this.ss5.img.a("mouseout", (function (e) {
                    this.parent.resume()
                }).j19(this))
            }
            if (this.ss1.pause == "click") {
                this.ss3.img.a("click", (function (e) {
                    this.parent.pause()
                }).j19(this))
            }
            this.setImage("img")
        }
        return this.ss5.img
    },
    ss54Copy: function () {
        if (!$J.defined(this.ss5["img"])) {
            this.ss54()
        }
        return this.ss5.img.cloneNode(true)
    },
    preload: function (key) {
        this.loading[key] = true;
        if (this.id != 0 && ((this.ss1.preloadInOrder && !this.parent.els[this.id - 1].ss24[key]) || (!this.preloadInOrder && !this.parent.els[0].ss24[key]))) {
            this.preload.j19(this, key).j32(100);
            return
        }
        if (!this.ss24[key] && (!this.tmp[key] || !$J.defined(this.tmp[key]))) {
            this.tmp[key] = $J.$(new Image());
            this.tmp[key].a("load", function (e, key) {
                if (key == "thumb") {
                    this.parent.thumbPreloaded++
                }
                this.ss19[key] = {
                    width: this.tmp[key].width,
                    height: this.tmp[key].height
                };
                this.ss24[key] = true
            }.j18(this, key));
            this.tmp[key].src = this[key]
        }
    },
    setImage: function (key) {
        if (!this.ss24[key]) {
            this.loading[key] || this.preload(key);
            this.setImage.j19(this, key).j32(100);
            return
        }
        this.calculateNeedSize(key);
        this.ss3[key].src = this[key];
        this.ss3[key].j31({
            visibility: "visible"
        });
        this.ss14Interval[key] = (function (key) {
            if (this.ss14[key] && $J.defined(this.ss14[key])) {
                this.ss14[key].hide();
                clearInterval(this.ss14Interval[key])
            }
        }).j19(this, key).interval(100);
        this.checkImageSize(key)
    },
    calculateNeedSize: function (key) {
        if (key == "thumb" || this.ss1.preserve) {
            if (key == "img" || this.ss1.containerDirection == "horizontally") {
                this.sizeNeed[key].height = this.ss19[key].height > this.ss12[key].height ? this.ss12[key].height : this.ss19[key].height;
                this.sizeNeed[key].width = this.ss19[key].width * this.sizeNeed[key].height / this.ss19[key].height
            }
            if (key == "img" && this.sizeNeed[key].width > this.ss12[key].width || key == "thumb" && this.ss1.containerDirection == "vertically") {
                this.sizeNeed[key].width = this.ss19[key].width > this.ss12[key].width ? this.ss12[key].width : this.ss19[key].width;
                this.sizeNeed[key].height = this.ss19[key].height * this.sizeNeed[key].width / this.ss19[key].width
            }
            this.sizeNeed[key].height = Math.round(this.sizeNeed[key].height);
            this.sizeNeed[key].width = Math.round(this.sizeNeed[key].width)
        } else {
            this.sizeNeed.img.width = this.ss12.img.width;
            this.sizeNeed.img.height = this.ss12.img.height
        }
    },
    checkImageSize: function (key, _7d) {
        if ($J.v.trident && !this.parent.replaced) {
            this.checkImageSize.j19(this, key, _7d || false).j32(50);
            return
        }
        if ($J.defined(_7d) && _7d) {
            this.ss13[key] = {
                width: parseInt(this.ss3[key].j5("width")),
                height: parseInt(this.ss3[key].j5("height")),
                marginTop: parseInt(this.ss3[key].j5("margin-top")),
                marginRight: parseInt(this.ss3[key].j5("margin-right")),
                marginBottom: parseInt(this.ss3[key].j5("margin-bottom")),
                marginLeft: parseInt(this.ss3[key].j5("margin-left"))
            };
            return
        }
        var _7e = 2,
            _7f = 50;
        if (key == "img") {
            _7e = _7e * 10
        }
        var _80 = true;
        var _81 = _7e;
        var _82 = 0;
        if (this.sizeNeed[key].width != this.ss13[key].width) {
            _80 = false;
            _81 = Math.abs((this.ss13[key].width - this.sizeNeed[key].width) % _7e);
            if (_81 == 0) {
                _81 = _7e
            }
            _81 = ((this.sizeNeed[key].width > this.ss13[key].width) ? (_81) : (0 - _81));
            this.ss13[key].width = this.ss13[key].width + _81
        }
        if (this.sizeNeed[key].height != this.ss13[key].height) {
            _80 = false;
            _81 = Math.abs((this.ss13[key].height - this.sizeNeed[key].height) % _7e);
            if (_81 == 0) {
                _81 = _7e
            }
            _81 = ((this.sizeNeed[key].height > this.ss13[key].height) ? (_81) : (0 - _81));
            this.ss13[key].height = this.ss13[key].height + _81
        }
        if (this.sizeNeed[key].height <= this.ss12[key].height && (key == "img" && this.ss1.preserve || key == "thumb" && this.ss1.containerDirection == "horizontally")) {
            var _83 = parseInt(this.ss3[key].j30("margin-top"));
            var _84 = (this.ss12[key].height - this.ss13[key].height) / 2 + this.ss12[key].marginTop;
            var _85 = Math.round(_84);
            if (_85 != _84) {
                _85 -= 1
            }
            if (_83 != _85) {
                _80 = false;
                _81 = Math.abs((_85 - _83) % _7e);
                if (_81 == 0) {
                    _81 = _7e
                }
                _81 = ((_85 > _83) ? (_81) : (0 - _81));
                this.ss13[key].marginTop = _83 + _81
            }
            var _86 = parseInt(this.ss3[key].j30("margin-bottom"));
            var _87 = Math.round((this.ss12[key].height - this.ss13[key].height) / 2 + this.ss12[key].marginBottom);
            if (_86 != _87) {
                _80 = false;
                _81 = Math.abs((_87 - _86) % _7e);
                if (_81 == 0) {
                    _81 = _7e
                }
                _81 = ((_87 > _86) ? (_81) : (0 - _81));
                this.ss13[key].marginBottom = _86 + _81
            }
        }
        if (this.sizeNeed[key].width <= this.ss12[key].width && (key == "img" && this.ss1.preserve || key == "thumb" && this.ss1.containerDirection == "vertically")) {
            var _88 = parseInt(this.ss3[key].j30("margin-left"));
            var _89 = (this.ss12[key].width - this.ss13[key].width) / 2 + this.ss12[key].marginLeft;
            var _8a = Math.round(_89);
            if (_89 != _8a) {
                _8a -= 1
            }
            if (_88 != _8a) {
                _80 = false;
                _81 = Math.abs((_8a - _88) % _7e);
                if (_81 == 0) {
                    _81 = _7e
                }
                _81 = ((_8a > _88) ? (_81) : (0 - _81));
                this.ss13[key].marginLeft = _88 + _81
            }
            var _8b = parseInt(this.ss3[key].j30("margin-right"));
            var _8c = Math.round((this.ss12[key].width - this.ss13[key].width) / 2 + this.ss12[key].marginRight);
            if (_8b != _8c) {
                _80 = false;
                _81 = Math.abs((_8c - _8b) % _7e);
                if (_81 == 0) {
                    _81 = _7e
                }
                _81 = ((_8c > _8b) ? (_81) : (0 - _81));
                this.ss13[key].marginRight = _8b + _81
            }
        }
        if (_80 === false) {
            this.ss3[key].j31(this.ss13[key]);
            this.checkImageSize.j19(this, key).j32(_7f)
        } else {}
    },
    highlight: function (_8d) {
        if ($J.defined(_8d) && _8d || !$J.defined(_8d)) {
            this.ss3.thumb.j2("highlight");
            this.ss12.thumb = {
                width: this.ss1.containerSize - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "border-left-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "border-right-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "margin-left", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "margin-right", this.parent.id)),
                height: this.ss1.containerSize - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "border-top-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "border-bottom-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "margin-top", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail highlight", "margin-bottom", this.parent.id)),
                marginTop: this.ss1.thumbnailMarginTop,
                marginBottom: this.ss1.thumbnailMarginBottom,
                marginLeft: this.ss1.thumbnailMarginLeft,
                marginRight: this.ss1.thumbnailMarginRight
            }
        } else {
            this.ss3.thumb.j3("highlight");
            this.ss12.thumb = {
                width: this.ss1.containerSize - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-left-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-right-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-left", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-right", this.parent.id)),
                height: this.ss1.containerSize - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-top-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "border-bottom-width", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-top", this.parent.id)) - parseInt(MagicSlideshow.ss15("img", "MagicSlideshowThumbnail", "margin-bottom", this.parent.id)),
                marginTop: this.ss1.thumbnailMarginTop,
                marginBottom: this.ss1.thumbnailMarginBottom,
                marginLeft: this.ss1.thumbnailMarginLeft,
                marginRight: this.ss1.thumbnailMarginRight
            }
        }
        this.calculateNeedSize("thumb");
        this.checkImageSize("thumb", true)
    }
});MagicSlideshow.Effect = $J.Class({
    init: function (_8e) {
        this.parent = _8e;
        this.ss1 = this.parent.ss1;
        this.prevEffect = "none";
        this.prepared = false;
        this.ss9 = {
            start: 0,
            ss32: 0
        };
        this.prepareTypes = {
            def: "horizontally",
            fade: "absolute",
            scroll: "horizontally",
            scrollHorizontally: "horizontally",
            scrollVertically: "vertically"
        };
        this.allowDirections = {
            def: ["horizontally"],
            fade: [""],
            scroll: ["horizontally", "vertically"]
        };
        this.callback = $J.$F;
        this.coreCallback = $J.$F;
        this.fx = []
    },
    stopEffects: function (_8f) {
        _8f = _8f || false;
        if (this.timeout || $J.defined(this.timeout)) {
            clearTimeout(this.timeout)
        }
        if (this.interval || $J.defined(this.interval)) {
            clearInterval(this.interval)
        }
        if (this.fx || $J.defined(this.fx)) {
            for (var i = 0, l = this.fx.length; i < l; i++) {
                this.fx[i].stop()
            }
            this.fx = []
        }
        if (_8f) {
            this.coreCallback();
            this.callback()
        }
        this.callback = $J.$F;
        this.coreCallback = $J.$F
    },
    goTo: function (cur, num, _90, _91, _92) {
        this.type = _90 = _90 || "next";
        this.origss1 = _92 || {
            num: 1,
            type: "next"
        };
        this.stopEffects();
        this.callback = _91 || $J.$F;
        this.cur = cur;
        this.num = num;
        this.effect = this.ss1[("effect-" + _90).k()];
        if (!this[("effect-" + this.effect).k()]) {
            this.effect = "def"
        }
        this.direction = this.ss1[("effect-" + this.effect + "-direction").k()];
        if (!$J.defined(this.direction) || !this.direction || !$J.$(this.allowDirections[this.effect]).contains(this.direction)) {
            this.direction = this.allowDirections[this.effect][0]
        }
        this.duration = this.ss1[("effect-" + this.effect + "-duration").k()];
        if (this.duration < 0.01) {
            this.duration = 0.01
        }
        var _93 = this.prepareTypes[(this.effect + (this.direction != "" ? ("-" + this.direction) : "")).k()];
        if (_93 != this.prepared) {
            var i, l = this.parent.els.length;
            switch (_93) {
            case "absolute":
                this.removeOffsets("all");
                for (i = 0; i < l; i++) {
                    this.parent.els[i].ss3.img.g(0);
                    this.parent.els[i].ss5.img.j31({
                        zIndex: this.ss1.zIndex + 5,
                        position: "absolute",
                        top: 0,
                        left: 0
                    });
                    if (this.parent.els[i].ss23) {
                        this.parent.els[i].ss23.g(0);
                        if (this.ss1.textPosition == "bottom") {
                            this.parent.els[i].ss23.j6({
                                bottom: 0
                            }, this.ss1)
                        } else {
                            this.parent.els[i].ss23.j6({
                                top: 0
                            })
                        }
                    }
                }
                this.parent.els[this.cur].ss3.img.g(1);
                if (this.parent.els[this.cur].ss23) {
                    this.parent.els[this.cur].ss23.g(this.ss1.textOpacity)
                }
                this.parent.els[this.cur].ss5.img.j31({
                    zIndex: this.ss1.zIndex + 6
                });
                this.parent.ss2.scrollLeft = 0;
                this.parent.ss2.scrollTop = 0;
                this.prepared = "absolute";
                break;
            case "horizontally":
            case "vertically":
            default:
                var _94 = this.direction == "vertically" ? "block" : "inline";
                for (i = 0; i < l; i++) {
                    this.parent.els[i].ss3.img.g(1);
                    this.parent.els[i].ss5.img.j31({
                        zIndex: this.ss1.zIndex + 5,
                        position: "static",
                        display: "block",
                        "float": _94 == "block" ? "none" : "left"
                    });
                    if ($J.v.engine == "trident" && $J.v.version == 4) {
                        this.parent.els[i].ss5.img.j31({
                            "float": "left"
                        })
                    }
                    this.parent.ss2Wrapper.j31({
                        width: _94 == "block" ? "auto" : (((this.parent.els.length + 3) * (this.ss1.width + 100)))
                    });
                    if (this.parent.els[i].ss23) {
                        this.parent.els[i].ss23.g(this.ss1.textOpacity);
                        if (this.ss1.textPosition == "bottom") {
                            this.parent.els[i].ss23.j6({
                                display: "none",
                                bottom: 0
                            }, this.ss1)
                        } else {
                            this.parent.els[i].ss23.j6({
                                display: "none",
                                top: 0
                            })
                        }
                    }
                }
                if (this.direction == "vertically") {
                    this.parent.ss2.scrollLeft = 0;
                    this.parent.ss2.scrollTop = this.ss1.height * this.cur
                } else {
                    this.parent.ss2.scrollLeft = this.ss1.width * this.cur;
                    this.parent.ss2.scrollTop = 0
                }
                this.prepared = this.direction == "vertically" ? this.direction : "horizontally";
                $J.$A(this.parent.els).j14(function (el) {
                    $J.$(el).ss5.img.j31({
                        position: "relative"
                    });
                    if ($J.$(el).ss23) {
                        $J.$(el).ss23.j31({
                            display: "block"
                        })
                    }
                });
                break
            }
        }
        this[("effect-" + this.effect).k()]()
    },
    effectDef: function () {
        this.parent.ss2.scrollLeft = this.ss1.width * this.num;
        this.stopEffects(true)
    },
    removeOffsets: function (key) {
        key = key || "extra";
        if (key == "all") {
            if (this.ss1.effectScrollDirection == "horizontally") {
                this.parent.ss2.scrollLeft = this.parent.ss2.scrollLeft % (this.parent.els.length * this.ss1.width)
            } else {
                this.parent.ss2.scrollTop = this.parent.ss2.scrollTop % (this.parent.els.length * this.ss1.height)
            }
            var i, l = this.ss9.start;
            for (i = 0; i < l; i++) {
                if (this.ss1.effectScrollDirection == "horizontally") {
                    this.parent.ss2.scrollLeft += this.ss1.width
                } else {
                    this.parent.ss2.scrollTop += this.ss1.width
                }
                $J.$(this.parent.ss2Wrapper.firstChild).remove();
                this.ss9.start--
            }
            l = this.ss9.ss32;
            for (i = 0; i < l; i++) {
                $J.$(this.parent.ss2Wrapper.lastChild).remove();
                this.ss9.ss32--
            }
        } else {
            if (key == "extra") {
                var _95 = this.parent.els.length;
                var _96, _97 = false,
                    _98 = false;
                if (this.direction == "horizontally") {
                    _96 = this.parent.ss2.scrollLeft - this.ss1.width * this.ss9.start;
                    _96 = _96 % (this.ss1.width * _95);
                    if (_96 <= 0 - this.ss1.width) {
                        _96 += this.ss1.width * _95
                    } else {
                        if (_96 <= 0) {
                            _97 = true
                        } else {
                            if (_96 > this.ss1.width * (_95 - 1)) {
                                _98 = true
                            }
                        }
                    }
                    this.parent.ss2.scrollLeft = this.ss1.width * this.ss9.start + _96
                } else {
                    _96 = this.parent.ss2.scrollTop - this.ss1.height * this.ss9.start;
                    _96 = _96 % (this.ss1.height * _95);
                    if (_96 <= 0 - this.ss1.height) {
                        _96 += this.ss1.height * _95
                    } else {
                        if (_96 <= 0) {
                            _97 = true
                        } else {
                            if (_96 > this.ss1.height * (_95 - 1)) {
                                _98 = true
                            }
                        }
                    }
                    this.parent.ss2.scrollTop = this.ss1.height * this.ss9.start + _96
                }
                if (this.ss9.start > 0) {
                    while ((this.ss9.start > 0 && !_97) || (this.ss9.start > 1 && _97)) {
                        if (this.direction == "horizontally") {
                            this.parent.ss2.scrollLeft -= this.ss1.width
                        } else {
                            this.parent.ss2.scrollTop -= this.ss1.height
                        }
                        $J.$(this.parent.ss2Wrapper.firstChild).remove();
                        this.ss9.start--
                    }
                }
                if (this.ss9.ss32 > 0) {
                    while ((this.ss9.ss32 > 0 && !_98) || (this.ss9.ss32 > 1 && _98)) {
                        $J.$(this.parent.ss2Wrapper.lastChild).remove();
                        this.ss9.ss32--
                    }
                }
            }
        }
    },
    effectScroll: function () {
        var _99 = this.parent.els.length;
        this.removeOffsets();
        var x;
        if (this.direction == "horizontally") {
            x = (this.parent.ss2.scrollLeft - (this.parent.ss2.scrollLeft % this.ss1.width)) / this.ss1.width
        } else {
            x = (this.parent.ss2.scrollTop - (this.parent.ss2.scrollTop % this.ss1.height)) / this.ss1.height
        }
        if (this.ss1.loop && this.ss1.loopType == "next") {
            cur = x - this.ss9.start;
            if (this.origss1.num < 0 && this.num > cur) {
                this.num = 0 - (_99 - this.num)
            } else {
                if (this.origss1.num > 0 && this.num <= cur) {
                    this.num = _99 + this.num
                } else {
                    if (cur && cur < 0) {
                        this.num = this.num - cur
                    }
                }
            }
        }
        if (this.ss1.loop && this.ss1.loopType == "next") {
            if (this.num < 0) {
                var num = 0 - this.num - this.ss9.start;
                var i = _99 - this.ss9.start - 1;
                while (num > 0) {
                    if (i < 0) {
                        i = _99 - 1
                    }
                    this.parent.ss2Wrapper.insertBefore(this.parent.els[i].ss54Copy(), this.parent.ss2Wrapper.firstChild);
                    if (this.direction == "horizontally") {
                        this.parent.ss2.scrollLeft += this.ss1.width
                    } else {
                        this.parent.ss2.scrollTop += this.ss1.height
                    }
                    this.ss9.start++;
                    i--;
                    num--
                }
                this.cur = 0 - this.num;
                this.num = 0
            } else {
                if (this.num > (_99 - 1)) {
                    var num = this.num + 1 - _99 - this.ss9.ss32;
                    var i = this.ss9.ss32;
                    while (num > 0) {
                        if (i == _99) {
                            i = 0
                        }
                        this.parent.ss2Wrapper.appendChild(this.parent.els[i].ss54Copy());
                        this.ss9.ss32++;
                        i++;
                        num--
                    }
                }
            }
        }
        if (this.direction == "vertically") {
            var _9a = this.parent.ss2.scrollTop;
            var _9b = this.ss1.height * this.num
        } else {
            var _9a = this.parent.ss2.scrollLeft;
            var _9b = this.ss1.width * this.num
        }
        if (_9b == _9a) {
            return
        }
        var _9c = Math.abs(_9b - _9a);
        var D = this.duration * 1000;
        var mD = 100;
        var C = D / mD + 1;
        var W = _9c;
        var fS = W / C / 4;
        var K = 2 * ((W - C * fS) / ((C / 2 - 1) * C));
        var N = 1;
        this.ScrollCurrentStep = N;
        this.interval = (function (C, K, fS, _9d) {
            var N = this.ScrollCurrentStep;
            if (this.direction == "vertically") {
                var _9e = this.parent.ss2.scrollTop
            } else {
                var _9e = this.parent.ss2.scrollLeft
            }
            if (_9d == _9e || N > C) {
                if (_9d != _9e) {
                    if (this.direction == "vertically") {
                        this.parent.ss2.scrollTop = _9d
                    } else {
                        this.parent.ss2.scrollLeft = _9d
                    }
                }
                this.coreCallback = (function () {
                    this.removeOffsets()
                }).j19(this);
                this.stopEffects(true);
                return
            }
            var sW = 0;
            if (N > C / 2) {
                sW = fS + K * (C - N)
            } else {
                sW = fS + K * (N - 1)
            }
            var _9f = Math.abs(_9d - _9e);
            sW = _9f > sW ? sW : _9f;
            if (_9d < _9e) {
                sW = 0 - sW
            }
            if (this.direction == "vertically") {
                this.parent.ss2.scrollTop += Math.round(sW)
            } else {
                this.parent.ss2.scrollLeft += Math.round(sW)
            }
            this.ScrollCurrentStep++
        }).j19(this, C, K, fS, _9b).interval(mD)
    },
    effectFade: function () {
        var mD = 50;
        var C = Math.round(this.duration * 1000 / mD);
        var K = Math.round(100 / C);
        this.parent.els[this.num].ss5.img.j31({
            zIndex: this.ss1.zIndex + 6
        });
        this.parent.els[this.cur].ss5.img.j31({
            zIndex: this.ss1.zIndex + 5
        });
        var i, l = this.parent.els.length,
            el, op;
        for (i = 0; i < l; i++) {
            el = this.parent.els[i].ss3.img;
            op = el.j5("opacity");
            if (op > 0 && i != this.num) {
                this.fx.push(new $J.FX(el, {
                    duration: this.duration * 1000,
                    onBeforeRender: (function (i, v) {
                        if (this.parent.els[i].ss23) {
                            this.parent.els[i].ss23.g(v.opacity * this.ss1.textOpacity)
                        }
                    }).j19(this, i)
                }).start({
                    "opacity": [op, 0]
                }))
            }
            if (op < 1 && i == this.num) {
                this.fx.push(new $J.FX(el, {
                    duration: this.duration * 1000,
                    onBeforeRender: (function (i, v) {
                        if (this.parent.els[i].ss23) {
                            this.parent.els[i].ss23.g(v.opacity * this.ss1.textOpacity)
                        }
                    }).j19(this, i),
                    onComplete: (function () {
                        this.stopEffects(true)
                    }).j19(this)
                }).start({
                    "opacity": [op, 1]
                }))
            }
        }
    }
});MagicSlideshow.Loading = $J.Class({
    init: function (el, ss1) {
        this.el = el;
        this.ss1 = ss1;
        this.appendDone = false;
        this.create();
        this.append()
    },
    create: function () {
        this.ss14 = $J.$(document.createElement("div"));
        this.ss14.update("&nbsp;&nbsp;<br />" + this.ss1.loadingText);
        this.ss14.j2("MagicSlideshowLoadingBox");
        this.ss14.j31({
            position: "absolute",
            top: 0,
            left: 0,
            zIndex: this.ss1.zIndex + 100,
            display: "none"
        });
        this.ss14.g(50);
        this.setPos.j19(this).j32(100)
    },
    append: function () {
        if (!this.el.parentNode && !$J.defined(this.el.parentNode)) {
            this.append.j19(this).j32(100);
            return
        }
        this.appendDone = true;
        this.el.parentNode.appendChild(this.ss14)
    },
    setPos: function () {
        var _a0 = this.el.j7();
        if (_a0.width == 0 || _a0.left == 0) {
            this.setPos.j19(this).j32(100)
        }
        var pos = this.el.ss47();
        var _a1 = this.ss14.j7();
        this.ss14.j31({
            top: Math.round(parseInt(pos.top) + parseInt(_a0.height) / 2 - parseInt(_a1.height) / 2) + "px",
            left: Math.round(parseInt(pos.left) + parseInt(_a0.width) / 2 - parseInt(_a1.width) / 2) + "px"
        })
    },
    show: function () {
        if (this.appendDone == false) {
            this.show.j19(this).j32(100);
            return
        }
        this.setPos();
        this.ss14.j31({
            display: ""
        })
    },
    hide: function () {
        this.ss14.j31({
            display: "none"
        })
    }
});
