/*!
 * jQuery JavaScript Library v1.6.1
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu May 12 15:04:36 2011 -0400
 */
(function (a, b) {
    function cy(a) {
        return f.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1
    }

    function cv(a) {
        if (!cj[a]) {
            var b = f("<" + a + ">").appendTo("body"), d = b.css("display");
            b.remove();
            if (d === "none" || d === "") {
                ck || (ck = c.createElement("iframe"), ck.frameBorder = ck.width = ck.height = 0), c.body.appendChild(ck);
                if (!cl || !ck.createElement)cl = (ck.contentWindow || ck.contentDocument).document, cl.write("<!doctype><html><body></body></html>");
                b = cl.createElement(a), cl.body.appendChild(b), d = f.css(b, "display"), c.body.removeChild(ck)
            }
            cj[a] = d
        }
        return cj[a]
    }

    function cu(a, b) {
        var c = {};
        f.each(cp.concat.apply([], cp.slice(0, b)), function () {
            c[this] = a
        });
        return c
    }

    function ct() {
        cq = b
    }

    function cs() {
        setTimeout(ct, 0);
        return cq = f.now()
    }

    function ci() {
        try {
            return new a.ActiveXObject("Microsoft.XMLHTTP")
        } catch (b) {
        }
    }

    function ch() {
        try {
            return new a.XMLHttpRequest
        } catch (b) {
        }
    }

    function cb(a, c) {
        a.dataFilter && (c = a.dataFilter(c, a.dataType));
        var d = a.dataTypes, e = {}, g, h, i = d.length, j, k = d[0], l, m, n, o, p;
        for (g = 1; g < i; g++) {
            if (g === 1)for (h in a.converters)typeof h == "string" && (e[h.toLowerCase()] = a.converters[h]);
            l = k, k = d[g];
            if (k === "*")k = l; else if (l !== "*" && l !== k) {
                m = l + " " + k, n = e[m] || e["* " + k];
                if (!n) {
                    p = b;
                    for (o in e) {
                        j = o.split(" ");
                        if (j[0] === l || j[0] === "*") {
                            p = e[j[1] + " " + k];
                            if (p) {
                                o = e[o], o === !0 ? n = p : p === !0 && (n = o);
                                break
                            }
                        }
                    }
                }
                !n && !p && f.error("No conversion from " + m.replace(" ", " to ")), n !== !0 && (c = n ? n(c) : p(o(c)))
            }
        }
        return c
    }

    function ca(a, c, d) {
        var e = a.contents, f = a.dataTypes, g = a.responseFields, h, i, j, k;
        for (i in g)i in d && (c[g[i]] = d[i]);
        while (f[0] === "*")f.shift(), h === b && (h = a.mimeType || c.getResponseHeader("content-type"));
        if (h)for (i in e)if (e[i] && e[i].test(h)) {
            f.unshift(i);
            break
        }
        if (f[0]in d)j = f[0]; else {
            for (i in d) {
                if (!f[0] || a.converters[i + " " + f[0]]) {
                    j = i;
                    break
                }
                k || (k = i)
            }
            j = j || k
        }
        if (j) {
            j !== f[0] && f.unshift(j);
            return d[j]
        }
    }

    function b_(a, b, c, d) {
        if (f.isArray(b))f.each(b, function (b, e) {
            c || bF.test(a) ? d(a, e) : b_(a + "[" + (typeof e == "object" || f.isArray(e) ? b : "") + "]", e, c, d)
        }); else if (!c && b != null && typeof b == "object")for (var e in b)b_(a + "[" + e + "]", b[e], c, d); else d(a, b)
    }

    function b$(a, c, d, e, f, g) {
        f = f || c.dataTypes[0], g = g || {}, g[f] = !0;
        var h = a[f], i = 0, j = h ? h.length : 0, k = a === bU, l;
        for (; i < j && (k || !l); i++)l = h[i](c, d, e), typeof l == "string" && (!k || g[l] ? l = b : (c.dataTypes.unshift(l), l = b$(a, c, d, e, l, g)));
        (k || !l) && !g["*"] && (l = b$(a, c, d, e, "*", g));
        return l
    }

    function bZ(a) {
        return function (b, c) {
            typeof b != "string" && (c = b, b = "*");
            if (f.isFunction(c)) {
                var d = b.toLowerCase().split(bQ), e = 0, g = d.length, h, i, j;
                for (; e < g; e++)h = d[e], j = /^\+/.test(h), j && (h = h.substr(1) || "*"), i = a[h] = a[h] || [], i[j ? "unshift" : "push"](c)
            }
        }
    }

    function bD(a, b, c) {
        var d = b === "width" ? bx : by, e = b === "width" ? a.offsetWidth : a.offsetHeight;
        if (c === "border")return e;
        f.each(d, function () {
            c || (e -= parseFloat(f.css(a, "padding" + this)) || 0), c === "margin" ? e += parseFloat(f.css(a, "margin" + this)) || 0 : e -= parseFloat(f.css(a, "border" + this + "Width")) || 0
        });
        return e
    }

    function bn(a, b) {
        b.src ? f.ajax({url:b.src, async:!1, dataType:"script"}) : f.globalEval((b.text || b.textContent || b.innerHTML || "").replace(bf, "/*$0*/")), b.parentNode && b.parentNode.removeChild(b)
    }

    function bm(a) {
        f.nodeName(a, "input") ? bl(a) : a.getElementsByTagName && f.grep(a.getElementsByTagName("input"), bl)
    }

    function bl(a) {
        if (a.type === "checkbox" || a.type === "radio")a.defaultChecked = a.checked
    }

    function bk(a) {
        return"getElementsByTagName"in a ? a.getElementsByTagName("*") : "querySelectorAll"in a ? a.querySelectorAll("*") : []
    }

    function bj(a, b) {
        var c;
        if (b.nodeType === 1) {
            b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase();
            if (c === "object")b.outerHTML = a.outerHTML; else if (c !== "input" || a.type !== "checkbox" && a.type !== "radio") {
                if (c === "option")b.selected = a.defaultSelected; else if (c === "input" || c === "textarea")b.defaultValue = a.defaultValue
            } else a.checked && (b.defaultChecked = b.checked = a.checked), b.value !== a.value && (b.value = a.value);
            b.removeAttribute(f.expando)
        }
    }

    function bi(a, b) {
        if (b.nodeType === 1 && !!f.hasData(a)) {
            var c = f.expando, d = f.data(a), e = f.data(b, d);
            if (d = d[c]) {
                var g = d.events;
                e = e[c] = f.extend({}, d);
                if (g) {
                    delete e.handle, e.events = {};
                    for (var h in g)for (var i = 0, j = g[h].length; i < j; i++)f.event.add(b, h + (g[h][i].namespace ? "." : "") + g[h][i].namespace, g[h][i], g[h][i].data)
                }
            }
        }
    }

    function bh(a, b) {
        return f.nodeName(a, "table") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
    }

    function X(a, b, c) {
        b = b || 0;
        if (f.isFunction(b))return f.grep(a, function (a, d) {
            var e = !!b.call(a, d, a);
            return e === c
        });
        if (b.nodeType)return f.grep(a, function (a, d) {
            return a === b === c
        });
        if (typeof b == "string") {
            var d = f.grep(a, function (a) {
                return a.nodeType === 1
            });
            if (S.test(b))return f.filter(b, d, !c);
            b = f.filter(b, d)
        }
        return f.grep(a, function (a, d) {
            return f.inArray(a, b) >= 0 === c
        })
    }

    function W(a) {
        return!a || !a.parentNode || a.parentNode.nodeType === 11
    }

    function O(a, b) {
        return(a && a !== "*" ? a + "." : "") + b.replace(A, "`").replace(B, "&")
    }

    function N(a) {
        var b, c, d, e, g, h, i, j, k, l, m, n, o, p = [], q = [], r = f._data(this, "events");
        if (!(a.liveFired === this || !r || !r.live || a.target.disabled || a.button && a.type === "click")) {
            a.namespace && (n = new RegExp("(^|\\.)" + a.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)")), a.liveFired = this;
            var s = r.live.slice(0);
            for (i = 0; i < s.length; i++)g = s[i], g.origType.replace(y, "") === a.type ? q.push(g.selector) : s.splice(i--, 1);
            e = f(a.target).closest(q, a.currentTarget);
            for (j = 0, k = e.length; j < k; j++) {
                m = e[j];
                for (i = 0; i < s.length; i++) {
                    g = s[i];
                    if (m.selector === g.selector && (!n || n.test(g.namespace)) && !m.elem.disabled) {
                        h = m.elem, d = null;
                        if (g.preType === "mouseenter" || g.preType === "mouseleave")a.type = g.preType, d = f(a.relatedTarget).closest(g.selector)[0], d && f.contains(h, d) && (d = h);
                        (!d || d !== h) && p.push({elem:h, handleObj:g, level:m.level})
                    }
                }
            }
            for (j = 0, k = p.length; j < k; j++) {
                e = p[j];
                if (c && e.level > c)break;
                a.currentTarget = e.elem, a.data = e.handleObj.data, a.handleObj = e.handleObj, o = e.handleObj.origHandler.apply(e.elem, arguments);
                if (o === !1 || a.isPropagationStopped()) {
                    c = e.level, o === !1 && (b = !1);
                    if (a.isImmediatePropagationStopped())break
                }
            }
            return b
        }
    }

    function L(a, c, d) {
        var e = f.extend({}, d[0]);
        e.type = a, e.originalEvent = {}, e.liveFired = b, f.event.handle.call(c, e), e.isDefaultPrevented() && d[0].preventDefault()
    }

    function F() {
        return!0
    }

    function E() {
        return!1
    }

    function m(a, c, d) {
        var e = c + "defer", g = c + "queue", h = c + "mark", i = f.data(a, e, b, !0);
        i && (d === "queue" || !f.data(a, g, b, !0)) && (d === "mark" || !f.data(a, h, b, !0)) && setTimeout(function () {
            !f.data(a, g, b, !0) && !f.data(a, h, b, !0) && (f.removeData(a, e, !0), i.resolve())
        }, 0)
    }

    function l(a) {
        for (var b in a)if (b !== "toJSON")return!1;
        return!0
    }

    function k(a, c, d) {
        if (d === b && a.nodeType === 1) {
            var e = "data-" + c.replace(j, "$1-$2").toLowerCase();
            d = a.getAttribute(e);
            if (typeof d == "string") {
                try {
                    d = d === "true" ? !0 : d === "false" ? !1 : d === "null" ? null : f.isNaN(d) ? i.test(d) ? f.parseJSON(d) : d : parseFloat(d)
                } catch (g) {
                }
                f.data(a, c, d)
            } else d = b
        }
        return d
    }

    var c = a.document, d = a.navigator, e = a.location, f = function () {
        function H() {
            if (!e.isReady) {
                try {
                    c.documentElement.doScroll("left")
                } catch (a) {
                    setTimeout(H, 1);
                    return
                }
                e.ready()
            }
        }

        var e = function (a, b) {
            return new e.fn.init(a, b, h)
        }, f = a.jQuery, g = a.$, h, i = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, j = /\S/, k = /^\s+/, l = /\s+$/, m = /\d/, n = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, o = /^[\],:{}\s]*$/, p = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, q = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, r = /(?:^|:|,)(?:\s*\[)+/g, s = /(webkit)[ \/]([\w.]+)/, t = /(opera)(?:.*version)?[ \/]([\w.]+)/, u = /(msie) ([\w.]+)/, v = /(mozilla)(?:.*? rv:([\w.]+))?/, w = d.userAgent, x, y, z, A = Object.prototype.toString, B = Object.prototype.hasOwnProperty, C = Array.prototype.push, D = Array.prototype.slice, E = String.prototype.trim, F = Array.prototype.indexOf, G = {};
        e.fn = e.prototype = {constructor:e, init:function (a, d, f) {
            var g, h, j, k;
            if (!a)return this;
            if (a.nodeType) {
                this.context = this[0] = a, this.length = 1;
                return this
            }
            if (a === "body" && !d && c.body) {
                this.context = c, this[0] = c.body, this.selector = a, this.length = 1;
                return this
            }
            if (typeof a == "string") {
                a.charAt(0) !== "<" || a.charAt(a.length - 1) !== ">" || a.length < 3 ? g = i.exec(a) : g = [null, a, null];
                if (g && (g[1] || !d)) {
                    if (g[1]) {
                        d = d instanceof e ? d[0] : d, k = d ? d.ownerDocument || d : c, j = n.exec(a), j ? e.isPlainObject(d) ? (a = [c.createElement(j[1])], e.fn.attr.call(a, d, !0)) : a = [k.createElement(j[1])] : (j = e.buildFragment([g[1]], [k]), a = (j.cacheable ? e.clone(j.fragment) : j.fragment).childNodes);
                        return e.merge(this, a)
                    }
                    h = c.getElementById(g[2]);
                    if (h && h.parentNode) {
                        if (h.id !== g[2])return f.find(a);
                        this.length = 1, this[0] = h
                    }
                    this.context = c, this.selector = a;
                    return this
                }
                return!d || d.jquery ? (d || f).find(a) : this.constructor(d).find(a)
            }
            if (e.isFunction(a))return f.ready(a);
            a.selector !== b && (this.selector = a.selector, this.context = a.context);
            return e.makeArray(a, this)
        }, selector:"", jquery:"1.6.1", length:0, size:function () {
            return this.length
        }, toArray:function () {
            return D.call(this, 0)
        }, get:function (a) {
            return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a]
        }, pushStack:function (a, b, c) {
            var d = this.constructor();
            e.isArray(a) ? C.apply(d, a) : e.merge(d, a), d.prevObject = this, d.context = this.context, b === "find" ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")");
            return d
        }, each:function (a, b) {
            return e.each(this, a, b)
        }, ready:function (a) {
            e.bindReady(), y.done(a);
            return this
        }, eq:function (a) {
            return a === -1 ? this.slice(a) : this.slice(a, +a + 1)
        }, first:function () {
            return this.eq(0)
        }, last:function () {
            return this.eq(-1)
        }, slice:function () {
            return this.pushStack(D.apply(this, arguments), "slice", D.call(arguments).join(","))
        }, map:function (a) {
            return this.pushStack(e.map(this, function (b, c) {
                return a.call(b, c, b)
            }))
        }, end:function () {
            return this.prevObject || this.constructor(null)
        }, push:C, sort:[].sort, splice:[].splice}, e.fn.init.prototype = e.fn, e.extend = e.fn.extend = function () {
            var a, c, d, f, g, h, i = arguments[0] || {}, j = 1, k = arguments.length, l = !1;
            typeof i == "boolean" && (l = i, i = arguments[1] || {}, j = 2), typeof i != "object" && !e.isFunction(i) && (i = {}), k === j && (i = this, --j);
            for (; j < k; j++)if ((a = arguments[j]) != null)for (c in a) {
                d = i[c], f = a[c];
                if (i === f)continue;
                l && f && (e.isPlainObject(f) || (g = e.isArray(f))) ? (g ? (g = !1, h = d && e.isArray(d) ? d : []) : h = d && e.isPlainObject(d) ? d : {}, i[c] = e.extend(l, h, f)) : f !== b && (i[c] = f)
            }
            return i
        }, e.extend({noConflict:function (b) {
            a.$ === e && (a.$ = g), b && a.jQuery === e && (a.jQuery = f);
            return e
        }, isReady:!1, readyWait:1, holdReady:function (a) {
            a ? e.readyWait++ : e.ready(!0)
        }, ready:function (a) {
            if (a === !0 && !--e.readyWait || a !== !0 && !e.isReady) {
                if (!c.body)return setTimeout(e.ready, 1);
                e.isReady = !0;
                if (a !== !0 && --e.readyWait > 0)return;
                y.resolveWith(c, [e]), e.fn.trigger && e(c).trigger("ready").unbind("ready")
            }
        }, bindReady:function () {
            if (!y) {
                y = e._Deferred();
                if (c.readyState === "complete")return setTimeout(e.ready, 1);
                if (c.addEventListener)c.addEventListener("DOMContentLoaded", z, !1), a.addEventListener("load", e.ready, !1); else if (c.attachEvent) {
                    c.attachEvent("onreadystatechange", z), a.attachEvent("onload", e.ready);
                    var b = !1;
                    try {
                        b = a.frameElement == null
                    } catch (d) {
                    }
                    c.documentElement.doScroll && b && H()
                }
            }
        }, isFunction:function (a) {
            return e.type(a) === "function"
        }, isArray:Array.isArray || function (a) {
            return e.type(a) === "array"
        }, isWindow:function (a) {
            return a && typeof a == "object" && "setInterval"in a
        }, isNaN:function (a) {
            return a == null || !m.test(a) || isNaN(a)
        }, type:function (a) {
            return a == null ? String(a) : G[A.call(a)] || "object"
        }, isPlainObject:function (a) {
            if (!a || e.type(a) !== "object" || a.nodeType || e.isWindow(a))return!1;
            if (a.constructor && !B.call(a, "constructor") && !B.call(a.constructor.prototype, "isPrototypeOf"))return!1;
            var c;
            for (c in a);
            return c === b || B.call(a, c)
        }, isEmptyObject:function (a) {
            for (var b in a)return!1;
            return!0
        }, error:function (a) {
            throw a
        }, parseJSON:function (b) {
            if (typeof b != "string" || !b)return null;
            b = e.trim(b);
            if (a.JSON && a.JSON.parse)return a.JSON.parse(b);
            if (o.test(b.replace(p, "@").replace(q, "]").replace(r, "")))return(new Function("return " + b))();
            e.error("Invalid JSON: " + b)
        }, parseXML:function (b, c, d) {
            a.DOMParser ? (d = new DOMParser, c = d.parseFromString(b, "text/xml")) : (c = new ActiveXObject("Microsoft.XMLDOM"), c.async = "false", c.loadXML(b)), d = c.documentElement, (!d || !d.nodeName || d.nodeName === "parsererror") && e.error("Invalid XML: " + b);
            return c
        }, noop:function () {
        }, globalEval:function (b) {
            b && j.test(b) && (a.execScript || function (b) {
                a.eval.call(a, b)
            })(b)
        }, nodeName:function (a, b) {
            return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
        }, each:function (a, c, d) {
            var f, g = 0, h = a.length, i = h === b || e.isFunction(a);
            if (d) {
                if (i) {
                    for (f in a)if (c.apply(a[f], d) === !1)break
                } else for (; g < h;)if (c.apply(a[g++], d) === !1)break
            } else if (i) {
                for (f in a)if (c.call(a[f], f, a[f]) === !1)break
            } else for (; g < h;)if (c.call(a[g], g, a[g++]) === !1)break;
            return a
        }, trim:E ? function (a) {
            return a == null ? "" : E.call(a)
        } : function (a) {
            return a == null ? "" : (a + "").replace(k, "").replace(l, "")
        }, makeArray:function (a, b) {
            var c = b || [];
            if (a != null) {
                var d = e.type(a);
                a.length == null || d === "string" || d === "function" || d === "regexp" || e.isWindow(a) ? C.call(c, a) : e.merge(c, a)
            }
            return c
        }, inArray:function (a, b) {
            if (F)return F.call(b, a);
            for (var c = 0, d = b.length; c < d; c++)if (b[c] === a)return c;
            return-1
        }, merge:function (a, c) {
            var d = a.length, e = 0;
            if (typeof c.length == "number")for (var f = c.length; e < f; e++)a[d++] = c[e]; else while (c[e] !== b)a[d++] = c[e++];
            a.length = d;
            return a
        }, grep:function (a, b, c) {
            var d = [], e;
            c = !!c;
            for (var f = 0, g = a.length; f < g; f++)e = !!b(a[f], f), c !== e && d.push(a[f]);
            return d
        }, map:function (a, c, d) {
            var f, g, h = [], i = 0, j = a.length, k = a instanceof e || j !== b && typeof j == "number" && (j > 0 && a[0] && a[j - 1] || j === 0 || e.isArray(a));
            if (k)for (; i < j; i++)f = c(a[i], i, d), f != null && (h[h.length] = f); else for (g in a)f = c(a[g], g, d), f != null && (h[h.length] = f);
            return h.concat.apply([], h)
        }, guid:1, proxy:function (a, c) {
            if (typeof c == "string") {
                var d = a[c];
                c = a, a = d
            }
            if (!e.isFunction(a))return b;
            var f = D.call(arguments, 2), g = function () {
                return a.apply(c, f.concat(D.call(arguments)))
            };
            g.guid = a.guid = a.guid || g.guid || e.guid++;
            return g
        }, access:function (a, c, d, f, g, h) {
            var i = a.length;
            if (typeof c == "object") {
                for (var j in c)e.access(a, j, c[j], f, g, d);
                return a
            }
            if (d !== b) {
                f = !h && f && e.isFunction(d);
                for (var k = 0; k < i; k++)g(a[k], c, f ? d.call(a[k], k, g(a[k], c)) : d, h);
                return a
            }
            return i ? g(a[0], c) : b
        }, now:function () {
            return(new Date).getTime()
        }, uaMatch:function (a) {
            a = a.toLowerCase();
            var b = s.exec(a) || t.exec(a) || u.exec(a) || a.indexOf("compatible") < 0 && v.exec(a) || [];
            return{browser:b[1] || "", version:b[2] || "0"}
        }, sub:function () {
            function a(b, c) {
                return new a.fn.init(b, c)
            }

            e.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function (d, f) {
                f && f instanceof e && !(f instanceof a) && (f = a(f));
                return e.fn.init.call(this, d, f, b)
            }, a.fn.init.prototype = a.fn;
            var b = a(c);
            return a
        }, browser:{}}), e.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (a, b) {
            G["[object " + b + "]"] = b.toLowerCase()
        }), x = e.uaMatch(w), x.browser && (e.browser[x.browser] = !0, e.browser.version = x.version), e.browser.webkit && (e.browser.safari = !0), j.test(" ") && (k = /^[\s\xA0]+/, l = /[\s\xA0]+$/), h = e(c), c.addEventListener ? z = function () {
            c.removeEventListener("DOMContentLoaded", z, !1), e.ready()
        } : c.attachEvent && (z = function () {
            c.readyState === "complete" && (c.detachEvent("onreadystatechange", z), e.ready())
        });
        return e
    }(), g = "done fail isResolved isRejected promise then always pipe".split(" "), h = [].slice;
    f.extend({_Deferred:function () {
        var a = [], b, c, d, e = {done:function () {
            if (!d) {
                var c = arguments, g, h, i, j, k;
                b && (k = b, b = 0);
                for (g = 0, h = c.length; g < h; g++)i = c[g], j = f.type(i), j === "array" ? e.done.apply(e, i) : j === "function" && a.push(i);
                k && e.resolveWith(k[0], k[1])
            }
            return this
        }, resolveWith:function (e, f) {
            if (!d && !b && !c) {
                f = f || [], c = 1;
                try {
                    while (a[0])a.shift().apply(e, f)
                } finally {
                    b = [e, f], c = 0
                }
            }
            return this
        }, resolve:function () {
            e.resolveWith(this, arguments);
            return this
        }, isResolved:function () {
            return!!c || !!b
        }, cancel:function () {
            d = 1, a = [];
            return this
        }};
        return e
    }, Deferred:function (a) {
        var b = f._Deferred(), c = f._Deferred(), d;
        f.extend(b, {then:function (a, c) {
            b.done(a).fail(c);
            return this
        }, always:function () {
            return b.done.apply(b, arguments).fail.apply(this, arguments)
        }, fail:c.done, rejectWith:c.resolveWith, reject:c.resolve, isRejected:c.isResolved, pipe:function (a, c) {
            return f.Deferred(
                function (d) {
                    f.each({done:[a, "resolve"], fail:[c, "reject"]}, function (a, c) {
                        var e = c[0], g = c[1], h;
                        f.isFunction(e) ? b[a](function () {
                            h = e.apply(this, arguments), h && f.isFunction(h.promise) ? h.promise().then(d.resolve, d.reject) : d[g](h)
                        }) : b[a](d[g])
                    })
                }).promise()
        }, promise:function (a) {
            if (a == null) {
                if (d)return d;
                d = a = {}
            }
            var c = g.length;
            while (c--)a[g[c]] = b[g[c]];
            return a
        }}), b.done(c.cancel).fail(b.cancel), delete b.cancel, a && a.call(b, b);
        return b
    }, when:function (a) {
        function i(a) {
            return function (c) {
                b[a] = arguments.length > 1 ? h.call(arguments, 0) : c, --e || g.resolveWith(g, h.call(b, 0))
            }
        }

        var b = arguments, c = 0, d = b.length, e = d, g = d <= 1 && a && f.isFunction(a.promise) ? a : f.Deferred();
        if (d > 1) {
            for (; c < d; c++)b[c] && f.isFunction(b[c].promise) ? b[c].promise().then(i(c), g.reject) : --e;
            e || g.resolveWith(g, b)
        } else g !== a && g.resolveWith(g, d ? [a] : []);
        return g.promise()
    }}), f.support = function () {
        var a = c.createElement("div"), b = c.documentElement, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
        a.setAttribute("className", "t"), a.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>", d = a.getElementsByTagName("*"), e = a.getElementsByTagName("a")[0];
        if (!d || !d.length || !e)return{};
        f = c.createElement("select"), g = f.appendChild(c.createElement("option")), h = a.getElementsByTagName("input")[0], j = {leadingWhitespace:a.firstChild.nodeType === 3, tbody:!a.getElementsByTagName("tbody").length, htmlSerialize:!!a.getElementsByTagName("link").length, style:/top/.test(e.getAttribute("style")), hrefNormalized:e.getAttribute("href") === "/a", opacity:/^0.55$/.test(e.style.opacity), cssFloat:!!e.style.cssFloat, checkOn:h.value === "on", optSelected:g.selected, getSetAttribute:a.className !== "t", submitBubbles:!0, changeBubbles:!0, focusinBubbles:!1, deleteExpando:!0, noCloneEvent:!0, inlineBlockNeedsLayout:!1, shrinkWrapBlocks:!1, reliableMarginRight:!0}, h.checked = !0, j.noCloneChecked = h.cloneNode(!0).checked, f.disabled = !0, j.optDisabled = !g.disabled;
        try {
            delete a.test
        } catch (s) {
            j.deleteExpando = !1
        }
        !a.addEventListener && a.attachEvent && a.fireEvent && (a.attachEvent("onclick", function b() {
            j.noCloneEvent = !1, a.detachEvent("onclick", b)
        }), a.cloneNode(!0).fireEvent("onclick")), h = c.createElement("input"), h.value = "t", h.setAttribute("type", "radio"), j.radioValue = h.value === "t", h.setAttribute("checked", "checked"), a.appendChild(h), k = c.createDocumentFragment(), k.appendChild(a.firstChild), j.checkClone = k.cloneNode(!0).cloneNode(!0).lastChild.checked, a.innerHTML = "", a.style.width = a.style.paddingLeft = "1px", l = c.createElement("body"), m = {visibility:"hidden", width:0, height:0, border:0, margin:0, background:"none"};
        for (q in m)l.style[q] = m[q];
        l.appendChild(a), b.insertBefore(l, b.firstChild), j.appendChecked = h.checked, j.boxModel = a.offsetWidth === 2, "zoom"in a.style && (a.style.display = "inline", a.style.zoom = 1, j.inlineBlockNeedsLayout = a.offsetWidth === 2, a.style.display = "", a.innerHTML = "<div style='width:4px;'></div>", j.shrinkWrapBlocks = a.offsetWidth !== 2), a.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>", n = a.getElementsByTagName("td"), r = n[0].offsetHeight === 0, n[0].style.display = "", n[1].style.display = "none", j.reliableHiddenOffsets = r && n[0].offsetHeight === 0, a.innerHTML = "", c.defaultView && c.defaultView.getComputedStyle && (i = c.createElement("div"), i.style.width = "0", i.style.marginRight = "0", a.appendChild(i), j.reliableMarginRight = (parseInt((c.defaultView.getComputedStyle(i, null) || {marginRight:0}).marginRight, 10) || 0) === 0), l.innerHTML = "", b.removeChild(l);
        if (a.attachEvent)for (q in{submit:1, change:1, focusin:1})p = "on" + q, r = p in a, r || (a.setAttribute(p, "return;"), r = typeof a[p] == "function"), j[q + "Bubbles"] = r;
        return j
    }(), f.boxModel = f.support.boxModel;
    var i = /^(?:\{.*\}|\[.*\])$/, j = /([a-z])([A-Z])/g;
    f.extend({cache:{}, uuid:0, expando:"jQuery" + (f.fn.jquery + Math.random()).replace(/\D/g, ""), noData:{embed:!0, object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet:!0}, hasData:function (a) {
        a = a.nodeType ? f.cache[a[f.expando]] : a[f.expando];
        return!!a && !l(a)
    }, data:function (a, c, d, e) {
        if (!!f.acceptData(a)) {
            var g = f.expando, h = typeof c == "string", i, j = a.nodeType, k = j ? f.cache : a, l = j ? a[f.expando] : a[f.expando] && f.expando;
            if ((!l || e && l && !k[l][g]) && h && d === b)return;
            l || (j ? a[f.expando] = l = ++f.uuid : l = f.expando), k[l] || (k[l] = {}, j || (k[l].toJSON = f.noop));
            if (typeof c == "object" || typeof c == "function")e ? k[l][g] = f.extend(k[l][g], c) : k[l] = f.extend(k[l], c);
            i = k[l], e && (i[g] || (i[g] = {}), i = i[g]), d !== b && (i[f.camelCase(c)] = d);
            if (c === "events" && !i[c])return i[g] && i[g].events;
            return h ? i[f.camelCase(c)] : i
        }
    }, removeData:function (b, c, d) {
        if (!!f.acceptData(b)) {
            var e = f.expando, g = b.nodeType, h = g ? f.cache : b, i = g ? b[f.expando] : f.expando;
            if (!h[i])return;
            if (c) {
                var j = d ? h[i][e] : h[i];
                if (j) {
                    delete j[c];
                    if (!l(j))return
                }
            }
            if (d) {
                delete h[i][e];
                if (!l(h[i]))return
            }
            var k = h[i][e];
            f.support.deleteExpando || h != a ? delete h[i] : h[i] = null, k ? (h[i] = {}, g || (h[i].toJSON = f.noop), h[i][e] = k) : g && (f.support.deleteExpando ? delete b[f.expando] : b.removeAttribute ? b.removeAttribute(f.expando) : b[f.expando] = null)
        }
    }, _data:function (a, b, c) {
        return f.data(a, b, c, !0)
    }, acceptData:function (a) {
        if (a.nodeName) {
            var b = f.noData[a.nodeName.toLowerCase()];
            if (b)return b !== !0 && a.getAttribute("classid") === b
        }
        return!0
    }}), f.fn.extend({data:function (a, c) {
        var d = null;
        if (typeof a == "undefined") {
            if (this.length) {
                d = f.data(this[0]);
                if (this[0].nodeType === 1) {
                    var e = this[0].attributes, g;
                    for (var h = 0, i = e.length; h < i; h++)g = e[h].name, g.indexOf("data-") === 0 && (g = f.camelCase(g.substring(5)), k(this[0], g, d[g]))
                }
            }
            return d
        }
        if (typeof a == "object")return this.each(function () {
            f.data(this, a)
        });
        var j = a.split(".");
        j[1] = j[1] ? "." + j[1] : "";
        if (c === b) {
            d = this.triggerHandler("getData" + j[1] + "!", [j[0]]), d === b && this.length && (d = f.data(this[0], a), d = k(this[0], a, d));
            return d === b && j[1] ? this.data(j[0]) : d
        }
        return this.each(function () {
            var b = f(this), d = [j[0], c];
            b.triggerHandler("setData" + j[1] + "!", d), f.data(this, a, c), b.triggerHandler("changeData" + j[1] + "!", d)
        })
    }, removeData:function (a) {
        return this.each(function () {
            f.removeData(this, a)
        })
    }}), f.extend({_mark:function (a, c) {
        a && (c = (c || "fx") + "mark", f.data(a, c, (f.data(a, c, b, !0) || 0) + 1, !0))
    }, _unmark:function (a, c, d) {
        a !== !0 && (d = c, c = a, a = !1);
        if (c) {
            d = d || "fx";
            var e = d + "mark", g = a ? 0 : (f.data(c, e, b, !0) || 1) - 1;
            g ? f.data(c, e, g, !0) : (f.removeData(c, e, !0), m(c, d, "mark"))
        }
    }, queue:function (a, c, d) {
        if (a) {
            c = (c || "fx") + "queue";
            var e = f.data(a, c, b, !0);
            d && (!e || f.isArray(d) ? e = f.data(a, c, f.makeArray(d), !0) : e.push(d));
            return e || []
        }
    }, dequeue:function (a, b) {
        b = b || "fx";
        var c = f.queue(a, b), d = c.shift(), e;
        d === "inprogress" && (d = c.shift()), d && (b === "fx" && c.unshift("inprogress"), d.call(a, function () {
            f.dequeue(a, b)
        })), c.length || (f.removeData(a, b + "queue", !0), m(a, b, "queue"))
    }}), f.fn.extend({queue:function (a, c) {
        typeof a != "string" && (c = a, a = "fx");
        if (c === b)return f.queue(this[0], a);
        return this.each(function () {
            var b = f.queue(this, a, c);
            a === "fx" && b[0] !== "inprogress" && f.dequeue(this, a)
        })
    }, dequeue:function (a) {
        return this.each(function () {
            f.dequeue(this, a)
        })
    }, delay:function (a, b) {
        a = f.fx ? f.fx.speeds[a] || a : a, b = b || "fx";
        return this.queue(b, function () {
            var c = this;
            setTimeout(function () {
                f.dequeue(c, b)
            }, a)
        })
    }, clearQueue:function (a) {
        return this.queue(a || "fx", [])
    }, promise:function (a, c) {
        function m() {
            --h || d.resolveWith(e, [e])
        }

        typeof a != "string" && (c = a, a = b), a = a || "fx";
        var d = f.Deferred(), e = this, g = e.length, h = 1, i = a + "defer", j = a + "queue", k = a + "mark", l;
        while (g--)if (l = f.data(e[g], i, b, !0) || (f.data(e[g], j, b, !0) || f.data(e[g], k, b, !0)) && f.data(e[g], i, f._Deferred(), !0))h++, l.done(m);
        m();
        return d.promise()
    }});
    var n = /[\n\t\r]/g, o = /\s+/, p = /\r/g, q = /^(?:button|input)$/i, r = /^(?:button|input|object|select|textarea)$/i, s = /^a(?:rea)?$/i, t = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, u = /\:/, v, w;
    f.fn.extend({attr:function (a, b) {
        return f.access(this, a, b, !0, f.attr)
    }, removeAttr:function (a) {
        return this.each(function () {
            f.removeAttr(this, a)
        })
    }, prop:function (a, b) {
        return f.access(this, a, b, !0, f.prop)
    }, removeProp:function (a) {
        a = f.propFix[a] || a;
        return this.each(function () {
            try {
                this[a] = b, delete this[a]
            } catch (c) {
            }
        })
    }, addClass:function (a) {
        if (f.isFunction(a))return this.each(function (b) {
            var c = f(this);
            c.addClass(a.call(this, b, c.attr("class") || ""))
        });
        if (a && typeof a == "string") {
            var b = (a || "").split(o);
            for (var c = 0, d = this.length; c < d; c++) {
                var e = this[c];
                if (e.nodeType === 1)if (!e.className)e.className = a; else {
                    var g = " " + e.className + " ", h = e.className;
                    for (var i = 0, j = b.length; i < j; i++)g.indexOf(" " + b[i] + " ") < 0 && (h += " " + b[i]);
                    e.className = f.trim(h)
                }
            }
        }
        return this
    }, removeClass:function (a) {
        if (f.isFunction(a))return this.each(function (b) {
            var c = f(this);
            c.removeClass(a.call(this, b, c.attr("class")))
        });
        if (a && typeof a == "string" || a === b) {
            var c = (a || "").split(o);
            for (var d = 0, e = this.length; d < e; d++) {
                var g = this[d];
                if (g.nodeType === 1 && g.className)if (a) {
                    var h = (" " + g.className + " ").replace(n, " ");
                    for (var i = 0, j = c.length; i < j; i++)h = h.replace(" " + c[i] + " ", " ");
                    g.className = f.trim(h)
                } else g.className = ""
            }
        }
        return this
    }, toggleClass:function (a, b) {
        var c = typeof a, d = typeof b == "boolean";
        if (f.isFunction(a))return this.each(function (c) {
            var d = f(this);
            d.toggleClass(a.call(this, c, d.attr("class"), b), b)
        });
        return this.each(function () {
            if (c === "string") {
                var e, g = 0, h = f(this), i = b, j = a.split(o);
                while (e = j[g++])i = d ? i : !h.hasClass(e), h[i ? "addClass" : "removeClass"](e)
            } else if (c === "undefined" || c === "boolean")this.className && f._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : f._data(this, "__className__") || ""
        })
    }, hasClass:function (a) {
        var b = " " + a + " ";
        for (var c = 0, d = this.length; c < d; c++)if ((" " + this[c].className + " ").replace(n, " ").indexOf(b) > -1)return!0;
        return!1
    }, val:function (a) {
        var c, d, e = this[0];
        if (!arguments.length) {
            if (e) {
                c = f.valHooks[e.nodeName.toLowerCase()] || f.valHooks[e.type];
                if (c && "get"in c && (d = c.get(e, "value")) !== b)return d;
                return(e.value || "").replace(p, "")
            }
            return b
        }
        var g = f.isFunction(a);
        return this.each(function (d) {
            var e = f(this), h;
            if (this.nodeType === 1) {
                g ? h = a.call(this, d, e.val()) : h = a, h == null ? h = "" : typeof h == "number" ? h += "" : f.isArray(h) && (h = f.map(h, function (a) {
                    return a == null ? "" : a + ""
                })), c = f.valHooks[this.nodeName.toLowerCase()] || f.valHooks[this.type];
                if (!c || !("set"in c) || c.set(this, h, "value") === b)this.value = h
            }
        })
    }}), f.extend({valHooks:{option:{get:function (a) {
        var b = a.attributes.value;
        return!b || b.specified ? a.value : a.text
    }}, select:{get:function (a) {
        var b, c = a.selectedIndex, d = [], e = a.options, g = a.type === "select-one";
        if (c < 0)return null;
        for (var h = g ? c : 0, i = g ? c + 1 : e.length; h < i; h++) {
            var j = e[h];
            if (j.selected && (f.support.optDisabled ? !j.disabled : j.getAttribute("disabled") === null) && (!j.parentNode.disabled || !f.nodeName(j.parentNode, "optgroup"))) {
                b = f(j).val();
                if (g)return b;
                d.push(b)
            }
        }
        if (g && !d.length && e.length)return f(e[c]).val();
        return d
    }, set:function (a, b) {
        var c = f.makeArray(b);
        f(a).find("option").each(function () {
            this.selected = f.inArray(f(this).val(), c) >= 0
        }), c.length || (a.selectedIndex = -1);
        return c
    }}}, attrFn:{val:!0, css:!0, html:!0, text:!0, data:!0, width:!0, height:!0, offset:!0}, attrFix:{tabindex:"tabIndex"}, attr:function (a, c, d, e) {
        var g = a.nodeType;
        if (!a || g === 3 || g === 8 || g === 2)return b;
        if (e && c in f.attrFn)return f(a)[c](d);
        if (!("getAttribute"in a))return f.prop(a, c, d);
        var h, i, j = g !== 1 || !f.isXMLDoc(a);
        c = j && f.attrFix[c] || c, i = f.attrHooks[c], i || (!t.test(c) || typeof d != "boolean" && d !== b && d.toLowerCase() !== c.toLowerCase() ? v && (f.nodeName(a, "form") || u.test(c)) && (i = v) : i = w);
        if (d !== b) {
            if (d === null) {
                f.removeAttr(a, c);
                return b
            }
            if (i && "set"in i && j && (h = i.set(a, d, c)) !== b)return h;
            a.setAttribute(c, "" + d);
            return d
        }
        if (i && "get"in i && j)return i.get(a, c);
        h = a.getAttribute(c);
        return h === null ? b : h
    }, removeAttr:function (a, b) {
        var c;
        a.nodeType === 1 && (b = f.attrFix[b] || b, f.support.getSetAttribute ? a.removeAttribute(b) : (f.attr(a, b, ""), a.removeAttributeNode(a.getAttributeNode(b))), t.test(b) && (c = f.propFix[b] || b)in a && (a[c] = !1))
    }, attrHooks:{type:{set:function (a, b) {
        if (q.test(a.nodeName) && a.parentNode)f.error("type property can't be changed"); else if (!f.support.radioValue && b === "radio" && f.nodeName(a, "input")) {
            var c = a.value;
            a.setAttribute("type", b), c && (a.value = c);
            return b
        }
    }}, tabIndex:{get:function (a) {
        var c = a.getAttributeNode("tabIndex");
        return c && c.specified ? parseInt(c.value, 10) : r.test(a.nodeName) || s.test(a.nodeName) && a.href ? 0 : b
    }}}, propFix:{tabindex:"tabIndex", readonly:"readOnly", "for":"htmlFor", "class":"className", maxlength:"maxLength", cellspacing:"cellSpacing", cellpadding:"cellPadding", rowspan:"rowSpan", colspan:"colSpan", usemap:"useMap", frameborder:"frameBorder", contenteditable:"contentEditable"}, prop:function (a, c, d) {
        var e = a.nodeType;
        if (!a || e === 3 || e === 8 || e === 2)return b;
        var g, h, i = e !== 1 || !f.isXMLDoc(a);
        c = i && f.propFix[c] || c, h = f.propHooks[c];
        return d !== b ? h && "set"in h && (g = h.set(a, d, c)) !== b ? g : a[c] = d : h && "get"in h && (g = h.get(a, c)) !== b ? g : a[c]
    }, propHooks:{}}), w = {get:function (a, c) {
        return a[f.propFix[c] || c] ? c.toLowerCase() : b
    }, set:function (a, b, c) {
        var d;
        b === !1 ? f.removeAttr(a, c) : (d = f.propFix[c] || c, d in a && (a[d] = b), a.setAttribute(c, c.toLowerCase()));
        return c
    }}, f.attrHooks.value = {get:function (a, b) {
        if (v && f.nodeName(a, "button"))return v.get(a, b);
        return a.value
    }, set:function (a, b, c) {
        if (v && f.nodeName(a, "button"))return v.set(a, b, c);
        a.value = b
    }}, f.support.getSetAttribute || (f.attrFix = f.propFix, v = f.attrHooks.name = f.valHooks.button = {get:function (a, c) {
        var d;
        d = a.getAttributeNode(c);
        return d && d.nodeValue !== "" ? d.nodeValue : b
    }, set:function (a, b, c) {
        var d = a.getAttributeNode(c);
        if (d) {
            d.nodeValue = b;
            return b
        }
    }}, f.each(["width", "height"], function (a, b) {
        f.attrHooks[b] = f.extend(f.attrHooks[b], {set:function (a, c) {
            if (c === "") {
                a.setAttribute(b, "auto");
                return c
            }
        }})
    })), f.support.hrefNormalized || f.each(["href", "src", "width", "height"], function (a, c) {
        f.attrHooks[c] = f.extend(f.attrHooks[c], {get:function (a) {
            var d = a.getAttribute(c, 2);
            return d === null ? b : d
        }})
    }), f.support.style || (f.attrHooks.style = {get:function (a) {
        return a.style.cssText.toLowerCase() || b
    }, set:function (a, b) {
        return a.style.cssText = "" + b
    }}), f.support.optSelected || (f.propHooks.selected = f.extend(f.propHooks.selected, {get:function (a) {
        var b = a.parentNode;
        b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex)
    }})), f.support.checkOn || f.each(["radio", "checkbox"], function () {
        f.valHooks[this] = {get:function (a) {
            return a.getAttribute("value") === null ? "on" : a.value
        }}
    }), f.each(["radio", "checkbox"], function () {
        f.valHooks[this] = f.extend(f.valHooks[this], {set:function (a, b) {
            if (f.isArray(b))return a.checked = f.inArray(f(a).val(), b) >= 0
        }})
    });
    var x = Object.prototype.hasOwnProperty, y = /\.(.*)$/, z = /^(?:textarea|input|select)$/i, A = /\./g, B = / /g, C = /[^\w\s.|`]/g, D = function (a) {
        return a.replace(C, "\\$&")
    };
    f.event = {add:function (a, c, d, e) {
        if (a.nodeType !== 3 && a.nodeType !== 8) {
            if (d === !1)d = E; else if (!d)return;
            var g, h;
            d.handler && (g = d, d = g.handler), d.guid || (d.guid = f.guid++);
            var i = f._data(a);
            if (!i)return;
            var j = i.events, k = i.handle;
            j || (i.events = j = {}), k || (i.handle = k = function (a) {
                return typeof f != "undefined" && (!a || f.event.triggered !== a.type) ? f.event.handle.apply(k.elem, arguments) : b
            }), k.elem = a, c = c.split(" ");
            var l, m = 0, n;
            while (l = c[m++]) {
                h = g ? f.extend({}, g) : {handler:d, data:e}, l.indexOf(".") > -1 ? (n = l.split("."), l = n.shift(), h.namespace = n.slice(0).sort().join(".")) : (n = [], h.namespace = ""), h.type = l, h.guid || (h.guid = d.guid);
                var o = j[l], p = f.event.special[l] || {};
                if (!o) {
                    o = j[l] = [];
                    if (!p.setup || p.setup.call(a, e, n, k) === !1)a.addEventListener ? a.addEventListener(l, k, !1) : a.attachEvent && a.attachEvent("on" + l, k)
                }
                p.add && (p.add.call(a, h), h.handler.guid || (h.handler.guid = d.guid)), o.push(h), f.event.global[l] = !0
            }
            a = null
        }
    }, global:{}, remove:function (a, c, d, e) {
        if (a.nodeType !== 3 && a.nodeType !== 8) {
            d === !1 && (d = E);
            var g, h, i, j, k = 0, l, m, n, o, p, q, r, s = f.hasData(a) && f._data(a), t = s && s.events;
            if (!s || !t)return;
            c && c.type && (d = c.handler, c = c.type);
            if (!c || typeof c == "string" && c.charAt(0) === ".") {
                c = c || "";
                for (h in t)f.event.remove(a, h + c);
                return
            }
            c = c.split(" ");
            while (h = c[k++]) {
                r = h, q = null, l = h.indexOf(".") < 0, m = [], l || (m = h.split("."), h = m.shift(), n = new RegExp("(^|\\.)" + f.map(m.slice(0).sort(), D).join("\\.(?:.*\\.)?") + "(\\.|$)")), p = t[h];
                if (!p)continue;
                if (!d) {
                    for (j = 0; j < p.length; j++) {
                        q = p[j];
                        if (l || n.test(q.namespace))f.event.remove(a, r, q.handler, j), p.splice(j--, 1)
                    }
                    continue
                }
                o = f.event.special[h] || {};
                for (j = e || 0; j < p.length; j++) {
                    q = p[j];
                    if (d.guid === q.guid) {
                        if (l || n.test(q.namespace))e == null && p.splice(j--, 1), o.remove && o.remove.call(a, q);
                        if (e != null)break
                    }
                }
                if (p.length === 0 || e != null && p.length === 1)(!o.teardown || o.teardown.call(a, m) === !1) && f.removeEvent(a, h, s.handle), g = null, delete t[h]
            }
            if (f.isEmptyObject(t)) {
                var u = s.handle;
                u && (u.elem = null), delete s.events, delete s.handle, f.isEmptyObject(s) && f.removeData(a, b, !0)
            }
        }
    }, customEvent:{getData:!0, setData:!0, changeData:!0}, trigger:function (c, d, e, g) {
        var h = c.type || c, i = [], j;
        h.indexOf("!") >= 0 && (h = h.slice(0, -1), j = !0), h.indexOf(".") >= 0 && (i = h.split("."), h = i.shift(), i.sort());
        if (!!e && !f.event.customEvent[h] || !!f.event.global[h]) {
            c = typeof c == "object" ? c[f.expando] ? c : new f.Event(h, c) : new f.Event(h), c.type = h, c.exclusive = j, c.namespace = i.join("."), c.namespace_re = new RegExp("(^|\\.)" + i.join("\\.(?:.*\\.)?") + "(\\.|$)");
            if (g || !e)c.preventDefault(), c.stopPropagation();
            if (!e) {
                f.each(f.cache, function () {
                    var a = f.expando, b = this[a];
                    b && b.events && b.events[h] && f.event.trigger(c, d, b.handle.elem
                    )
                });
                return
            }
            if (e.nodeType === 3 || e.nodeType === 8)return;
            c.result = b, c.target = e, d = d ? f.makeArray(d) : [], d.unshift(c);
            var k = e, l = h.indexOf(":") < 0 ? "on" + h : "";
            do {
                var m = f._data(k, "handle");
                c.currentTarget = k, m && m.apply(k, d), l && f.acceptData(k) && k[l] && k[l].apply(k, d) === !1 && (c.result = !1, c.preventDefault()), k = k.parentNode || k.ownerDocument || k === c.target.ownerDocument && a
            } while (k && !c.isPropagationStopped());
            if (!c.isDefaultPrevented()) {
                var n, o = f.event.special[h] || {};
                if ((!o._default || o._default.call(e.ownerDocument, c) === !1) && (h !== "click" || !f.nodeName(e, "a")) && f.acceptData(e)) {
                    try {
                        l && e[h] && (n = e[l], n && (e[l] = null), f.event.triggered = h, e[h]())
                    } catch (p) {
                    }
                    n && (e[l] = n), f.event.triggered = b
                }
            }
            return c.result
        }
    }, handle:function (c) {
        c = f.event.fix(c || a.event);
        var d = ((f._data(this, "events") || {})[c.type] || []).slice(0), e = !c.exclusive && !c.namespace, g = Array.prototype.slice.call(arguments, 0);
        g[0] = c, c.currentTarget = this;
        for (var h = 0, i = d.length; h < i; h++) {
            var j = d[h];
            if (e || c.namespace_re.test(j.namespace)) {
                c.handler = j.handler, c.data = j.data, c.handleObj = j;
                var k = j.handler.apply(this, g);
                k !== b && (c.result = k, k === !1 && (c.preventDefault(), c.stopPropagation()));
                if (c.isImmediatePropagationStopped())break
            }
        }
        return c.result
    }, props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix:function (a) {
        if (a[f.expando])return a;
        var d = a;
        a = f.Event(d);
        for (var e = this.props.length, g; e;)g = this.props[--e], a[g] = d[g];
        a.target || (a.target = a.srcElement || c), a.target.nodeType === 3 && (a.target = a.target.parentNode), !a.relatedTarget && a.fromElement && (a.relatedTarget = a.fromElement === a.target ? a.toElement : a.fromElement);
        if (a.pageX == null && a.clientX != null) {
            var h = a.target.ownerDocument || c, i = h.documentElement, j = h.body;
            a.pageX = a.clientX + (i && i.scrollLeft || j && j.scrollLeft || 0) - (i && i.clientLeft || j && j.clientLeft || 0), a.pageY = a.clientY + (i && i.scrollTop || j && j.scrollTop || 0) - (i && i.clientTop || j && j.clientTop || 0)
        }
        a.which == null && (a.charCode != null || a.keyCode != null) && (a.which = a.charCode != null ? a.charCode : a.keyCode), !a.metaKey && a.ctrlKey && (a.metaKey = a.ctrlKey), !a.which && a.button !== b && (a.which = a.button & 1 ? 1 : a.button & 2 ? 3 : a.button & 4 ? 2 : 0);
        return a
    }, guid:1e8, proxy:f.proxy, special:{ready:{setup:f.bindReady, teardown:f.noop}, live:{add:function (a) {
        f.event.add(this, O(a.origType, a.selector), f.extend({}, a, {handler:N, guid:a.handler.guid}))
    }, remove:function (a) {
        f.event.remove(this, O(a.origType, a.selector), a)
    }}, beforeunload:{setup:function (a, b, c) {
        f.isWindow(this) && (this.onbeforeunload = c)
    }, teardown:function (a, b) {
        this.onbeforeunload === b && (this.onbeforeunload = null)
    }}}}, f.removeEvent = c.removeEventListener ? function (a, b, c) {
        a.removeEventListener && a.removeEventListener(b, c, !1)
    } : function (a, b, c) {
        a.detachEvent && a.detachEvent("on" + b, c)
    }, f.Event = function (a, b) {
        if (!this.preventDefault)return new f.Event(a, b);
        a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? F : E) : this.type = a, b && f.extend(this, b), this.timeStamp = f.now(), this[f.expando] = !0
    }, f.Event.prototype = {preventDefault:function () {
        this.isDefaultPrevented = F;
        var a = this.originalEvent;
        !a || (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
    }, stopPropagation:function () {
        this.isPropagationStopped = F;
        var a = this.originalEvent;
        !a || (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)
    }, stopImmediatePropagation:function () {
        this.isImmediatePropagationStopped = F, this.stopPropagation()
    }, isDefaultPrevented:E, isPropagationStopped:E, isImmediatePropagationStopped:E};
    var G = function (a) {
        var b = a.relatedTarget;
        a.type = a.data;
        try {
            if (b && b !== c && !b.parentNode)return;
            while (b && b !== this)b = b.parentNode;
            b !== this && f.event.handle.apply(this, arguments)
        } catch (d) {
        }
    }, H = function (a) {
        a.type = a.data, f.event.handle.apply(this, arguments)
    };
    f.each({mouseenter:"mouseover", mouseleave:"mouseout"}, function (a, b) {
        f.event.special[a] = {setup:function (c) {
            f.event.add(this, b, c && c.selector ? H : G, a)
        }, teardown:function (a) {
            f.event.remove(this, b, a && a.selector ? H : G)
        }}
    }), f.support.submitBubbles || (f.event.special.submit = {setup:function (a, b) {
        if (!f.nodeName(this, "form"))f.event.add(this, "click.specialSubmit", function (a) {
            var b = a.target, c = b.type;
            (c === "submit" || c === "image") && f(b).closest("form").length && L("submit", this, arguments)
        }), f.event.add(this, "keypress.specialSubmit", function (a) {
            var b = a.target, c = b.type;
            (c === "text" || c === "password") && f(b).closest("form").length && a.keyCode === 13 && L("submit", this, arguments)
        }); else return!1
    }, teardown:function (a) {
        f.event.remove(this, ".specialSubmit")
    }});
    if (!f.support.changeBubbles) {
        var I, J = function (a) {
            var b = a.type, c = a.value;
            b === "radio" || b === "checkbox" ? c = a.checked : b === "select-multiple" ? c = a.selectedIndex > -1 ? f.map(a.options,
                function (a) {
                    return a.selected
                }).join("-") : "" : f.nodeName(a, "select") && (c = a.selectedIndex);
            return c
        }, K = function (c) {
            var d = c.target, e, g;
            if (!!z.test(d.nodeName) && !d.readOnly) {
                e = f._data(d, "_change_data"), g = J(d), (c.type !== "focusout" || d.type !== "radio") && f._data(d, "_change_data", g);
                if (e === b || g === e)return;
                if (e != null || g)c.type = "change", c.liveFired = b, f.event.trigger(c, arguments[1], d)
            }
        };
        f.event.special.change = {filters:{focusout:K, beforedeactivate:K, click:function (a) {
            var b = a.target, c = f.nodeName(b, "input") ? b.type : "";
            (c === "radio" || c === "checkbox" || f.nodeName(b, "select")) && K.call(this, a)
        }, keydown:function (a) {
            var b = a.target, c = f.nodeName(b, "input") ? b.type : "";
            (a.keyCode === 13 && !f.nodeName(b, "textarea") || a.keyCode === 32 && (c === "checkbox" || c === "radio") || c === "select-multiple") && K.call(this, a)
        }, beforeactivate:function (a) {
            var b = a.target;
            f._data(b, "_change_data", J(b))
        }}, setup:function (a, b) {
            if (this.type === "file")return!1;
            for (var c in I)f.event.add(this, c + ".specialChange", I[c]);
            return z.test(this.nodeName)
        }, teardown:function (a) {
            f.event.remove(this, ".specialChange");
            return z.test(this.nodeName)
        }}, I = f.event.special.change.filters, I.focus = I.beforeactivate
    }
    f.support.focusinBubbles || f.each({focus:"focusin", blur:"focusout"}, function (a, b) {
        function e(a) {
            var c = f.event.fix(a);
            c.type = b, c.originalEvent = {}, f.event.trigger(c, null, c.target), c.isDefaultPrevented() && a.preventDefault()
        }

        var d = 0;
        f.event.special[b] = {setup:function () {
            d++ === 0 && c.addEventListener(a, e, !0)
        }, teardown:function () {
            --d === 0 && c.removeEventListener(a, e, !0)
        }}
    }), f.each(["bind", "one"], function (a, c) {
        f.fn[c] = function (a, d, e) {
            var g;
            if (typeof a == "object") {
                for (var h in a)this[c](h, d, a[h], e);
                return this
            }
            if (arguments.length === 2 || d === !1)e = d, d = b;
            c === "one" ? (g = function (a) {
                f(this).unbind(a, g);
                return e.apply(this, arguments)
            }, g.guid = e.guid || f.guid++) : g = e;
            if (a === "unload" && c !== "one")this.one(a, d, e); else for (var i = 0, j = this.length; i < j; i++)f.event.add(this[i], a, g, d);
            return this
        }
    }), f.fn.extend({unbind:function (a, b) {
        if (typeof a == "object" && !a.preventDefault)for (var c in a)this.unbind(c, a[c]); else for (var d = 0, e = this.length; d < e; d++)f.event.remove(this[d], a, b);
        return this
    }, delegate:function (a, b, c, d) {
        return this.live(b, c, d, a)
    }, undelegate:function (a, b, c) {
        return arguments.length === 0 ? this.unbind("live") : this.die(b, null, c, a)
    }, trigger:function (a, b) {
        return this.each(function () {
            f.event.trigger(a, b, this)
        })
    }, triggerHandler:function (a, b) {
        if (this[0])return f.event.trigger(a, b, this[0], !0)
    }, toggle:function (a) {
        var b = arguments, c = a.guid || f.guid++, d = 0, e = function (c) {
            var e = (f.data(this, "lastToggle" + a.guid) || 0) % d;
            f.data(this, "lastToggle" + a.guid, e + 1), c.preventDefault();
            return b[e].apply(this, arguments) || !1
        };
        e.guid = c;
        while (d < b.length)b[d++].guid = c;
        return this.click(e)
    }, hover:function (a, b) {
        return this.mouseenter(a).mouseleave(b || a)
    }});
    var M = {focus:"focusin", blur:"focusout", mouseenter:"mouseover", mouseleave:"mouseout"};
    f.each(["live", "die"], function (a, c) {
        f.fn[c] = function (a, d, e, g) {
            var h, i = 0, j, k, l, m = g || this.selector, n = g ? this : f(this.context);
            if (typeof a == "object" && !a.preventDefault) {
                for (var o in a)n[c](o, d, a[o], m);
                return this
            }
            if (c === "die" && !a && g && g.charAt(0) === ".") {
                n.unbind(g);
                return this
            }
            if (d === !1 || f.isFunction(d))e = d || E, d = b;
            a = (a || "").split(" ");
            while ((h = a[i++]) != null) {
                j = y.exec(h), k = "", j && (k = j[0], h = h.replace(y, ""));
                if (h === "hover") {
                    a.push("mouseenter" + k, "mouseleave" + k);
                    continue
                }
                l = h, M[h] ? (a.push(M[h] + k), h = h + k) : h = (M[h] || h) + k;
                if (c === "live")for (var p = 0, q = n.length; p < q; p++)f.event.add(n[p], "live." + O(h, m), {data:d, selector:m, handler:e, origType:h, origHandler:e, preType:l}); else n.unbind("live." + O(h, m), e)
            }
            return this
        }
    }), f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), function (a, b) {
        f.fn[b] = function (a, c) {
            c == null && (c = a, a = null);
            return arguments.length > 0 ? this.bind(b, a, c) : this.trigger(b)
        }, f.attrFn && (f.attrFn[b] = !0)
    }), function () {
        function u(a, b, c, d, e, f) {
            for (var g = 0, h = d.length; g < h; g++) {
                var i = d[g];
                if (i) {
                    var j = !1;
                    i = i[a];
                    while (i) {
                        if (i.sizcache === c) {
                            j = d[i.sizset];
                            break
                        }
                        if (i.nodeType === 1) {
                            f || (i.sizcache = c, i.sizset = g);
                            if (typeof b != "string") {
                                if (i === b) {
                                    j = !0;
                                    break
                                }
                            } else if (k.filter(b, [i]).length > 0) {
                                j = i;
                                break
                            }
                        }
                        i = i[a]
                    }
                    d[g] = j
                }
            }
        }

        function t(a, b, c, d, e, f) {
            for (var g = 0, h = d.length; g < h; g++) {
                var i = d[g];
                if (i) {
                    var j = !1;
                    i = i[a];
                    while (i) {
                        if (i.sizcache === c) {
                            j = d[i.sizset];
                            break
                        }
                        i.nodeType === 1 && !f && (i.sizcache = c, i.sizset = g);
                        if (i.nodeName.toLowerCase() === b) {
                            j = i;
                            break
                        }
                        i = i[a]
                    }
                    d[g] = j
                }
            }
        }

        var a = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, d = 0, e = Object.prototype.toString, g = !1, h = !0, i = /\\/g, j = /\W/;
        [0, 0].sort(function () {
            h = !1;
            return 0
        });
        var k = function (b, d, f, g) {
            f = f || [], d = d || c;
            var h = d;
            if (d.nodeType !== 1 && d.nodeType !== 9)return[];
            if (!b || typeof b != "string")return f;
            var i, j, n, o, q, r, s, t, u = !0, w = k.isXML(d), x = [], y = b;
            do {
                a.exec(""), i = a.exec(y);
                if (i) {
                    y = i[3], x.push(i[1]);
                    if (i[2]) {
                        o = i[3];
                        break
                    }
                }
            } while (i);
            if (x.length > 1 && m.exec(b))if (x.length === 2 && l.relative[x[0]])j = v(x[0] + x[1], d); else {
                j = l.relative[x[0]] ? [d] : k(x.shift(), d);
                while (x.length)b = x.shift(), l.relative[b] && (b += x.shift()), j = v(b, j)
            } else {
                !g && x.length > 1 && d.nodeType === 9 && !w && l.match.ID.test(x[0]) && !l.match.ID.test(x[x.length - 1]) && (q = k.find(x.shift(), d, w), d = q.expr ? k.filter(q.expr, q.set)[0] : q.set[0]);
                if (d) {
                    q = g ? {expr:x.pop(), set:p(g)} : k.find(x.pop(), x.length === 1 && (x[0] === "~" || x[0] === "+") && d.parentNode ? d.parentNode : d, w), j = q.expr ? k.filter(q.expr, q.set) : q.set, x.length > 0 ? n = p(j) : u = !1;
                    while (x.length)r = x.pop(), s = r, l.relative[r] ? s = x.pop() : r = "", s == null && (s = d), l.relative[r](n, s, w)
                } else n = x = []
            }
            n || (n = j), n || k.error(r || b);
            if (e.call(n) === "[object Array]")if (!u)f.push.apply(f, n); else if (d && d.nodeType === 1)for (t = 0; n[t] != null; t++)n[t] && (n[t] === !0 || n[t].nodeType === 1 && k.contains(d, n[t])) && f.push(j[t]); else for (t = 0; n[t] != null; t++)n[t] && n[t].nodeType === 1 && f.push(j[t]); else p(n, f);
            o && (k(o, h, f, g), k.uniqueSort(f));
            return f
        };
        k.uniqueSort = function (a) {
            if (r) {
                g = h, a.sort(r);
                if (g)for (var b = 1; b < a.length; b++)a[b] === a[b - 1] && a.splice(b--, 1)
            }
            return a
        }, k.matches = function (a, b) {
            return k(a, null, null, b)
        }, k.matchesSelector = function (a, b) {
            return k(b, null, null, [a]).length > 0
        }, k.find = function (a, b, c) {
            var d;
            if (!a)return[];
            for (var e = 0, f = l.order.length; e < f; e++) {
                var g, h = l.order[e];
                if (g = l.leftMatch[h].exec(a)) {
                    var j = g[1];
                    g.splice(1, 1);
                    if (j.substr(j.length - 1) !== "\\") {
                        g[1] = (g[1] || "").replace(i, ""), d = l.find[h](g, b, c);
                        if (d != null) {
                            a = a.replace(l.match[h], "");
                            break
                        }
                    }
                }
            }
            d || (d = typeof b.getElementsByTagName != "undefined" ? b.getElementsByTagName("*") : []);
            return{set:d, expr:a}
        }, k.filter = function (a, c, d, e) {
            var f, g, h = a, i = [], j = c, m = c && c[0] && k.isXML(c[0]);
            while (a && c.length) {
                for (var n in l.filter)if ((f = l.leftMatch[n].exec(a)) != null && f[2]) {
                    var o, p, q = l.filter[n], r = f[1];
                    g = !1, f.splice(1, 1);
                    if (r.substr(r.length - 1) === "\\")continue;
                    j === i && (i = []);
                    if (l.preFilter[n]) {
                        f = l.preFilter[n](f, j, d, i, e, m);
                        if (!f)g = o = !0; else if (f === !0)continue
                    }
                    if (f)for (var s = 0; (p = j[s]) != null; s++)if (p) {
                        o = q(p, f, s, j);
                        var t = e ^ !!o;
                        d && o != null ? t ? g = !0 : j[s] = !1 : t && (i.push(p), g = !0)
                    }
                    if (o !== b) {
                        d || (j = i), a = a.replace(l.match[n], "");
                        if (!g)return[];
                        break
                    }
                }
                if (a === h)if (g == null)k.error(a); else break;
                h = a
            }
            return j
        }, k.error = function (a) {
            throw"Syntax error, unrecognized expression: " + a
        };
        var l = k.selectors = {order:["ID", "NAME", "TAG"], match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/}, leftMatch:{}, attrMap:{"class":"className", "for":"htmlFor"}, attrHandle:{href:function (a) {
            return a.getAttribute("href")
        }, type:function (a) {
            return a.getAttribute("type")
        }}, relative:{"+":function (a, b) {
            var c = typeof b == "string", d = c && !j.test(b), e = c && !d;
            d && (b = b.toLowerCase());
            for (var f = 0, g = a.length, h; f < g; f++)if (h = a[f]) {
                while ((h = h.previousSibling) && h.nodeType !== 1);
                a[f] = e || h && h.nodeName.toLowerCase() === b ? h || !1 : h === b
            }
            e && k.filter(b, a, !0)
        }, ">":function (a, b) {
            var c, d = typeof b == "string", e = 0, f = a.length;
            if (d && !j.test(b)) {
                b = b.toLowerCase();
                for (; e < f; e++) {
                    c = a[e];
                    if (c) {
                        var g = c.parentNode;
                        a[e] = g.nodeName.toLowerCase() === b ? g : !1
                    }
                }
            } else {
                for (; e < f; e++)c = a[e], c && (a[e] = d ? c.parentNode : c.parentNode === b);
                d && k.filter(b, a, !0)
            }
        }, "":function (a, b, c) {
            var e, f = d++, g = u;
            typeof b == "string" && !j.test(b) && (b = b.toLowerCase(), e = b, g = t), g("parentNode", b, f, a, e, c)
        }, "~":function (a, b, c) {
            var e, f = d++, g = u;
            typeof b == "string" && !j.test(b) && (b = b.toLowerCase(), e = b, g = t), g("previousSibling", b, f, a, e, c)
        }}, find:{ID:function (a, b, c) {
            if (typeof b.getElementById != "undefined" && !c) {
                var d = b.getElementById(a[1]);
                return d && d.parentNode ? [d] : []
            }
        }, NAME:function (a, b) {
            if (typeof b.getElementsByName != "undefined") {
                var c = [], d = b.getElementsByName(a[1]);
                for (var e = 0, f = d.length; e < f; e++)d[e].getAttribute("name") === a[1] && c.push(d[e]);
                return c.length === 0 ? null : c
            }
        }, TAG:function (a, b) {
            if (typeof b.getElementsByTagName != "undefined")return b.getElementsByTagName(a[1])
        }}, preFilter:{CLASS:function (a, b, c, d, e, f) {
            a = " " + a[1].replace(i, "") + " ";
            if (f)return a;
            for (var g = 0, h; (h = b[g]) != null; g++)h && (e ^ (h.className && (" " + h.className + " ").replace(/[\t\n\r]/g, " ").indexOf(a) >= 0) ? c || d.push(h) : c && (b[g] = !1));
            return!1
        }, ID:function (a) {
            return a[1].replace(i, "")
        }, TAG:function (a, b) {
            return a[1].replace(i, "").toLowerCase()
        }, CHILD:function (a) {
            if (a[1] === "nth") {
                a[2] || k.error(a[0]), a[2] = a[2].replace(/^\+|\s*/g, "");
                var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]);
                a[2] = b[1] + (b[2] || 1) - 0, a[3] = b[3] - 0
            } else a[2] && k.error(a[0]);
            a[0] = d++;
            return a
        }, ATTR:function (a, b, c, d, e, f) {
            var g = a[1] = a[1].replace(i, "");
            !f && l.attrMap[g] && (a[1] = l.attrMap[g]), a[4] = (a[4] || a[5] || "").replace(i, ""), a[2] === "~=" && (a[4] = " " + a[4] + " ");
            return a
        }, PSEUDO:function (b, c, d, e, f) {
            if (b[1] === "not")if ((a.exec(b[3]) || "").length > 1 || /^\w/.test(b[3]))b[3] = k(b[3], null, null, c); else {
                var g = k.filter(b[3], c, d, !0 ^ f);
                d || e.push.apply(e, g);
                return!1
            } else if (l.match.POS.test(b[0]) || l.match.CHILD.test(b[0]))return!0;
            return b
        }, POS:function (a) {
            a.unshift(!0);
            return a
        }}, filters:{enabled:function (a) {
            return a.disabled === !1 && a.type !== "hidden"
        }, disabled:function (a) {
            return a.disabled === !0
        }, checked:function (a) {
            return a.checked === !0
        }, selected:function (a) {
            a.parentNode && a.parentNode.selectedIndex;
            return a.selected === !0
        }, parent:function (a) {
            return!!a.firstChild
        }, empty:function (a) {
            return!a.firstChild
        }, has:function (a, b, c) {
            return!!k(c[3], a).length
        }, header:function (a) {
            return/h\d/i.test(a.nodeName)
        }, text:function (a) {
            var b = a.getAttribute("type"), c = a.type;
            return a.nodeName.toLowerCase() === "input" && "text" === c && (b === c || b === null)
        }, radio:function (a) {
            return a.nodeName.toLowerCase() === "input" && "radio" === a.type
        }, checkbox:function (a) {
            return a.nodeName.toLowerCase() === "input" && "checkbox" === a.type
        }, file:function (a) {
            return a.nodeName.toLowerCase() === "input" && "file" === a.type
        }, password:function (a) {
            return a.nodeName.toLowerCase() === "input" && "password" === a.type
        }, submit:function (a) {
            var b = a.nodeName.toLowerCase();
            return(b === "input" || b === "button") && "submit" === a.type
        }, image:function (a) {
            return a.nodeName.toLowerCase() === "input" && "image" === a.type
        }, reset:function (a) {
            var b = a.nodeName.toLowerCase();
            return(b === "input" || b === "button") && "reset" === a.type
        }, button:function (a) {
            var b = a.nodeName.toLowerCase();
            return b === "input" && "button" === a.type || b === "button"
        }, input:function (a) {
            return/input|select|textarea|button/i.test(a.nodeName)
        }, focus:function (a) {
            return a === a.ownerDocument.activeElement
        }}, setFilters:{first:function (a, b) {
            return b === 0
        }, last:function (a, b, c, d) {
            return b === d.length - 1
        }, even:function (a, b) {
            return b % 2 === 0
        }, odd:function (a, b) {
            return b % 2 === 1
        }, lt:function (a, b, c) {
            return b < c[3] - 0
        }, gt:function (a, b, c) {
            return b > c[3] - 0
        }, nth:function (a, b, c) {
            return c[3] - 0 === b
        }, eq:function (a, b, c) {
            return c[3] - 0 === b
        }}, filter:{PSEUDO:function (a, b, c, d) {
            var e = b[1], f = l.filters[e];
            if (f)return f(a, c, b, d);
            if (e === "contains")return(a.textContent || a.innerText || k.getText([a]) || "").indexOf(b[3]) >= 0;
            if (e === "not") {
                var g = b[3];
                for (var h = 0, i = g.length; h < i; h++)if (g[h] === a)return!1;
                return!0
            }
            k.error(e)
        }, CHILD:function (a, b) {
            var c = b[1], d = a;
            switch (c) {
                case"only":
                case"first":
                    while (d = d.previousSibling)if (d.nodeType === 1)return!1;
                    if (c === "first")return!0;
                    d = a;
                case"last":
                    while (d = d.nextSibling)if (d.nodeType === 1)return!1;
                    return!0;
                case"nth":
                    var e = b[2], f = b[3];
                    if (e === 1 && f === 0)return!0;
                    var g = b[0], h = a.parentNode;
                    if (h && (h.sizcache !== g || !a.nodeIndex)) {
                        var i = 0;
                        for (d = h.firstChild; d; d = d.nextSibling)d.nodeType === 1 && (d.nodeIndex = ++i);
                        h.sizcache = g
                    }
                    var j = a.nodeIndex - f;
                    return e === 0 ? j === 0 : j % e === 0 && j / e >= 0
            }
        }, ID:function (a, b) {
            return a.nodeType === 1 && a.getAttribute("id") === b
        }, TAG:function (a, b) {
            return b === "*" && a.nodeType === 1 || a.nodeName.toLowerCase() === b
        }, CLASS:function (a, b) {
            return(" " + (a.className || a.getAttribute("class")) + " ").indexOf(b) > -1
        }, ATTR:function (a, b) {
            var c = b[1], d = l.attrHandle[c] ? l.attrHandle[c](a) : a[c] != null ? a[c] : a.getAttribute(c), e = d + "", f = b[2], g = b[4];
            return d == null ? f === "!=" : f === "=" ? e === g : f === "*=" ? e.indexOf(g) >= 0 : f === "~=" ? (" " + e + " ").indexOf(g) >= 0 : g ? f === "!=" ? e !== g : f === "^=" ? e.indexOf(g) === 0 : f === "$=" ? e.substr(e.length - g.length) === g : f === "|=" ? e === g || e.substr(0, g.length + 1) === g + "-" : !1 : e && d !== !1
        }, POS:function (a, b, c, d) {
            var e = b[2], f = l.setFilters[e];
            if (f)return f(a, c, b, d)
        }}}, m = l.match.POS, n = function (a, b) {
            return"\\" + (b - 0 + 1)
        };
        for (var o in l.match)l.match[o] = new RegExp(l.match[o].source + /(?![^\[]*\])(?![^\(]*\))/.source), l.leftMatch[o] = new RegExp(/(^(?:.|\r|\n)*?)/.source + l.match[o].source.replace(/\\(\d+)/g, n));
        var p = function (a, b) {
            a = Array.prototype.slice.call(a, 0);
            if (b) {
                b.push.apply(b, a);
                return b
            }
            return a
        };
        try {
            Array.prototype.slice.call(c.documentElement.childNodes, 0)[0].nodeType
        } catch (q) {
            p = function (a, b) {
                var c = 0, d = b || [];
                if (e.call(a) === "[object Array]")Array.prototype.push.apply(d, a); else if (typeof a.length == "number")for (var f = a.length; c < f; c++)d.push(a[c]); else for (; a[c]; c++)d.push(a[c]);
                return d
            }
        }
        var r, s;
        c.documentElement.compareDocumentPosition ? r = function (a, b) {
            if (a === b) {
                g = !0;
                return 0
            }
            if (!a.compareDocumentPosition || !b.compareDocumentPosition)return a.compareDocumentPosition ? -1 : 1;
            return a.compareDocumentPosition(b) & 4 ? -1 : 1
        } : (r = function (a, b) {
            if (a === b) {
                g = !0;
                return 0
            }
            if (a.sourceIndex && b.sourceIndex)return a.sourceIndex - b.sourceIndex;
            var c, d, e = [], f = [], h = a.parentNode, i = b.parentNode, j = h;
            if (h === i)return s(a, b);
            if (!h)return-1;
            if (!i)return 1;
            while (j)e.unshift(j), j = j.parentNode;
            j = i;
            while (j)f.unshift(j), j = j.parentNode;
            c = e.length, d = f.length;
            for (var k = 0; k < c && k < d; k++)if (e[k] !== f[k])return s(e[k], f[k]);
            return k === c ? s(a, f[k], -1) : s(e[k], b, 1)
        }, s = function (a, b, c) {
            if (a === b)return c;
            var d = a.nextSibling;
            while (d) {
                if (d === b)return-1;
                d = d.nextSibling
            }
            return 1
        }), k.getText = function (a) {
            var b = "", c;
            for (var d = 0; a[d]; d++)c = a[d], c.nodeType === 3 || c.nodeType === 4 ? b += c.nodeValue : c.nodeType !== 8 && (b += k.getText(c.childNodes));
            return b
        }, function () {
            var a = c.createElement("div"), d = "script" + (new Date).getTime(), e = c.documentElement;
            a.innerHTML = "<a name='" + d + "'/>", e.insertBefore(a, e.firstChild), c.getElementById(d) && (l.find.ID = function (a, c, d) {
                if (typeof c.getElementById != "undefined" && !d) {
                    var e = c.getElementById(a[1]);
                    return e ? e.id === a[1] || typeof e.getAttributeNode != "undefined" && e.getAttributeNode("id").nodeValue === a[1] ? [e] : b : []
                }
            }, l.filter.ID = function (a, b) {
                var c = typeof a.getAttributeNode != "undefined" && a.getAttributeNode("id");
                return a.nodeType === 1 && c && c.nodeValue === b
            }), e.removeChild(a), e = a = null
        }(), function () {
            var a = c.createElement("div");
            a.appendChild(c.createComment("")), a.getElementsByTagName("*").length > 0 && (l.find.TAG = function (a, b) {
                var c = b.getElementsByTagName(a[1]);
                if (a[1] === "*") {
                    var d = [];
                    for (var e = 0; c[e]; e++)c[e].nodeType === 1 && d.push(c[e]);
                    c = d
                }
                return c
            }), a.innerHTML = "<a href='#'></a>", a.firstChild && typeof a.firstChild.getAttribute != "undefined" && a.firstChild.getAttribute("href") !== "#" && (l.attrHandle.href = function (a) {
                return a.getAttribute("href", 2)
            }), a = null
        }(), c.querySelectorAll && function () {
            var a = k, b = c.createElement("div"), d = "__sizzle__";
            b.innerHTML = "<p class='TEST'></p>";
            if (!b.querySelectorAll || b.querySelectorAll(".TEST").length !== 0) {
                k = function (b, e, f, g) {
                    e = e || c;
                    if (!g && !k.isXML(e)) {
                        var h = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);
                        if (h && (e.nodeType === 1 || e.nodeType === 9)) {
                            if (h[1])return p(e.getElementsByTagName(b), f);
                            if (h[2] && l.find.CLASS && e.getElementsByClassName)return p(e.getElementsByClassName(h[2]), f)
                        }
                        if (e.nodeType === 9) {
                            if (b === "body" && e.body)return p([e.body], f);
                            if (h && h[3]) {
                                var i = e.getElementById(h[3]);
                                if (!i || !i.parentNode)return p([], f);
                                if (i.id === h[3])return p([i], f)
                            }
                            try {
                                return p(e.querySelectorAll(b), f)
                            } catch (j) {
                            }
                        } else if (e.nodeType === 1 && e.nodeName.toLowerCase() !== "object") {
                            var m = e, n = e.getAttribute("id"), o = n || d, q = e.parentNode, r = /^\s*[+~]/.test(b);
                            n ? o = o.replace(/'/g, "\\$&") : e.setAttribute("id", o), r && q && (e = e.parentNode);
                            try {
                                if (!r || q)return p(e.querySelectorAll("[id='" + o + "'] " + b), f)
                            } catch (s) {
                            } finally {
                                n || m.removeAttribute("id")
                            }
                        }
                    }
                    return a(b, e, f, g)
                };
                for (var e in a)k[e] = a[e];
                b = null
            }
        }(), function () {
            var a = c.documentElement, b = a.matchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || a.msMatchesSelector;
            if (b) {
                var d = !b.call(c.createElement("div"), "div"), e = !1;
                try {
                    b.call(c.documentElement, "[test!='']:sizzle")
                } catch (f) {
                    e = !0
                }
                k.matchesSelector = function (a, c) {
                    c = c.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
                    if (!k.isXML(a))try {
                        if (e || !l.match.PSEUDO.test(c) && !/!=/.test(c)) {
                            var f = b.call(a, c);
                            if (f || !d || a.document && a.document.nodeType !== 11)return f
                        }
                    } catch (g) {
                    }
                    return k(c, null, null, [a]).length > 0
                }
            }
        }(), function () {
            var a = c.createElement("div");
            a.innerHTML = "<div class='test e'></div><div class='test'></div>";
            if (!!a.getElementsByClassName && a.getElementsByClassName("e").length !== 0) {
                a.lastChild.className = "e";
                if (a.getElementsByClassName("e").length === 1)return;
                l.order.splice(1, 0, "CLASS"), l.find.CLASS = function (a, b, c) {
                    if (typeof b.getElementsByClassName != "undefined" && !c)return b.getElementsByClassName(a[1])
                }, a = null
            }
        }(), c.documentElement.contains ? k.contains = function (a, b) {
            return a !== b && (a.contains ? a.contains(b) : !0)
        } : c.documentElement.compareDocumentPosition ? k.contains = function (a, b) {
            return!!(a.compareDocumentPosition(b) & 16)
        } : k.contains = function () {
            return!1
        }, k.isXML = function (a) {
            var b = (a ? a.ownerDocument || a : 0).documentElement;
            return b ? b.nodeName !== "HTML" : !1
        };
        var v = function (a, b) {
            var c, d = [], e = "", f = b.nodeType ? [b] : b;
            while (c = l.match.PSEUDO.exec(a))e += c[0], a = a.replace(l.match.PSEUDO, "");
            a = l.relative[a] ? a + "*" : a;
            for (var g = 0, h = f.length; g < h; g++)k(a, f[g], d);
            return k.filter(e, d)
        };
        f.find = k, f.expr = k.selectors, f.expr[":"] = f.expr.filters, f.unique = k.uniqueSort, f.text = k.getText, f.isXMLDoc = k.isXML, f.contains = k.contains
    }();
    var P = /Until$/, Q = /^(?:parents|prevUntil|prevAll)/, R = /,/, S = /^.[^:#\[\.,]*$/, T = Array.prototype.slice, U = f.expr.match.POS, V = {children:!0, contents:!0, next:!0, prev:!0};
    f.fn.extend({find:function (a) {
        var b = this, c, d;
        if (typeof a != "string")return f(a).filter(function () {
            for (c = 0, d = b.length; c < d; c++)if (f.contains(b[c], this))return!0
        });
        var e = this.pushStack("", "find", a), g, h, i;
        for (c = 0, d = this.length; c < d; c++) {
            g = e.length, f.find(a, this[c], e);
            if (c > 0)for (h = g; h < e.length; h++)for (i = 0; i < g; i++)if (e[i] === e[h]) {
                e.splice(h--, 1);
                break
            }
        }
        return e
    }, has:function (a) {
        var b = f(a);
        return this.filter(function () {
            for (var a = 0, c = b.length; a < c; a++)if (f.contains(this, b[a]))return!0
        })
    }, not:function (a) {
        return this.pushStack(X(this, a, !1), "not", a)
    }, filter:function (a) {
        return this.pushStack(X(this, a, !0), "filter", a)
    }, is:function (a) {
        return!!a && (typeof a == "string" ? f.filter(a, this).length > 0 : this.filter(a).length > 0)
    }, closest:function (a, b) {
        var c = [], d, e, g = this[0];
        if (f.isArray(a)) {
            var h, i, j = {}, k = 1;
            if (g && a.length) {
                for (d = 0, e = a.length; d < e; d++)i = a[d], j[i] || (j[i] = U.test(i) ? f(i, b || this.context) : i);
                while (g && g.ownerDocument && g !== b) {
                    for (i in j)h = j[i], (h.jquery ? h.index(g) > -1 : f(g).is(h)) && c.push({selector:i, elem:g, level:k});
                    g = g.parentNode, k++
                }
            }
            return c
        }
        var l = U.test(a) || typeof a != "string" ? f(a, b || this.context) : 0;
        for (d = 0, e = this.length; d < e; d++) {
            g = this[d];
            while (g) {
                if (l ? l.index(g) > -1 : f.find.matchesSelector(g, a)) {
                    c.push(g);
                    break
                }
                g = g.parentNode;
                if (!g || !g.ownerDocument || g === b || g.nodeType === 11)break
            }
        }
        c = c.length > 1 ? f.unique(c) : c;
        return this.pushStack(c, "closest", a)
    }, index:function (a) {
        if (!a || typeof a == "string")return f.inArray(this[0], a ? f(a) : this.parent().children());
        return f.inArray(a.jquery ? a[0] : a, this)
    }, add:function (a, b) {
        var c = typeof a == "string" ? f(a, b) : f.makeArray(a && a.nodeType ? [a] : a), d = f.merge(this.get(), c);
        return this.pushStack(W(c[0]) || W(d[0]) ? d : f.unique(d))
    }, andSelf:function () {
        return this.add(this.prevObject)
    }}), f.each({parent:function (a) {
        var b = a.parentNode;
        return b && b.nodeType !== 11 ? b : null
    }, parents:function (a) {
        return f.dir(a, "parentNode")
    }, parentsUntil:function (a, b, c) {
        return f.dir(a, "parentNode", c)
    }, next:function (a) {
        return f.nth(a, 2, "nextSibling")
    }, prev:function (a) {
        return f.nth(a, 2, "previousSibling")
    }, nextAll:function (a) {
        return f.dir(a, "nextSibling")
    }, prevAll:function (a) {
        return f.dir(a, "previousSibling")
    }, nextUntil:function (a, b, c) {
        return f.dir(a, "nextSibling", c)
    }, prevUntil:function (a, b, c) {
        return f.dir(a, "previousSibling", c)
    }, siblings:function (a) {
        return f.sibling(a.parentNode.firstChild, a)
    }, children:function (a) {
        return f.sibling(a.firstChild)
    }, contents:function (a) {
        return f.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : f.makeArray(a.childNodes)
    }}, function (a, b) {
        f.fn[a] = function (c, d) {
            var e = f.map(this, b, c), g = T.call(arguments);
            P.test(a) || (d = c), d && typeof d == "string" && (e = f.filter(d, e)), e = this.length > 1 && !V[a] ? f.unique(e) : e, (this.length > 1 || R.test(d)) && Q.test(a) && (e = e.reverse());
            return this.pushStack(e, a, g.join(","))
        }
    }), f.extend({filter:function (a, b, c) {
        c && (a = ":not(" + a + ")");
        return b.length === 1 ? f.find.matchesSelector(b[0], a) ? [b[0]] : [] : f.find.matches(a, b)
    }, dir:function (a, c, d) {
        var e = [], g = a[c];
        while (g && g.nodeType !== 9 && (d === b || g.nodeType !== 1 || !f(g).is(d)))g.nodeType === 1 && e.push(g), g = g[c];
        return e
    }, nth:function (a, b, c, d) {
        b = b || 1;
        var e = 0;
        for (; a; a = a[c])if (a.nodeType === 1 && ++e === b)break;
        return a
    }, sibling:function (a, b) {
        var c = [];
        for (; a; a = a.nextSibling)a.nodeType === 1 && a !== b && c.push(a);
        return c
    }});
    var Y = / jQuery\d+="(?:\d+|null)"/g, Z = /^\s+/, $ = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, _ = /<([\w:]+)/, ba = /<tbody/i, bb = /<|&#?\w+;/, bc = /<(?:script|object|embed|option|style)/i, bd = /checked\s*(?:[^=]|=\s*.checked.)/i, be = /\/(java|ecma)script/i, bf = /^\s*<!(?:\[CDATA\[|\-\-)/, bg = {option:[1, "<select multiple='multiple'>", "</select>"], legend:[1, "<fieldset>", "</fieldset>"], thead:[1, "<table>", "</table>"], tr:[2, "<table><tbody>", "</tbody></table>"], td:[3, "<table><tbody><tr>", "</tr></tbody></table>"], col:[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], area:[1, "<map>", "</map>"], _default:[0, "", ""]};
    bg.optgroup = bg.option, bg.tbody = bg.tfoot = bg.colgroup = bg.caption = bg.thead, bg.th = bg.td, f.support.htmlSerialize || (bg._default = [1, "div<div>", "</div>"]), f.fn.extend({text:function (a) {
        if (f.isFunction(a))return this.each(function (b) {
            var c = f(this);
            c.text(a.call(this, b, c.text()))
        });
        if (typeof a != "object" && a !== b)return this.empty().append((this[0] && this[0].ownerDocument || c).createTextNode(a));
        return f.text(this)
    }, wrapAll:function (a) {
        if (f.isFunction(a))return this.each(function (b) {
            f(this).wrapAll(a.call(this, b))
        });
        if (this[0]) {
            var b = f(a, this[0].ownerDocument).eq(0).clone(!0);
            this[0].parentNode && b.insertBefore(this[0]), b.map(
                function () {
                    var a = this;
                    while (a.firstChild && a.firstChild.nodeType === 1)a = a.firstChild;
                    return a
                }).append(this)
        }
        return this
    }, wrapInner:function (a) {
        if (f.isFunction(a))return this.each(function (b) {
            f(this).wrapInner(a.call(this, b))
        });
        return this.each(function () {
            var b = f(this), c = b.contents();
            c.length ? c.wrapAll(a) : b.append(a)
        })
    }, wrap:function (a) {
        return this.each(function () {
            f(this).wrapAll(a)
        })
    }, unwrap:function () {
        return this.parent().each(
            function () {
                f.nodeName(this, "body") || f(this).replaceWith(this.childNodes)
            }).end()
    }, append:function () {
        return this.domManip(arguments, !0, function (a) {
            this.nodeType === 1 && this.appendChild(a)
        })
    }, prepend:function () {
        return this.domManip(arguments, !0, function (a) {
            this.nodeType === 1 && this.insertBefore(a, this.firstChild)
        })
    }, before:function () {
        if (this[0] && this[0].parentNode)return this.domManip(arguments, !1, function (a) {
            this.parentNode.insertBefore(a, this)
        });
        if (arguments.length) {
            var a = f(arguments[0]);
            a.push.apply(a, this.toArray());
            return this.pushStack(a, "before", arguments)
        }
    }, after:function () {
        if (this[0] && this[0].parentNode)return this.domManip(arguments, !1, function (a) {
            this.parentNode.insertBefore(a, this.nextSibling)
        });
        if (arguments.length) {
            var a = this.pushStack(this, "after", arguments);
            a.push.apply(a, f(arguments[0]).toArray());
            return a
        }
    }, remove:function (a, b) {
        for (var c = 0, d; (d = this[c]) != null; c++)if (!a || f.filter(a, [d]).length)!b && d.nodeType === 1 && (f.cleanData(d.getElementsByTagName("*")), f.cleanData([d])), d.parentNode && d.parentNode.removeChild(d);
        return this
    }, empty:function () {
        for (var a = 0, b; (b = this[a]) != null; a++) {
            b.nodeType === 1 && f.cleanData(b.getElementsByTagName("*"));
            while (b.firstChild)b.removeChild(b.firstChild)
        }
        return this
    }, clone:function (a, b) {
        a = a == null ? !1 : a, b = b == null ? a : b;
        return this.map(function () {
            return f.clone(this, a, b)
        })
    }, html:function (a) {
        if (a === b)return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(Y, "") : null;
        if (typeof a == "string" && !bc.test(a) && (f.support.leadingWhitespace || !Z.test(a)) && !bg[(_.exec(a) || ["", ""])[1].toLowerCase()]) {
            a = a.replace($, "<$1></$2>");
            try {
                for (var c = 0, d = this.length; c < d; c++)this[c].nodeType === 1 && (f.cleanData(this[c].getElementsByTagName("*")), this[c].innerHTML = a)
            } catch (e) {
                this.empty().append(a)
            }
        } else f.isFunction(a) ? this.each(function (b) {
            var c = f(this);
            c.html(a.call(this, b, c.html()))
        }) : this.empty().append(a);
        return this
    }, replaceWith:function (a) {
        if (this[0] && this[0].parentNode) {
            if (f.isFunction(a))return this.each(function (b) {
                var c = f(this), d = c.html();
                c.replaceWith(a.call(this, b, d))
            });
            typeof a != "string" && (a = f(a).detach());
            return this.each(function () {
                var b = this.nextSibling, c = this.parentNode;
                f(this).remove(), b ? f(b).before(a) : f(c).append(a)
            })
        }
        return this.length ? this.pushStack(f(f.isFunction(a) ? a() : a), "replaceWith", a) : this
    }, detach:function (a) {
        return this.remove(a, !0)
    }, domManip:function (a, c, d) {
        var e, g, h, i, j = a[0], k = [];
        if (!f.support.checkClone && arguments.length === 3 && typeof j == "string" && bd.test(j))return this.each(function () {
            f(this).domManip(a, c, d, !0)
        });
        if (f.isFunction(j))return this.each(function (e) {
            var g = f(this);
            a[0] = j.call(this, e, c ? g.html() : b), g.domManip(a, c, d)
        });
        if (this[0]) {
            i = j && j.parentNode, f.support.parentNode && i && i.nodeType === 11 && i.childNodes.length === this.length ? e = {fragment:i} : e = f.buildFragment(a, this, k), h = e.fragment, h.childNodes.length === 1 ? g = h = h.firstChild : g = h.firstChild;
            if (g) {
                c = c && f.nodeName(g, "tr");
                for (var l = 0, m = this.length, n = m - 1; l < m; l++)d.call(c ? bh(this[l], g) : this[l], e.cacheable || m > 1 && l < n ? f.clone(h, !0, !0) : h)
            }
            k.length && f.each(k, bn)
        }
        return this
    }}), f.buildFragment = function (a, b, d) {
        var e, g, h, i = b && b[0] ? b[0].ownerDocument || b[0] : c;
        a.length === 1 && typeof a[0] == "string" && a[0].length < 512 && i === c && a[0].charAt(0) === "<" && !bc.test(a[0]) && (f.support.checkClone || !bd.test(a[0])) && (g = !0, h = f.fragments[a[0]], h && h !== 1 && (e = h)), e || (e = i.createDocumentFragment(), f.clean(a, i, e, d)), g && (f.fragments[a[0]] = h ? e : 1);
        return{fragment:e, cacheable:g}
    }, f.fragments = {}, f.each({appendTo:"append", prependTo:"prepend", insertBefore:"before", insertAfter:"after", replaceAll:"replaceWith"}, function (a, b) {
        f.fn[a] = function (c) {
            var d = [], e = f(c), g = this.length === 1 && this[0].parentNode;
            if (g && g.nodeType === 11 && g.childNodes.length === 1 && e.length === 1) {
                e[b](this[0]);
                return this
            }
            for (var h = 0, i = e.length; h < i; h++) {
                var j = (h > 0 ? this.clone(!0) : this).get();
                f(e[h])[b](j), d = d.concat(j)
            }
            return this.pushStack(d, a, e.selector)
        }
    }), f.extend({clone:function (a, b, c) {
        var d = a.cloneNode(!0), e, g, h;
        if ((!f.support.noCloneEvent || !f.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !f.isXMLDoc(a)) {
            bj(a, d), e = bk(a), g = bk(d);
            for (h = 0; e[h]; ++h)bj(e[h], g[h])
        }
        if (b) {
            bi(a, d);
            if (c) {
                e = bk(a), g = bk(d);
                for (h = 0; e[h]; ++h)bi(e[h], g[h])
            }
        }
        return d
    }, clean:function (a, b, d, e) {
        var g;
        b = b || c, typeof b.createElement == "undefined" && (b = b.ownerDocument ||
            b[0] && b[0].ownerDocument || c);
        var h = [], i;
        for (var j = 0, k; (k = a[j]) != null; j++) {
            typeof k == "number" && (k += "");
            if (!k)continue;
            if (typeof k == "string")if (!bb.test(k))k = b.createTextNode(k); else {
                k = k.replace($, "<$1></$2>");
                var l = (_.exec(k) || ["", ""])[1].toLowerCase(), m = bg[l] || bg._default, n = m[0], o = b.createElement("div");
                o.innerHTML = m[1] + k + m[2];
                while (n--)o = o.lastChild;
                if (!f.support.tbody) {
                    var p = ba.test(k), q = l === "table" && !p ? o.firstChild && o.firstChild.childNodes : m[1] === "<table>" && !p ? o.childNodes : [];
                    for (i = q.length - 1; i >= 0; --i)f.nodeName(q[i], "tbody") && !q[i].childNodes.length && q[i].parentNode.removeChild(q[i])
                }
                !f.support.leadingWhitespace && Z.test(k) && o.insertBefore(b.createTextNode(Z.exec(k)[0]), o.firstChild), k = o.childNodes
            }
            var r;
            if (!f.support.appendChecked)if (k[0] && typeof (r = k.length) == "number")for (i = 0; i < r; i++)bm(k[i]); else bm(k);
            k.nodeType ? h.push(k) : h = f.merge(h, k)
        }
        if (d) {
            g = function (a) {
                return!a.type || be.test(a.type)
            };
            for (j = 0; h[j]; j++)if (e && f.nodeName(h[j], "script") && (!h[j].type || h[j].type.toLowerCase() === "text/javascript"))e.push(h[j].parentNode ? h[j].parentNode.removeChild(h[j]) : h[j]); else {
                if (h[j].nodeType === 1) {
                    var s = f.grep(h[j].getElementsByTagName("script"), g);
                    h.splice.apply(h, [j + 1, 0].concat(s))
                }
                d.appendChild(h[j])
            }
        }
        return h
    }, cleanData:function (a) {
        var b, c, d = f.cache, e = f.expando, g = f.event.special, h = f.support.deleteExpando;
        for (var i = 0, j; (j = a[i]) != null; i++) {
            if (j.nodeName && f.noData[j.nodeName.toLowerCase()])continue;
            c = j[f.expando];
            if (c) {
                b = d[c] && d[c][e];
                if (b && b.events) {
                    for (var k in b.events)g[k] ? f.event.remove(j, k) : f.removeEvent(j, k, b.handle);
                    b.handle && (b.handle.elem = null)
                }
                h ? delete j[f.expando] : j.removeAttribute && j.removeAttribute(f.expando), delete d[c]
            }
        }
    }});
    var bo = /alpha\([^)]*\)/i, bp = /opacity=([^)]*)/, bq = /-([a-z])/ig, br = /([A-Z]|^ms)/g, bs = /^-?\d+(?:px)?$/i, bt = /^-?\d/, bu = /^[+\-]=/, bv = /[^+\-\.\de]+/g, bw = {position:"absolute", visibility:"hidden", display:"block"}, bx = ["Left", "Right"], by = ["Top", "Bottom"], bz, bA, bB, bC = function (a, b) {
        return b.toUpperCase()
    };
    f.fn.css = function (a, c) {
        if (arguments.length === 2 && c === b)return this;
        return f.access(this, a, c, !0, function (a, c, d) {
            return d !== b ? f.style(a, c, d) : f.css(a, c)
        })
    }, f.extend({cssHooks:{opacity:{get:function (a, b) {
        if (b) {
            var c = bz(a, "opacity", "opacity");
            return c === "" ? "1" : c
        }
        return a.style.opacity
    }}}, cssNumber:{zIndex:!0, fontWeight:!0, opacity:!0, zoom:!0, lineHeight:!0, widows:!0, orphans:!0}, cssProps:{"float":f.support.cssFloat ? "cssFloat" : "styleFloat"}, style:function (a, c, d, e) {
        if (!!a && a.nodeType !== 3 && a.nodeType !== 8 && !!a.style) {
            var g, h, i = f.camelCase(c), j = a.style, k = f.cssHooks[i];
            c = f.cssProps[i] || i;
            if (d === b) {
                if (k && "get"in k && (g = k.get(a, !1, e)) !== b)return g;
                return j[c]
            }
            h = typeof d;
            if (h === "number" && isNaN(d) || d == null)return;
            h === "string" && bu.test(d) && (d = +d.replace(bv, "") + parseFloat(f.css(a, c))), h === "number" && !f.cssNumber[i] && (d += "px");
            if (!k || !("set"in k) || (d = k.set(a, d)) !== b)try {
                j[c] = d
            } catch (l) {
            }
        }
    }, css:function (a, c, d) {
        var e, g;
        c = f.camelCase(c), g = f.cssHooks[c], c = f.cssProps[c] || c, c === "cssFloat" && (c = "float");
        if (g && "get"in g && (e = g.get(a, !0, d)) !== b)return e;
        if (bz)return bz(a, c)
    }, swap:function (a, b, c) {
        var d = {};
        for (var e in b)d[e] = a.style[e], a.style[e] = b[e];
        c.call(a);
        for (e in b)a.style[e] = d[e]
    }, camelCase:function (a) {
        return a.replace(bq, bC)
    }}), f.curCSS = f.css, f.each(["height", "width"], function (a, b) {
        f.cssHooks[b] = {get:function (a, c, d) {
            var e;
            if (c) {
                a.offsetWidth !== 0 ? e = bD(a, b, d) : f.swap(a, bw, function () {
                    e = bD(a, b, d)
                });
                if (e <= 0) {
                    e = bz(a, b, b), e === "0px" && bB && (e = bB(a, b, b));
                    if (e != null)return e === "" || e === "auto" ? "0px" : e
                }
                if (e < 0 || e == null) {
                    e = a.style[b];
                    return e === "" || e === "auto" ? "0px" : e
                }
                return typeof e == "string" ? e : e + "px"
            }
        }, set:function (a, b) {
            if (!bs.test(b))return b;
            b = parseFloat(b);
            if (b >= 0)return b + "px"
        }}
    }), f.support.opacity || (f.cssHooks.opacity = {get:function (a, b) {
        return bp.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "" : b ? "1" : ""
    }, set:function (a, b) {
        var c = a.style, d = a.currentStyle;
        c.zoom = 1;
        var e = f.isNaN(b) ? "" : "alpha(opacity=" + b * 100 + ")", g = d && d.filter || c.filter || "";
        c.filter = bo.test(g) ? g.replace(bo, e) : g + " " + e
    }}), f(function () {
        f.support.reliableMarginRight || (f.cssHooks.marginRight = {get:function (a, b) {
            var c;
            f.swap(a, {display:"inline-block"}, function () {
                b ? c = bz(a, "margin-right", "marginRight") : c = a.style.marginRight
            });
            return c
        }})
    }), c.defaultView && c.defaultView.getComputedStyle && (bA = function (a, c) {
        var d, e, g;
        c = c.replace(br, "-$1").toLowerCase();
        if (!(e = a.ownerDocument.defaultView))return b;
        if (g = e.getComputedStyle(a, null))d = g.getPropertyValue(c), d === "" && !f.contains(a.ownerDocument.documentElement, a) && (d = f.style(a, c));
        return d
    }), c.documentElement.currentStyle && (bB = function (a, b) {
        var c, d = a.currentStyle && a.currentStyle[b], e = a.runtimeStyle && a.runtimeStyle[b], f = a.style;
        !bs.test(d) && bt.test(d) && (c = f.left, e && (a.runtimeStyle.left = a.currentStyle.left), f.left = b === "fontSize" ? "1em" : d || 0, d = f.pixelLeft + "px", f.left = c, e && (a.runtimeStyle.left = e));
        return d === "" ? "auto" : d
    }), bz = bA || bB, f.expr && f.expr.filters && (f.expr.filters.hidden = function (a) {
        var b = a.offsetWidth, c = a.offsetHeight;
        return b === 0 && c === 0 || !f.support.reliableHiddenOffsets && (a.style.display || f.css(a, "display")) === "none"
    }, f.expr.filters.visible = function (a) {
        return!f.expr.filters.hidden(a)
    });
    var bE = /%20/g, bF = /\[\]$/, bG = /\r?\n/g, bH = /#.*$/, bI = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, bJ = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, bK = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/, bL = /^(?:GET|HEAD)$/, bM = /^\/\//, bN = /\?/, bO = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, bP = /^(?:select|textarea)/i, bQ = /\s+/, bR = /([?&])_=[^&]*/, bS = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, bT = f.fn.load, bU = {}, bV = {}, bW, bX;
    try {
        bW = e.href
    } catch (bY) {
        bW = c.createElement("a"), bW.href = "", bW = bW.href
    }
    bX = bS.exec(bW.toLowerCase()) || [], f.fn.extend({load:function (a, c, d) {
        if (typeof a != "string" && bT)return bT.apply(this, arguments);
        if (!this.length)return this;
        var e = a.indexOf(" ");
        if (e >= 0) {
            var g = a.slice(e, a.length);
            a = a.slice(0, e)
        }
        var h = "GET";
        c && (f.isFunction(c) ? (d = c, c = b) : typeof c == "object" && (c = f.param(c, f.ajaxSettings.traditional), h = "POST"));
        var i = this;
        f.ajax({url:a, type:h, dataType:"html", data:c, complete:function (a, b, c) {
            c = a.responseText, a.isResolved() && (a.done(function (a) {
                c = a
            }), i.html(g ? f("<div>").append(c.replace(bO, "")).find(g) : c)), d && i.each(d, [c, b, a])
        }});
        return this
    }, serialize:function () {
        return f.param(this.serializeArray())
    }, serializeArray:function () {
        return this.map(
            function () {
                return this.elements ? f.makeArray(this.elements) : this
            }).filter(
            function () {
                return this.name && !this.disabled && (this.checked || bP.test(this.nodeName) || bJ.test(this.type))
            }).map(
            function (a, b) {
                var c = f(this).val();
                return c == null ? null : f.isArray(c) ? f.map(c, function (a, c) {
                    return{name:b.name, value:a.replace(bG, "\r\n")}
                }) : {name:b.name, value:c.replace(bG, "\r\n")}
            }).get()
    }}), f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (a, b) {
        f.fn[b] = function (a) {
            return this.bind(b, a)
        }
    }), f.each(["get", "post"], function (a, c) {
        f[c] = function (a, d, e, g) {
            f.isFunction(d) && (g = g || e, e = d, d = b);
            return f.ajax({type:c, url:a, data:d, success:e, dataType:g})
        }
    }), f.extend({getScript:function (a, c) {
        return f.get(a, b, c, "script")
    }, getJSON:function (a, b, c) {
        return f.get(a, b, c, "json")
    }, ajaxSetup:function (a, b) {
        b ? f.extend(!0, a, f.ajaxSettings, b) : (b = a, a = f.extend(!0, f.ajaxSettings, b));
        for (var c in{context:1, url:1})c in b ? a[c] = b[c] : c in f.ajaxSettings && (a[c] = f.ajaxSettings[c]);
        return a
    }, ajaxSettings:{url:bW, isLocal:bK.test(bX[1]), global:!0, type:"GET", contentType:"application/x-www-form-urlencoded", processData:!0, async:!0, accepts:{xml:"application/xml, text/xml", html:"text/html", text:"text/plain", json:"application/json, text/javascript", "*":"*/*"}, contents:{xml:/xml/, html:/html/, json:/json/}, responseFields:{xml:"responseXML", text:"responseText"}, converters:{"* text":a.String, "text html":!0, "text json":f.parseJSON, "text xml":f.parseXML}}, ajaxPrefilter:bZ(bU), ajaxTransport:bZ(bV), ajax:function (a, c) {
        function w(a, c, l, m) {
            if (s !== 2) {
                s = 2, q && clearTimeout(q), p = b, n = m || "", v.readyState = a ? 4 : 0;
                var o, r, u, w = l ? ca(d, v, l) : b, x, y;
                if (a >= 200 && a < 300 || a === 304) {
                    if (d.ifModified) {
                        if (x = v.getResponseHeader("Last-Modified"))f.lastModified[k] = x;
                        if (y = v.getResponseHeader("Etag"))f.etag[k] = y
                    }
                    if (a === 304)c = "notmodified", o = !0; else try {
                        r = cb(d, w), c = "success", o = !0
                    } catch (z) {
                        c = "parsererror", u = z
                    }
                } else {
                    u = c;
                    if (!c || a)c = "error", a < 0 && (a = 0)
                }
                v.status = a, v.statusText = c, o ? h.resolveWith(e, [r, c, v]) : h.rejectWith(e, [v, c, u]), v.statusCode(j), j = b, t && g.trigger("ajax" + (o ? "Success" : "Error"), [v, d, o ? r : u]), i.resolveWith(e, [v, c]), t && (g.trigger("ajaxComplete", [v, d]), --f.active || f.event.trigger("ajaxStop"))
            }
        }

        typeof a == "object" && (c = a, a = b), c = c || {};
        var d = f.ajaxSetup({}, c), e = d.context || d, g = e !== d && (e.nodeType || e instanceof f) ? f(e) : f.event, h = f.Deferred(), i = f._Deferred(), j = d.statusCode || {}, k, l = {}, m = {}, n, o, p, q, r, s = 0, t, u, v = {readyState:0, setRequestHeader:function (a, b) {
            if (!s) {
                var c = a.toLowerCase();
                a = m[c] = m[c] || a, l[a] = b
            }
            return this
        }, getAllResponseHeaders:function () {
            return s === 2 ? n : null
        }, getResponseHeader:function (a) {
            var c;
            if (s === 2) {
                if (!o) {
                    o = {};
                    while (c = bI.exec(n))o[c[1].toLowerCase()] = c[2]
                }
                c = o[a.toLowerCase()]
            }
            return c === b ? null : c
        }, overrideMimeType:function (a) {
            s || (d.mimeType = a);
            return this
        }, abort:function (a) {
            a = a || "abort", p && p.abort(a), w(0, a);
            return this
        }};
        h.promise(v), v.success = v.done, v.error = v.fail, v.complete = i.done, v.statusCode = function (a) {
            if (a) {
                var b;
                if (s < 2)for (b in a)j[b] = [j[b], a[b]]; else b = a[v.status], v.then(b, b)
            }
            return this
        }, d.url = ((a || d.url) + "").replace(bH, "").replace(bM, bX[1] + "//"), d.dataTypes = f.trim(d.dataType || "*").toLowerCase().split(bQ), d.crossDomain == null && (r = bS.exec(d.url.toLowerCase()), d.crossDomain = !(!r || r[1] == bX[1] && r[2] == bX[2] && (r[3] || (r[1] === "http:" ? 80 : 443)) == (bX[3] || (bX[1] === "http:" ? 80 : 443)))), d.data && d.processData && typeof d.data != "string" && (d.data = f.param(d.data, d.traditional)), b$(bU, d, c, v);
        if (s === 2)return!1;
        t = d.global, d.type = d.type.toUpperCase(), d.hasContent = !bL.test(d.type), t && f.active++ === 0 && f.event.trigger("ajaxStart");
        if (!d.hasContent) {
            d.data && (d.url += (bN.test(d.url) ? "&" : "?") + d.data), k = d.url;
            if (d.cache === !1) {
                var x = f.now(), y = d.url.replace(bR, "$1_=" + x);
                d.url = y + (y === d.url ? (bN.test(d.url) ? "&" : "?") + "_=" + x : "")
            }
        }
        (d.data && d.hasContent && d.contentType !== !1 || c.contentType) && v.setRequestHeader("Content-Type", d.contentType), d.ifModified && (k = k || d.url, f.lastModified[k] && v.setRequestHeader("If-Modified-Since", f.lastModified[k]), f.etag[k] && v.setRequestHeader("If-None-Match", f.etag[k])), v.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + (d.dataTypes[0] !== "*" ? ", */*; q=0.01" : "") : d.accepts["*"]);
        for (u in d.headers)v.setRequestHeader(u, d.headers[u]);
        if (d.beforeSend && (d.beforeSend.call(e, v, d) === !1 || s === 2)) {
            v.abort();
            return!1
        }
        for (u in{success:1, error:1, complete:1})v[u](d[u]);
        p = b$(bV, d, c, v);
        if (!p)w(-1, "No Transport"); else {
            v.readyState = 1, t && g.trigger("ajaxSend", [v, d]), d.async && d.timeout > 0 && (q = setTimeout(function () {
                v.abort("timeout")
            }, d.timeout));
            try {
                s = 1, p.send(l, w)
            } catch (z) {
                status < 2 ? w(-1, z) : f.error(z)
            }
        }
        return v
    }, param:function (a, c) {
        var d = [], e = function (a, b) {
            b = f.isFunction(b) ? b() : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
        };
        c === b && (c = f.ajaxSettings.traditional);
        if (f.isArray(a) || a.jquery && !f.isPlainObject(a))f.each(a, function () {
            e(this.name, this.value)
        }); else for (var g in a)b_(g, a[g], c, e);
        return d.join("&").replace(bE, "+")
    }}), f.extend({active:0, lastModified:{}, etag:{}});
    var cc = f.now(), cd = /(\=)\?(&|$)|\?\?/i;
    f.ajaxSetup({jsonp:"callback", jsonpCallback:function () {
        return f.expando + "_" + cc++
    }}), f.ajaxPrefilter("json jsonp", function (b, c, d) {
        var e = b.contentType === "application/x-www-form-urlencoded" && typeof b.data == "string";
        if (b.dataTypes[0] === "jsonp" || b.jsonp !== !1 && (cd.test(b.url) || e && cd.test(b.data))) {
            var g, h = b.jsonpCallback = f.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, i = a[h], j = b.url, k = b.data, l = "$1" + h + "$2";
            b.jsonp !== !1 && (j = j.replace(cd, l), b.url === j && (e && (k = k.replace(cd, l)), b.data === k && (j += (/\?/.test(j) ? "&" : "?") + b.jsonp + "=" + h))), b.url = j, b.data = k, a[h] = function (a) {
                g = [a]
            }, d.always(function () {
                a[h] = i, g && f.isFunction(i) && a[h](g[0])
            }), b.converters["script json"] = function () {
                g || f.error(h + " was not called");
                return g[0]
            }, b.dataTypes[0] = "json";
            return"script"
        }
    }), f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/javascript|ecmascript/}, converters:{"text script":function (a) {
        f.globalEval(a);
        return a
    }}}), f.ajaxPrefilter("script", function (a) {
        a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
    }), f.ajaxTransport("script", function (a) {
        if (a.crossDomain) {
            var d, e = c.head || c.getElementsByTagName("head")[0] || c.documentElement;
            return{send:function (f, g) {
                d = c.createElement("script"), d.async = "async", a.scriptCharset && (d.charset = a.scriptCharset), d.src = a.url, d.onload = d.onreadystatechange = function (a, c) {
                    if (c || !d.readyState || /loaded|complete/.test(d.readyState))d.onload = d.onreadystatechange = null, e && d.parentNode && e.removeChild(d), d = b, c || g(200, "success")
                }, e.insertBefore(d, e.firstChild)
            }, abort:function () {
                d && d.onload(0, 1)
            }}
        }
    });
    var ce = a.ActiveXObject ? function () {
        for (var a in cg)cg[a](0, 1)
    } : !1, cf = 0, cg;
    f.ajaxSettings.xhr = a.ActiveXObject ? function () {
        return!this.isLocal && ch() || ci()
    } : ch, function (a) {
        f.extend(f.support, {ajax:!!a, cors:!!a && "withCredentials"in a})
    }(f.ajaxSettings.xhr()), f.support.ajax && f.ajaxTransport(function (c) {
        if (!c.crossDomain || f.support.cors) {
            var d;
            return{send:function (e, g) {
                var h = c.xhr(), i, j;
                c.username ? h.open(c.type, c.url, c.async, c.username, c.password) : h.open(c.type, c.url, c.async);
                if (c.xhrFields)for (j in c.xhrFields)h[j] = c.xhrFields[j];
                c.mimeType && h.overrideMimeType && h.overrideMimeType(c.mimeType), !c.crossDomain && !e["X-Requested-With"] && (e["X-Requested-With"] = "XMLHttpRequest");
                try {
                    for (j in e)h.setRequestHeader(j, e[j])
                } catch (k) {
                }
                h.send(c.hasContent && c.data || null), d = function (a, e) {
                    var j, k, l, m, n;
                    try {
                        if (d && (e || h.readyState === 4)) {
                            d = b, i && (h.onreadystatechange = f.noop, ce && delete cg[i]);
                            if (e)h.readyState !== 4 && h.abort(); else {
                                j = h.status, l = h.getAllResponseHeaders(), m = {}, n = h.responseXML, n && n.documentElement && (m.xml = n), m.text = h.responseText;
                                try {
                                    k = h.statusText
                                } catch (o) {
                                    k = ""
                                }
                                !j && c.isLocal && !c.crossDomain ? j = m.text ? 200 : 404 : j === 1223 && (j = 204)
                            }
                        }
                    } catch (p) {
                        e || g(-1, p)
                    }
                    m && g(j, k, m, l)
                }, !c.async || h.readyState === 4 ? d() : (i = ++cf, ce && (cg || (cg = {}, f(a).unload(ce)), cg[i] = d), h.onreadystatechange = d)
            }, abort:function () {
                d && d(0, 1)
            }}
        }
    });
    var cj = {}, ck, cl, cm = /^(?:toggle|show|hide)$/, cn = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, co, cp = [
        ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
        ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
        ["opacity"]
    ], cq, cr = a.webkitRequestAnimationFrame || a.mozRequestAnimationFrame || a.oRequestAnimationFrame;
    f.fn.extend({show:function (a, b, c) {
        var d, e;
        if (a || a === 0)return this.animate(cu("show", 3), a, b, c);
        for (var g = 0, h = this.length; g < h; g++)d = this[g], d.style && (e = d.style.display, !f._data(d, "olddisplay") && e === "none" && (e = d.style.display = ""), e === "" && f.css(d, "display") === "none" && f._data(d, "olddisplay", cv(d.nodeName)));
        for (g = 0; g < h; g++) {
            d = this[g];
            if (d.style) {
                e = d.style.display;
                if (e === "" || e === "none")d.style.display = f._data(d, "olddisplay") || ""
            }
        }
        return this
    }, hide:function (a, b, c) {
        if (a || a === 0)return this.animate(cu("hide", 3), a, b, c);
        for (var d = 0, e = this.length; d < e; d++)if (this[d].style) {
            var g = f.css(this[d], "display");
            g !== "none" && !f._data(this[d], "olddisplay") && f._data(this[d], "olddisplay", g)
        }
        for (d = 0; d < e; d++)this[d].style && (this[d].style.display = "none");
        return this
    }, _toggle:f.fn.toggle, toggle:function (a, b, c) {
        var d = typeof a == "boolean";
        f.isFunction(a) && f.isFunction(b) ? this._toggle.apply(this, arguments) : a == null || d ? this.each(function () {
            var b = d ? a : f(this).is(":hidden");
            f(this)[b ? "show" : "hide"]()
        }) : this.animate(cu("toggle", 3), a, b, c);
        return this
    }, fadeTo:function (a, b, c, d) {
        return this.filter(":hidden").css("opacity", 0).show().end().animate({opacity:b}, a, c, d)
    }, animate:function (a, b, c, d) {
        var e = f.speed(b, c, d);
        if (f.isEmptyObject(a))return this.each(e.complete, [!1]);
        a = f.extend({}, a);
        return this[e.queue === !1 ? "each" : "queue"](function () {
            e.queue === !1 && f._mark(this);
            var b = f.extend({}, e), c = this.nodeType === 1, d = c && f(this).is(":hidden"), g, h, i, j, k, l, m, n, o;
            b.animatedProperties = {};
            for (i in a) {
                g = f.camelCase(i), i !== g && (a[g] = a[i], delete a[i]), h = a[g], f.isArray(h) ? (b.animatedProperties[g] = h[1], h = a[g] = h[0]) : b.animatedProperties[g] = b.specialEasing && b.specialEasing[g] || b.easing || "swing";
                if (h === "hide" && d || h === "show" && !d)return b.complete.call(this);
                c && (g === "height" || g === "width") && (b.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY], f.css(this, "display") === "inline" && f.css(this, "float") === "none" && (f.support.inlineBlockNeedsLayout ? (j = cv(this.nodeName), j === "inline" ? this.style.display = "inline-block" : (this.style.display = "inline", this.style.zoom = 1)) : this.style.display = "inline-block"))
            }
            b.overflow != null && (this.style.overflow = "hidden");
            for (i in a)k = new f.fx(this, b, i), h = a[i], cm.test(h) ? k[h === "toggle" ? d ? "show" : "hide" : h]() : (l = cn.exec(h), m = k.cur(), l ? (n = parseFloat(l[2]), o = l[3] || (f.cssNumber[i] ? "" : "px"), o !== "px" && (f.style(this, i, (n || 1) + o), m = (n || 1) / k.cur() * m, f.style(this, i, m + o)), l[1] && (n = (l[1] === "-=" ? -1 : 1) * n + m), k.custom(m, n, o)) : k.custom(m, h, ""));
            return!0
        })
    }, stop:function (a, b) {
        a && this.queue([]), this.each(function () {
            var a = f.timers, c = a.length;
            b || f._unmark(!0, this);
            while (c--)a[c].elem === this && (b && a[c](!0), a.splice(c, 1))
        }), b || this.dequeue();
        return this
    }}), f.each({slideDown:cu("show", 1), slideUp:cu("hide", 1), slideToggle:cu("toggle", 1), fadeIn:{opacity:"show"}, fadeOut:{opacity:"hide"}, fadeToggle:{opacity:"toggle"}}, function (a, b) {
        f.fn[a] = function (a, c, d) {
            return this.animate(b, a, c, d)
        }
    }), f.extend({speed:function (a, b, c) {
        var d = a && typeof a == "object" ? f.extend({}, a) : {complete:c || !c && b || f.isFunction(a) && a, duration:a, easing:c && b || b && !f.isFunction(b) && b};
        d.duration = f.fx.off ? 0 : typeof d.duration == "number" ? d.duration : d.duration in f.fx.speeds ? f.fx.speeds[d.duration] : f.fx.speeds._default, d.old = d.complete, d.complete = function (a) {
            d.queue !== !1 ? f.dequeue(this) : a !== !1 && f._unmark(this), f.isFunction(d.old) && d.old.call(this)
        };
        return d
    }, easing:{linear:function (a, b, c, d) {
        return c + d * a
    }, swing:function (a, b, c, d) {
        return(-Math.cos(a * Math.PI) / 2 + .5) * d + c
    }}, timers:[], fx:function (a, b, c) {
        this.options = b, this.elem = a, this.prop = c, b.orig = b.orig || {}
    }}), f.fx.prototype = {update:function () {
        this.options.step && this.options.step.call(this.elem, this.now, this), (f.fx.step[this.prop] || f.fx.step._default)(this)
    }, cur:function () {
        if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null))return this.elem[this.prop];
        var a, b = f.css(this.elem, this.prop);
        return isNaN(a = parseFloat(b)) ? !b || b === "auto" ? 0 : b : a
    }, custom:function (a, b, c) {
        function h(a) {
            return d.step(a)
        }

        var d = this, e = f.fx, g;
        this.startTime = cq || cs(), this.start = a, this.end = b, this.unit = c || this.unit || (f.cssNumber[this.prop] ? "" : "px"), this.now = this.start, this.pos = this.state = 0, h.elem = this.elem, h() && f.timers.push(h) && !co && (cr ? (co = 1, g = function () {
            co && (cr(g), e.tick())
        }, cr(g)) : co = setInterval(e.tick, e.interval))
    }, show:function () {
        this.options.orig[this.prop] = f.style(this.elem, this.prop), this.options.show = !0, this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()), f(this.elem).show()
    }, hide:function () {
        this.options.orig[this.prop] = f.style(this.elem, this.prop), this.options.hide = !0, this.custom(this.cur(), 0)
    }, step:function (a) {
        var b = cq || cs(), c = !0, d = this.elem, e = this.options, g, h;
        if (a || b >= e.duration + this.startTime) {
            this.now = this.end, this.pos = this.state = 1, this.update(), e.animatedProperties[this.prop] = !0;
            for (g in e.animatedProperties)e.animatedProperties[g] !== !0 && (c = !1);
            if (c) {
                e.overflow != null && !f.support.shrinkWrapBlocks && f.each(["", "X", "Y"], function (a, b) {
                    d.style["overflow" + b] = e.overflow[a]
                }), e.hide && f(d).hide();
                if (e.hide || e.show)for (var i in e.animatedProperties)f.style(d, i, e.orig[i]);
                e.complete.call(d)
            }
            return!1
        }
        e.duration == Infinity ? this.now = b : (h = b - this.startTime, this.state = h / e.duration, this.pos = f.easing[e.animatedProperties[this.prop]](this.state, h, 0, 1, e.duration), this.now = this.start + (this.end - this.start) * this.pos), this.update();
        return!0
    }}, f.extend(f.fx, {tick:function () {
        for (var a = f.timers, b = 0; b < a.length; ++b)a[b]() || a.splice(b--, 1);
        a.length || f.fx.stop()
    }, interval:13, stop:function () {
        clearInterval(co), co = null
    }, speeds:{slow:600, fast:200, _default:400}, step:{opacity:function (a) {
        f.style(a.elem, "opacity", a.now)
    }, _default:function (a) {
        a.elem.style && a.elem.style[a.prop] != null ? a.elem.style[a.prop] = (a.prop === "width" || a.prop === "height" ? Math.max(0, a.now) : a.now) + a.unit : a.elem[a.prop] = a.now
    }}}), f.expr && f.expr.filters && (f.expr.filters.animated = function (a) {
        return f.grep(f.timers,
            function (b) {
                return a === b.elem
            }).length
    });
    var cw = /^t(?:able|d|h)$/i, cx = /^(?:body|html)$/i;
    "getBoundingClientRect"in c.documentElement ? f.fn.offset = function (a) {
        var b = this[0], c;
        if (a)return this.each(function (b) {
            f.offset.setOffset(this, a, b)
        });
        if (!b || !b.ownerDocument)return null;
        if (b === b.ownerDocument.body)return f.offset.bodyOffset(b);
        try {
            c = b.getBoundingClientRect()
        } catch (d) {
        }
        var e = b.ownerDocument, g = e.documentElement;
        if (!c || !f.contains(g, b))return c ? {top:c.top, left:c.left} : {top:0, left:0};
        var h = e.body, i = cy(e), j = g.clientTop || h.clientTop || 0, k = g.clientLeft || h.clientLeft || 0, l = i.pageYOffset || f.support.boxModel && g.scrollTop || h.scrollTop, m = i.pageXOffset || f.support.boxModel && g.scrollLeft || h.scrollLeft, n = c.top + l - j, o = c.left + m - k;
        return{top:n, left:o}
    } : f.fn.offset = function (a) {
        var b = this[0];
        if (a)return this.each(function (b) {
            f.offset.setOffset(this, a, b)
        });
        if (!b || !b.ownerDocument)return null;
        if (b === b.ownerDocument.body)return f.offset.bodyOffset(b);
        f.offset.initialize();
        var c, d = b.offsetParent, e = b, g = b.ownerDocument, h = g.documentElement, i = g.body, j = g.defaultView, k = j ? j.getComputedStyle(b, null) : b.currentStyle, l = b.offsetTop, m = b.offsetLeft;
        while ((b = b.parentNode) && b !== i && b !== h) {
            if (f.offset.supportsFixedPosition && k.position === "fixed")break;
            c = j ? j.getComputedStyle(b, null) : b.currentStyle, l -= b.scrollTop, m -= b.scrollLeft, b === d && (l += b.offsetTop, m += b.offsetLeft, f.offset.doesNotAddBorder && (!f.offset.doesAddBorderForTableAndCells || !cw.test(b.nodeName)) && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), e = d, d = b.offsetParent), f.offset.subtractsBorderForOverflowNotVisible && c.overflow !== "visible" && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), k = c
        }
        if (k.position === "relative" || k.position === "static")l += i.offsetTop, m += i.offsetLeft;
        f.offset.supportsFixedPosition && k.position === "fixed" && (l += Math.max(h.scrollTop, i.scrollTop), m += Math.max(h.scrollLeft, i.scrollLeft));
        return{top:l, left:m}
    }, f.offset = {initialize:function () {
        var a = c.body, b = c.createElement("div"), d, e, g, h, i = parseFloat(f.css(a, "marginTop")) || 0, j = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
        f.extend(b.style, {position:"absolute", top:0, left:0, margin:0, border:0, width:"1px", height:"1px", visibility:"hidden"}), b.innerHTML = j, a.insertBefore(b, a.firstChild), d = b.firstChild, e = d.firstChild, h = d.nextSibling.firstChild.firstChild, this.doesNotAddBorder = e.offsetTop !== 5, this.doesAddBorderForTableAndCells = h.offsetTop === 5, e.style.position = "fixed", e.style.top = "20px", this.supportsFixedPosition = e.offsetTop === 20 || e.offsetTop === 15, e.style.position = e.style.top = "", d.style.overflow = "hidden", d.style.position = "relative", this.subtractsBorderForOverflowNotVisible = e.offsetTop === -5, this.doesNotIncludeMarginInBodyOffset = a.offsetTop !== i, a.removeChild(b), f.offset.initialize = f.noop
    }, bodyOffset:function (a) {
        var b = a.offsetTop, c = a.offsetLeft;
        f.offset.initialize(), f.offset.doesNotIncludeMarginInBodyOffset && (b += parseFloat(f.css(a, "marginTop")) || 0, c += parseFloat(f.css(a, "marginLeft")) || 0);
        return{top:b, left:c}
    }, setOffset:function (a, b, c) {
        var d = f.css(a, "position");
        d === "static" && (a.style.position = "relative");
        var e = f(a), g = e.offset(), h = f.css(a, "top"), i = f.css(a, "left"), j = (d === "absolute" || d === "fixed") && f.inArray("auto", [h, i]) > -1, k = {}, l = {}, m, n;
        j ? (l = e.position(), m = l.top, n = l.left) : (m = parseFloat(h) || 0, n = parseFloat(i) || 0), f.isFunction(b) && (b = b.call(a, c, g)), b.top != null && (k.top = b.top - g.top + m), b.left != null && (k.left = b.left - g.left + n), "using"in b ? b.using.call(a, k) : e.css(k)
    }}, f.fn.extend({position:function () {
        if (!this[0])return null;
        var a = this[0], b = this.offsetParent(), c = this.offset(), d = cx.test(b[0].nodeName) ? {top:0, left:0} : b.offset();
        c.top -= parseFloat(f.css(a, "marginTop")) || 0, c.left -= parseFloat(f.css(a, "marginLeft")) || 0, d.top += parseFloat(f.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(f.css(b[0], "borderLeftWidth")) || 0;
        return{top:c.top - d.top, left:c.left - d.left}
    }, offsetParent:function () {
        return this.map(function () {
            var a = this.offsetParent || c.body;
            while (a && !cx.test(a.nodeName) && f.css(a, "position") === "static")a = a.offsetParent;
            return a
        })
    }}), f.each(["Left", "Top"], function (a, c) {
        var d = "scroll" + c;
        f.fn[d] = function (c) {
            var e, g;
            if (c === b) {
                e = this[0];
                if (!e)return null;
                g = cy(e);
                return g ? "pageXOffset"in g ? g[a ? "pageYOffset" : "pageXOffset"] : f.support.boxModel && g.document.documentElement[d] || g.document.body[d] : e[d]
            }
            return this.each(function () {
                g = cy(this), g ? g.scrollTo(a ? f(g).scrollLeft() : c, a ? c : f(g).scrollTop()) : this[d] = c
            })
        }
    }), f.each(["Height", "Width"], function (a, c) {
        var d = c.toLowerCase();
        f.fn["inner" + c] = function () {
            return this[0] ? parseFloat(f.css(this[0], d, "padding")) : null
        }, f.fn["outer" + c] = function (a) {
            return this[0] ? parseFloat(f.css(this[0], d, a ? "margin" : "border")) : null
        }, f.fn[d] = function (a) {
            var e = this[0];
            if (!e)return a == null ? null : this;
            if (f.isFunction(a))return this.each(function (b) {
                var c = f(this);
                c[d](a.call(this, b, c[d]()))
            });
            if (f.isWindow(e)) {
                var g = e.document.documentElement["client" + c];
                return e.document.compatMode === "CSS1Compat" && g || e.document.body["client" + c] || g
            }
            if (e.nodeType === 9)return Math.max(e.documentElement["client" + c], e.body["scroll" + c], e.documentElement["scroll" + c], e.body["offset" + c], e.documentElement["offset" + c]);
            if (a === b) {
                var h = f.css(e, d), i = parseFloat(h);
                return f.isNaN(i) ? h : i
            }
            return this.css(d, typeof a == "string" ? a : a + "px")
        }
    }), a.jQuery = a.$ = f
})(window);

/*!
 * jQuery UI 1.8.9
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function (b, c) {
    function f(g) {
        return!b(g).parents().andSelf().filter(
            function () {
                return b.curCSS(this, "visibility") === "hidden" || b.expr.filters.hidden(this)
            }).length
    }

    b.ui = b.ui || {};
    if (!b.ui.version) {
        b.extend(b.ui, {version:"1.8.9", keyCode:{ALT:18, BACKSPACE:8, CAPS_LOCK:20, COMMA:188, COMMAND:91, COMMAND_LEFT:91, COMMAND_RIGHT:93, CONTROL:17, DELETE:46, DOWN:40, END:35, ENTER:13, ESCAPE:27, HOME:36, INSERT:45, LEFT:37, MENU:93, NUMPAD_ADD:107, NUMPAD_DECIMAL:110, NUMPAD_DIVIDE:111, NUMPAD_ENTER:108, NUMPAD_MULTIPLY:106,
            NUMPAD_SUBTRACT:109, PAGE_DOWN:34, PAGE_UP:33, PERIOD:190, RIGHT:39, SHIFT:16, SPACE:32, TAB:9, UP:38, WINDOWS:91}});
        b.fn.extend({_focus:b.fn.focus, focus:function (g, e) {
            return typeof g === "number" ? this.each(function () {
                var a = this;
                setTimeout(function () {
                    b(a).focus();
                    e && e.call(a)
                }, g)
            }) : this._focus.apply(this, arguments)
        }, scrollParent:function () {
            var g;
            g = b.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(
                function () {
                    return/(relative|absolute|fixed)/.test(b.curCSS(this,
                        "position", 1)) && /(auto|scroll)/.test(b.curCSS(this, "overflow", 1) + b.curCSS(this, "overflow-y", 1) + b.curCSS(this, "overflow-x", 1))
                }).eq(0) : this.parents().filter(
                function () {
                    return/(auto|scroll)/.test(b.curCSS(this, "overflow", 1) + b.curCSS(this, "overflow-y", 1) + b.curCSS(this, "overflow-x", 1))
                }).eq(0);
            return/fixed/.test(this.css("position")) || !g.length ? b(document) : g
        }, zIndex:function (g) {
            if (g !== c)return this.css("zIndex", g);
            if (this.length) {
                g = b(this[0]);
                for (var e; g.length && g[0] !== document;) {
                    e = g.css("position");
                    if (e === "absolute" || e === "relative" || e === "fixed") {
                        e = parseInt(g.css("zIndex"), 10);
                        if (!isNaN(e) && e !== 0)return e
                    }
                    g = g.parent()
                }
            }
            return 0
        }, disableSelection:function () {
            return this.bind((b.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (g) {
                g.preventDefault()
            })
        }, enableSelection:function () {
            return this.unbind(".ui-disableSelection")
        }});
        b.each(["Width", "Height"], function (g, e) {
            function a(j, n, q, l) {
                b.each(d, function () {
                    n -= parseFloat(b.curCSS(j, "padding" + this, true)) || 0;
                    if (q)n -= parseFloat(b.curCSS(j,
                        "border" + this + "Width", true)) || 0;
                    if (l)n -= parseFloat(b.curCSS(j, "margin" + this, true)) || 0
                });
                return n
            }

            var d = e === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], h = e.toLowerCase(), i = {innerWidth:b.fn.innerWidth, innerHeight:b.fn.innerHeight, outerWidth:b.fn.outerWidth, outerHeight:b.fn.outerHeight};
            b.fn["inner" + e] = function (j) {
                if (j === c)return i["inner" + e].call(this);
                return this.each(function () {
                    b(this).css(h, a(this, j) + "px")
                })
            };
            b.fn["outer" + e] = function (j, n) {
                if (typeof j !== "number")return i["outer" + e].call(this, j);
                return this.each(function () {
                    b(this).css(h,
                        a(this, j, true, n) + "px")
                })
            }
        });
        b.extend(b.expr[":"], {data:function (g, e, a) {
            return!!b.data(g, a[3])
        }, focusable:function (g) {
            var e = g.nodeName.toLowerCase(), a = b.attr(g, "tabindex");
            if ("area" === e) {
                e = g.parentNode;
                a = e.name;
                if (!g.href || !a || e.nodeName.toLowerCase() !== "map")return false;
                g = b("img[usemap=#" + a + "]")[0];
                return!!g && f(g)
            }
            return(/input|select|textarea|button|object/.test(e) ? !g.disabled : "a" == e ? g.href || !isNaN(a) : !isNaN(a)) && f(g)
        }, tabbable:function (g) {
            var e = b.attr(g, "tabindex");
            return(isNaN(e) || e >= 0) && b(g).is(":focusable")
        }});
        b(function () {
            var g = document.body, e = g.appendChild(e = document.createElement("div"));
            b.extend(e.style, {minHeight:"100px", height:"auto", padding:0, borderWidth:0});
            b.support.minHeight = e.offsetHeight === 100;
            b.support.selectstart = "onselectstart"in e;
            g.removeChild(e).style.display = "none"
        });
        b.extend(b.ui, {plugin:{add:function (g, e, a) {
            g = b.ui[g].prototype;
            for (var d in a) {
                g.plugins[d] = g.plugins[d] || [];
                g.plugins[d].push([e, a[d]])
            }
        }, call:function (g, e, a) {
            if ((e = g.plugins[e]) && g.element[0].parentNode)for (var d = 0; d < e.length; d++)g.options[e[d][0]] &&
            e[d][1].apply(g.element, a)
        }}, contains:function (g, e) {
            return document.compareDocumentPosition ? g.compareDocumentPosition(e) & 16 : g !== e && g.contains(e)
        }, hasScroll:function (g, e) {
            if (b(g).css("overflow") === "hidden")return false;
            e = e && e === "left" ? "scrollLeft" : "scrollTop";
            var a = false;
            if (g[e] > 0)return true;
            g[e] = 1;
            a = g[e] > 0;
            g[e] = 0;
            return a
        }, isOverAxis:function (g, e, a) {
            return g > e && g < e + a
        }, isOver:function (g, e, a, d, h, i) {
            return b.ui.isOverAxis(g, a, h) && b.ui.isOverAxis(e, d, i)
        }})
    }
})(jQuery);
(function (b, c) {
    if (b.cleanData) {
        var f = b.cleanData;
        b.cleanData = function (e) {
            for (var a = 0, d; (d = e[a]) != null; a++)b(d).triggerHandler("remove");
            f(e)
        }
    } else {
        var g = b.fn.remove;
        b.fn.remove = function (e, a) {
            return this.each(function () {
                if (!a)if (!e || b.filter(e, [this]).length)b("*", this).add([this]).each(function () {
                    b(this).triggerHandler("remove")
                });
                return g.call(b(this), e, a)
            })
        }
    }
    b.widget = function (e, a, d) {
        var h = e.split(".")[0], i;
        e = e.split(".")[1];
        i = h + "-" + e;
        if (!d) {
            d = a;
            a = b.Widget
        }
        b.expr[":"][i] = function (j) {
            return!!b.data(j,
                e)
        };
        b[h] = b[h] || {};
        b[h][e] = function (j, n) {
            arguments.length && this._createWidget(j, n)
        };
        a = new a;
        a.options = b.extend(true, {}, a.options);
        b[h][e].prototype = b.extend(true, a, {namespace:h, widgetName:e, widgetEventPrefix:b[h][e].prototype.widgetEventPrefix || e, widgetBaseClass:i}, d);
        b.widget.bridge(e, b[h][e])
    };
    b.widget.bridge = function (e, a) {
        b.fn[e] = function (d) {
            var h = typeof d === "string", i = Array.prototype.slice.call(arguments, 1), j = this;
            d = !h && i.length ? b.extend.apply(null, [true, d].concat(i)) : d;
            if (h && d.charAt(0) === "_")return j;
            h ? this.each(function () {
                var n = b.data(this, e), q = n && b.isFunction(n[d]) ? n[d].apply(n, i) : n;
                if (q !== n && q !== c) {
                    j = q;
                    return false
                }
            }) : this.each(function () {
                var n = b.data(this, e);
                n ? n.option(d || {})._init() : b.data(this, e, new a(d, this))
            });
            return j
        }
    };
    b.Widget = function (e, a) {
        arguments.length && this._createWidget(e, a)
    };
    b.Widget.prototype = {widgetName:"widget", widgetEventPrefix:"", options:{disabled:false}, _createWidget:function (e, a) {
        b.data(a, this.widgetName, this);
        this.element = b(a);
        this.options = b.extend(true, {}, this.options,
            this._getCreateOptions(), e);
        var d = this;
        this.element.bind("remove." + this.widgetName, function () {
            d.destroy()
        });
        this._create();
        this._trigger("create");
        this._init()
    }, _getCreateOptions:function () {
        return b.metadata && b.metadata.get(this.element[0])[this.widgetName]
    }, _create:function () {
    }, _init:function () {
    }, destroy:function () {
        this.element.unbind("." + this.widgetName).removeData(this.widgetName);
        this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled ui-state-disabled")
    },
        widget:function () {
            return this.element
        }, option:function (e, a) {
            var d = e;
            if (arguments.length === 0)return b.extend({}, this.options);
            if (typeof e === "string") {
                if (a === c)return this.options[e];
                d = {};
                d[e] = a
            }
            this._setOptions(d);
            return this
        }, _setOptions:function (e) {
            var a = this;
            b.each(e, function (d, h) {
                a._setOption(d, h)
            });
            return this
        }, _setOption:function (e, a) {
            this.options[e] = a;
            if (e === "disabled")this.widget()[a ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled ui-state-disabled").attr("aria-disabled", a);
            return this
        },
        enable:function () {
            return this._setOption("disabled", false)
        }, disable:function () {
            return this._setOption("disabled", true)
        }, _trigger:function (e, a, d) {
            var h = this.options[e];
            a = b.Event(a);
            a.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase();
            d = d || {};
            if (a.originalEvent) {
                e = b.event.props.length;
                for (var i; e;) {
                    i = b.event.props[--e];
                    a[i] = a.originalEvent[i]
                }
            }
            this.element.trigger(a, d);
            return!(b.isFunction(h) && h.call(this.element[0], a, d) === false || a.isDefaultPrevented())
        }}
})(jQuery);
(function (b) {
    b.widget("ui.mouse", {options:{cancel:":input,option", distance:1, delay:0}, _mouseInit:function () {
        var c = this;
        this.element.bind("mousedown." + this.widgetName,
            function (f) {
                return c._mouseDown(f)
            }).bind("click." + this.widgetName, function (f) {
            if (true === b.data(f.target, c.widgetName + ".preventClickEvent")) {
                b.removeData(f.target, c.widgetName + ".preventClickEvent");
                f.stopImmediatePropagation();
                return false
            }
        });
        this.started = false
    }, _mouseDestroy:function () {
        this.element.unbind("." + this.widgetName)
    }, _mouseDown:function (c) {
        c.originalEvent =
            c.originalEvent || {};
        if (!c.originalEvent.mouseHandled) {
            this._mouseStarted && this._mouseUp(c);
            this._mouseDownEvent = c;
            var f = this, g = c.which == 1, e = typeof this.options.cancel == "string" ? b(c.target).parents().add(c.target).filter(this.options.cancel).length : false;
            if (!g || e || !this._mouseCapture(c))return true;
            this.mouseDelayMet = !this.options.delay;
            if (!this.mouseDelayMet)this._mouseDelayTimer = setTimeout(function () {
                f.mouseDelayMet = true
            }, this.options.delay);
            if (this._mouseDistanceMet(c) && this._mouseDelayMet(c)) {
                this._mouseStarted =
                    this._mouseStart(c) !== false;
                if (!this._mouseStarted) {
                    c.preventDefault();
                    return true
                }
            }
            this._mouseMoveDelegate = function (a) {
                return f._mouseMove(a)
            };
            this._mouseUpDelegate = function (a) {
                return f._mouseUp(a)
            };
            b(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate);
            c.preventDefault();
            return c.originalEvent.mouseHandled = true
        }
    }, _mouseMove:function (c) {
        if (b.browser.msie && !(document.documentMode >= 9) && !c.button)return this._mouseUp(c);
        if (this._mouseStarted) {
            this._mouseDrag(c);
            return c.preventDefault()
        }
        if (this._mouseDistanceMet(c) && this._mouseDelayMet(c))(this._mouseStarted = this._mouseStart(this._mouseDownEvent, c) !== false) ? this._mouseDrag(c) : this._mouseUp(c);
        return!this._mouseStarted
    }, _mouseUp:function (c) {
        b(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
        if (this._mouseStarted) {
            this._mouseStarted = false;
            c.target == this._mouseDownEvent.target && b.data(c.target, this.widgetName + ".preventClickEvent",
                true);
            this._mouseStop(c)
        }
        return false
    }, _mouseDistanceMet:function (c) {
        return Math.max(Math.abs(this._mouseDownEvent.pageX - c.pageX), Math.abs(this._mouseDownEvent.pageY - c.pageY)) >= this.options.distance
    }, _mouseDelayMet:function () {
        return this.mouseDelayMet
    }, _mouseStart:function () {
    }, _mouseDrag:function () {
    }, _mouseStop:function () {
    }, _mouseCapture:function () {
        return true
    }})
})(jQuery);
(function (b) {
    b.widget("ui.draggable", b.ui.mouse, {widgetEventPrefix:"drag", options:{addClasses:true, appendTo:"parent", axis:false, connectToSortable:false, containment:false, cursor:"auto", cursorAt:false, grid:false, handle:false, helper:"original", iframeFix:false, opacity:false, refreshPositions:false, revert:false, revertDuration:500, scope:"default", scroll:true, scrollSensitivity:20, scrollSpeed:20, snap:false, snapMode:"both", snapTolerance:20, stack:false, zIndex:false}, _create:function () {
        if (this.options.helper ==
            "original" && !/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position = "relative";
        this.options.addClasses && this.element.addClass("ui-draggable");
        this.options.disabled && this.element.addClass("ui-draggable-disabled");
        this._mouseInit()
    }, destroy:function () {
        if (this.element.data("draggable")) {
            this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
            this._mouseDestroy();
            return this
        }
    }, _mouseCapture:function (c) {
        var f =
            this.options;
        if (this.helper || f.disabled || b(c.target).is(".ui-resizable-handle"))return false;
        this.handle = this._getHandle(c);
        if (!this.handle)return false;
        return true
    }, _mouseStart:function (c) {
        var f = this.options;
        this.helper = this._createHelper(c);
        this._cacheHelperProportions();
        if (b.ui.ddmanager)b.ui.ddmanager.current = this;
        this._cacheMargins();
        this.cssPosition = this.helper.css("position");
        this.scrollParent = this.helper.scrollParent();
        this.offset = this.positionAbs = this.element.offset();
        this.offset = {top:this.offset.top -
            this.margins.top, left:this.offset.left - this.margins.left};
        b.extend(this.offset, {click:{left:c.pageX - this.offset.left, top:c.pageY - this.offset.top}, parent:this._getParentOffset(), relative:this._getRelativeOffset()});
        this.originalPosition = this.position = this._generatePosition(c);
        this.originalPageX = c.pageX;
        this.originalPageY = c.pageY;
        f.cursorAt && this._adjustOffsetFromHelper(f.cursorAt);
        f.containment && this._setContainment();
        if (this._trigger("start", c) === false) {
            this._clear();
            return false
        }
        this._cacheHelperProportions();
        b.ui.ddmanager && !f.dropBehaviour && b.ui.ddmanager.prepareOffsets(this, c);
        this.helper.addClass("ui-draggable-dragging");
        this._mouseDrag(c, true);
        return true
    }, _mouseDrag:function (c, f) {
        this.position = this._generatePosition(c);
        this.positionAbs = this._convertPositionTo("absolute");
        if (!f) {
            f = this._uiHash();
            if (this._trigger("drag", c, f) === false) {
                this._mouseUp({});
                return false
            }
            this.position = f.position
        }
        if (!this.options.axis || this.options.axis != "y")this.helper[0].style.left = this.position.left + "px";
        if (!this.options.axis ||
            this.options.axis != "x")this.helper[0].style.top = this.position.top + "px";
        b.ui.ddmanager && b.ui.ddmanager.drag(this, c);
        return false
    }, _mouseStop:function (c) {
        var f = false;
        if (b.ui.ddmanager && !this.options.dropBehaviour)f = b.ui.ddmanager.drop(this, c);
        if (this.dropped) {
            f = this.dropped;
            this.dropped = false
        }
        if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")return false;
        if (this.options.revert == "invalid" && !f || this.options.revert == "valid" && f || this.options.revert === true || b.isFunction(this.options.revert) &&
            this.options.revert.call(this.element, f)) {
            var g = this;
            b(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () {
                g._trigger("stop", c) !== false && g._clear()
            })
        } else this._trigger("stop", c) !== false && this._clear();
        return false
    }, cancel:function () {
        this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear();
        return this
    }, _getHandle:function (c) {
        var f = !this.options.handle || !b(this.options.handle, this.element).length ? true : false;
        b(this.options.handle, this.element).find("*").andSelf().each(function () {
            if (this ==
                c.target)f = true
        });
        return f
    }, _createHelper:function (c) {
        var f = this.options;
        c = b.isFunction(f.helper) ? b(f.helper.apply(this.element[0], [c])) : f.helper == "clone" ? this.element.clone() : this.element;
        c.parents("body").length || c.appendTo(f.appendTo == "parent" ? this.element[0].parentNode : f.appendTo);
        c[0] != this.element[0] && !/(fixed|absolute)/.test(c.css("position")) && c.css("position", "absolute");
        return c
    }, _adjustOffsetFromHelper:function (c) {
        if (typeof c == "string")c = c.split(" ");
        if (b.isArray(c))c = {left:+c[0], top:+c[1] ||
            0};
        if ("left"in c)this.offset.click.left = c.left + this.margins.left;
        if ("right"in c)this.offset.click.left = this.helperProportions.width - c.right + this.margins.left;
        if ("top"in c)this.offset.click.top = c.top + this.margins.top;
        if ("bottom"in c)this.offset.click.top = this.helperProportions.height - c.bottom + this.margins.top
    }, _getParentOffset:function () {
        this.offsetParent = this.helper.offsetParent();
        var c = this.offsetParent.offset();
        if (this.cssPosition == "absolute" && this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0],
            this.offsetParent[0])) {
            c.left += this.scrollParent.scrollLeft();
            c.top += this.scrollParent.scrollTop()
        }
        if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && b.browser.msie)c = {top:0, left:0};
        return{top:c.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left:c.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)}
    }, _getRelativeOffset:function () {
        if (this.cssPosition == "relative") {
            var c = this.element.position();
            return{top:c.top -
                (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left:c.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()}
        } else return{top:0, left:0}
    }, _cacheMargins:function () {
        this.margins = {left:parseInt(this.element.css("marginLeft"), 10) || 0, top:parseInt(this.element.css("marginTop"), 10) || 0}
    }, _cacheHelperProportions:function () {
        this.helperProportions = {width:this.helper.outerWidth(), height:this.helper.outerHeight()}
    }, _setContainment:function () {
        var c = this.options;
        if (c.containment ==
            "parent")c.containment = this.helper[0].parentNode;
        if (c.containment == "document" || c.containment == "window")this.containment = [(c.containment == "document" ? 0 : b(window).scrollLeft()) - this.offset.relative.left - this.offset.parent.left, (c.containment == "document" ? 0 : b(window).scrollTop()) - this.offset.relative.top - this.offset.parent.top, (c.containment == "document" ? 0 : b(window).scrollLeft()) + b(c.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (c.containment == "document" ?
            0 : b(window).scrollTop()) + (b(c.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
        if (!/^(document|window|parent)$/.test(c.containment) && c.containment.constructor != Array) {
            var f = b(c.containment)[0];
            if (f) {
                c = b(c.containment).offset();
                var g = b(f).css("overflow") != "hidden";
                this.containment = [c.left + (parseInt(b(f).css("borderLeftWidth"), 10) || 0) + (parseInt(b(f).css("paddingLeft"), 10) || 0) - this.margins.left, c.top + (parseInt(b(f).css("borderTopWidth"),
                    10) || 0) + (parseInt(b(f).css("paddingTop"), 10) || 0) - this.margins.top, c.left + (g ? Math.max(f.scrollWidth, f.offsetWidth) : f.offsetWidth) - (parseInt(b(f).css("borderLeftWidth"), 10) || 0) - (parseInt(b(f).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, c.top + (g ? Math.max(f.scrollHeight, f.offsetHeight) : f.offsetHeight) - (parseInt(b(f).css("borderTopWidth"), 10) || 0) - (parseInt(b(f).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
            }
        } else if (c.containment.constructor ==
            Array)this.containment = c.containment
    }, _convertPositionTo:function (c, f) {
        if (!f)f = this.position;
        c = c == "absolute" ? 1 : -1;
        var g = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(g[0].tagName);
        return{top:f.top + this.offset.relative.top * c + this.offset.parent.top * c - (b.browser.safari && b.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() :
            e ? 0 : g.scrollTop()) * c), left:f.left + this.offset.relative.left * c + this.offset.parent.left * c - (b.browser.safari && b.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : g.scrollLeft()) * c)}
    }, _generatePosition:function (c) {
        var f = this.options, g = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(g[0].tagName), a = c.pageX, d = c.pageY;
        if (this.originalPosition) {
            if (this.containment) {
                if (c.pageX - this.offset.click.left < this.containment[0])a = this.containment[0] + this.offset.click.left;
                if (c.pageY - this.offset.click.top < this.containment[1])d = this.containment[1] + this.offset.click.top;
                if (c.pageX - this.offset.click.left > this.containment[2])a = this.containment[2] + this.offset.click.left;
                if (c.pageY - this.offset.click.top > this.containment[3])d = this.containment[3] + this.offset.click.top
            }
            if (f.grid) {
                d = this.originalPageY + Math.round((d - this.originalPageY) /
                    f.grid[1]) * f.grid[1];
                d = this.containment ? !(d - this.offset.click.top < this.containment[1] || d - this.offset.click.top > this.containment[3]) ? d : !(d - this.offset.click.top < this.containment[1]) ? d - f.grid[1] : d + f.grid[1] : d;
                a = this.originalPageX + Math.round((a - this.originalPageX) / f.grid[0]) * f.grid[0];
                a = this.containment ? !(a - this.offset.click.left < this.containment[0] || a - this.offset.click.left > this.containment[2]) ? a : !(a - this.offset.click.left < this.containment[0]) ? a - f.grid[0] : a + f.grid[0] : a
            }
        }
        return{top:d - this.offset.click.top -
            this.offset.relative.top - this.offset.parent.top + (b.browser.safari && b.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : g.scrollTop()), left:a - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (b.browser.safari && b.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : g.scrollLeft())}
    }, _clear:function () {
        this.helper.removeClass("ui-draggable-dragging");
        this.helper[0] !=
            this.element[0] && !this.cancelHelperRemoval && this.helper.remove();
        this.helper = null;
        this.cancelHelperRemoval = false
    }, _trigger:function (c, f, g) {
        g = g || this._uiHash();
        b.ui.plugin.call(this, c, [f, g]);
        if (c == "drag")this.positionAbs = this._convertPositionTo("absolute");
        return b.Widget.prototype._trigger.call(this, c, f, g)
    }, plugins:{}, _uiHash:function () {
        return{helper:this.helper, position:this.position, originalPosition:this.originalPosition, offset:this.positionAbs}
    }});
    b.extend(b.ui.draggable, {version:"1.8.9"});
    b.ui.plugin.add("draggable", "connectToSortable", {start:function (c, f) {
        var g = b(this).data("draggable"), e = g.options, a = b.extend({}, f, {item:g.element});
        g.sortables = [];
        b(e.connectToSortable).each(function () {
            var d = b.data(this, "sortable");
            if (d && !d.options.disabled) {
                g.sortables.push({instance:d, shouldRevert:d.options.revert});
                d._refreshItems();
                d._trigger("activate", c, a)
            }
        })
    }, stop:function (c, f) {
        var g = b(this).data("draggable"), e = b.extend({}, f, {item:g.element});
        b.each(g.sortables, function () {
            if (this.instance.isOver) {
                this.instance.isOver =
                    0;
                g.cancelHelperRemoval = true;
                this.instance.cancelHelperRemoval = false;
                if (this.shouldRevert)this.instance.options.revert = true;
                this.instance._mouseStop(c);
                this.instance.options.helper = this.instance.options._helper;
                g.options.helper == "original" && this.instance.currentItem.css({top:"auto", left:"auto"})
            } else {
                this.instance.cancelHelperRemoval = false;
                this.instance._trigger("deactivate", c, e)
            }
        })
    }, drag:function (c, f) {
        var g = b(this).data("draggable"), e = this;
        b.each(g.sortables, function () {
            this.instance.positionAbs =
                g.positionAbs;
            this.instance.helperProportions = g.helperProportions;
            this.instance.offset.click = g.offset.click;
            if (this.instance._intersectsWith(this.instance.containerCache)) {
                if (!this.instance.isOver) {
                    this.instance.isOver = 1;
                    this.instance.currentItem = b(e).clone().appendTo(this.instance.element).data("sortable-item", true);
                    this.instance.options._helper = this.instance.options.helper;
                    this.instance.options.helper = function () {
                        return f.helper[0]
                    };
                    c.target = this.instance.currentItem[0];
                    this.instance._mouseCapture(c,
                        true);
                    this.instance._mouseStart(c, true, true);
                    this.instance.offset.click.top = g.offset.click.top;
                    this.instance.offset.click.left = g.offset.click.left;
                    this.instance.offset.parent.left -= g.offset.parent.left - this.instance.offset.parent.left;
                    this.instance.offset.parent.top -= g.offset.parent.top - this.instance.offset.parent.top;
                    g._trigger("toSortable", c);
                    g.dropped = this.instance.element;
                    g.currentItem = g.element;
                    this.instance.fromOutside = g
                }
                this.instance.currentItem && this.instance._mouseDrag(c)
            } else if (this.instance.isOver) {
                this.instance.isOver =
                    0;
                this.instance.cancelHelperRemoval = true;
                this.instance.options.revert = false;
                this.instance._trigger("out", c, this.instance._uiHash(this.instance));
                this.instance._mouseStop(c, true);
                this.instance.options.helper = this.instance.options._helper;
                this.instance.currentItem.remove();
                this.instance.placeholder && this.instance.placeholder.remove();
                g._trigger("fromSortable", c);
                g.dropped = false
            }
        })
    }});
    b.ui.plugin.add("draggable", "cursor", {start:function () {
        var c = b("body"), f = b(this).data("draggable").options;
        if (c.css("cursor"))f._cursor =
            c.css("cursor");
        c.css("cursor", f.cursor)
    }, stop:function () {
        var c = b(this).data("draggable").options;
        c._cursor && b("body").css("cursor", c._cursor)
    }});
    b.ui.plugin.add("draggable", "iframeFix", {start:function () {
        var c = b(this).data("draggable").options;
        b(c.iframeFix === true ? "iframe" : c.iframeFix).each(function () {
            b('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth + "px", height:this.offsetHeight + "px", position:"absolute", opacity:"0.001", zIndex:1E3}).css(b(this).offset()).appendTo("body")
        })
    },
        stop:function () {
            b("div.ui-draggable-iframeFix").each(function () {
                this.parentNode.removeChild(this)
            })
        }});
    b.ui.plugin.add("draggable", "opacity", {start:function (c, f) {
        c = b(f.helper);
        f = b(this).data("draggable").options;
        if (c.css("opacity"))f._opacity = c.css("opacity");
        c.css("opacity", f.opacity)
    }, stop:function (c, f) {
        c = b(this).data("draggable").options;
        c._opacity && b(f.helper).css("opacity", c._opacity)
    }});
    b.ui.plugin.add("draggable", "scroll", {start:function () {
        var c = b(this).data("draggable");
        if (c.scrollParent[0] !=
            document && c.scrollParent[0].tagName != "HTML")c.overflowOffset = c.scrollParent.offset()
    }, drag:function (c) {
        var f = b(this).data("draggable"), g = f.options, e = false;
        if (f.scrollParent[0] != document && f.scrollParent[0].tagName != "HTML") {
            if (!g.axis || g.axis != "x")if (f.overflowOffset.top + f.scrollParent[0].offsetHeight - c.pageY < g.scrollSensitivity)f.scrollParent[0].scrollTop = e = f.scrollParent[0].scrollTop + g.scrollSpeed; else if (c.pageY - f.overflowOffset.top < g.scrollSensitivity)f.scrollParent[0].scrollTop = e = f.scrollParent[0].scrollTop -
                g.scrollSpeed;
            if (!g.axis || g.axis != "y")if (f.overflowOffset.left + f.scrollParent[0].offsetWidth - c.pageX < g.scrollSensitivity)f.scrollParent[0].scrollLeft = e = f.scrollParent[0].scrollLeft + g.scrollSpeed; else if (c.pageX - f.overflowOffset.left < g.scrollSensitivity)f.scrollParent[0].scrollLeft = e = f.scrollParent[0].scrollLeft - g.scrollSpeed
        } else {
            if (!g.axis || g.axis != "x")if (c.pageY - b(document).scrollTop() < g.scrollSensitivity)e = b(document).scrollTop(b(document).scrollTop() - g.scrollSpeed); else if (b(window).height() -
                (c.pageY - b(document).scrollTop()) < g.scrollSensitivity)e = b(document).scrollTop(b(document).scrollTop() + g.scrollSpeed);
            if (!g.axis || g.axis != "y")if (c.pageX - b(document).scrollLeft() < g.scrollSensitivity)e = b(document).scrollLeft(b(document).scrollLeft() - g.scrollSpeed); else if (b(window).width() - (c.pageX - b(document).scrollLeft()) < g.scrollSensitivity)e = b(document).scrollLeft(b(document).scrollLeft() + g.scrollSpeed)
        }
        e !== false && b.ui.ddmanager && !g.dropBehaviour && b.ui.ddmanager.prepareOffsets(f, c)
    }});
    b.ui.plugin.add("draggable",
        "snap", {start:function () {
            var c = b(this).data("draggable"), f = c.options;
            c.snapElements = [];
            b(f.snap.constructor != String ? f.snap.items || ":data(draggable)" : f.snap).each(function () {
                var g = b(this), e = g.offset();
                this != c.element[0] && c.snapElements.push({item:this, width:g.outerWidth(), height:g.outerHeight(), top:e.top, left:e.left})
            })
        }, drag:function (c, f) {
            for (var g = b(this).data("draggable"), e = g.options, a = e.snapTolerance, d = f.offset.left, h = d + g.helperProportions.width, i = f.offset.top, j = i + g.helperProportions.height, n =
                g.snapElements.length - 1; n >= 0; n--) {
                var q = g.snapElements[n].left, l = q + g.snapElements[n].width, k = g.snapElements[n].top, m = k + g.snapElements[n].height;
                if (q - a < d && d < l + a && k - a < i && i < m + a || q - a < d && d < l + a && k - a < j && j < m + a || q - a < h && h < l + a && k - a < i && i < m + a || q - a < h && h < l + a && k - a < j && j < m + a) {
                    if (e.snapMode != "inner") {
                        var o = Math.abs(k - j) <= a, p = Math.abs(m - i) <= a, s = Math.abs(q - h) <= a, r = Math.abs(l - d) <= a;
                        if (o)f.position.top = g._convertPositionTo("relative", {top:k - g.helperProportions.height, left:0}).top - g.margins.top;
                        if (p)f.position.top = g._convertPositionTo("relative",
                            {top:m, left:0}).top - g.margins.top;
                        if (s)f.position.left = g._convertPositionTo("relative", {top:0, left:q - g.helperProportions.width}).left - g.margins.left;
                        if (r)f.position.left = g._convertPositionTo("relative", {top:0, left:l}).left - g.margins.left
                    }
                    var u = o || p || s || r;
                    if (e.snapMode != "outer") {
                        o = Math.abs(k - i) <= a;
                        p = Math.abs(m - j) <= a;
                        s = Math.abs(q - d) <= a;
                        r = Math.abs(l - h) <= a;
                        if (o)f.position.top = g._convertPositionTo("relative", {top:k, left:0}).top - g.margins.top;
                        if (p)f.position.top = g._convertPositionTo("relative", {top:m - g.helperProportions.height,
                            left:0}).top - g.margins.top;
                        if (s)f.position.left = g._convertPositionTo("relative", {top:0, left:q}).left - g.margins.left;
                        if (r)f.position.left = g._convertPositionTo("relative", {top:0, left:l - g.helperProportions.width}).left - g.margins.left
                    }
                    if (!g.snapElements[n].snapping && (o || p || s || r || u))g.options.snap.snap && g.options.snap.snap.call(g.element, c, b.extend(g._uiHash(), {snapItem:g.snapElements[n].item}));
                    g.snapElements[n].snapping = o || p || s || r || u
                } else {
                    g.snapElements[n].snapping && g.options.snap.release && g.options.snap.release.call(g.element,
                        c, b.extend(g._uiHash(), {snapItem:g.snapElements[n].item}));
                    g.snapElements[n].snapping = false
                }
            }
        }});
    b.ui.plugin.add("draggable", "stack", {start:function () {
        var c = b(this).data("draggable").options;
        c = b.makeArray(b(c.stack)).sort(function (g, e) {
            return(parseInt(b(g).css("zIndex"), 10) || 0) - (parseInt(b(e).css("zIndex"), 10) || 0)
        });
        if (c.length) {
            var f = parseInt(c[0].style.zIndex) || 0;
            b(c).each(function (g) {
                this.style.zIndex = f + g
            });
            this[0].style.zIndex = f + c.length
        }
    }});
    b.ui.plugin.add("draggable", "zIndex", {start:function (c, f) {
        c = b(f.helper);
        f = b(this).data("draggable").options;
        if (c.css("zIndex"))f._zIndex = c.css("zIndex");
        c.css("zIndex", f.zIndex)
    }, stop:function (c, f) {
        c = b(this).data("draggable").options;
        c._zIndex && b(f.helper).css("zIndex", c._zIndex)
    }})
})(jQuery);
(function (b) {
    b.widget("ui.droppable", {widgetEventPrefix:"drop", options:{accept:"*", activeClass:false, addClasses:true, greedy:false, hoverClass:false, scope:"default", tolerance:"intersect"}, _create:function () {
        var c = this.options, f = c.accept;
        this.isover = 0;
        this.isout = 1;
        this.accept = b.isFunction(f) ? f : function (g) {
            return g.is(f)
        };
        this.proportions = {width:this.element[0].offsetWidth, height:this.element[0].offsetHeight};
        b.ui.ddmanager.droppables[c.scope] = b.ui.ddmanager.droppables[c.scope] || [];
        b.ui.ddmanager.droppables[c.scope].push(this);
        c.addClasses && this.element.addClass("ui-droppable")
    }, destroy:function () {
        for (var c = b.ui.ddmanager.droppables[this.options.scope], f = 0; f < c.length; f++)c[f] == this && c.splice(f, 1);
        this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");
        return this
    }, _setOption:function (c, f) {
        if (c == "accept")this.accept = b.isFunction(f) ? f : function (g) {
            return g.is(f)
        };
        b.Widget.prototype._setOption.apply(this, arguments)
    }, _activate:function (c) {
        var f = b.ui.ddmanager.current;
        this.options.activeClass &&
        this.element.addClass(this.options.activeClass);
        f && this._trigger("activate", c, this.ui(f))
    }, _deactivate:function (c) {
        var f = b.ui.ddmanager.current;
        this.options.activeClass && this.element.removeClass(this.options.activeClass);
        f && this._trigger("deactivate", c, this.ui(f))
    }, _over:function (c) {
        var f = b.ui.ddmanager.current;
        if (!(!f || (f.currentItem || f.element)[0] == this.element[0]))if (this.accept.call(this.element[0], f.currentItem || f.element)) {
            this.options.hoverClass && this.element.addClass(this.options.hoverClass);
            this._trigger("over", c, this.ui(f))
        }
    }, _out:function (c) {
        var f = b.ui.ddmanager.current;
        if (!(!f || (f.currentItem || f.element)[0] == this.element[0]))if (this.accept.call(this.element[0], f.currentItem || f.element)) {
            this.options.hoverClass && this.element.removeClass(this.options.hoverClass);
            this._trigger("out", c, this.ui(f))
        }
    }, _drop:function (c, f) {
        var g = f || b.ui.ddmanager.current;
        if (!g || (g.currentItem || g.element)[0] == this.element[0])return false;
        var e = false;
        this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function () {
            var a =
                b.data(this, "droppable");
            if (a.options.greedy && !a.options.disabled && a.options.scope == g.options.scope && a.accept.call(a.element[0], g.currentItem || g.element) && b.ui.intersect(g, b.extend(a, {offset:a.element.offset()}), a.options.tolerance)) {
                e = true;
                return false
            }
        });
        if (e)return false;
        if (this.accept.call(this.element[0], g.currentItem || g.element)) {
            this.options.activeClass && this.element.removeClass(this.options.activeClass);
            this.options.hoverClass && this.element.removeClass(this.options.hoverClass);
            this._trigger("drop",
                c, this.ui(g));
            return this.element
        }
        return false
    }, ui:function (c) {
        return{draggable:c.currentItem || c.element, helper:c.helper, position:c.position, offset:c.positionAbs}
    }});
    b.extend(b.ui.droppable, {version:"1.8.9"});
    b.ui.intersect = function (c, f, g) {
        if (!f.offset)return false;
        var e = (c.positionAbs || c.position.absolute).left, a = e + c.helperProportions.width, d = (c.positionAbs || c.position.absolute).top, h = d + c.helperProportions.height, i = f.offset.left, j = i + f.proportions.width, n = f.offset.top, q = n + f.proportions.height;
        switch (g) {
            case "fit":
                return i <= e && a <= j && n <= d && h <= q;
            case "intersect":
                return i < e + c.helperProportions.width / 2 && a - c.helperProportions.width / 2 < j && n < d + c.helperProportions.height / 2 && h - c.helperProportions.height / 2 < q;
            case "pointer":
                return b.ui.isOver((c.positionAbs || c.position.absolute).top + (c.clickOffset || c.offset.click).top, (c.positionAbs || c.position.absolute).left + (c.clickOffset || c.offset.click).left, n, i, f.proportions.height, f.proportions.width);
            case "touch":
                return(d >= n && d <= q || h >= n && h <= q || d < n && h > q) && (e >=
                    i && e <= j || a >= i && a <= j || e < i && a > j);
            default:
                return false
        }
    };
    b.ui.ddmanager = {current:null, droppables:{"default":[]}, prepareOffsets:function (c, f) {
        var g = b.ui.ddmanager.droppables[c.options.scope] || [], e = f ? f.type : null, a = (c.currentItem || c.element).find(":data(droppable)").andSelf(), d = 0;
        a:for (; d < g.length; d++)if (!(g[d].options.disabled || c && !g[d].accept.call(g[d].element[0], c.currentItem || c.element))) {
            for (var h = 0; h < a.length; h++)if (a[h] == g[d].element[0]) {
                g[d].proportions.height = 0;
                continue a
            }
            g[d].visible = g[d].element.css("display") !=
                "none";
            if (g[d].visible) {
                g[d].offset = g[d].element.offset();
                g[d].proportions = {width:g[d].element[0].offsetWidth, height:g[d].element[0].offsetHeight};
                e == "mousedown" && g[d]._activate.call(g[d], f)
            }
        }
    }, drop:function (c, f) {
        var g = false;
        b.each(b.ui.ddmanager.droppables[c.options.scope] || [], function () {
            if (this.options) {
                if (!this.options.disabled && this.visible && b.ui.intersect(c, this, this.options.tolerance))g = g || this._drop.call(this, f);
                if (!this.options.disabled && this.visible && this.accept.call(this.element[0], c.currentItem ||
                    c.element)) {
                    this.isout = 1;
                    this.isover = 0;
                    this._deactivate.call(this, f)
                }
            }
        });
        return g
    }, drag:function (c, f) {
        c.options.refreshPositions && b.ui.ddmanager.prepareOffsets(c, f);
        b.each(b.ui.ddmanager.droppables[c.options.scope] || [], function () {
            if (!(this.options.disabled || this.greedyChild || !this.visible)) {
                var g = b.ui.intersect(c, this, this.options.tolerance);
                if (g = !g && this.isover == 1 ? "isout" : g && this.isover == 0 ? "isover" : null) {
                    var e;
                    if (this.options.greedy) {
                        var a = this.element.parents(":data(droppable):eq(0)");
                        if (a.length) {
                            e =
                                b.data(a[0], "droppable");
                            e.greedyChild = g == "isover" ? 1 : 0
                        }
                    }
                    if (e && g == "isover") {
                        e.isover = 0;
                        e.isout = 1;
                        e._out.call(e, f)
                    }
                    this[g] = 1;
                    this[g == "isout" ? "isover" : "isout"] = 0;
                    this[g == "isover" ? "_over" : "_out"].call(this, f);
                    if (e && g == "isout") {
                        e.isout = 0;
                        e.isover = 1;
                        e._over.call(e, f)
                    }
                }
            }
        })
    }}
})(jQuery);
(function (b) {
    b.widget("ui.resizable", b.ui.mouse, {widgetEventPrefix:"resize", options:{alsoResize:false, animate:false, animateDuration:"slow", animateEasing:"swing", aspectRatio:false, autoHide:false, containment:false, ghost:false, grid:false, handles:"e,s,se", helper:false, maxHeight:null, maxWidth:null, minHeight:10, minWidth:10, zIndex:1E3}, _create:function () {
        var g = this, e = this.options;
        this.element.addClass("ui-resizable");
        b.extend(this, {_aspectRatio:!!e.aspectRatio, aspectRatio:e.aspectRatio, originalElement:this.element,
            _proportionallyResizeElements:[], _helper:e.helper || e.ghost || e.animate ? e.helper || "ui-resizable-helper" : null});
        if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
            /relative/.test(this.element.css("position")) && b.browser.opera && this.element.css({position:"relative", top:"auto", left:"auto"});
            this.element.wrap(b('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"), width:this.element.outerWidth(), height:this.element.outerHeight(),
                top:this.element.css("top"), left:this.element.css("left")}));
            this.element = this.element.parent().data("resizable", this.element.data("resizable"));
            this.elementIsWrapper = true;
            this.element.css({marginLeft:this.originalElement.css("marginLeft"), marginTop:this.originalElement.css("marginTop"), marginRight:this.originalElement.css("marginRight"), marginBottom:this.originalElement.css("marginBottom")});
            this.originalElement.css({marginLeft:0, marginTop:0, marginRight:0, marginBottom:0});
            this.originalResizeStyle =
                this.originalElement.css("resize");
            this.originalElement.css("resize", "none");
            this._proportionallyResizeElements.push(this.originalElement.css({position:"static", zoom:1, display:"block"}));
            this.originalElement.css({margin:this.originalElement.css("margin")});
            this._proportionallyResize()
        }
        this.handles = e.handles || (!b(".ui-resizable-handle", this.element).length ? "e,s,se" : {n:".ui-resizable-n", e:".ui-resizable-e", s:".ui-resizable-s", w:".ui-resizable-w", se:".ui-resizable-se", sw:".ui-resizable-sw", ne:".ui-resizable-ne",
            nw:".ui-resizable-nw"});
        if (this.handles.constructor == String) {
            if (this.handles == "all")this.handles = "n,e,s,w,se,sw,ne,nw";
            var a = this.handles.split(",");
            this.handles = {};
            for (var d = 0; d < a.length; d++) {
                var h = b.trim(a[d]), i = b('<div class="ui-resizable-handle ' + ("ui-resizable-" + h) + '"></div>');
                /sw|se|ne|nw/.test(h) && i.css({zIndex:++e.zIndex});
                "se" == h && i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
                this.handles[h] = ".ui-resizable-" + h;
                this.element.append(i)
            }
        }
        this._renderAxis = function (j) {
            j = j || this.element;
            for (var n in this.handles) {
                if (this.handles[n].constructor ==
                    String)this.handles[n] = b(this.handles[n], this.element).show();
                if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
                    var q = b(this.handles[n], this.element), l = 0;
                    l = /sw|ne|nw|se|n|s/.test(n) ? q.outerHeight() : q.outerWidth();
                    q = ["padding", /ne|nw|n/.test(n) ? "Top" : /se|sw|s/.test(n) ? "Bottom" : /^e$/.test(n) ? "Right" : "Left"].join("");
                    j.css(q, l);
                    this._proportionallyResize()
                }
                b(this.handles[n])
            }
        };
        this._renderAxis(this.element);
        this._handles = b(".ui-resizable-handle", this.element).disableSelection();
        this._handles.mouseover(function () {
            if (!g.resizing) {
                if (this.className)var j = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
                g.axis = j && j[1] ? j[1] : "se"
            }
        });
        if (e.autoHide) {
            this._handles.hide();
            b(this.element).addClass("ui-resizable-autohide").hover(function () {
                b(this).removeClass("ui-resizable-autohide");
                g._handles.show()
            }, function () {
                if (!g.resizing) {
                    b(this).addClass("ui-resizable-autohide");
                    g._handles.hide()
                }
            })
        }
        this._mouseInit()
    }, destroy:function () {
        this._mouseDestroy();
        var g = function (a) {
            b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
        };
        if (this.elementIsWrapper) {
            g(this.element);
            var e = this.element;
            e.after(this.originalElement.css({position:e.css("position"), width:e.outerWidth(), height:e.outerHeight(), top:e.css("top"), left:e.css("left")})).remove()
        }
        this.originalElement.css("resize", this.originalResizeStyle);
        g(this.originalElement);
        return this
    }, _mouseCapture:function (g) {
        var e = false;
        for (var a in this.handles)if (b(this.handles[a])[0] == g.target)e = true;
        return!this.options.disabled && e
    }, _mouseStart:function (g) {
        var e = this.options, a = this.element.position(),
            d = this.element;
        this.resizing = true;
        this.documentScroll = {top:b(document).scrollTop(), left:b(document).scrollLeft()};
        if (d.is(".ui-draggable") || /absolute/.test(d.css("position")))d.css({position:"absolute", top:a.top, left:a.left});
        b.browser.opera && /relative/.test(d.css("position")) && d.css({position:"relative", top:"auto", left:"auto"});
        this._renderProxy();
        a = c(this.helper.css("left"));
        var h = c(this.helper.css("top"));
        if (e.containment) {
            a += b(e.containment).scrollLeft() || 0;
            h += b(e.containment).scrollTop() || 0
        }
        this.offset =
            this.helper.offset();
        this.position = {left:a, top:h};
        this.size = this._helper ? {width:d.outerWidth(), height:d.outerHeight()} : {width:d.width(), height:d.height()};
        this.originalSize = this._helper ? {width:d.outerWidth(), height:d.outerHeight()} : {width:d.width(), height:d.height()};
        this.originalPosition = {left:a, top:h};
        this.sizeDiff = {width:d.outerWidth() - d.width(), height:d.outerHeight() - d.height()};
        this.originalMousePosition = {left:g.pageX, top:g.pageY};
        this.aspectRatio = typeof e.aspectRatio == "number" ? e.aspectRatio :
            this.originalSize.width / this.originalSize.height || 1;
        e = b(".ui-resizable-" + this.axis).css("cursor");
        b("body").css("cursor", e == "auto" ? this.axis + "-resize" : e);
        d.addClass("ui-resizable-resizing");
        this._propagate("start", g);
        return true
    }, _mouseDrag:function (g) {
        var e = this.helper, a = this.originalMousePosition, d = this._change[this.axis];
        if (!d)return false;
        a = d.apply(this, [g, g.pageX - a.left || 0, g.pageY - a.top || 0]);
        if (this._aspectRatio || g.shiftKey)a = this._updateRatio(a, g);
        a = this._respectSize(a, g);
        this._propagate("resize",
            g);
        e.css({top:this.position.top + "px", left:this.position.left + "px", width:this.size.width + "px", height:this.size.height + "px"});
        !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize();
        this._updateCache(a);
        this._trigger("resize", g, this.ui());
        return false
    }, _mouseStop:function (g) {
        this.resizing = false;
        var e = this.options, a = this;
        if (this._helper) {
            var d = this._proportionallyResizeElements, h = d.length && /textarea/i.test(d[0].nodeName);
            d = h && b.ui.hasScroll(d[0], "left") ? 0 : a.sizeDiff.height;
            h = {width:a.size.width - (h ? 0 : a.sizeDiff.width), height:a.size.height - d};
            d = parseInt(a.element.css("left"), 10) + (a.position.left - a.originalPosition.left) || null;
            var i = parseInt(a.element.css("top"), 10) + (a.position.top - a.originalPosition.top) || null;
            e.animate || this.element.css(b.extend(h, {top:i, left:d}));
            a.helper.height(a.size.height);
            a.helper.width(a.size.width);
            this._helper && !e.animate && this._proportionallyResize()
        }
        b("body").css("cursor", "auto");
        this.element.removeClass("ui-resizable-resizing");
        this._propagate("stop",
            g);
        this._helper && this.helper.remove();
        return false
    }, _updateCache:function (g) {
        this.offset = this.helper.offset();
        if (f(g.left))this.position.left = g.left;
        if (f(g.top))this.position.top = g.top;
        if (f(g.height))this.size.height = g.height;
        if (f(g.width))this.size.width = g.width
    }, _updateRatio:function (g) {
        var e = this.position, a = this.size, d = this.axis;
        if (g.height)g.width = a.height * this.aspectRatio; else if (g.width)g.height = a.width / this.aspectRatio;
        if (d == "sw") {
            g.left = e.left + (a.width - g.width);
            g.top = null
        }
        if (d == "nw") {
            g.top =
                e.top + (a.height - g.height);
            g.left = e.left + (a.width - g.width)
        }
        return g
    }, _respectSize:function (g) {
        var e = this.options, a = this.axis, d = f(g.width) && e.maxWidth && e.maxWidth < g.width, h = f(g.height) && e.maxHeight && e.maxHeight < g.height, i = f(g.width) && e.minWidth && e.minWidth > g.width, j = f(g.height) && e.minHeight && e.minHeight > g.height;
        if (i)g.width = e.minWidth;
        if (j)g.height = e.minHeight;
        if (d)g.width = e.maxWidth;
        if (h)g.height = e.maxHeight;
        var n = this.originalPosition.left + this.originalSize.width, q = this.position.top + this.size.height,
            l = /sw|nw|w/.test(a);
        a = /nw|ne|n/.test(a);
        if (i && l)g.left = n - e.minWidth;
        if (d && l)g.left = n - e.maxWidth;
        if (j && a)g.top = q - e.minHeight;
        if (h && a)g.top = q - e.maxHeight;
        if ((e = !g.width && !g.height) && !g.left && g.top)g.top = null; else if (e && !g.top && g.left)g.left = null;
        return g
    }, _proportionallyResize:function () {
        if (this._proportionallyResizeElements.length)for (var g = this.helper || this.element, e = 0; e < this._proportionallyResizeElements.length; e++) {
            var a = this._proportionallyResizeElements[e];
            if (!this.borderDif) {
                var d = [a.css("borderTopWidth"),
                    a.css("borderRightWidth"), a.css("borderBottomWidth"), a.css("borderLeftWidth")], h = [a.css("paddingTop"), a.css("paddingRight"), a.css("paddingBottom"), a.css("paddingLeft")];
                this.borderDif = b.map(d, function (i, j) {
                    i = parseInt(i, 10) || 0;
                    j = parseInt(h[j], 10) || 0;
                    return i + j
                })
            }
            b.browser.msie && (b(g).is(":hidden") || b(g).parents(":hidden").length) || a.css({height:g.height() - this.borderDif[0] - this.borderDif[2] || 0, width:g.width() - this.borderDif[1] - this.borderDif[3] || 0})
        }
    }, _renderProxy:function () {
        var g = this.options;
        this.elementOffset =
            this.element.offset();
        if (this._helper) {
            this.helper = this.helper || b('<div style="overflow:hidden;"></div>');
            var e = b.browser.msie && b.browser.version < 7, a = e ? 1 : 0;
            e = e ? 2 : -1;
            this.helper.addClass(this._helper).css({width:this.element.outerWidth() + e, height:this.element.outerHeight() + e, position:"absolute", left:this.elementOffset.left - a + "px", top:this.elementOffset.top - a + "px", zIndex:++g.zIndex});
            this.helper.appendTo("body").disableSelection()
        } else this.helper = this.element
    }, _change:{e:function (g, e) {
        return{width:this.originalSize.width +
            e}
    }, w:function (g, e) {
        return{left:this.originalPosition.left + e, width:this.originalSize.width - e}
    }, n:function (g, e, a) {
        return{top:this.originalPosition.top + a, height:this.originalSize.height - a}
    }, s:function (g, e, a) {
        return{height:this.originalSize.height + a}
    }, se:function (g, e, a) {
        return b.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [g, e, a]))
    }, sw:function (g, e, a) {
        return b.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [g, e, a]))
    }, ne:function (g, e, a) {
        return b.extend(this._change.n.apply(this,
            arguments), this._change.e.apply(this, [g, e, a]))
    }, nw:function (g, e, a) {
        return b.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [g, e, a]))
    }}, _propagate:function (g, e) {
        b.ui.plugin.call(this, g, [e, this.ui()]);
        g != "resize" && this._trigger(g, e, this.ui())
    }, plugins:{}, ui:function () {
        return{originalElement:this.originalElement, element:this.element, helper:this.helper, position:this.position, size:this.size, originalSize:this.originalSize, originalPosition:this.originalPosition}
    }});
    b.extend(b.ui.resizable,
        {version:"1.8.9"});
    b.ui.plugin.add("resizable", "alsoResize", {start:function () {
        var g = b(this).data("resizable").options, e = function (a) {
            b(a).each(function () {
                var d = b(this);
                d.data("resizable-alsoresize", {width:parseInt(d.width(), 10), height:parseInt(d.height(), 10), left:parseInt(d.css("left"), 10), top:parseInt(d.css("top"), 10), position:d.css("position")})
            })
        };
        if (typeof g.alsoResize == "object" && !g.alsoResize.parentNode)if (g.alsoResize.length) {
            g.alsoResize = g.alsoResize[0];
            e(g.alsoResize)
        } else b.each(g.alsoResize,
            function (a) {
                e(a)
            }); else e(g.alsoResize)
    }, resize:function (g, e) {
        var a = b(this).data("resizable");
        g = a.options;
        var d = a.originalSize, h = a.originalPosition, i = {height:a.size.height - d.height || 0, width:a.size.width - d.width || 0, top:a.position.top - h.top || 0, left:a.position.left - h.left || 0}, j = function (n, q) {
            b(n).each(function () {
                var l = b(this), k = b(this).data("resizable-alsoresize"), m = {}, o = q && q.length ? q : l.parents(e.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
                b.each(o, function (p, s) {
                    if ((p =
                        (k[s] || 0) + (i[s] || 0)) && p >= 0)m[s] = p || null
                });
                if (b.browser.opera && /relative/.test(l.css("position"))) {
                    a._revertToRelativePosition = true;
                    l.css({position:"absolute", top:"auto", left:"auto"})
                }
                l.css(m)
            })
        };
        typeof g.alsoResize == "object" && !g.alsoResize.nodeType ? b.each(g.alsoResize, function (n, q) {
            j(n, q)
        }) : j(g.alsoResize)
    }, stop:function () {
        var g = b(this).data("resizable"), e = g.options, a = function (d) {
            b(d).each(function () {
                var h = b(this);
                h.css({position:h.data("resizable-alsoresize").position})
            })
        };
        if (g._revertToRelativePosition) {
            g._revertToRelativePosition =
                false;
            typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? b.each(e.alsoResize, function (d) {
                a(d)
            }) : a(e.alsoResize)
        }
        b(this).removeData("resizable-alsoresize")
    }});
    b.ui.plugin.add("resizable", "animate", {stop:function (g) {
        var e = b(this).data("resizable"), a = e.options, d = e._proportionallyResizeElements, h = d.length && /textarea/i.test(d[0].nodeName), i = h && b.ui.hasScroll(d[0], "left") ? 0 : e.sizeDiff.height;
        h = {width:e.size.width - (h ? 0 : e.sizeDiff.width), height:e.size.height - i};
        i = parseInt(e.element.css("left"), 10) + (e.position.left -
            e.originalPosition.left) || null;
        var j = parseInt(e.element.css("top"), 10) + (e.position.top - e.originalPosition.top) || null;
        e.element.animate(b.extend(h, j && i ? {top:j, left:i} : {}), {duration:a.animateDuration, easing:a.animateEasing, step:function () {
            var n = {width:parseInt(e.element.css("width"), 10), height:parseInt(e.element.css("height"), 10), top:parseInt(e.element.css("top"), 10), left:parseInt(e.element.css("left"), 10)};
            d && d.length && b(d[0]).css({width:n.width, height:n.height});
            e._updateCache(n);
            e._propagate("resize",
                g)
        }})
    }});
    b.ui.plugin.add("resizable", "containment", {start:function () {
        var g = b(this).data("resizable"), e = g.element, a = g.options.containment;
        if (e = a instanceof b ? a.get(0) : /parent/.test(a) ? e.parent().get(0) : a) {
            g.containerElement = b(e);
            if (/document/.test(a) || a == document) {
                g.containerOffset = {left:0, top:0};
                g.containerPosition = {left:0, top:0};
                g.parentData = {element:b(document), left:0, top:0, width:b(document).width(), height:b(document).height() || document.body.parentNode.scrollHeight}
            } else {
                var d = b(e), h = [];
                b(["Top",
                    "Right", "Left", "Bottom"]).each(function (n, q) {
                        h[n] = c(d.css("padding" + q))
                    });
                g.containerOffset = d.offset();
                g.containerPosition = d.position();
                g.containerSize = {height:d.innerHeight() - h[3], width:d.innerWidth() - h[1]};
                a = g.containerOffset;
                var i = g.containerSize.height, j = g.containerSize.width;
                j = b.ui.hasScroll(e, "left") ? e.scrollWidth : j;
                i = b.ui.hasScroll(e) ? e.scrollHeight : i;
                g.parentData = {element:e, left:a.left, top:a.top, width:j, height:i}
            }
        }
    }, resize:function (g) {
        var e = b(this).data("resizable"), a = e.options, d = e.containerOffset,
            h = e.position;
        g = e._aspectRatio || g.shiftKey;
        var i = {top:0, left:0}, j = e.containerElement;
        if (j[0] != document && /static/.test(j.css("position")))i = d;
        if (h.left < (e._helper ? d.left : 0)) {
            e.size.width += e._helper ? e.position.left - d.left : e.position.left - i.left;
            if (g)e.size.height = e.size.width / a.aspectRatio;
            e.position.left = a.helper ? d.left : 0
        }
        if (h.top < (e._helper ? d.top : 0)) {
            e.size.height += e._helper ? e.position.top - d.top : e.position.top;
            if (g)e.size.width = e.size.height * a.aspectRatio;
            e.position.top = e._helper ? d.top : 0
        }
        e.offset.left =
            e.parentData.left + e.position.left;
        e.offset.top = e.parentData.top + e.position.top;
        a = Math.abs((e._helper ? e.offset.left - i.left : e.offset.left - i.left) + e.sizeDiff.width);
        d = Math.abs((e._helper ? e.offset.top - i.top : e.offset.top - d.top) + e.sizeDiff.height);
        h = e.containerElement.get(0) == e.element.parent().get(0);
        i = /relative|absolute/.test(e.containerElement.css("position"));
        if (h && i)a -= e.parentData.left;
        if (a + e.size.width >= e.parentData.width) {
            e.size.width = e.parentData.width - a;
            if (g)e.size.height = e.size.width / e.aspectRatio
        }
        if (d +
            e.size.height >= e.parentData.height) {
            e.size.height = e.parentData.height - d;
            if (g)e.size.width = e.size.height * e.aspectRatio
        }
    }, stop:function () {
        var g = b(this).data("resizable"), e = g.options, a = g.containerOffset, d = g.containerPosition, h = g.containerElement, i = b(g.helper), j = i.offset(), n = i.outerWidth() - g.sizeDiff.width;
        i = i.outerHeight() - g.sizeDiff.height;
        g._helper && !e.animate && /relative/.test(h.css("position")) && b(this).css({left:j.left - d.left - a.left, width:n, height:i});
        g._helper && !e.animate && /static/.test(h.css("position")) &&
        b(this).css({left:j.left - d.left - a.left, width:n, height:i})
    }});
    b.ui.plugin.add("resizable", "ghost", {start:function () {
        var g = b(this).data("resizable"), e = g.options, a = g.size;
        g.ghost = g.originalElement.clone();
        g.ghost.css({opacity:0.25, display:"block", position:"relative", height:a.height, width:a.width, margin:0, left:0, top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost == "string" ? e.ghost : "");
        g.ghost.appendTo(g.helper)
    }, resize:function () {
        var g = b(this).data("resizable");
        g.ghost && g.ghost.css({position:"relative",
            height:g.size.height, width:g.size.width})
    }, stop:function () {
        var g = b(this).data("resizable");
        g.ghost && g.helper && g.helper.get(0).removeChild(g.ghost.get(0))
    }});
    b.ui.plugin.add("resizable", "grid", {resize:function () {
        var g = b(this).data("resizable"), e = g.options, a = g.size, d = g.originalSize, h = g.originalPosition, i = g.axis;
        e.grid = typeof e.grid == "number" ? [e.grid, e.grid] : e.grid;
        var j = Math.round((a.width - d.width) / (e.grid[0] || 1)) * (e.grid[0] || 1);
        e = Math.round((a.height - d.height) / (e.grid[1] || 1)) * (e.grid[1] || 1);
        if (/^(se|s|e)$/.test(i)) {
            g.size.width =
                d.width + j;
            g.size.height = d.height + e
        } else if (/^(ne)$/.test(i)) {
            g.size.width = d.width + j;
            g.size.height = d.height + e;
            g.position.top = h.top - e
        } else {
            if (/^(sw)$/.test(i)) {
                g.size.width = d.width + j;
                g.size.height = d.height + e
            } else {
                g.size.width = d.width + j;
                g.size.height = d.height + e;
                g.position.top = h.top - e
            }
            g.position.left = h.left - j
        }
    }});
    var c = function (g) {
        return parseInt(g, 10) || 0
    }, f = function (g) {
        return!isNaN(parseInt(g, 10))
    }
})(jQuery);
(function (b) {
    b.widget("ui.selectable", b.ui.mouse, {options:{appendTo:"body", autoRefresh:true, distance:0, filter:"*", tolerance:"touch"}, _create:function () {
        var c = this;
        this.element.addClass("ui-selectable");
        this.dragged = false;
        var f;
        this.refresh = function () {
            f = b(c.options.filter, c.element[0]);
            f.each(function () {
                var g = b(this), e = g.offset();
                b.data(this, "selectable-item", {element:this, $element:g, left:e.left, top:e.top, right:e.left + g.outerWidth(), bottom:e.top + g.outerHeight(), startselected:false, selected:g.hasClass("ui-selected"),
                    selecting:g.hasClass("ui-selecting"), unselecting:g.hasClass("ui-unselecting")})
            })
        };
        this.refresh();
        this.selectees = f.addClass("ui-selectee");
        this._mouseInit();
        this.helper = b("<div class='ui-selectable-helper'></div>")
    }, destroy:function () {
        this.selectees.removeClass("ui-selectee").removeData("selectable-item");
        this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");
        this._mouseDestroy();
        return this
    }, _mouseStart:function (c) {
        var f = this;
        this.opos = [c.pageX,
            c.pageY];
        if (!this.options.disabled) {
            var g = this.options;
            this.selectees = b(g.filter, this.element[0]);
            this._trigger("start", c);
            b(g.appendTo).append(this.helper);
            this.helper.css({left:c.clientX, top:c.clientY, width:0, height:0});
            g.autoRefresh && this.refresh();
            this.selectees.filter(".ui-selected").each(function () {
                var e = b.data(this, "selectable-item");
                e.startselected = true;
                if (!c.metaKey) {
                    e.$element.removeClass("ui-selected");
                    e.selected = false;
                    e.$element.addClass("ui-unselecting");
                    e.unselecting = true;
                    f._trigger("unselecting",
                        c, {unselecting:e.element})
                }
            });
            b(c.target).parents().andSelf().each(function () {
                var e = b.data(this, "selectable-item");
                if (e) {
                    var a = !c.metaKey || !e.$element.hasClass("ui-selected");
                    e.$element.removeClass(a ? "ui-unselecting" : "ui-selected").addClass(a ? "ui-selecting" : "ui-unselecting");
                    e.unselecting = !a;
                    e.selecting = a;
                    (e.selected = a) ? f._trigger("selecting", c, {selecting:e.element}) : f._trigger("unselecting", c, {unselecting:e.element});
                    return false
                }
            })
        }
    }, _mouseDrag:function (c) {
        var f = this;
        this.dragged = true;
        if (!this.options.disabled) {
            var g =
                this.options, e = this.opos[0], a = this.opos[1], d = c.pageX, h = c.pageY;
            if (e > d) {
                var i = d;
                d = e;
                e = i
            }
            if (a > h) {
                i = h;
                h = a;
                a = i
            }
            this.helper.css({left:e, top:a, width:d - e, height:h - a});
            this.selectees.each(function () {
                var j = b.data(this, "selectable-item");
                if (!(!j || j.element == f.element[0])) {
                    var n = false;
                    if (g.tolerance == "touch")n = !(j.left > d || j.right < e || j.top > h || j.bottom < a); else if (g.tolerance == "fit")n = j.left > e && j.right < d && j.top > a && j.bottom < h;
                    if (n) {
                        if (j.selected) {
                            j.$element.removeClass("ui-selected");
                            j.selected = false
                        }
                        if (j.unselecting) {
                            j.$element.removeClass("ui-unselecting");
                            j.unselecting = false
                        }
                        if (!j.selecting) {
                            j.$element.addClass("ui-selecting");
                            j.selecting = true;
                            f._trigger("selecting", c, {selecting:j.element})
                        }
                    } else {
                        if (j.selecting)if (c.metaKey && j.startselected) {
                            j.$element.removeClass("ui-selecting");
                            j.selecting = false;
                            j.$element.addClass("ui-selected");
                            j.selected = true
                        } else {
                            j.$element.removeClass("ui-selecting");
                            j.selecting = false;
                            if (j.startselected) {
                                j.$element.addClass("ui-unselecting");
                                j.unselecting = true
                            }
                            f._trigger("unselecting", c, {unselecting:j.element})
                        }
                        if (j.selected)if (!c.metaKey &&
                            !j.startselected) {
                            j.$element.removeClass("ui-selected");
                            j.selected = false;
                            j.$element.addClass("ui-unselecting");
                            j.unselecting = true;
                            f._trigger("unselecting", c, {unselecting:j.element})
                        }
                    }
                }
            });
            return false
        }
    }, _mouseStop:function (c) {
        var f = this;
        this.dragged = false;
        b(".ui-unselecting", this.element[0]).each(function () {
            var g = b.data(this, "selectable-item");
            g.$element.removeClass("ui-unselecting");
            g.unselecting = false;
            g.startselected = false;
            f._trigger("unselected", c, {unselected:g.element})
        });
        b(".ui-selecting", this.element[0]).each(function () {
            var g =
                b.data(this, "selectable-item");
            g.$element.removeClass("ui-selecting").addClass("ui-selected");
            g.selecting = false;
            g.selected = true;
            g.startselected = true;
            f._trigger("selected", c, {selected:g.element})
        });
        this._trigger("stop", c);
        this.helper.remove();
        return false
    }});
    b.extend(b.ui.selectable, {version:"1.8.9"})
})(jQuery);
(function (b) {
    b.widget("ui.sortable", b.ui.mouse, {widgetEventPrefix:"sort", options:{appendTo:"parent", axis:false, connectWith:false, containment:false, cursor:"auto", cursorAt:false, dropOnEmpty:true, forcePlaceholderSize:false, forceHelperSize:false, grid:false, handle:false, helper:"original", items:"> *", opacity:false, placeholder:false, revert:false, scroll:true, scrollSensitivity:20, scrollSpeed:20, scope:"default", tolerance:"intersect", zIndex:1E3}, _create:function () {
        this.containerCache = {};
        this.element.addClass("ui-sortable");
        this.refresh();
        this.floating = this.items.length ? /left|right/.test(this.items[0].item.css("float")) : false;
        this.offset = this.element.offset();
        this._mouseInit()
    }, destroy:function () {
        this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");
        this._mouseDestroy();
        for (var c = this.items.length - 1; c >= 0; c--)this.items[c].item.removeData("sortable-item");
        return this
    }, _setOption:function (c, f) {
        if (c === "disabled") {
            this.options[c] = f;
            this.widget()[f ? "addClass" : "removeClass"]("ui-sortable-disabled")
        } else b.Widget.prototype._setOption.apply(this,
            arguments)
    }, _mouseCapture:function (c, f) {
        if (this.reverting)return false;
        if (this.options.disabled || this.options.type == "static")return false;
        this._refreshItems(c);
        var g = null, e = this;
        b(c.target).parents().each(function () {
            if (b.data(this, "sortable-item") == e) {
                g = b(this);
                return false
            }
        });
        if (b.data(c.target, "sortable-item") == e)g = b(c.target);
        if (!g)return false;
        if (this.options.handle && !f) {
            var a = false;
            b(this.options.handle, g).find("*").andSelf().each(function () {
                if (this == c.target)a = true
            });
            if (!a)return false
        }
        this.currentItem =
            g;
        this._removeCurrentsFromItems();
        return true
    }, _mouseStart:function (c, f, g) {
        f = this.options;
        var e = this;
        this.currentContainer = this;
        this.refreshPositions();
        this.helper = this._createHelper(c);
        this._cacheHelperProportions();
        this._cacheMargins();
        this.scrollParent = this.helper.scrollParent();
        this.offset = this.currentItem.offset();
        this.offset = {top:this.offset.top - this.margins.top, left:this.offset.left - this.margins.left};
        this.helper.css("position", "absolute");
        this.cssPosition = this.helper.css("position");
        b.extend(this.offset,
            {click:{left:c.pageX - this.offset.left, top:c.pageY - this.offset.top}, parent:this._getParentOffset(), relative:this._getRelativeOffset()});
        this.originalPosition = this._generatePosition(c);
        this.originalPageX = c.pageX;
        this.originalPageY = c.pageY;
        f.cursorAt && this._adjustOffsetFromHelper(f.cursorAt);
        this.domPosition = {prev:this.currentItem.prev()[0], parent:this.currentItem.parent()[0]};
        this.helper[0] != this.currentItem[0] && this.currentItem.hide();
        this._createPlaceholder();
        f.containment && this._setContainment();
        if (f.cursor) {
            if (b("body").css("cursor"))this._storedCursor = b("body").css("cursor");
            b("body").css("cursor", f.cursor)
        }
        if (f.opacity) {
            if (this.helper.css("opacity"))this._storedOpacity = this.helper.css("opacity");
            this.helper.css("opacity", f.opacity)
        }
        if (f.zIndex) {
            if (this.helper.css("zIndex"))this._storedZIndex = this.helper.css("zIndex");
            this.helper.css("zIndex", f.zIndex)
        }
        if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML")this.overflowOffset = this.scrollParent.offset();
        this._trigger("start",
            c, this._uiHash());
        this._preserveHelperProportions || this._cacheHelperProportions();
        if (!g)for (g = this.containers.length - 1; g >= 0; g--)this.containers[g]._trigger("activate", c, e._uiHash(this));
        if (b.ui.ddmanager)b.ui.ddmanager.current = this;
        b.ui.ddmanager && !f.dropBehaviour && b.ui.ddmanager.prepareOffsets(this, c);
        this.dragging = true;
        this.helper.addClass("ui-sortable-helper");
        this._mouseDrag(c);
        return true
    }, _mouseDrag:function (c) {
        this.position = this._generatePosition(c);
        this.positionAbs = this._convertPositionTo("absolute");
        if (!this.lastPositionAbs)this.lastPositionAbs = this.positionAbs;
        if (this.options.scroll) {
            var f = this.options, g = false;
            if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") {
                if (this.overflowOffset.top + this.scrollParent[0].offsetHeight - c.pageY < f.scrollSensitivity)this.scrollParent[0].scrollTop = g = this.scrollParent[0].scrollTop + f.scrollSpeed; else if (c.pageY - this.overflowOffset.top < f.scrollSensitivity)this.scrollParent[0].scrollTop = g = this.scrollParent[0].scrollTop - f.scrollSpeed;
                if (this.overflowOffset.left +
                    this.scrollParent[0].offsetWidth - c.pageX < f.scrollSensitivity)this.scrollParent[0].scrollLeft = g = this.scrollParent[0].scrollLeft + f.scrollSpeed; else if (c.pageX - this.overflowOffset.left < f.scrollSensitivity)this.scrollParent[0].scrollLeft = g = this.scrollParent[0].scrollLeft - f.scrollSpeed
            } else {
                if (c.pageY - b(document).scrollTop() < f.scrollSensitivity)g = b(document).scrollTop(b(document).scrollTop() - f.scrollSpeed); else if (b(window).height() - (c.pageY - b(document).scrollTop()) < f.scrollSensitivity)g = b(document).scrollTop(b(document).scrollTop() +
                    f.scrollSpeed);
                if (c.pageX - b(document).scrollLeft() < f.scrollSensitivity)g = b(document).scrollLeft(b(document).scrollLeft() - f.scrollSpeed); else if (b(window).width() - (c.pageX - b(document).scrollLeft()) < f.scrollSensitivity)g = b(document).scrollLeft(b(document).scrollLeft() + f.scrollSpeed)
            }
            g !== false && b.ui.ddmanager && !f.dropBehaviour && b.ui.ddmanager.prepareOffsets(this, c)
        }
        this.positionAbs = this._convertPositionTo("absolute");
        if (!this.options.axis || this.options.axis != "y")this.helper[0].style.left = this.position.left +
            "px";
        if (!this.options.axis || this.options.axis != "x")this.helper[0].style.top = this.position.top + "px";
        for (f = this.items.length - 1; f >= 0; f--) {
            g = this.items[f];
            var e = g.item[0], a = this._intersectsWithPointer(g);
            if (a)if (e != this.currentItem[0] && this.placeholder[a == 1 ? "next" : "prev"]()[0] != e && !b.ui.contains(this.placeholder[0], e) && (this.options.type == "semi-dynamic" ? !b.ui.contains(this.element[0], e) : true)) {
                this.direction = a == 1 ? "down" : "up";
                if (this.options.tolerance == "pointer" || this._intersectsWithSides(g))this._rearrange(c,
                    g); else break;
                this._trigger("change", c, this._uiHash());
                break
            }
        }
        this._contactContainers(c);
        b.ui.ddmanager && b.ui.ddmanager.drag(this, c);
        this._trigger("sort", c, this._uiHash());
        this.lastPositionAbs = this.positionAbs;
        return false
    }, _mouseStop:function (c, f) {
        if (c) {
            b.ui.ddmanager && !this.options.dropBehaviour && b.ui.ddmanager.drop(this, c);
            if (this.options.revert) {
                var g = this;
                f = g.placeholder.offset();
                g.reverting = true;
                b(this.helper).animate({left:f.left - this.offset.parent.left - g.margins.left + (this.offsetParent[0] ==
                    document.body ? 0 : this.offsetParent[0].scrollLeft), top:f.top - this.offset.parent.top - g.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)}, parseInt(this.options.revert, 10) || 500, function () {
                    g._clear(c)
                })
            } else this._clear(c, f);
            return false
        }
    }, cancel:function () {
        var c = this;
        if (this.dragging) {
            this._mouseUp({target:null});
            this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
            for (var f = this.containers.length -
                1; f >= 0; f--) {
                this.containers[f]._trigger("deactivate", null, c._uiHash(this));
                if (this.containers[f].containerCache.over) {
                    this.containers[f]._trigger("out", null, c._uiHash(this));
                    this.containers[f].containerCache.over = 0
                }
            }
        }
        if (this.placeholder) {
            this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
            this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove();
            b.extend(this, {helper:null, dragging:false, reverting:false, _noFinalSort:null});
            this.domPosition.prev ? b(this.domPosition.prev).after(this.currentItem) : b(this.domPosition.parent).prepend(this.currentItem)
        }
        return this
    }, serialize:function (c) {
        var f = this._getItemsAsjQuery(c && c.connected), g = [];
        c = c || {};
        b(f).each(function () {
            var e = (b(c.item || this).attr(c.attribute || "id") || "").match(c.expression || /(.+)[-=_](.+)/);
            if (e)g.push((c.key || e[1] + "[]") + "=" + (c.key && c.expression ? e[1] : e[2]))
        });
        !g.length && c.key && g.push(c.key + "=");
        return g.join("&")
    }, toArray:function (c) {
        var f = this._getItemsAsjQuery(c &&
            c.connected), g = [];
        c = c || {};
        f.each(function () {
            g.push(b(c.item || this).attr(c.attribute || "id") || "")
        });
        return g
    }, _intersectsWith:function (c) {
        var f = this.positionAbs.left, g = f + this.helperProportions.width, e = this.positionAbs.top, a = e + this.helperProportions.height, d = c.left, h = d + c.width, i = c.top, j = i + c.height, n = this.offset.click.top, q = this.offset.click.left;
        n = e + n > i && e + n < j && f + q > d && f + q < h;
        return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ?
            "width" : "height"] > c[this.floating ? "width" : "height"] ? n : d < f + this.helperProportions.width / 2 && g - this.helperProportions.width / 2 < h && i < e + this.helperProportions.height / 2 && a - this.helperProportions.height / 2 < j
    }, _intersectsWithPointer:function (c) {
        var f = b.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, c.top, c.height);
        c = b.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, c.left, c.width);
        f = f && c;
        c = this._getDragVerticalDirection();
        var g = this._getDragHorizontalDirection();
        if (!f)return false;
        return this.floating ?
            g && g == "right" || c == "down" ? 2 : 1 : c && (c == "down" ? 2 : 1)
    }, _intersectsWithSides:function (c) {
        var f = b.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, c.top + c.height / 2, c.height);
        c = b.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, c.left + c.width / 2, c.width);
        var g = this._getDragVerticalDirection(), e = this._getDragHorizontalDirection();
        return this.floating && e ? e == "right" && c || e == "left" && !c : g && (g == "down" && f || g == "up" && !f)
    }, _getDragVerticalDirection:function () {
        var c = this.positionAbs.top - this.lastPositionAbs.top;
        return c != 0 && (c > 0 ? "down" : "up")
    }, _getDragHorizontalDirection:function () {
        var c = this.positionAbs.left - this.lastPositionAbs.left;
        return c != 0 && (c > 0 ? "right" : "left")
    }, refresh:function (c) {
        this._refreshItems(c);
        this.refreshPositions();
        return this
    }, _connectWith:function () {
        var c = this.options;
        return c.connectWith.constructor == String ? [c.connectWith] : c.connectWith
    }, _getItemsAsjQuery:function (c) {
        var f = [], g = [], e = this._connectWith();
        if (e && c)for (c = e.length - 1; c >= 0; c--)for (var a = b(e[c]), d = a.length - 1; d >= 0; d--) {
            var h =
                b.data(a[d], "sortable");
            if (h && h != this && !h.options.disabled)g.push([b.isFunction(h.options.items) ? h.options.items.call(h.element) : b(h.options.items, h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), h])
        }
        g.push([b.isFunction(this.options.items) ? this.options.items.call(this.element, null, {options:this.options, item:this.currentItem}) : b(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
        for (c = g.length - 1; c >= 0; c--)g[c][0].each(function () {
            f.push(this)
        });
        return b(f)
    }, _removeCurrentsFromItems:function () {
        for (var c = this.currentItem.find(":data(sortable-item)"), f = 0; f < this.items.length; f++)for (var g = 0; g < c.length; g++)c[g] == this.items[f].item[0] && this.items.splice(f, 1)
    }, _refreshItems:function (c) {
        this.items = [];
        this.containers = [this];
        var f = this.items, g = [
            [b.isFunction(this.options.items) ? this.options.items.call(this.element[0], c, {item:this.currentItem}) : b(this.options.items, this.element), this]
        ], e = this._connectWith();
        if (e)for (var a = e.length - 1; a >= 0; a--)for (var d =
            b(e[a]), h = d.length - 1; h >= 0; h--) {
            var i = b.data(d[h], "sortable");
            if (i && i != this && !i.options.disabled) {
                g.push([b.isFunction(i.options.items) ? i.options.items.call(i.element[0], c, {item:this.currentItem}) : b(i.options.items, i.element), i]);
                this.containers.push(i)
            }
        }
        for (a = g.length - 1; a >= 0; a--) {
            c = g[a][1];
            e = g[a][0];
            h = 0;
            for (d = e.length; h < d; h++) {
                i = b(e[h]);
                i.data("sortable-item", c);
                f.push({item:i, instance:c, width:0, height:0, left:0, top:0})
            }
        }
    }, refreshPositions:function (c) {
        if (this.offsetParent && this.helper)this.offset.parent =
            this._getParentOffset();
        for (var f = this.items.length - 1; f >= 0; f--) {
            var g = this.items[f], e = this.options.toleranceElement ? b(this.options.toleranceElement, g.item) : g.item;
            if (!c) {
                g.width = e.outerWidth();
                g.height = e.outerHeight()
            }
            e = e.offset();
            g.left = e.left;
            g.top = e.top
        }
        if (this.options.custom && this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this); else for (f = this.containers.length - 1; f >= 0; f--) {
            e = this.containers[f].element.offset();
            this.containers[f].containerCache.left = e.left;
            this.containers[f].containerCache.top =
                e.top;
            this.containers[f].containerCache.width = this.containers[f].element.outerWidth();
            this.containers[f].containerCache.height = this.containers[f].element.outerHeight()
        }
        return this
    }, _createPlaceholder:function (c) {
        var f = c || this, g = f.options;
        if (!g.placeholder || g.placeholder.constructor == String) {
            var e = g.placeholder;
            g.placeholder = {element:function () {
                var a = b(document.createElement(f.currentItem[0].nodeName)).addClass(e || f.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
                if (!e)a.style.visibility = "hidden";
                return a
            }, update:function (a, d) {
                if (!(e && !g.forcePlaceholderSize)) {
                    d.height() || d.height(f.currentItem.innerHeight() - parseInt(f.currentItem.css("paddingTop") || 0, 10) - parseInt(f.currentItem.css("paddingBottom") || 0, 10));
                    d.width() || d.width(f.currentItem.innerWidth() - parseInt(f.currentItem.css("paddingLeft") || 0, 10) - parseInt(f.currentItem.css("paddingRight") || 0, 10))
                }
            }}
        }
        f.placeholder = b(g.placeholder.element.call(f.element, f.currentItem));
        f.currentItem.after(f.placeholder);
        g.placeholder.update(f, f.placeholder)
    }, _contactContainers:function (c) {
        for (var f = null, g = null, e = this.containers.length - 1; e >= 0; e--)if (!b.ui.contains(this.currentItem[0], this.containers[e].element[0]))if (this._intersectsWith(this.containers[e].containerCache)) {
            if (!(f && b.ui.contains(this.containers[e].element[0], f.element[0]))) {
                f = this.containers[e];
                g = e
            }
        } else if (this.containers[e].containerCache.over) {
            this.containers[e]._trigger("out", c, this._uiHash(this));
            this.containers[e].containerCache.over = 0
        }
        if (f)if (this.containers.length ===
            1) {
            this.containers[g]._trigger("over", c, this._uiHash(this));
            this.containers[g].containerCache.over = 1
        } else if (this.currentContainer != this.containers[g]) {
            f = 1E4;
            e = null;
            for (var a = this.positionAbs[this.containers[g].floating ? "left" : "top"], d = this.items.length - 1; d >= 0; d--)if (b.ui.contains(this.containers[g].element[0], this.items[d].item[0])) {
                var h = this.items[d][this.containers[g].floating ? "left" : "top"];
                if (Math.abs(h - a) < f) {
                    f = Math.abs(h - a);
                    e = this.items[d]
                }
            }
            if (e || this.options.dropOnEmpty) {
                this.currentContainer =
                    this.containers[g];
                e ? this._rearrange(c, e, null, true) : this._rearrange(c, null, this.containers[g].element, true);
                this._trigger("change", c, this._uiHash());
                this.containers[g]._trigger("change", c, this._uiHash(this));
                this.options.placeholder.update(this.currentContainer, this.placeholder);
                this.containers[g]._trigger("over", c, this._uiHash(this));
                this.containers[g].containerCache.over = 1
            }
        }
    }, _createHelper:function (c) {
        var f = this.options;
        c = b.isFunction(f.helper) ? b(f.helper.apply(this.element[0], [c, this.currentItem])) :
            f.helper == "clone" ? this.currentItem.clone() : this.currentItem;
        c.parents("body").length || b(f.appendTo != "parent" ? f.appendTo : this.currentItem[0].parentNode)[0].appendChild(c[0]);
        if (c[0] == this.currentItem[0])this._storedCSS = {width:this.currentItem[0].style.width, height:this.currentItem[0].style.height, position:this.currentItem.css("position"), top:this.currentItem.css("top"), left:this.currentItem.css("left")};
        if (c[0].style.width == "" || f.forceHelperSize)c.width(this.currentItem.width());
        if (c[0].style.height ==
            "" || f.forceHelperSize)c.height(this.currentItem.height());
        return c
    }, _adjustOffsetFromHelper:function (c) {
        if (typeof c == "string")c = c.split(" ");
        if (b.isArray(c))c = {left:+c[0], top:+c[1] || 0};
        if ("left"in c)this.offset.click.left = c.left + this.margins.left;
        if ("right"in c)this.offset.click.left = this.helperProportions.width - c.right + this.margins.left;
        if ("top"in c)this.offset.click.top = c.top + this.margins.top;
        if ("bottom"in c)this.offset.click.top = this.helperProportions.height - c.bottom + this.margins.top
    }, _getParentOffset:function () {
        this.offsetParent =
            this.helper.offsetParent();
        var c = this.offsetParent.offset();
        if (this.cssPosition == "absolute" && this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
            c.left += this.scrollParent.scrollLeft();
            c.top += this.scrollParent.scrollTop()
        }
        if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && b.browser.msie)c = {top:0, left:0};
        return{top:c.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left:c.left + (parseInt(this.offsetParent.css("borderLeftWidth"),
            10) || 0)}
    }, _getRelativeOffset:function () {
        if (this.cssPosition == "relative") {
            var c = this.currentItem.position();
            return{top:c.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left:c.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()}
        } else return{top:0, left:0}
    }, _cacheMargins:function () {
        this.margins = {left:parseInt(this.currentItem.css("marginLeft"), 10) || 0, top:parseInt(this.currentItem.css("marginTop"), 10) || 0}
    }, _cacheHelperProportions:function () {
        this.helperProportions =
        {width:this.helper.outerWidth(), height:this.helper.outerHeight()}
    }, _setContainment:function () {
        var c = this.options;
        if (c.containment == "parent")c.containment = this.helper[0].parentNode;
        if (c.containment == "document" || c.containment == "window")this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, b(c.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (b(c.containment == "document" ? document : window).height() ||
            document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
        if (!/^(document|window|parent)$/.test(c.containment)) {
            var f = b(c.containment)[0];
            c = b(c.containment).offset();
            var g = b(f).css("overflow") != "hidden";
            this.containment = [c.left + (parseInt(b(f).css("borderLeftWidth"), 10) || 0) + (parseInt(b(f).css("paddingLeft"), 10) || 0) - this.margins.left, c.top + (parseInt(b(f).css("borderTopWidth"), 10) || 0) + (parseInt(b(f).css("paddingTop"), 10) || 0) - this.margins.top, c.left + (g ? Math.max(f.scrollWidth,
                f.offsetWidth) : f.offsetWidth) - (parseInt(b(f).css("borderLeftWidth"), 10) || 0) - (parseInt(b(f).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, c.top + (g ? Math.max(f.scrollHeight, f.offsetHeight) : f.offsetHeight) - (parseInt(b(f).css("borderTopWidth"), 10) || 0) - (parseInt(b(f).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
        }
    }, _convertPositionTo:function (c, f) {
        if (!f)f = this.position;
        c = c == "absolute" ? 1 : -1;
        var g = this.cssPosition == "absolute" && !(this.scrollParent[0] !=
            document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(g[0].tagName);
        return{top:f.top + this.offset.relative.top * c + this.offset.parent.top * c - (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : g.scrollTop()) * c), left:f.left + this.offset.relative.left * c + this.offset.parent.left * c - (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() :
            e ? 0 : g.scrollLeft()) * c)}
    }, _generatePosition:function (c) {
        var f = this.options, g = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(g[0].tagName);
        if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0]))this.offset.relative = this._getRelativeOffset();
        var a = c.pageX, d = c.pageY;
        if (this.originalPosition) {
            if (this.containment) {
                if (c.pageX -
                    this.offset.click.left < this.containment[0])a = this.containment[0] + this.offset.click.left;
                if (c.pageY - this.offset.click.top < this.containment[1])d = this.containment[1] + this.offset.click.top;
                if (c.pageX - this.offset.click.left > this.containment[2])a = this.containment[2] + this.offset.click.left;
                if (c.pageY - this.offset.click.top > this.containment[3])d = this.containment[3] + this.offset.click.top
            }
            if (f.grid) {
                d = this.originalPageY + Math.round((d - this.originalPageY) / f.grid[1]) * f.grid[1];
                d = this.containment ? !(d - this.offset.click.top <
                    this.containment[1] || d - this.offset.click.top > this.containment[3]) ? d : !(d - this.offset.click.top < this.containment[1]) ? d - f.grid[1] : d + f.grid[1] : d;
                a = this.originalPageX + Math.round((a - this.originalPageX) / f.grid[0]) * f.grid[0];
                a = this.containment ? !(a - this.offset.click.left < this.containment[0] || a - this.offset.click.left > this.containment[2]) ? a : !(a - this.offset.click.left < this.containment[0]) ? a - f.grid[0] : a + f.grid[0] : a
            }
        }
        return{top:d - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (b.browser.safari &&
            this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : g.scrollTop()), left:a - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (b.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : g.scrollLeft())}
    }, _rearrange:function (c, f, g, e) {
        g ? g[0].appendChild(this.placeholder[0]) : f.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? f.item[0] : f.item[0].nextSibling);
        this.counter =
            this.counter ? ++this.counter : 1;
        var a = this, d = this.counter;
        window.setTimeout(function () {
            d == a.counter && a.refreshPositions(!e)
        }, 0)
    }, _clear:function (c, f) {
        this.reverting = false;
        var g = [];
        !this._noFinalSort && this.currentItem[0].parentNode && this.placeholder.before(this.currentItem);
        this._noFinalSort = null;
        if (this.helper[0] == this.currentItem[0]) {
            for (var e in this._storedCSS)if (this._storedCSS[e] == "auto" || this._storedCSS[e] == "static")this._storedCSS[e] = "";
            this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
        } else this.currentItem.show();
        this.fromOutside && !f && g.push(function (a) {
            this._trigger("receive", a, this._uiHash(this.fromOutside))
        });
        if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !f)g.push(function (a) {
            this._trigger("update", a, this._uiHash())
        });
        if (!b.ui.contains(this.element[0], this.currentItem[0])) {
            f || g.push(function (a) {
                this._trigger("remove", a, this._uiHash())
            });
            for (e = this.containers.length - 1; e >= 0; e--)if (b.ui.contains(this.containers[e].element[0],
                this.currentItem[0]) && !f) {
                g.push(function (a) {
                    return function (d) {
                        a._trigger("receive", d, this._uiHash(this))
                    }
                }.call(this, this.containers[e]));
                g.push(function (a) {
                    return function (d) {
                        a._trigger("update", d, this._uiHash(this))
                    }
                }.call(this, this.containers[e]))
            }
        }
        for (e = this.containers.length - 1; e >= 0; e--) {
            f || g.push(function (a) {
                return function (d) {
                    a._trigger("deactivate", d, this._uiHash(this))
                }
            }.call(this, this.containers[e]));
            if (this.containers[e].containerCache.over) {
                g.push(function (a) {
                    return function (d) {
                        a._trigger("out",
                            d, this._uiHash(this))
                    }
                }.call(this, this.containers[e]));
                this.containers[e].containerCache.over = 0
            }
        }
        this._storedCursor && b("body").css("cursor", this._storedCursor);
        this._storedOpacity && this.helper.css("opacity", this._storedOpacity);
        if (this._storedZIndex)this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex);
        this.dragging = false;
        if (this.cancelHelperRemoval) {
            if (!f) {
                this._trigger("beforeStop", c, this._uiHash());
                for (e = 0; e < g.length; e++)g[e].call(this, c);
                this._trigger("stop", c, this._uiHash())
            }
            return false
        }
        f ||
        this._trigger("beforeStop", c, this._uiHash());
        this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
        this.helper[0] != this.currentItem[0] && this.helper.remove();
        this.helper = null;
        if (!f) {
            for (e = 0; e < g.length; e++)g[e].call(this, c);
            this._trigger("stop", c, this._uiHash())
        }
        this.fromOutside = false;
        return true
    }, _trigger:function () {
        b.Widget.prototype._trigger.apply(this, arguments) === false && this.cancel()
    }, _uiHash:function (c) {
        var f = c || this;
        return{helper:f.helper, placeholder:f.placeholder || b([]), position:f.position,
            originalPosition:f.originalPosition, offset:f.positionAbs, item:f.currentItem, sender:c ? c.element : null}
    }});
    b.extend(b.ui.sortable, {version:"1.8.9"})
})(jQuery);
jQuery.effects || function (b, c) {
    function f(l) {
        var k;
        if (l && l.constructor == Array && l.length == 3)return l;
        if (k = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(l))return[parseInt(k[1], 10), parseInt(k[2], 10), parseInt(k[3], 10)];
        if (k = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(l))return[parseFloat(k[1]) * 2.55, parseFloat(k[2]) * 2.55, parseFloat(k[3]) * 2.55];
        if (k = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(l))return[parseInt(k[1],
            16), parseInt(k[2], 16), parseInt(k[3], 16)];
        if (k = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(l))return[parseInt(k[1] + k[1], 16), parseInt(k[2] + k[2], 16), parseInt(k[3] + k[3], 16)];
        if (/rgba\(0, 0, 0, 0\)/.exec(l))return j.transparent;
        return j[b.trim(l).toLowerCase()]
    }

    function g(l, k) {
        var m;
        do {
            m = b.curCSS(l, k);
            if (m != "" && m != "transparent" || b.nodeName(l, "body"))break;
            k = "backgroundColor"
        } while (l = l.parentNode);
        return f(m)
    }

    function e() {
        var l = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle,
            k = {}, m, o;
        if (l && l.length && l[0] && l[l[0]])for (var p = l.length; p--;) {
            m = l[p];
            if (typeof l[m] == "string") {
                o = m.replace(/\-(\w)/g, function (s, r) {
                    return r.toUpperCase()
                });
                k[o] = l[m]
            }
        } else for (m in l)if (typeof l[m] === "string")k[m] = l[m];
        return k
    }

    function a(l) {
        var k, m;
        for (k in l) {
            m = l[k];
            if (m == null || b.isFunction(m) || k in q || /scrollbar/.test(k) || !/color/i.test(k) && isNaN(parseFloat(m)))delete l[k]
        }
        return l
    }

    function d(l, k) {
        var m = {_:0}, o;
        for (o in k)if (l[o] != k[o])m[o] = k[o];
        return m
    }

    function h(l, k, m, o) {
        if (typeof l == "object") {
            o =
                k;
            m = null;
            k = l;
            l = k.effect
        }
        if (b.isFunction(k)) {
            o = k;
            m = null;
            k = {}
        }
        if (typeof k == "number" || b.fx.speeds[k]) {
            o = m;
            m = k;
            k = {}
        }
        if (b.isFunction(m)) {
            o = m;
            m = null
        }
        k = k || {};
        m = m || k.duration;
        m = b.fx.off ? 0 : typeof m == "number" ? m : m in b.fx.speeds ? b.fx.speeds[m] : b.fx.speeds._default;
        o = o || k.complete;
        return[l, k, m, o]
    }

    function i(l) {
        if (!l || typeof l === "number" || b.fx.speeds[l])return true;
        if (typeof l === "string" && !b.effects[l])return true;
        return false
    }

    b.effects = {};
    b.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor",
        "borderTopColor", "borderColor", "color", "outlineColor"], function (l, k) {
        b.fx.step[k] = function (m) {
            if (!m.colorInit) {
                m.start = g(m.elem, k);
                m.end = f(m.end);
                m.colorInit = true
            }
            m.elem.style[k] = "rgb(" + Math.max(Math.min(parseInt(m.pos * (m.end[0] - m.start[0]) + m.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(m.pos * (m.end[1] - m.start[1]) + m.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(m.pos * (m.end[2] - m.start[2]) + m.start[2], 10), 255), 0) + ")"
        }
    });
    var j = {aqua:[0, 255, 255], azure:[240, 255, 255], beige:[245, 245, 220], black:[0,
        0, 0], blue:[0, 0, 255], brown:[165, 42, 42], cyan:[0, 255, 255], darkblue:[0, 0, 139], darkcyan:[0, 139, 139], darkgrey:[169, 169, 169], darkgreen:[0, 100, 0], darkkhaki:[189, 183, 107], darkmagenta:[139, 0, 139], darkolivegreen:[85, 107, 47], darkorange:[255, 140, 0], darkorchid:[153, 50, 204], darkred:[139, 0, 0], darksalmon:[233, 150, 122], darkviolet:[148, 0, 211], fuchsia:[255, 0, 255], gold:[255, 215, 0], green:[0, 128, 0], indigo:[75, 0, 130], khaki:[240, 230, 140], lightblue:[173, 216, 230], lightcyan:[224, 255, 255], lightgreen:[144, 238, 144], lightgrey:[211,
        211, 211], lightpink:[255, 182, 193], lightyellow:[255, 255, 224], lime:[0, 255, 0], magenta:[255, 0, 255], maroon:[128, 0, 0], navy:[0, 0, 128], olive:[128, 128, 0], orange:[255, 165, 0], pink:[255, 192, 203], purple:[128, 0, 128], violet:[128, 0, 128], red:[255, 0, 0], silver:[192, 192, 192], white:[255, 255, 255], yellow:[255, 255, 0], transparent:[255, 255, 255]}, n = ["add", "remove", "toggle"], q = {border:1, borderBottom:1, borderColor:1, borderLeft:1, borderRight:1, borderTop:1, borderWidth:1, margin:1, padding:1};
    b.effects.animateClass = function (l, k, m, o) {
        if (b.isFunction(m)) {
            o = m;
            m = null
        }
        return this.queue("fx", function () {
            var p = b(this), s = p.attr("style") || " ", r = a(e.call(this)), u, v = p.attr("className");
            b.each(n, function (w, y) {
                l[y] && p[y + "Class"](l[y])
            });
            u = a(e.call(this));
            p.attr("className", v);
            p.animate(d(r, u), k, m, function () {
                b.each(n, function (w, y) {
                    l[y] && p[y + "Class"](l[y])
                });
                if (typeof p.attr("style") == "object") {
                    p.attr("style").cssText = "";
                    p.attr("style").cssText = s
                } else p.attr("style", s);
                o && o.apply(this, arguments)
            });
            r = b.queue(this);
            u = r.splice(r.length - 1, 1)[0];
            r.splice(1, 0, u);
            b.dequeue(this)
        })
    };
    b.fn.extend({_addClass:b.fn.addClass, addClass:function (l, k, m, o) {
        return k ? b.effects.animateClass.apply(this, [
            {add:l},
            k,
            m,
            o
        ]) : this._addClass(l)
    }, _removeClass:b.fn.removeClass, removeClass:function (l, k, m, o) {
        return k ? b.effects.animateClass.apply(this, [
            {remove:l},
            k,
            m,
            o
        ]) : this._removeClass(l)
    }, _toggleClass:b.fn.toggleClass, toggleClass:function (l, k, m, o, p) {
        return typeof k == "boolean" || k === c ? m ? b.effects.animateClass.apply(this, [k ? {add:l} : {remove:l}, m, o, p]) : this._toggleClass(l,
            k) : b.effects.animateClass.apply(this, [
            {toggle:l},
            k,
            m,
            o
        ])
    }, switchClass:function (l, k, m, o, p) {
        return b.effects.animateClass.apply(this, [
            {add:k, remove:l},
            m,
            o,
            p
        ])
    }});
    b.extend(b.effects, {version:"1.8.9", save:function (l, k) {
        for (var m = 0; m < k.length; m++)k[m] !== null && l.data("ec.storage." + k[m], l[0].style[k[m]])
    }, restore:function (l, k) {
        for (var m = 0; m < k.length; m++)k[m] !== null && l.css(k[m], l.data("ec.storage." + k[m]))
    }, setMode:function (l, k) {
        if (k == "toggle")k = l.is(":hidden") ? "show" : "hide";
        return k
    }, getBaseline:function (l, k) {
        var m;
        switch (l[0]) {
            case "top":
                m = 0;
                break;
            case "middle":
                m = 0.5;
                break;
            case "bottom":
                m = 1;
                break;
            default:
                m = l[0] / k.height
        }
        switch (l[1]) {
            case "left":
                l = 0;
                break;
            case "center":
                l = 0.5;
                break;
            case "right":
                l = 1;
                break;
            default:
                l = l[1] / k.width
        }
        return{x:l, y:m}
    }, createWrapper:function (l) {
        if (l.parent().is(".ui-effects-wrapper"))return l.parent();
        var k = {width:l.outerWidth(true), height:l.outerHeight(true), "float":l.css("float")}, m = b("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%", background:"transparent",
            border:"none", margin:0, padding:0});
        l.wrap(m);
        m = l.parent();
        if (l.css("position") == "static") {
            m.css({position:"relative"});
            l.css({position:"relative"})
        } else {
            b.extend(k, {position:l.css("position"), zIndex:l.css("z-index")});
            b.each(["top", "left", "bottom", "right"], function (o, p) {
                k[p] = l.css(p);
                if (isNaN(parseInt(k[p], 10)))k[p] = "auto"
            });
            l.css({position:"relative", top:0, left:0, right:"auto", bottom:"auto"})
        }
        return m.css(k).show()
    }, removeWrapper:function (l) {
        if (l.parent().is(".ui-effects-wrapper"))return l.parent().replaceWith(l);
        return l
    }, setTransition:function (l, k, m, o) {
        o = o || {};
        b.each(k, function (p, s) {
            unit = l.cssUnit(s);
            if (unit[0] > 0)o[s] = unit[0] * m + unit[1]
        });
        return o
    }});
    b.fn.extend({effect:function (l) {
        var k = h.apply(this, arguments), m = {options:k[1], duration:k[2], callback:k[3]};
        k = m.options.mode;
        var o = b.effects[l];
        if (b.fx.off || !o)return k ? this[k](m.duration, m.callback) : this.each(function () {
            m.callback && m.callback.call(this)
        });
        return o.call(this, m)
    }, _show:b.fn.show, show:function (l) {
        if (i(l))return this._show.apply(this, arguments);
        else {
            var k = h.apply(this, arguments);
            k[1].mode = "show";
            return this.effect.apply(this, k)
        }
    }, _hide:b.fn.hide, hide:function (l) {
        if (i(l))return this._hide.apply(this, arguments); else {
            var k = h.apply(this, arguments);
            k[1].mode = "hide";
            return this.effect.apply(this, k)
        }
    }, __toggle:b.fn.toggle, toggle:function (l) {
        if (i(l) || typeof l === "boolean" || b.isFunction(l))return this.__toggle.apply(this, arguments); else {
            var k = h.apply(this, arguments);
            k[1].mode = "toggle";
            return this.effect.apply(this, k)
        }
    }, cssUnit:function (l) {
        var k = this.css(l),
            m = [];
        b.each(["em", "px", "%", "pt"], function (o, p) {
            if (k.indexOf(p) > 0)m = [parseFloat(k), p]
        });
        return m
    }});
    b.easing.jswing = b.easing.swing;
    b.extend(b.easing, {def:"easeOutQuad", swing:function (l, k, m, o, p) {
        return b.easing[b.easing.def](l, k, m, o, p)
    }, easeInQuad:function (l, k, m, o, p) {
        return o * (k /= p) * k + m
    }, easeOutQuad:function (l, k, m, o, p) {
        return-o * (k /= p) * (k - 2) + m
    }, easeInOutQuad:function (l, k, m, o, p) {
        if ((k /= p / 2) < 1)return o / 2 * k * k + m;
        return-o / 2 * (--k * (k - 2) - 1) + m
    }, easeInCubic:function (l, k, m, o, p) {
        return o * (k /= p) * k * k + m
    }, easeOutCubic:function (l, k, m, o, p) {
        return o * ((k = k / p - 1) * k * k + 1) + m
    }, easeInOutCubic:function (l, k, m, o, p) {
        if ((k /= p / 2) < 1)return o / 2 * k * k * k + m;
        return o / 2 * ((k -= 2) * k * k + 2) + m
    }, easeInQuart:function (l, k, m, o, p) {
        return o * (k /= p) * k * k * k + m
    }, easeOutQuart:function (l, k, m, o, p) {
        return-o * ((k = k / p - 1) * k * k * k - 1) + m
    }, easeInOutQuart:function (l, k, m, o, p) {
        if ((k /= p / 2) < 1)return o / 2 * k * k * k * k + m;
        return-o / 2 * ((k -= 2) * k * k * k - 2) + m
    }, easeInQuint:function (l, k, m, o, p) {
        return o * (k /= p) * k * k * k * k + m
    }, easeOutQuint:function (l, k, m, o, p) {
        return o * ((k = k / p - 1) * k * k * k * k + 1) + m
    }, easeInOutQuint:function (l, k, m, o, p) {
        if ((k /= p / 2) < 1)return o / 2 * k * k * k * k * k + m;
        return o / 2 * ((k -= 2) * k * k * k * k + 2) + m
    }, easeInSine:function (l, k, m, o, p) {
        return-o * Math.cos(k / p * (Math.PI / 2)) + o + m
    }, easeOutSine:function (l, k, m, o, p) {
        return o * Math.sin(k / p * (Math.PI / 2)) + m
    }, easeInOutSine:function (l, k, m, o, p) {
        return-o / 2 * (Math.cos(Math.PI * k / p) - 1) + m
    }, easeInExpo:function (l, k, m, o, p) {
        return k == 0 ? m : o * Math.pow(2, 10 * (k / p - 1)) + m
    }, easeOutExpo:function (l, k, m, o, p) {
        return k == p ? m + o : o * (-Math.pow(2, -10 * k / p) + 1) + m
    }, easeInOutExpo:function (l, k, m, o, p) {
        if (k == 0)return m;
        if (k ==
            p)return m + o;
        if ((k /= p / 2) < 1)return o / 2 * Math.pow(2, 10 * (k - 1)) + m;
        return o / 2 * (-Math.pow(2, -10 * --k) + 2) + m
    }, easeInCirc:function (l, k, m, o, p) {
        return-o * (Math.sqrt(1 - (k /= p) * k) - 1) + m
    }, easeOutCirc:function (l, k, m, o, p) {
        return o * Math.sqrt(1 - (k = k / p - 1) * k) + m
    }, easeInOutCirc:function (l, k, m, o, p) {
        if ((k /= p / 2) < 1)return-o / 2 * (Math.sqrt(1 - k * k) - 1) + m;
        return o / 2 * (Math.sqrt(1 - (k -= 2) * k) + 1) + m
    }, easeInElastic:function (l, k, m, o, p) {
        l = 1.70158;
        var s = 0, r = o;
        if (k == 0)return m;
        if ((k /= p) == 1)return m + o;
        s || (s = p * 0.3);
        if (r < Math.abs(o)) {
            r = o;
            l = s / 4
        } else l =
            s / (2 * Math.PI) * Math.asin(o / r);
        return-(r * Math.pow(2, 10 * (k -= 1)) * Math.sin((k * p - l) * 2 * Math.PI / s)) + m
    }, easeOutElastic:function (l, k, m, o, p) {
        l = 1.70158;
        var s = 0, r = o;
        if (k == 0)return m;
        if ((k /= p) == 1)return m + o;
        s || (s = p * 0.3);
        if (r < Math.abs(o)) {
            r = o;
            l = s / 4
        } else l = s / (2 * Math.PI) * Math.asin(o / r);
        return r * Math.pow(2, -10 * k) * Math.sin((k * p - l) * 2 * Math.PI / s) + o + m
    }, easeInOutElastic:function (l, k, m, o, p) {
        l = 1.70158;
        var s = 0, r = o;
        if (k == 0)return m;
        if ((k /= p / 2) == 2)return m + o;
        s || (s = p * 0.3 * 1.5);
        if (r < Math.abs(o)) {
            r = o;
            l = s / 4
        } else l = s / (2 * Math.PI) * Math.asin(o /
            r);
        if (k < 1)return-0.5 * r * Math.pow(2, 10 * (k -= 1)) * Math.sin((k * p - l) * 2 * Math.PI / s) + m;
        return r * Math.pow(2, -10 * (k -= 1)) * Math.sin((k * p - l) * 2 * Math.PI / s) * 0.5 + o + m
    }, easeInBack:function (l, k, m, o, p, s) {
        if (s == c)s = 1.70158;
        return o * (k /= p) * k * ((s + 1) * k - s) + m
    }, easeOutBack:function (l, k, m, o, p, s) {
        if (s == c)s = 1.70158;
        return o * ((k = k / p - 1) * k * ((s + 1) * k + s) + 1) + m
    }, easeInOutBack:function (l, k, m, o, p, s) {
        if (s == c)s = 1.70158;
        if ((k /= p / 2) < 1)return o / 2 * k * k * (((s *= 1.525) + 1) * k - s) + m;
        return o / 2 * ((k -= 2) * k * (((s *= 1.525) + 1) * k + s) + 2) + m
    }, easeInBounce:function (l, k, m, o, p) {
        return o - b.easing.easeOutBounce(l, p - k, 0, o, p) + m
    }, easeOutBounce:function (l, k, m, o, p) {
        return(k /= p) < 1 / 2.75 ? o * 7.5625 * k * k + m : k < 2 / 2.75 ? o * (7.5625 * (k -= 1.5 / 2.75) * k + 0.75) + m : k < 2.5 / 2.75 ? o * (7.5625 * (k -= 2.25 / 2.75) * k + 0.9375) + m : o * (7.5625 * (k -= 2.625 / 2.75) * k + 0.984375) + m
    }, easeInOutBounce:function (l, k, m, o, p) {
        if (k < p / 2)return b.easing.easeInBounce(l, k * 2, 0, o, p) * 0.5 + m;
        return b.easing.easeOutBounce(l, k * 2 - p, 0, o, p) * 0.5 + o * 0.5 + m
    }})
}(jQuery);
(function (b) {
    b.effects.blind = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right"], e = b.effects.setMode(f, c.options.mode || "hide"), a = c.options.direction || "vertical";
            b.effects.save(f, g);
            f.show();
            var d = b.effects.createWrapper(f).css({overflow:"hidden"}), h = a == "vertical" ? "height" : "width";
            a = a == "vertical" ? d.height() : d.width();
            e == "show" && d.css(h, 0);
            var i = {};
            i[h] = e == "show" ? a : 0;
            d.animate(i, c.duration, c.options.easing, function () {
                e == "hide" && f.hide();
                b.effects.restore(f,
                    g);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(f[0], arguments);
                f.dequeue()
            })
        })
    }
})(jQuery);
(function (b) {
    b.effects.bounce = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right"], e = b.effects.setMode(f, c.options.mode || "effect"), a = c.options.direction || "up", d = c.options.distance || 20, h = c.options.times || 5, i = c.duration || 250;
            /show|hide/.test(e) && g.push("opacity");
            b.effects.save(f, g);
            f.show();
            b.effects.createWrapper(f);
            var j = a == "up" || a == "down" ? "top" : "left";
            a = a == "up" || a == "left" ? "pos" : "neg";
            d = c.options.distance || (j == "top" ? f.outerHeight({margin:true}) / 3 : f.outerWidth({margin:true}) /
                3);
            if (e == "show")f.css("opacity", 0).css(j, a == "pos" ? -d : d);
            if (e == "hide")d /= h * 2;
            e != "hide" && h--;
            if (e == "show") {
                var n = {opacity:1};
                n[j] = (a == "pos" ? "+=" : "-=") + d;
                f.animate(n, i / 2, c.options.easing);
                d /= 2;
                h--
            }
            for (n = 0; n < h; n++) {
                var q = {}, l = {};
                q[j] = (a == "pos" ? "-=" : "+=") + d;
                l[j] = (a == "pos" ? "+=" : "-=") + d;
                f.animate(q, i / 2, c.options.easing).animate(l, i / 2, c.options.easing);
                d = e == "hide" ? d * 2 : d / 2
            }
            if (e == "hide") {
                n = {opacity:0};
                n[j] = (a == "pos" ? "-=" : "+=") + d;
                f.animate(n, i / 2, c.options.easing, function () {
                    f.hide();
                    b.effects.restore(f, g);
                    b.effects.removeWrapper(f);
                    c.callback && c.callback.apply(this, arguments)
                })
            } else {
                q = {};
                l = {};
                q[j] = (a == "pos" ? "-=" : "+=") + d;
                l[j] = (a == "pos" ? "+=" : "-=") + d;
                f.animate(q, i / 2, c.options.easing).animate(l, i / 2, c.options.easing, function () {
                    b.effects.restore(f, g);
                    b.effects.removeWrapper(f);
                    c.callback && c.callback.apply(this, arguments)
                })
            }
            f.queue("fx", function () {
                f.dequeue()
            });
            f.dequeue()
        })
    }
})(jQuery);
(function (b) {
    b.effects.clip = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right", "height", "width"], e = b.effects.setMode(f, c.options.mode || "hide"), a = c.options.direction || "vertical";
            b.effects.save(f, g);
            f.show();
            var d = b.effects.createWrapper(f).css({overflow:"hidden"});
            d = f[0].tagName == "IMG" ? d : f;
            var h = {size:a == "vertical" ? "height" : "width", position:a == "vertical" ? "top" : "left"};
            a = a == "vertical" ? d.height() : d.width();
            if (e == "show") {
                d.css(h.size, 0);
                d.css(h.position,
                    a / 2)
            }
            var i = {};
            i[h.size] = e == "show" ? a : 0;
            i[h.position] = e == "show" ? 0 : a / 2;
            d.animate(i, {queue:false, duration:c.duration, easing:c.options.easing, complete:function () {
                e == "hide" && f.hide();
                b.effects.restore(f, g);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(f[0], arguments);
                f.dequeue()
            }})
        })
    }
})(jQuery);
(function (b) {
    b.effects.drop = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right", "opacity"], e = b.effects.setMode(f, c.options.mode || "hide"), a = c.options.direction || "left";
            b.effects.save(f, g);
            f.show();
            b.effects.createWrapper(f);
            var d = a == "up" || a == "down" ? "top" : "left";
            a = a == "up" || a == "left" ? "pos" : "neg";
            var h = c.options.distance || (d == "top" ? f.outerHeight({margin:true}) / 2 : f.outerWidth({margin:true}) / 2);
            if (e == "show")f.css("opacity", 0).css(d, a == "pos" ? -h : h);
            var i = {opacity:e ==
                "show" ? 1 : 0};
            i[d] = (e == "show" ? a == "pos" ? "+=" : "-=" : a == "pos" ? "-=" : "+=") + h;
            f.animate(i, {queue:false, duration:c.duration, easing:c.options.easing, complete:function () {
                e == "hide" && f.hide();
                b.effects.restore(f, g);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(this, arguments);
                f.dequeue()
            }})
        })
    }
})(jQuery);
(function (b) {
    b.effects.explode = function (c) {
        return this.queue(function () {
            var f = c.options.pieces ? Math.round(Math.sqrt(c.options.pieces)) : 3, g = c.options.pieces ? Math.round(Math.sqrt(c.options.pieces)) : 3;
            c.options.mode = c.options.mode == "toggle" ? b(this).is(":visible") ? "hide" : "show" : c.options.mode;
            var e = b(this).show().css("visibility", "hidden"), a = e.offset();
            a.top -= parseInt(e.css("marginTop"), 10) || 0;
            a.left -= parseInt(e.css("marginLeft"), 10) || 0;
            for (var d = e.outerWidth(true), h = e.outerHeight(true), i = 0; i < f; i++)for (var j =
                0; j < g; j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute", visibility:"visible", left:-j * (d / g), top:-i * (h / f)}).parent().addClass("ui-effects-explode").css({position:"absolute", overflow:"hidden", width:d / g, height:h / f, left:a.left + j * (d / g) + (c.options.mode == "show" ? (j - Math.floor(g / 2)) * (d / g) : 0), top:a.top + i * (h / f) + (c.options.mode == "show" ? (i - Math.floor(f / 2)) * (h / f) : 0), opacity:c.options.mode == "show" ? 0 : 1}).animate({left:a.left + j * (d / g) + (c.options.mode == "show" ? 0 : (j - Math.floor(g / 2)) * (d / g)), top:a.top +
                i * (h / f) + (c.options.mode == "show" ? 0 : (i - Math.floor(f / 2)) * (h / f)), opacity:c.options.mode == "show" ? 1 : 0}, c.duration || 500);
            setTimeout(function () {
                c.options.mode == "show" ? e.css({visibility:"visible"}) : e.css({visibility:"visible"}).hide();
                c.callback && c.callback.apply(e[0]);
                e.dequeue();
                b("div.ui-effects-explode").remove()
            }, c.duration || 500)
        })
    }
})(jQuery);
(function (b) {
    b.effects.fade = function (c) {
        return this.queue(function () {
            var f = b(this), g = b.effects.setMode(f, c.options.mode || "hide");
            f.animate({opacity:g}, {queue:false, duration:c.duration, easing:c.options.easing, complete:function () {
                c.callback && c.callback.apply(this, arguments);
                f.dequeue()
            }})
        })
    }
})(jQuery);
(function (b) {
    b.effects.fold = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right"], e = b.effects.setMode(f, c.options.mode || "hide"), a = c.options.size || 15, d = !!c.options.horizFirst, h = c.duration ? c.duration / 2 : b.fx.speeds._default / 2;
            b.effects.save(f, g);
            f.show();
            var i = b.effects.createWrapper(f).css({overflow:"hidden"}), j = e == "show" != d, n = j ? ["width", "height"] : ["height", "width"];
            j = j ? [i.width(), i.height()] : [i.height(), i.width()];
            var q = /([0-9]+)%/.exec(a);
            if (q)a = parseInt(q[1],
                10) / 100 * j[e == "hide" ? 0 : 1];
            if (e == "show")i.css(d ? {height:0, width:a} : {height:a, width:0});
            d = {};
            q = {};
            d[n[0]] = e == "show" ? j[0] : a;
            q[n[1]] = e == "show" ? j[1] : 0;
            i.animate(d, h, c.options.easing).animate(q, h, c.options.easing, function () {
                e == "hide" && f.hide();
                b.effects.restore(f, g);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(f[0], arguments);
                f.dequeue()
            })
        })
    }
})(jQuery);
(function (b) {
    b.effects.highlight = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["backgroundImage", "backgroundColor", "opacity"], e = b.effects.setMode(f, c.options.mode || "show"), a = {backgroundColor:f.css("backgroundColor")};
            if (e == "hide")a.opacity = 0;
            b.effects.save(f, g);
            f.show().css({backgroundImage:"none", backgroundColor:c.options.color || "#ffff99"}).animate(a, {queue:false, duration:c.duration, easing:c.options.easing, complete:function () {
                e == "hide" && f.hide();
                b.effects.restore(f, g);
                e == "show" && !b.support.opacity &&
                this.style.removeAttribute("filter");
                c.callback && c.callback.apply(this, arguments);
                f.dequeue()
            }})
        })
    }
})(jQuery);
(function (b) {
    b.effects.pulsate = function (c) {
        return this.queue(function () {
            var f = b(this), g = b.effects.setMode(f, c.options.mode || "show");
            times = (c.options.times || 5) * 2 - 1;
            duration = c.duration ? c.duration / 2 : b.fx.speeds._default / 2;
            isVisible = f.is(":visible");
            animateTo = 0;
            if (!isVisible) {
                f.css("opacity", 0).show();
                animateTo = 1
            }
            if (g == "hide" && isVisible || g == "show" && !isVisible)times--;
            for (g = 0; g < times; g++) {
                f.animate({opacity:animateTo}, duration, c.options.easing);
                animateTo = (animateTo + 1) % 2
            }
            f.animate({opacity:animateTo}, duration,
                c.options.easing, function () {
                    animateTo == 0 && f.hide();
                    c.callback && c.callback.apply(this, arguments)
                });
            f.queue("fx",
                function () {
                    f.dequeue()
                }).dequeue()
        })
    }
})(jQuery);
(function (b) {
    b.effects.puff = function (c) {
        return this.queue(function () {
            var f = b(this), g = b.effects.setMode(f, c.options.mode || "hide"), e = parseInt(c.options.percent, 10) || 150, a = e / 100, d = {height:f.height(), width:f.width()};
            b.extend(c.options, {fade:true, mode:g, percent:g == "hide" ? e : 100, from:g == "hide" ? d : {height:d.height * a, width:d.width * a}});
            f.effect("scale", c.options, c.duration, c.callback);
            f.dequeue()
        })
    };
    b.effects.scale = function (c) {
        return this.queue(function () {
            var f = b(this), g = b.extend(true, {}, c.options), e = b.effects.setMode(f,
                c.options.mode || "effect"), a = parseInt(c.options.percent, 10) || (parseInt(c.options.percent, 10) == 0 ? 0 : e == "hide" ? 0 : 100), d = c.options.direction || "both", h = c.options.origin;
            if (e != "effect") {
                g.origin = h || ["middle", "center"];
                g.restore = true
            }
            h = {height:f.height(), width:f.width()};
            f.from = c.options.from || (e == "show" ? {height:0, width:0} : h);
            a = {y:d != "horizontal" ? a / 100 : 1, x:d != "vertical" ? a / 100 : 1};
            f.to = {height:h.height * a.y, width:h.width * a.x};
            if (c.options.fade) {
                if (e == "show") {
                    f.from.opacity = 0;
                    f.to.opacity = 1
                }
                if (e == "hide") {
                    f.from.opacity =
                        1;
                    f.to.opacity = 0
                }
            }
            g.from = f.from;
            g.to = f.to;
            g.mode = e;
            f.effect("size", g, c.duration, c.callback);
            f.dequeue()
        })
    };
    b.effects.size = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], e = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], a = ["width", "height", "overflow"], d = ["fontSize"], h = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], i = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
                j = b.effects.setMode(f, c.options.mode || "effect"), n = c.options.restore || false, q = c.options.scale || "both", l = c.options.origin, k = {height:f.height(), width:f.width()};
            f.from = c.options.from || k;
            f.to = c.options.to || k;
            if (l) {
                l = b.effects.getBaseline(l, k);
                f.from.top = (k.height - f.from.height) * l.y;
                f.from.left = (k.width - f.from.width) * l.x;
                f.to.top = (k.height - f.to.height) * l.y;
                f.to.left = (k.width - f.to.width) * l.x
            }
            var m = {from:{y:f.from.height / k.height, x:f.from.width / k.width}, to:{y:f.to.height / k.height, x:f.to.width / k.width}};
            if (q == "box" || q == "both") {
                if (m.from.y != m.to.y) {
                    g = g.concat(h);
                    f.from = b.effects.setTransition(f, h, m.from.y, f.from);
                    f.to = b.effects.setTransition(f, h, m.to.y, f.to)
                }
                if (m.from.x != m.to.x) {
                    g = g.concat(i);
                    f.from = b.effects.setTransition(f, i, m.from.x, f.from);
                    f.to = b.effects.setTransition(f, i, m.to.x, f.to)
                }
            }
            if (q == "content" || q == "both")if (m.from.y != m.to.y) {
                g = g.concat(d);
                f.from = b.effects.setTransition(f, d, m.from.y, f.from);
                f.to = b.effects.setTransition(f, d, m.to.y, f.to)
            }
            b.effects.save(f, n ? g : e);
            f.show();
            b.effects.createWrapper(f);
            f.css("overflow", "hidden").css(f.from);
            if (q == "content" || q == "both") {
                h = h.concat(["marginTop", "marginBottom"]).concat(d);
                i = i.concat(["marginLeft", "marginRight"]);
                a = g.concat(h).concat(i);
                f.find("*[width]").each(function () {
                    child = b(this);
                    n && b.effects.save(child, a);
                    var o = {height:child.height(), width:child.width()};
                    child.from = {height:o.height * m.from.y, width:o.width * m.from.x};
                    child.to = {height:o.height * m.to.y, width:o.width * m.to.x};
                    if (m.from.y != m.to.y) {
                        child.from = b.effects.setTransition(child, h, m.from.y, child.from);
                        child.to = b.effects.setTransition(child, h, m.to.y, child.to)
                    }
                    if (m.from.x != m.to.x) {
                        child.from = b.effects.setTransition(child, i, m.from.x, child.from);
                        child.to = b.effects.setTransition(child, i, m.to.x, child.to)
                    }
                    child.css(child.from);
                    child.animate(child.to, c.duration, c.options.easing, function () {
                        n && b.effects.restore(child, a)
                    })
                })
            }
            f.animate(f.to, {queue:false, duration:c.duration, easing:c.options.easing, complete:function () {
                f.to.opacity === 0 && f.css("opacity", f.from.opacity);
                j == "hide" && f.hide();
                b.effects.restore(f,
                    n ? g : e);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(this, arguments);
                f.dequeue()
            }})
        })
    }
})(jQuery);
(function (b) {
    b.effects.shake = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right"];
            b.effects.setMode(f, c.options.mode || "effect");
            var e = c.options.direction || "left", a = c.options.distance || 20, d = c.options.times || 3, h = c.duration || c.options.duration || 140;
            b.effects.save(f, g);
            f.show();
            b.effects.createWrapper(f);
            var i = e == "up" || e == "down" ? "top" : "left", j = e == "up" || e == "left" ? "pos" : "neg";
            e = {};
            var n = {}, q = {};
            e[i] = (j == "pos" ? "-=" : "+=") + a;
            n[i] = (j == "pos" ? "+=" : "-=") + a * 2;
            q[i] =
                (j == "pos" ? "-=" : "+=") + a * 2;
            f.animate(e, h, c.options.easing);
            for (a = 1; a < d; a++)f.animate(n, h, c.options.easing).animate(q, h, c.options.easing);
            f.animate(n, h, c.options.easing).animate(e, h / 2, c.options.easing, function () {
                b.effects.restore(f, g);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(this, arguments)
            });
            f.queue("fx", function () {
                f.dequeue()
            });
            f.dequeue()
        })
    }
})(jQuery);
(function (b) {
    b.effects.slide = function (c) {
        return this.queue(function () {
            var f = b(this), g = ["position", "top", "bottom", "left", "right"], e = b.effects.setMode(f, c.options.mode || "show"), a = c.options.direction || "left";
            b.effects.save(f, g);
            f.show();
            b.effects.createWrapper(f).css({overflow:"hidden"});
            var d = a == "up" || a == "down" ? "top" : "left";
            a = a == "up" || a == "left" ? "pos" : "neg";
            var h = c.options.distance || (d == "top" ? f.outerHeight({margin:true}) : f.outerWidth({margin:true}));
            if (e == "show")f.css(d, a == "pos" ? isNaN(h) ? "-" + h : -h : h);
            var i = {};
            i[d] = (e == "show" ? a == "pos" ? "+=" : "-=" : a == "pos" ? "-=" : "+=") + h;
            f.animate(i, {queue:false, duration:c.duration, easing:c.options.easing, complete:function () {
                e == "hide" && f.hide();
                b.effects.restore(f, g);
                b.effects.removeWrapper(f);
                c.callback && c.callback.apply(this, arguments);
                f.dequeue()
            }})
        })
    }
})(jQuery);
(function (b) {
    b.effects.transfer = function (c) {
        return this.queue(function () {
            var f = b(this), g = b(c.options.to), e = g.offset();
            g = {top:e.top, left:e.left, height:g.innerHeight(), width:g.innerWidth()};
            e = f.offset();
            var a = b('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:e.top, left:e.left, height:f.innerHeight(), width:f.innerWidth(), position:"absolute"}).animate(g, c.duration, c.options.easing, function () {
                a.remove();
                c.callback && c.callback.apply(f[0], arguments);
                f.dequeue()
            })
        })
    }
})(jQuery);
(function (b) {
    b.widget("ui.accordion", {options:{active:0, animated:"slide", autoHeight:true, clearStyle:false, collapsible:false, event:"click", fillSpace:false, header:"> li > :first-child,> :not(li):even", icons:{header:"ui-icon-triangle-1-e", headerSelected:"ui-icon-triangle-1-s"}, navigation:false, navigationFilter:function () {
        return this.href.toLowerCase() === location.href.toLowerCase()
    }}, _create:function () {
        var c = this, f = c.options;
        c.running = 0;
        c.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
        c.headers =
            c.element.find(f.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",
                function () {
                    f.disabled || b(this).addClass("ui-state-hover")
                }).bind("mouseleave.accordion",
                function () {
                    f.disabled || b(this).removeClass("ui-state-hover")
                }).bind("focus.accordion",
                function () {
                    f.disabled || b(this).addClass("ui-state-focus")
                }).bind("blur.accordion", function () {
                f.disabled || b(this).removeClass("ui-state-focus")
            });
        c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
        if (f.navigation) {
            var g = c.element.find("a").filter(f.navigationFilter).eq(0);
            if (g.length) {
                var e = g.closest(".ui-accordion-header");
                c.active = e.length ? e : g.closest(".ui-accordion-content").prev()
            }
        }
        c.active = c._findActive(c.active || f.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
        c.active.next().addClass("ui-accordion-content-active");
        c._createIcons();
        c.resize();
        c.element.attr("role", "tablist");
        c.headers.attr("role", "tab").bind("keydown.accordion",
            function (a) {
                return c._keydown(a)
            }).next().attr("role", "tabpanel");
        c.headers.not(c.active || "").attr({"aria-expanded":"false", tabIndex:-1}).next().hide();
        c.active.length ? c.active.attr({"aria-expanded":"true", tabIndex:0}) : c.headers.eq(0).attr("tabIndex", 0);
        b.browser.safari || c.headers.find("a").attr("tabIndex", -1);
        f.event && c.headers.bind(f.event.split(" ").join(".accordion ") + ".accordion", function (a) {
            c._clickHandler.call(c, a, this);
            a.preventDefault()
        })
    }, _createIcons:function () {
        var c = this.options;
        if (c.icons) {
            b("<span></span>").addClass("ui-icon " +
                c.icons.header).prependTo(this.headers);
            this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);
            this.element.addClass("ui-accordion-icons")
        }
    }, _destroyIcons:function () {
        this.headers.children(".ui-icon").remove();
        this.element.removeClass("ui-accordion-icons")
    }, destroy:function () {
        var c = this.options;
        this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");
        this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
        this.headers.find("a").removeAttr("tabIndex");
        this._destroyIcons();
        var f = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");
        if (c.autoHeight || c.fillHeight)f.css("height", "");
        return b.Widget.prototype.destroy.call(this)
    }, _setOption:function (c, f) {
        b.Widget.prototype._setOption.apply(this, arguments);
        c == "active" && this.activate(f);
        if (c == "icons") {
            this._destroyIcons();
            f && this._createIcons()
        }
        if (c == "disabled")this.headers.add(this.headers.next())[f ? "addClass" : "removeClass"]("ui-accordion-disabled ui-state-disabled")
    }, _keydown:function (c) {
        if (!(this.options.disabled || c.altKey || c.ctrlKey)) {
            var f = b.ui.keyCode, g = this.headers.length, e = this.headers.index(c.target), a = false;
            switch (c.keyCode) {
                case f.RIGHT:
                case f.DOWN:
                    a = this.headers[(e + 1) % g];
                    break;
                case f.LEFT:
                case f.UP:
                    a = this.headers[(e - 1 + g) % g];
                    break;
                case f.SPACE:
                case f.ENTER:
                    this._clickHandler({target:c.target}, c.target);
                    c.preventDefault()
            }
            if (a) {
                b(c.target).attr("tabIndex", -1);
                b(a).attr("tabIndex", 0);
                a.focus();
                return false
            }
            return true
        }
    }, resize:function () {
        var c = this.options, f;
        if (c.fillSpace) {
            if (b.browser.msie) {
                var g = this.element.parent().css("overflow");
                this.element.parent().css("overflow", "hidden")
            }
            f = this.element.parent().height();
            b.browser.msie && this.element.parent().css("overflow", g);
            this.headers.each(function () {
                f -= b(this).outerHeight(true)
            });
            this.headers.next().each(
                function () {
                    b(this).height(Math.max(0, f - b(this).innerHeight() +
                        b(this).height()))
                }).css("overflow", "auto")
        } else if (c.autoHeight) {
            f = 0;
            this.headers.next().each(
                function () {
                    f = Math.max(f, b(this).height("").height())
                }).height(f)
        }
        return this
    }, activate:function (c) {
        this.options.active = c;
        c = this._findActive(c)[0];
        this._clickHandler({target:c}, c);
        return this
    }, _findActive:function (c) {
        return c ? typeof c === "number" ? this.headers.filter(":eq(" + c + ")") : this.headers.not(this.headers.not(c)) : c === false ? b([]) : this.headers.filter(":eq(0)")
    }, _clickHandler:function (c, f) {
        var g = this.options;
        if (!g.disabled)if (c.target) {
            c = b(c.currentTarget || f);
            f = c[0] === this.active[0];
            g.active = g.collapsible && f ? false : this.headers.index(c);
            if (!(this.running || !g.collapsible && f)) {
                var e = this.active;
                i = c.next();
                d = this.active.next();
                h = {options:g, newHeader:f && g.collapsible ? b([]) : c, oldHeader:this.active, newContent:f && g.collapsible ? b([]) : i, oldContent:d};
                var a = this.headers.index(this.active[0]) > this.headers.index(c[0]);
                this.active = f ? b([]) : c;
                this._toggle(i, d, h, f, a);
                e.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);
                if (!f) {
                    c.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(g.icons.header).addClass(g.icons.headerSelected);
                    c.next().addClass("ui-accordion-content-active")
                }
            }
        } else if (g.collapsible) {
            this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);
            this.active.next().addClass("ui-accordion-content-active");
            var d = this.active.next(),
                h = {options:g, newHeader:b([]), oldHeader:g.active, newContent:b([]), oldContent:d}, i = this.active = b([]);
            this._toggle(i, d, h)
        }
    }, _toggle:function (c, f, g, e, a) {
        var d = this, h = d.options;
        d.toShow = c;
        d.toHide = f;
        d.data = g;
        var i = function () {
            if (d)return d._completed.apply(d, arguments)
        };
        d._trigger("changestart", null, d.data);
        d.running = f.size() === 0 ? c.size() : f.size();
        if (h.animated) {
            g = {};
            g = h.collapsible && e ? {toShow:b([]), toHide:f, complete:i, down:a, autoHeight:h.autoHeight || h.fillSpace} : {toShow:c, toHide:f, complete:i, down:a, autoHeight:h.autoHeight ||
                h.fillSpace};
            if (!h.proxied)h.proxied = h.animated;
            if (!h.proxiedDuration)h.proxiedDuration = h.duration;
            h.animated = b.isFunction(h.proxied) ? h.proxied(g) : h.proxied;
            h.duration = b.isFunction(h.proxiedDuration) ? h.proxiedDuration(g) : h.proxiedDuration;
            e = b.ui.accordion.animations;
            var j = h.duration, n = h.animated;
            if (n && !e[n] && !b.easing[n])n = "slide";
            e[n] || (e[n] = function (q) {
                this.slide(q, {easing:n, duration:j || 700})
            });
            e[n](g)
        } else {
            if (h.collapsible && e)c.toggle(); else {
                f.hide();
                c.show()
            }
            i(true)
        }
        f.prev().attr({"aria-expanded":"false",
            tabIndex:-1}).blur();
        c.prev().attr({"aria-expanded":"true", tabIndex:0}).focus()
    }, _completed:function (c) {
        this.running = c ? 0 : --this.running;
        if (!this.running) {
            this.options.clearStyle && this.toShow.add(this.toHide).css({height:"", overflow:""});
            this.toHide.removeClass("ui-accordion-content-active");
            if (this.toHide.length)this.toHide.parent()[0].className = this.toHide.parent()[0].className;
            this._trigger("change", null, this.data)
        }
    }});
    b.extend(b.ui.accordion, {version:"1.8.9", animations:{slide:function (c, f) {
        c =
            b.extend({easing:"swing", duration:300}, c, f);
        if (c.toHide.size())if (c.toShow.size()) {
            var g = c.toShow.css("overflow"), e = 0, a = {}, d = {}, h;
            f = c.toShow;
            h = f[0].style.width;
            f.width(parseInt(f.parent().width(), 10) - parseInt(f.css("paddingLeft"), 10) - parseInt(f.css("paddingRight"), 10) - (parseInt(f.css("borderLeftWidth"), 10) || 0) - (parseInt(f.css("borderRightWidth"), 10) || 0));
            b.each(["height", "paddingTop", "paddingBottom"], function (i, j) {
                d[j] = "hide";
                i = ("" + b.css(c.toShow[0], j)).match(/^([\d+-.]+)(.*)$/);
                a[j] = {value:i[1],
                    unit:i[2] || "px"}
            });
            c.toShow.css({height:0, overflow:"hidden"}).show();
            c.toHide.filter(":hidden").each(c.complete).end().filter(":visible").animate(d, {step:function (i, j) {
                if (j.prop == "height")e = j.end - j.start === 0 ? 0 : (j.now - j.start) / (j.end - j.start);
                c.toShow[0].style[j.prop] = e * a[j.prop].value + a[j.prop].unit
            }, duration:c.duration, easing:c.easing, complete:function () {
                c.autoHeight || c.toShow.css("height", "");
                c.toShow.css({width:h, overflow:g});
                c.complete()
            }})
        } else c.toHide.animate({height:"hide", paddingTop:"hide",
            paddingBottom:"hide"}, c); else c.toShow.animate({height:"show", paddingTop:"show", paddingBottom:"show"}, c)
    }, bounceslide:function (c) {
        this.slide(c, {easing:c.down ? "easeOutBounce" : "swing", duration:c.down ? 1E3 : 200})
    }}})
})(jQuery);
(function (b) {
    b.widget("ui.autocomplete", {options:{appendTo:"body", delay:300, minLength:1, position:{my:"left top", at:"left bottom", collision:"none"}, source:null}, pending:0, _create:function () {
        var c = this, f = this.element[0].ownerDocument, g;
        this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({role:"textbox", "aria-autocomplete":"list", "aria-haspopup":"true"}).bind("keydown.autocomplete",
            function (e) {
                if (!(c.options.disabled || c.element.attr("readonly"))) {
                    g = false;
                    var a = b.ui.keyCode;
                    switch (e.keyCode) {
                        case a.PAGE_UP:
                            c._move("previousPage", e);
                            break;
                        case a.PAGE_DOWN:
                            c._move("nextPage", e);
                            break;
                        case a.UP:
                            c._move("previous", e);
                            e.preventDefault();
                            break;
                        case a.DOWN:
                            c._move("next", e);
                            e.preventDefault();
                            break;
                        case a.ENTER:
                        case a.NUMPAD_ENTER:
                            if (c.menu.active) {
                                g = true;
                                e.preventDefault()
                            }
                        case a.TAB:
                            if (!c.menu.active)return;
                            c.menu.select(e);
                            break;
                        case a.ESCAPE:
                            c.element.val(c.term);
                            c.close(e);
                            break;
                        default:
                            clearTimeout(c.searching);
                            c.searching = setTimeout(function () {
                                if (c.term != c.element.val()) {
                                    c.selectedItem =
                                        null;
                                    c.search(null, e)
                                }
                            }, c.options.delay);
                            break
                    }
                }
            }).bind("keypress.autocomplete",
            function (e) {
                if (g) {
                    g = false;
                    e.preventDefault()
                }
            }).bind("focus.autocomplete",
            function () {
                if (!c.options.disabled) {
                    c.selectedItem = null;
                    c.previous = c.element.val()
                }
            }).bind("blur.autocomplete", function (e) {
                if (!c.options.disabled) {
                    clearTimeout(c.searching);
                    c.closing = setTimeout(function () {
                        c.close(e);
                        c._change(e)
                    }, 150)
                }
            });
        this._initSource();
        this.response = function () {
            return c._response.apply(c, arguments)
        };
        this.menu = b("<ul></ul>").addClass("ui-autocomplete").appendTo(b(this.options.appendTo ||
            "body", f)[0]).mousedown(
            function (e) {
                var a = c.menu.element[0];
                b(e.target).closest(".ui-menu-item").length || setTimeout(function () {
                    b(document).one("mousedown", function (d) {
                        d.target !== c.element[0] && d.target !== a && !b.ui.contains(a, d.target) && c.close()
                    })
                }, 1);
                setTimeout(function () {
                    clearTimeout(c.closing)
                }, 13)
            }).menu({focus:function (e, a) {
                a = a.item.data("item.autocomplete");
                false !== c._trigger("focus", e, {item:a}) && /^key/.test(e.originalEvent.type) && c.element.val(a.value)
            }, selected:function (e, a) {
                var d = a.item.data("item.autocomplete"),
                    h = c.previous;
                if (c.element[0] !== f.activeElement) {
                    c.element.focus();
                    c.previous = h;
                    setTimeout(function () {
                        c.previous = h;
                        c.selectedItem = d
                    }, 1)
                }
                false !== c._trigger("select", e, {item:d}) && c.element.val(d.value);
                c.term = c.element.val();
                c.close(e);
                c.selectedItem = d
            }, blur:function () {
                c.menu.element.is(":visible") && c.element.val() !== c.term && c.element.val(c.term)
            }}).zIndex(this.element.zIndex() + 1).css({top:0, left:0}).hide().data("menu");
        b.fn.bgiframe && this.menu.element.bgiframe()
    }, destroy:function () {
        this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
        this.menu.element.remove();
        b.Widget.prototype.destroy.call(this)
    }, _setOption:function (c, f) {
        b.Widget.prototype._setOption.apply(this, arguments);
        c === "source" && this._initSource();
        if (c === "appendTo")this.menu.element.appendTo(b(f || "body", this.element[0].ownerDocument)[0]);
        c === "disabled" && f && this.xhr && this.xhr.abort()
    }, _initSource:function () {
        var c = this, f, g;
        if (b.isArray(this.options.source)) {
            f = this.options.source;
            this.source = function (e, a) {
                a(b.ui.autocomplete.filter(f, e.term))
            }
        } else if (typeof this.options.source ===
            "string") {
            g = this.options.source;
            this.source = function (e, a) {
                c.xhr && c.xhr.abort();
                c.xhr = b.ajax({url:g, data:e, dataType:"json", success:function (d, h, i) {
                    i === c.xhr && a(d);
                    c.xhr = null
                }, error:function (d) {
                    d === c.xhr && a([]);
                    c.xhr = null
                }})
            }
        } else this.source = this.options.source
    }, search:function (c, f) {
        c = c != null ? c : this.element.val();
        this.term = this.element.val();
        if (c.length < this.options.minLength)return this.close(f);
        clearTimeout(this.closing);
        if (this._trigger("search", f) !== false)return this._search(c)
    }, _search:function (c) {
        this.pending++;
        this.element.addClass("ui-autocomplete-loading");
        this.source({term:c}, this.response)
    }, _response:function (c) {
        if (!this.options.disabled && c && c.length) {
            c = this._normalize(c);
            this._suggest(c);
            this._trigger("open")
        } else this.close();
        this.pending--;
        this.pending || this.element.removeClass("ui-autocomplete-loading")
    }, close:function (c) {
        clearTimeout(this.closing);
        if (this.menu.element.is(":visible")) {
            this.menu.element.hide();
            this.menu.deactivate();
            this._trigger("close", c)
        }
    }, _change:function (c) {
        this.previous !==
            this.element.val() && this._trigger("change", c, {item:this.selectedItem})
    }, _normalize:function (c) {
        if (c.length && c[0].label && c[0].value)return c;
        return b.map(c, function (f) {
            if (typeof f === "string")return{label:f, value:f};
            return b.extend({label:f.label || f.value, value:f.value || f.label}, f)
        })
    }, _suggest:function (c) {
        var f = this.menu.element.empty().zIndex(this.element.zIndex() + 1);
        this._renderMenu(f, c);
        this.menu.deactivate();
        this.menu.refresh();
        f.show();
        this._resizeMenu();
        f.position(b.extend({of:this.element}, this.options.position))
    },
        _resizeMenu:function () {
            var c = this.menu.element;
            c.outerWidth(Math.max(c.width("").outerWidth(), this.element.outerWidth()))
        }, _renderMenu:function (c, f) {
            var g = this;
            b.each(f, function (e, a) {
                g._renderItem(c, a)
            })
        }, _renderItem:function (c, f) {
            return b("<li></li>").data("item.autocomplete", f).append(b("<a></a>").text(f.label)).appendTo(c)
        }, _move:function (c, f) {
            if (this.menu.element.is(":visible"))if (this.menu.first() && /^previous/.test(c) || this.menu.last() && /^next/.test(c)) {
                this.element.val(this.term);
                this.menu.deactivate()
            } else this.menu[c](f);
            else this.search(null, f)
        }, widget:function () {
            return this.menu.element
        }});
    b.extend(b.ui.autocomplete, {escapeRegex:function (c) {
        return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
    }, filter:function (c, f) {
        var g = new RegExp(b.ui.autocomplete.escapeRegex(f), "i");
        return b.grep(c, function (e) {
            return g.test(e.label || e.value || e)
        })
    }})
})(jQuery);
(function (b) {
    b.widget("ui.menu", {_create:function () {
        var c = this;
        this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox", "aria-activedescendant":"ui-active-menuitem"}).click(function (f) {
            if (b(f.target).closest(".ui-menu-item a").length) {
                f.preventDefault();
                c.select(f)
            }
        });
        this.refresh()
    }, refresh:function () {
        var c = this;
        this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
            -1).mouseenter(
            function (f) {
                c.activate(f, b(this).parent())
            }).mouseleave(function () {
                c.deactivate()
            })
    }, activate:function (c, f) {
        this.deactivate();
        if (this.hasScroll()) {
            var g = f.offset().top - this.element.offset().top, e = this.element.attr("scrollTop"), a = this.element.height();
            if (g < 0)this.element.attr("scrollTop", e + g); else g >= a && this.element.attr("scrollTop", e + g - a + f.height())
        }
        this.active = f.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-menuitem").end();
        this._trigger("focus", c, {item:f})
    },
        deactivate:function () {
            if (this.active) {
                this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
                this._trigger("blur");
                this.active = null
            }
        }, next:function (c) {
            this.move("next", ".ui-menu-item:first", c)
        }, previous:function (c) {
            this.move("prev", ".ui-menu-item:last", c)
        }, first:function () {
            return this.active && !this.active.prevAll(".ui-menu-item").length
        }, last:function () {
            return this.active && !this.active.nextAll(".ui-menu-item").length
        }, move:function (c, f, g) {
            if (this.active) {
                c = this.active[c + "All"](".ui-menu-item").eq(0);
                c.length ? this.activate(g, c) : this.activate(g, this.element.children(f))
            } else this.activate(g, this.element.children(f))
        }, nextPage:function (c) {
            if (this.hasScroll())if (!this.active || this.last())this.activate(c, this.element.children(".ui-menu-item:first")); else {
                var f = this.active.offset().top, g = this.element.height(), e = this.element.children(".ui-menu-item").filter(function () {
                    var a = b(this).offset().top - f - g + b(this).height();
                    return a < 10 && a > -10
                });
                e.length || (e = this.element.children(".ui-menu-item:last"));
                this.activate(c,
                    e)
            } else this.activate(c, this.element.children(".ui-menu-item").filter(!this.active || this.last() ? ":first" : ":last"))
        }, previousPage:function (c) {
            if (this.hasScroll())if (!this.active || this.first())this.activate(c, this.element.children(".ui-menu-item:last")); else {
                var f = this.active.offset().top, g = this.element.height();
                result = this.element.children(".ui-menu-item").filter(function () {
                    var e = b(this).offset().top - f + g - b(this).height();
                    return e < 10 && e > -10
                });
                result.length || (result = this.element.children(".ui-menu-item:first"));
                this.activate(c, result)
            } else this.activate(c, this.element.children(".ui-menu-item").filter(!this.active || this.first() ? ":last" : ":first"))
        }, hasScroll:function () {
            return this.element.height() < this.element.attr("scrollHeight")
        }, select:function (c) {
            this._trigger("selected", c, {item:this.active})
        }})
})(jQuery);
(function (b) {
    var c, f = function (e) {
        b(":ui-button", e.target.form).each(function () {
            var a = b(this).data("button");
            setTimeout(function () {
                a.refresh()
            }, 1)
        })
    }, g = function (e) {
        var a = e.name, d = e.form, h = b([]);
        if (a)h = d ? b(d).find("[name='" + a + "']") : b("[name='" + a + "']", e.ownerDocument).filter(function () {
            return!this.form
        });
        return h
    };
    b.widget("ui.button", {options:{disabled:null, text:true, label:null, icons:{primary:null, secondary:null}}, _create:function () {
        this.element.closest("form").unbind("reset.button").bind("reset.button",
            f);
        if (typeof this.options.disabled !== "boolean")this.options.disabled = this.element.attr("disabled");
        this._determineButtonType();
        this.hasTitle = !!this.buttonElement.attr("title");
        var e = this, a = this.options, d = this.type === "checkbox" || this.type === "radio", h = "ui-state-hover" + (!d ? " ui-state-active" : "");
        if (a.label === null)a.label = this.buttonElement.html();
        if (this.element.is(":disabled"))a.disabled = true;
        this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role", "button").bind("mouseenter.button",
            function () {
                if (!a.disabled) {
                    b(this).addClass("ui-state-hover");
                    this === c && b(this).addClass("ui-state-active")
                }
            }).bind("mouseleave.button",
            function () {
                a.disabled || b(this).removeClass(h)
            }).bind("focus.button",
            function () {
                b(this).addClass("ui-state-focus")
            }).bind("blur.button", function () {
                b(this).removeClass("ui-state-focus")
            });
        d && this.element.bind("change.button", function () {
            e.refresh()
        });
        if (this.type === "checkbox")this.buttonElement.bind("click.button", function () {
            if (a.disabled)return false;
            b(this).toggleClass("ui-state-active");
            e.buttonElement.attr("aria-pressed", e.element[0].checked)
        }); else if (this.type === "radio")this.buttonElement.bind("click.button", function () {
            if (a.disabled)return false;
            b(this).addClass("ui-state-active");
            e.buttonElement.attr("aria-pressed", true);
            var i = e.element[0];
            g(i).not(i).map(
                function () {
                    return b(this).button("widget")[0]
                }).removeClass("ui-state-active").attr("aria-pressed", false)
        }); else {
            this.buttonElement.bind("mousedown.button",
                function () {
                    if (a.disabled)return false;
                    b(this).addClass("ui-state-active");
                    c = this;
                    b(document).one("mouseup", function () {
                        c = null
                    })
                }).bind("mouseup.button",
                function () {
                    if (a.disabled)return false;
                    b(this).removeClass("ui-state-active")
                }).bind("keydown.button",
                function (i) {
                    if (a.disabled)return false;
                    if (i.keyCode == b.ui.keyCode.SPACE || i.keyCode == b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")
                }).bind("keyup.button", function () {
                    b(this).removeClass("ui-state-active")
                });
            this.buttonElement.is("a") && this.buttonElement.keyup(function (i) {
                i.keyCode === b.ui.keyCode.SPACE && b(this).click()
            })
        }
        this._setOption("disabled",
            a.disabled)
    }, _determineButtonType:function () {
        this.type = this.element.is(":checkbox") ? "checkbox" : this.element.is(":radio") ? "radio" : this.element.is("input") ? "input" : "button";
        if (this.type === "checkbox" || this.type === "radio") {
            this.buttonElement = this.element.parents().last().find("label[for=" + this.element.attr("id") + "]");
            this.element.addClass("ui-helper-hidden-accessible");
            var e = this.element.is(":checked");
            e && this.buttonElement.addClass("ui-state-active");
            this.buttonElement.attr("aria-pressed", e)
        } else this.buttonElement =
            this.element
    }, widget:function () {
        return this.buttonElement
    }, destroy:function () {
        this.element.removeClass("ui-helper-hidden-accessible");
        this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
        this.hasTitle ||
        this.buttonElement.removeAttr("title");
        b.Widget.prototype.destroy.call(this)
    }, _setOption:function (e, a) {
        b.Widget.prototype._setOption.apply(this, arguments);
        if (e === "disabled")a ? this.element.attr("disabled", true) : this.element.removeAttr("disabled");
        this._resetButton()
    }, refresh:function () {
        var e = this.element.is(":disabled");
        e !== this.options.disabled && this._setOption("disabled", e);
        if (this.type === "radio")g(this.element[0]).each(function () {
            b(this).is(":checked") ? b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
                true) : b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", false)
        }); else if (this.type === "checkbox")this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", true) : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", false)
    }, _resetButton:function () {
        if (this.type === "input")this.options.label && this.element.val(this.options.label); else {
            var e = this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
                a = b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(), d = this.options.icons, h = d.primary && d.secondary;
            if (d.primary || d.secondary) {
                e.addClass("ui-button-text-icon" + (h ? "s" : d.primary ? "-primary" : "-secondary"));
                d.primary && e.prepend("<span class='ui-button-icon-primary ui-icon " + d.primary + "'></span>");
                d.secondary && e.append("<span class='ui-button-icon-secondary ui-icon " + d.secondary + "'></span>");
                if (!this.options.text) {
                    e.addClass(h ? "ui-button-icons-only" : "ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");
                    this.hasTitle || e.attr("title", a)
                }
            } else e.addClass("ui-button-text-only")
        }
    }});
    b.widget("ui.buttonset", {options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"}, _create:function () {
        this.element.addClass("ui-buttonset")
    }, _init:function () {
        this.refresh()
    }, _setOption:function (e, a) {
        e === "disabled" && this.buttons.button("option", e, a);
        b.Widget.prototype._setOption.apply(this, arguments)
    }, refresh:function () {
        this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(
            function () {
                return b(this).button("widget")[0]
            }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()
    },
        destroy:function () {
            this.element.removeClass("ui-buttonset");
            this.buttons.map(
                function () {
                    return b(this).button("widget")[0]
                }).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
            b.Widget.prototype.destroy.call(this)
        }})
})(jQuery);
(function (b, c) {
    function f() {
        this.debug = false;
        this._curInst = null;
        this._keyEvent = false;
        this._disabledInputs = [];
        this._inDialog = this._datepickerShowing = false;
        this._mainDivId = "ui-datepicker-div";
        this._inlineClass = "ui-datepicker-inline";
        this._appendClass = "ui-datepicker-append";
        this._triggerClass = "ui-datepicker-trigger";
        this._dialogClass = "ui-datepicker-dialog";
        this._disableClass = "ui-datepicker-disabled";
        this._unselectableClass = "ui-datepicker-unselectable";
        this._currentClass = "ui-datepicker-current-day";
        this._dayOverClass =
            "ui-datepicker-days-cell-over";
        this.regional = [];
        this.regional[""] = {closeText:"Done", prevText:"Prev", nextText:"Next", currentText:"Today", monthNames:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin:["Su",
            "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader:"Wk", dateFormat:"mm/dd/yy", firstDay:0, isRTL:false, showMonthAfterYear:false, yearSuffix:""};
        this._defaults = {showOn:"focus", showAnim:"fadeIn", showOptions:{}, defaultDate:null, appendText:"", buttonText:"...", buttonImage:"", buttonImageOnly:false, hideIfNoPrevNext:false, navigationAsDateFormat:false, gotoCurrent:false, changeMonth:false, changeYear:false, yearRange:"c-10:c+10", showOtherMonths:false, selectOtherMonths:false, showWeek:false, calculateWeek:this.iso8601Week, shortYearCutoff:"+10",
            minDate:null, maxDate:null, duration:"fast", beforeShowDay:null, beforeShow:null, onSelect:null, onChangeMonthYear:null, onClose:null, numberOfMonths:1, showCurrentAtPos:0, stepMonths:1, stepBigMonths:12, altField:"", altFormat:"", constrainInput:true, showButtonPanel:false, autoSize:false};
        b.extend(this._defaults, this.regional[""]);
        this.dpDiv = b('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')
    }

    function g(a, d) {
        b.extend(a, d);
        for (var h in d)if (d[h] ==
            null || d[h] == c)a[h] = d[h];
        return a
    }

    b.extend(b.ui, {datepicker:{version:"1.8.9"}});
    var e = (new Date).getTime();
    b.extend(f.prototype, {markerClassName:"hasDatepicker", log:function () {
        this.debug && console.log.apply("", arguments)
    }, _widgetDatepicker:function () {
        return this.dpDiv
    }, setDefaults:function (a) {
        g(this._defaults, a || {});
        return this
    }, _attachDatepicker:function (a, d) {
        var h = null;
        for (var i in this._defaults) {
            var j = a.getAttribute("date:" + i);
            if (j) {
                h = h || {};
                try {
                    h[i] = eval(j)
                } catch (n) {
                    h[i] = j
                }
            }
        }
        i = a.nodeName.toLowerCase();
        j = i == "div" || i == "span";
        if (!a.id) {
            this.uuid += 1;
            a.id = "dp" + this.uuid
        }
        var q = this._newInst(b(a), j);
        q.settings = b.extend({}, d || {}, h || {});
        if (i == "input")this._connectDatepicker(a, q); else j && this._inlineDatepicker(a, q)
    }, _newInst:function (a, d) {
        return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1"), input:a, selectedDay:0, selectedMonth:0, selectedYear:0, drawMonth:0, drawYear:0, inline:d, dpDiv:!d ? this.dpDiv : b('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}
    },
        _connectDatepicker:function (a, d) {
            var h = b(a);
            d.append = b([]);
            d.trigger = b([]);
            if (!h.hasClass(this.markerClassName)) {
                this._attachments(h, d);
                h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
                    function (i, j, n) {
                        d.settings[j] = n
                    }).bind("getData.datepicker", function (i, j) {
                    return this._get(d, j)
                });
                this._autoSize(d);
                b.data(a, "datepicker", d)
            }
        }, _attachments:function (a, d) {
            var h = this._get(d, "appendText"), i = this._get(d, "isRTL");
            d.append &&
            d.append.remove();
            if (h) {
                d.append = b('<span class="' + this._appendClass + '">' + h + "</span>");
                a[i ? "before" : "after"](d.append)
            }
            a.unbind("focus", this._showDatepicker);
            d.trigger && d.trigger.remove();
            h = this._get(d, "showOn");
            if (h == "focus" || h == "both")a.focus(this._showDatepicker);
            if (h == "button" || h == "both") {
                h = this._get(d, "buttonText");
                var j = this._get(d, "buttonImage");
                d.trigger = b(this._get(d, "buttonImageOnly") ? b("<img/>").addClass(this._triggerClass).attr({src:j, alt:h, title:h}) : b('<button type="button"></button>').addClass(this._triggerClass).html(j ==
                    "" ? h : b("<img/>").attr({src:j, alt:h, title:h})));
                a[i ? "before" : "after"](d.trigger);
                d.trigger.click(function () {
                    b.datepicker._datepickerShowing && b.datepicker._lastInput == a[0] ? b.datepicker._hideDatepicker() : b.datepicker._showDatepicker(a[0]);
                    return false
                })
            }
        }, _autoSize:function (a) {
            if (this._get(a, "autoSize") && !a.inline) {
                var d = new Date(2009, 11, 20), h = this._get(a, "dateFormat");
                if (h.match(/[DM]/)) {
                    var i = function (j) {
                        for (var n = 0, q = 0, l = 0; l < j.length; l++)if (j[l].length > n) {
                            n = j[l].length;
                            q = l
                        }
                        return q
                    };
                    d.setMonth(i(this._get(a,
                        h.match(/MM/) ? "monthNames" : "monthNamesShort")));
                    d.setDate(i(this._get(a, h.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - d.getDay())
                }
                a.input.attr("size", this._formatDate(a, d).length)
            }
        }, _inlineDatepicker:function (a, d) {
            var h = b(a);
            if (!h.hasClass(this.markerClassName)) {
                h.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker",
                    function (i, j, n) {
                        d.settings[j] = n
                    }).bind("getData.datepicker", function (i, j) {
                    return this._get(d, j)
                });
                b.data(a, "datepicker", d);
                this._setDate(d, this._getDefaultDate(d),
                    true);
                this._updateDatepicker(d);
                this._updateAlternate(d);
                d.dpDiv.show()
            }
        }, _dialogDatepicker:function (a, d, h, i, j) {
            a = this._dialogInst;
            if (!a) {
                this.uuid += 1;
                this._dialogInput = b('<input type="text" id="' + ("dp" + this.uuid) + '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
                this._dialogInput.keydown(this._doKeyDown);
                b("body").append(this._dialogInput);
                a = this._dialogInst = this._newInst(this._dialogInput, false);
                a.settings = {};
                b.data(this._dialogInput[0], "datepicker", a)
            }
            g(a.settings, i || {});
            d = d && d.constructor == Date ? this._formatDate(a, d) : d;
            this._dialogInput.val(d);
            this._pos = j ? j.length ? j : [j.pageX, j.pageY] : null;
            if (!this._pos)this._pos = [document.documentElement.clientWidth / 2 - 100 + (document.documentElement.scrollLeft || document.body.scrollLeft), document.documentElement.clientHeight / 2 - 150 + (document.documentElement.scrollTop || document.body.scrollTop)];
            this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px");
            a.settings.onSelect = h;
            this._inDialog = true;
            this.dpDiv.addClass(this._dialogClass);
            this._showDatepicker(this._dialogInput[0]);
            b.blockUI && b.blockUI(this.dpDiv);
            b.data(this._dialogInput[0], "datepicker", a);
            return this
        }, _destroyDatepicker:function (a) {
            var d = b(a), h = b.data(a, "datepicker");
            if (d.hasClass(this.markerClassName)) {
                var i = a.nodeName.toLowerCase();
                b.removeData(a, "datepicker");
                if (i == "input") {
                    h.append.remove();
                    h.trigger.remove();
                    d.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup",
                        this._doKeyUp)
                } else if (i == "div" || i == "span")d.removeClass(this.markerClassName).empty()
            }
        }, _enableDatepicker:function (a) {
            var d = b(a), h = b.data(a, "datepicker");
            if (d.hasClass(this.markerClassName)) {
                var i = a.nodeName.toLowerCase();
                if (i == "input") {
                    a.disabled = false;
                    h.trigger.filter("button").each(
                        function () {
                            this.disabled = false
                        }).end().filter("img").css({opacity:"1.0", cursor:""})
                } else if (i == "div" || i == "span")d.children("." + this._inlineClass).children().removeClass("ui-state-disabled");
                this._disabledInputs = b.map(this._disabledInputs,
                    function (j) {
                        return j == a ? null : j
                    })
            }
        }, _disableDatepicker:function (a) {
            var d = b(a), h = b.data(a, "datepicker");
            if (d.hasClass(this.markerClassName)) {
                var i = a.nodeName.toLowerCase();
                if (i == "input") {
                    a.disabled = true;
                    h.trigger.filter("button").each(
                        function () {
                            this.disabled = true
                        }).end().filter("img").css({opacity:"0.5", cursor:"default"})
                } else if (i == "div" || i == "span")d.children("." + this._inlineClass).children().addClass("ui-state-disabled");
                this._disabledInputs = b.map(this._disabledInputs, function (j) {
                    return j == a ? null :
                        j
                });
                this._disabledInputs[this._disabledInputs.length] = a
            }
        }, _isDisabledDatepicker:function (a) {
            if (!a)return false;
            for (var d = 0; d < this._disabledInputs.length; d++)if (this._disabledInputs[d] == a)return true;
            return false
        }, _getInst:function (a) {
            try {
                return b.data(a, "datepicker")
            } catch (d) {
                throw"Missing instance data for this datepicker";
            }
        }, _optionDatepicker:function (a, d, h) {
            var i = this._getInst(a);
            if (arguments.length == 2 && typeof d == "string")return d == "defaults" ? b.extend({}, b.datepicker._defaults) : i ? d == "all" ? b.extend({},
                i.settings) : this._get(i, d) : null;
            var j = d || {};
            if (typeof d == "string") {
                j = {};
                j[d] = h
            }
            if (i) {
                this._curInst == i && this._hideDatepicker();
                var n = this._getDateDatepicker(a, true);
                g(i.settings, j);
                this._attachments(b(a), i);
                this._autoSize(i);
                this._setDateDatepicker(a, n);
                this._updateDatepicker(i)
            }
        }, _changeDatepicker:function (a, d, h) {
            this._optionDatepicker(a, d, h)
        }, _refreshDatepicker:function (a) {
            (a = this._getInst(a)) && this._updateDatepicker(a)
        }, _setDateDatepicker:function (a, d) {
            if (a = this._getInst(a)) {
                this._setDate(a, d);
                this._updateDatepicker(a);
                this._updateAlternate(a)
            }
        }, _getDateDatepicker:function (a, d) {
            (a = this._getInst(a)) && !a.inline && this._setDateFromField(a, d);
            return a ? this._getDate(a) : null
        }, _doKeyDown:function (a) {
            var d = b.datepicker._getInst(a.target), h = true, i = d.dpDiv.is(".ui-datepicker-rtl");
            d._keyEvent = true;
            if (b.datepicker._datepickerShowing)switch (a.keyCode) {
                case 9:
                    b.datepicker._hideDatepicker();
                    h = false;
                    break;
                case 13:
                    h = b("td." + b.datepicker._dayOverClass + ":not(." + b.datepicker._currentClass + ")", d.dpDiv);
                    h[0] ?
                        b.datepicker._selectDay(a.target, d.selectedMonth, d.selectedYear, h[0]) : b.datepicker._hideDatepicker();
                    return false;
                case 27:
                    b.datepicker._hideDatepicker();
                    break;
                case 33:
                    b.datepicker._adjustDate(a.target, a.ctrlKey ? -b.datepicker._get(d, "stepBigMonths") : -b.datepicker._get(d, "stepMonths"), "M");
                    break;
                case 34:
                    b.datepicker._adjustDate(a.target, a.ctrlKey ? +b.datepicker._get(d, "stepBigMonths") : +b.datepicker._get(d, "stepMonths"), "M");
                    break;
                case 35:
                    if (a.ctrlKey || a.metaKey)b.datepicker._clearDate(a.target);
                    h = a.ctrlKey ||
                        a.metaKey;
                    break;
                case 36:
                    if (a.ctrlKey || a.metaKey)b.datepicker._gotoToday(a.target);
                    h = a.ctrlKey || a.metaKey;
                    break;
                case 37:
                    if (a.ctrlKey || a.metaKey)b.datepicker._adjustDate(a.target, i ? +1 : -1, "D");
                    h = a.ctrlKey || a.metaKey;
                    if (a.originalEvent.altKey)b.datepicker._adjustDate(a.target, a.ctrlKey ? -b.datepicker._get(d, "stepBigMonths") : -b.datepicker._get(d, "stepMonths"), "M");
                    break;
                case 38:
                    if (a.ctrlKey || a.metaKey)b.datepicker._adjustDate(a.target, -7, "D");
                    h = a.ctrlKey || a.metaKey;
                    break;
                case 39:
                    if (a.ctrlKey || a.metaKey)b.datepicker._adjustDate(a.target,
                        i ? -1 : +1, "D");
                    h = a.ctrlKey || a.metaKey;
                    if (a.originalEvent.altKey)b.datepicker._adjustDate(a.target, a.ctrlKey ? +b.datepicker._get(d, "stepBigMonths") : +b.datepicker._get(d, "stepMonths"), "M");
                    break;
                case 40:
                    if (a.ctrlKey || a.metaKey)b.datepicker._adjustDate(a.target, +7, "D");
                    h = a.ctrlKey || a.metaKey;
                    break;
                default:
                    h = false
            } else if (a.keyCode == 36 && a.ctrlKey)b.datepicker._showDatepicker(this); else h = false;
            if (h) {
                a.preventDefault();
                a.stopPropagation()
            }
        }, _doKeyPress:function (a) {
            var d = b.datepicker._getInst(a.target);
            if (b.datepicker._get(d,
                "constrainInput")) {
                d = b.datepicker._possibleChars(b.datepicker._get(d, "dateFormat"));
                var h = String.fromCharCode(a.charCode == c ? a.keyCode : a.charCode);
                return a.ctrlKey || a.metaKey || h < " " || !d || d.indexOf(h) > -1
            }
        }, _doKeyUp:function (a) {
            a = b.datepicker._getInst(a.target);
            if (a.input.val() != a.lastVal)try {
                if (b.datepicker.parseDate(b.datepicker._get(a, "dateFormat"), a.input ? a.input.val() : null, b.datepicker._getFormatConfig(a))) {
                    b.datepicker._setDateFromField(a);
                    b.datepicker._updateAlternate(a);
                    b.datepicker._updateDatepicker(a)
                }
            } catch (d) {
                b.datepicker.log(d)
            }
            return true
        },
        _showDatepicker:function (a) {
            a = a.target || a;
            if (a.nodeName.toLowerCase() != "input")a = b("input", a.parentNode)[0];
            if (!(b.datepicker._isDisabledDatepicker(a) || b.datepicker._lastInput == a)) {
                var d = b.datepicker._getInst(a);
                b.datepicker._curInst && b.datepicker._curInst != d && b.datepicker._curInst.dpDiv.stop(true, true);
                var h = b.datepicker._get(d, "beforeShow");
                g(d.settings, h ? h.apply(a, [a, d]) : {});
                d.lastVal = null;
                b.datepicker._lastInput = a;
                b.datepicker._setDateFromField(d);
                if (b.datepicker._inDialog)a.value = "";
                if (!b.datepicker._pos) {
                    b.datepicker._pos =
                        b.datepicker._findPos(a);
                    b.datepicker._pos[1] += a.offsetHeight
                }
                var i = false;
                b(a).parents().each(function () {
                    i |= b(this).css("position") == "fixed";
                    return!i
                });
                if (i && b.browser.opera) {
                    b.datepicker._pos[0] -= document.documentElement.scrollLeft;
                    b.datepicker._pos[1] -= document.documentElement.scrollTop
                }
                h = {left:b.datepicker._pos[0], top:b.datepicker._pos[1]};
                b.datepicker._pos = null;
                d.dpDiv.empty();
                d.dpDiv.css({position:"absolute", display:"block", top:"-1000px"});
                b.datepicker._updateDatepicker(d);
                h = b.datepicker._checkOffset(d,
                    h, i);
                d.dpDiv.css({position:b.datepicker._inDialog && b.blockUI ? "static" : i ? "fixed" : "absolute", display:"none", left:h.left + "px", top:h.top + "px"});
                if (!d.inline) {
                    h = b.datepicker._get(d, "showAnim");
                    var j = b.datepicker._get(d, "duration"), n = function () {
                        b.datepicker._datepickerShowing = true;
                        var q = d.dpDiv.find("iframe.ui-datepicker-cover");
                        if (q.length) {
                            var l = b.datepicker._getBorders(d.dpDiv);
                            q.css({left:-l[0], top:-l[1], width:d.dpDiv.outerWidth(), height:d.dpDiv.outerHeight()})
                        }
                    };
                    d.dpDiv.zIndex(b(a).zIndex() + 1);
                    b.effects &&
                        b.effects[h] ? d.dpDiv.show(h, b.datepicker._get(d, "showOptions"), j, n) : d.dpDiv[h || "show"](h ? j : null, n);
                    if (!h || !j)n();
                    d.input.is(":visible") && !d.input.is(":disabled") && d.input.focus();
                    b.datepicker._curInst = d
                }
            }
        }, _updateDatepicker:function (a) {
            var d = this, h = b.datepicker._getBorders(a.dpDiv);
            a.dpDiv.empty().append(this._generateHTML(a));
            var i = a.dpDiv.find("iframe.ui-datepicker-cover");
            i.length && i.css({left:-h[0], top:-h[1], width:a.dpDiv.outerWidth(), height:a.dpDiv.outerHeight()});
            a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",
                function () {
                    b(this).removeClass("ui-state-hover");
                    this.className.indexOf("ui-datepicker-prev") != -1 && b(this).removeClass("ui-datepicker-prev-hover");
                    this.className.indexOf("ui-datepicker-next") != -1 && b(this).removeClass("ui-datepicker-next-hover")
                }).bind("mouseover",
                function () {
                    if (!d._isDisabledDatepicker(a.inline ? a.dpDiv.parent()[0] : a.input[0])) {
                        b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
                        b(this).addClass("ui-state-hover");
                        this.className.indexOf("ui-datepicker-prev") !=
                            -1 && b(this).addClass("ui-datepicker-prev-hover");
                        this.className.indexOf("ui-datepicker-next") != -1 && b(this).addClass("ui-datepicker-next-hover")
                    }
                }).end().find("." + this._dayOverClass + " a").trigger("mouseover").end();
            h = this._getNumberOfMonths(a);
            i = h[1];
            i > 1 ? a.dpDiv.addClass("ui-datepicker-multi-" + i).css("width", 17 * i + "em") : a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
            a.dpDiv[(h[0] != 1 || h[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi");
            a.dpDiv[(this._get(a,
                "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl");
            a == b.datepicker._curInst && b.datepicker._datepickerShowing && a.input && a.input.is(":visible") && !a.input.is(":disabled") && a.input.focus();
            if (a.yearshtml) {
                var j = a.yearshtml;
                setTimeout(function () {
                    j === a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);
                    j = a.yearshtml = null
                }, 0)
            }
        }, _getBorders:function (a) {
            var d = function (h) {
                return{thin:1, medium:2, thick:3}[h] || h
            };
            return[parseFloat(d(a.css("border-left-width"))), parseFloat(d(a.css("border-top-width")))]
        },
        _checkOffset:function (a, d, h) {
            var i = a.dpDiv.outerWidth(), j = a.dpDiv.outerHeight(), n = a.input ? a.input.outerWidth() : 0, q = a.input ? a.input.outerHeight() : 0, l = document.documentElement.clientWidth + b(document).scrollLeft(), k = document.documentElement.clientHeight + b(document).scrollTop();
            d.left -= this._get(a, "isRTL") ? i - n : 0;
            d.left -= h && d.left == a.input.offset().left ? b(document).scrollLeft() : 0;
            d.top -= h && d.top == a.input.offset().top + q ? b(document).scrollTop() : 0;
            d.left -= Math.min(d.left, d.left + i > l && l > i ? Math.abs(d.left + i -
                l) : 0);
            d.top -= Math.min(d.top, d.top + j > k && k > j ? Math.abs(j + q) : 0);
            return d
        }, _findPos:function (a) {
            for (var d = this._get(this._getInst(a), "isRTL"); a && (a.type == "hidden" || a.nodeType != 1);)a = a[d ? "previousSibling" : "nextSibling"];
            a = b(a).offset();
            return[a.left, a.top]
        }, _hideDatepicker:function (a) {
            var d = this._curInst;
            if (!(!d || a && d != b.data(a, "datepicker")))if (this._datepickerShowing) {
                a = this._get(d, "showAnim");
                var h = this._get(d, "duration"), i = function () {
                    b.datepicker._tidyDialog(d);
                    this._curInst = null
                };
                b.effects && b.effects[a] ?
                    d.dpDiv.hide(a, b.datepicker._get(d, "showOptions"), h, i) : d.dpDiv[a == "slideDown" ? "slideUp" : a == "fadeIn" ? "fadeOut" : "hide"](a ? h : null, i);
                a || i();
                if (a = this._get(d, "onClose"))a.apply(d.input ? d.input[0] : null, [d.input ? d.input.val() : "", d]);
                this._datepickerShowing = false;
                this._lastInput = null;
                if (this._inDialog) {
                    this._dialogInput.css({position:"absolute", left:"0", top:"-100px"});
                    if (b.blockUI) {
                        b.unblockUI();
                        b("body").append(this.dpDiv)
                    }
                }
                this._inDialog = false
            }
        }, _tidyDialog:function (a) {
            a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
        },
        _checkExternalClick:function (a) {
            if (b.datepicker._curInst) {
                a = b(a.target);
                a[0].id != b.datepicker._mainDivId && a.parents("#" + b.datepicker._mainDivId).length == 0 && !a.hasClass(b.datepicker.markerClassName) && !a.hasClass(b.datepicker._triggerClass) && b.datepicker._datepickerShowing && !(b.datepicker._inDialog && b.blockUI) && b.datepicker._hideDatepicker()
            }
        }, _adjustDate:function (a, d, h) {
            a = b(a);
            var i = this._getInst(a[0]);
            if (!this._isDisabledDatepicker(a[0])) {
                this._adjustInstDate(i, d + (h == "M" ? this._get(i, "showCurrentAtPos") :
                    0), h);
                this._updateDatepicker(i)
            }
        }, _gotoToday:function (a) {
            a = b(a);
            var d = this._getInst(a[0]);
            if (this._get(d, "gotoCurrent") && d.currentDay) {
                d.selectedDay = d.currentDay;
                d.drawMonth = d.selectedMonth = d.currentMonth;
                d.drawYear = d.selectedYear = d.currentYear
            } else {
                var h = new Date;
                d.selectedDay = h.getDate();
                d.drawMonth = d.selectedMonth = h.getMonth();
                d.drawYear = d.selectedYear = h.getFullYear()
            }
            this._notifyChange(d);
            this._adjustDate(a)
        }, _selectMonthYear:function (a, d, h) {
            a = b(a);
            var i = this._getInst(a[0]);
            i._selectingMonthYear =
                false;
            i["selected" + (h == "M" ? "Month" : "Year")] = i["draw" + (h == "M" ? "Month" : "Year")] = parseInt(d.options[d.selectedIndex].value, 10);
            this._notifyChange(i);
            this._adjustDate(a)
        }, _clickMonthYear:function (a) {
            var d = this._getInst(b(a)[0]);
            d.input && d._selectingMonthYear && setTimeout(function () {
                d.input.focus()
            }, 0);
            d._selectingMonthYear = !d._selectingMonthYear
        }, _selectDay:function (a, d, h, i) {
            var j = b(a);
            if (!(b(i).hasClass(this._unselectableClass) || this._isDisabledDatepicker(j[0]))) {
                j = this._getInst(j[0]);
                j.selectedDay = j.currentDay =
                    b("a", i).html();
                j.selectedMonth = j.currentMonth = d;
                j.selectedYear = j.currentYear = h;
                this._selectDate(a, this._formatDate(j, j.currentDay, j.currentMonth, j.currentYear))
            }
        }, _clearDate:function (a) {
            a = b(a);
            this._getInst(a[0]);
            this._selectDate(a, "")
        }, _selectDate:function (a, d) {
            a = this._getInst(b(a)[0]);
            d = d != null ? d : this._formatDate(a);
            a.input && a.input.val(d);
            this._updateAlternate(a);
            var h = this._get(a, "onSelect");
            if (h)h.apply(a.input ? a.input[0] : null, [d, a]); else a.input && a.input.trigger("change");
            if (a.inline)this._updateDatepicker(a);
            else {
                this._hideDatepicker();
                this._lastInput = a.input[0];
                typeof a.input[0] != "object" && a.input.focus();
                this._lastInput = null
            }
        }, _updateAlternate:function (a) {
            var d = this._get(a, "altField");
            if (d) {
                var h = this._get(a, "altFormat") || this._get(a, "dateFormat"), i = this._getDate(a), j = this.formatDate(h, i, this._getFormatConfig(a));
                b(d).each(function () {
                    b(this).val(j)
                })
            }
        }, noWeekends:function (a) {
            a = a.getDay();
            return[a > 0 && a < 6, ""]
        }, iso8601Week:function (a) {
            a = new Date(a.getTime());
            a.setDate(a.getDate() + 4 - (a.getDay() || 7));
            var d =
                a.getTime();
            a.setMonth(0);
            a.setDate(1);
            return Math.floor(Math.round((d - a) / 864E5) / 7) + 1
        }, parseDate:function (a, d, h) {
            if (a == null || d == null)throw"Invalid arguments";
            d = typeof d == "object" ? d.toString() : d + "";
            if (d == "")return null;
            var i = (h ? h.shortYearCutoff : null) || this._defaults.shortYearCutoff;
            i = typeof i != "string" ? i : (new Date).getFullYear() % 100 + parseInt(i, 10);
            for (var j = (h ? h.dayNamesShort : null) || this._defaults.dayNamesShort, n = (h ? h.dayNames : null) || this._defaults.dayNames, q = (h ? h.monthNamesShort : null) || this._defaults.monthNamesShort,
                     l = (h ? h.monthNames : null) || this._defaults.monthNames, k = h = -1, m = -1, o = -1, p = false, s = function (x) {
                (x = y + 1 < a.length && a.charAt(y + 1) == x) && y++;
                return x
            }, r = function (x) {
                var C = s(x);
                x = new RegExp("^\\d{1," + (x == "@" ? 14 : x == "!" ? 20 : x == "y" && C ? 4 : x == "o" ? 3 : 2) + "}");
                x = d.substring(w).match(x);
                if (!x)throw"Missing number at position " + w;
                w += x[0].length;
                return parseInt(x[0], 10)
            }, u = function (x, C, J) {
                x = s(x) ? J : C;
                for (C = 0; C < x.length; C++)if (d.substr(w, x[C].length).toLowerCase() == x[C].toLowerCase()) {
                    w += x[C].length;
                    return C + 1
                }
                throw"Unknown name at position " +
                    w;
            }, v = function () {
                if (d.charAt(w) != a.charAt(y))throw"Unexpected literal at position " + w;
                w++
            }, w = 0, y = 0; y < a.length; y++)if (p)if (a.charAt(y) == "'" && !s("'"))p = false; else v(); else switch (a.charAt(y)) {
                case "d":
                    m = r("d");
                    break;
                case "D":
                    u("D", j, n);
                    break;
                case "o":
                    o = r("o");
                    break;
                case "m":
                    k = r("m");
                    break;
                case "M":
                    k = u("M", q, l);
                    break;
                case "y":
                    h = r("y");
                    break;
                case "@":
                    var B = new Date(r("@"));
                    h = B.getFullYear();
                    k = B.getMonth() + 1;
                    m = B.getDate();
                    break;
                case "!":
                    B = new Date((r("!") - this._ticksTo1970) / 1E4);
                    h = B.getFullYear();
                    k = B.getMonth() +
                        1;
                    m = B.getDate();
                    break;
                case "'":
                    if (s("'"))v(); else p = true;
                    break;
                default:
                    v()
            }
            if (h == -1)h = (new Date).getFullYear(); else if (h < 100)h += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (h <= i ? 0 : -100);
            if (o > -1) {
                k = 1;
                m = o;
                do {
                    i = this._getDaysInMonth(h, k - 1);
                    if (m <= i)break;
                    k++;
                    m -= i
                } while (1)
            }
            B = this._daylightSavingAdjust(new Date(h, k - 1, m));
            if (B.getFullYear() != h || B.getMonth() + 1 != k || B.getDate() != m)throw"Invalid date";
            return B
        }, ATOM:"yy-mm-dd", COOKIE:"D, dd M yy", ISO_8601:"yy-mm-dd", RFC_822:"D, d M y", RFC_850:"DD, dd-M-y",
        RFC_1036:"D, d M y", RFC_1123:"D, d M yy", RFC_2822:"D, d M yy", RSS:"D, d M y", TICKS:"!", TIMESTAMP:"@", W3C:"yy-mm-dd", _ticksTo1970:(718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 24 * 60 * 60 * 1E7, formatDate:function (a, d, h) {
            if (!d)return"";
            var i = (h ? h.dayNamesShort : null) || this._defaults.dayNamesShort, j = (h ? h.dayNames : null) || this._defaults.dayNames, n = (h ? h.monthNamesShort : null) || this._defaults.monthNamesShort;
            h = (h ? h.monthNames : null) || this._defaults.monthNames;
            var q = function (s) {
                (s = p + 1 < a.length &&
                    a.charAt(p + 1) == s) && p++;
                return s
            }, l = function (s, r, u) {
                r = "" + r;
                if (q(s))for (; r.length < u;)r = "0" + r;
                return r
            }, k = function (s, r, u, v) {
                return q(s) ? v[r] : u[r]
            }, m = "", o = false;
            if (d)for (var p = 0; p < a.length; p++)if (o)if (a.charAt(p) == "'" && !q("'"))o = false; else m += a.charAt(p); else switch (a.charAt(p)) {
                case "d":
                    m += l("d", d.getDate(), 2);
                    break;
                case "D":
                    m += k("D", d.getDay(), i, j);
                    break;
                case "o":
                    m += l("o", (d.getTime() - (new Date(d.getFullYear(), 0, 0)).getTime()) / 864E5, 3);
                    break;
                case "m":
                    m += l("m", d.getMonth() + 1, 2);
                    break;
                case "M":
                    m += k("M",
                        d.getMonth(), n, h);
                    break;
                case "y":
                    m += q("y") ? d.getFullYear() : (d.getYear() % 100 < 10 ? "0" : "") + d.getYear() % 100;
                    break;
                case "@":
                    m += d.getTime();
                    break;
                case "!":
                    m += d.getTime() * 1E4 + this._ticksTo1970;
                    break;
                case "'":
                    if (q("'"))m += "'"; else o = true;
                    break;
                default:
                    m += a.charAt(p)
            }
            return m
        }, _possibleChars:function (a) {
            for (var d = "", h = false, i = function (n) {
                (n = j + 1 < a.length && a.charAt(j + 1) == n) && j++;
                return n
            }, j = 0; j < a.length; j++)if (h)if (a.charAt(j) == "'" && !i("'"))h = false; else d += a.charAt(j); else switch (a.charAt(j)) {
                case "d":
                case "m":
                case "y":
                case "@":
                    d +=
                        "0123456789";
                    break;
                case "D":
                case "M":
                    return null;
                case "'":
                    if (i("'"))d += "'"; else h = true;
                    break;
                default:
                    d += a.charAt(j)
            }
            return d
        }, _get:function (a, d) {
            return a.settings[d] !== c ? a.settings[d] : this._defaults[d]
        }, _setDateFromField:function (a, d) {
            if (a.input.val() != a.lastVal) {
                var h = this._get(a, "dateFormat"), i = a.lastVal = a.input ? a.input.val() : null, j, n;
                j = n = this._getDefaultDate(a);
                var q = this._getFormatConfig(a);
                try {
                    j = this.parseDate(h, i, q) || n
                } catch (l) {
                    this.log(l);
                    i = d ? "" : i
                }
                a.selectedDay = j.getDate();
                a.drawMonth = a.selectedMonth =
                    j.getMonth();
                a.drawYear = a.selectedYear = j.getFullYear();
                a.currentDay = i ? j.getDate() : 0;
                a.currentMonth = i ? j.getMonth() : 0;
                a.currentYear = i ? j.getFullYear() : 0;
                this._adjustInstDate(a)
            }
        }, _getDefaultDate:function (a) {
            return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date))
        }, _determineDate:function (a, d, h) {
            var i = function (n) {
                var q = new Date;
                q.setDate(q.getDate() + n);
                return q
            }, j = function (n) {
                try {
                    return b.datepicker.parseDate(b.datepicker._get(a, "dateFormat"), n, b.datepicker._getFormatConfig(a))
                } catch (q) {
                }
                var l =
                    (n.toLowerCase().match(/^c/) ? b.datepicker._getDate(a) : null) || new Date, k = l.getFullYear(), m = l.getMonth();
                l = l.getDate();
                for (var o = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, p = o.exec(n); p;) {
                    switch (p[2] || "d") {
                        case "d":
                        case "D":
                            l += parseInt(p[1], 10);
                            break;
                        case "w":
                        case "W":
                            l += parseInt(p[1], 10) * 7;
                            break;
                        case "m":
                        case "M":
                            m += parseInt(p[1], 10);
                            l = Math.min(l, b.datepicker._getDaysInMonth(k, m));
                            break;
                        case "y":
                        case "Y":
                            k += parseInt(p[1], 10);
                            l = Math.min(l, b.datepicker._getDaysInMonth(k, m));
                            break
                    }
                    p = o.exec(n)
                }
                return new Date(k,
                    m, l)
            };
            if (d = (d = d == null || d === "" ? h : typeof d == "string" ? j(d) : typeof d == "number" ? isNaN(d) ? h : i(d) : new Date(d.getTime())) && d.toString() == "Invalid Date" ? h : d) {
                d.setHours(0);
                d.setMinutes(0);
                d.setSeconds(0);
                d.setMilliseconds(0)
            }
            return this._daylightSavingAdjust(d)
        }, _daylightSavingAdjust:function (a) {
            if (!a)return null;
            a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0);
            return a
        }, _setDate:function (a, d, h) {
            var i = !d, j = a.selectedMonth, n = a.selectedYear;
            d = this._restrictMinMax(a, this._determineDate(a, d, new Date));
            a.selectedDay =
                a.currentDay = d.getDate();
            a.drawMonth = a.selectedMonth = a.currentMonth = d.getMonth();
            a.drawYear = a.selectedYear = a.currentYear = d.getFullYear();
            if ((j != a.selectedMonth || n != a.selectedYear) && !h)this._notifyChange(a);
            this._adjustInstDate(a);
            if (a.input)a.input.val(i ? "" : this._formatDate(a))
        }, _getDate:function (a) {
            return!a.currentYear || a.input && a.input.val() == "" ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay))
        }, _generateHTML:function (a) {
            var d = new Date;
            d = this._daylightSavingAdjust(new Date(d.getFullYear(),
                d.getMonth(), d.getDate()));
            var h = this._get(a, "isRTL"), i = this._get(a, "showButtonPanel"), j = this._get(a, "hideIfNoPrevNext"), n = this._get(a, "navigationAsDateFormat"), q = this._getNumberOfMonths(a), l = this._get(a, "showCurrentAtPos"), k = this._get(a, "stepMonths"), m = q[0] != 1 || q[1] != 1, o = this._daylightSavingAdjust(!a.currentDay ? new Date(9999, 9, 9) : new Date(a.currentYear, a.currentMonth, a.currentDay)), p = this._getMinMaxDate(a, "min"), s = this._getMinMaxDate(a, "max");
            l = a.drawMonth - l;
            var r = a.drawYear;
            if (l < 0) {
                l += 12;
                r--
            }
            if (s) {
                var u =
                    this._daylightSavingAdjust(new Date(s.getFullYear(), s.getMonth() - q[0] * q[1] + 1, s.getDate()));
                for (u = p && u < p ? p : u; this._daylightSavingAdjust(new Date(r, l, 1)) > u;) {
                    l--;
                    if (l < 0) {
                        l = 11;
                        r--
                    }
                }
            }
            a.drawMonth = l;
            a.drawYear = r;
            u = this._get(a, "prevText");
            u = !n ? u : this.formatDate(u, this._daylightSavingAdjust(new Date(r, l - k, 1)), this._getFormatConfig(a));
            u = this._canAdjustMonth(a, -1, r, l) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + e + ".datepicker._adjustDate('#" + a.id + "', -" + k + ", 'M');\" title=\"" + u + '"><span class="ui-icon ui-icon-circle-triangle-' +
                (h ? "e" : "w") + '">' + u + "</span></a>" : j ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + u + '"><span class="ui-icon ui-icon-circle-triangle-' + (h ? "e" : "w") + '">' + u + "</span></a>";
            var v = this._get(a, "nextText");
            v = !n ? v : this.formatDate(v, this._daylightSavingAdjust(new Date(r, l + k, 1)), this._getFormatConfig(a));
            j = this._canAdjustMonth(a, +1, r, l) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + e + ".datepicker._adjustDate('#" + a.id + "', +" + k + ", 'M');\" title=\"" + v + '"><span class="ui-icon ui-icon-circle-triangle-' +
                (h ? "w" : "e") + '">' + v + "</span></a>" : j ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + v + '"><span class="ui-icon ui-icon-circle-triangle-' + (h ? "w" : "e") + '">' + v + "</span></a>";
            k = this._get(a, "currentText");
            v = this._get(a, "gotoCurrent") && a.currentDay ? o : d;
            k = !n ? k : this.formatDate(k, v, this._getFormatConfig(a));
            n = !a.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + e + '.datepicker._hideDatepicker();">' + this._get(a,
                "closeText") + "</button>" : "";
            i = i ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (h ? n : "") + (this._isInRange(a, v) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + e + ".datepicker._gotoToday('#" + a.id + "');\">" + k + "</button>" : "") + (h ? "" : n) + "</div>" : "";
            n = parseInt(this._get(a, "firstDay"), 10);
            n = isNaN(n) ? 0 : n;
            k = this._get(a, "showWeek");
            v = this._get(a, "dayNames");
            this._get(a, "dayNamesShort");
            var w = this._get(a, "dayNamesMin"), y =
                this._get(a, "monthNames"), B = this._get(a, "monthNamesShort"), x = this._get(a, "beforeShowDay"), C = this._get(a, "showOtherMonths"), J = this._get(a, "selectOtherMonths");
            this._get(a, "calculateWeek");
            for (var M = this._getDefaultDate(a), K = "", G = 0; G < q[0]; G++) {
                for (var N = "", H = 0; H < q[1]; H++) {
                    var O = this._daylightSavingAdjust(new Date(r, l, a.selectedDay)), A = " ui-corner-all", D = "";
                    if (m) {
                        D += '<div class="ui-datepicker-group';
                        if (q[1] > 1)switch (H) {
                            case 0:
                                D += " ui-datepicker-group-first";
                                A = " ui-corner-" + (h ? "right" : "left");
                                break;
                            case q[1] -
                                1:
                                D += " ui-datepicker-group-last";
                                A = " ui-corner-" + (h ? "left" : "right");
                                break;
                            default:
                                D += " ui-datepicker-group-middle";
                                A = "";
                                break
                        }
                        D += '">'
                    }
                    D += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + A + '">' + (/all|left/.test(A) && G == 0 ? h ? j : u : "") + (/all|right/.test(A) && G == 0 ? h ? u : j : "") + this._generateMonthYearHeader(a, l, r, p, s, G > 0 || H > 0, y, B) + '</div><table class="ui-datepicker-calendar"><thead><tr>';
                    var E = k ? '<th class="ui-datepicker-week-col">' + this._get(a, "weekHeader") + "</th>" : "";
                    for (A = 0; A < 7; A++) {
                        var z =
                            (A + n) % 7;
                        E += "<th" + ((A + n + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + '><span title="' + v[z] + '">' + w[z] + "</span></th>"
                    }
                    D += E + "</tr></thead><tbody>";
                    E = this._getDaysInMonth(r, l);
                    if (r == a.selectedYear && l == a.selectedMonth)a.selectedDay = Math.min(a.selectedDay, E);
                    A = (this._getFirstDayOfMonth(r, l) - n + 7) % 7;
                    E = m ? 6 : Math.ceil((A + E) / 7);
                    z = this._daylightSavingAdjust(new Date(r, l, 1 - A));
                    for (var P = 0; P < E; P++) {
                        D += "<tr>";
                        var Q = !k ? "" : '<td class="ui-datepicker-week-col">' + this._get(a, "calculateWeek")(z) + "</td>";
                        for (A = 0; A < 7; A++) {
                            var I =
                                x ? x.apply(a.input ? a.input[0] : null, [z]) : [true, ""], F = z.getMonth() != l, L = F && !J || !I[0] || p && z < p || s && z > s;
                            Q += '<td class="' + ((A + n + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (F ? " ui-datepicker-other-month" : "") + (z.getTime() == O.getTime() && l == a.selectedMonth && a._keyEvent || M.getTime() == z.getTime() && M.getTime() == O.getTime() ? " " + this._dayOverClass : "") + (L ? " " + this._unselectableClass + " ui-state-disabled" : "") + (F && !C ? "" : " " + I[1] + (z.getTime() == o.getTime() ? " " + this._currentClass : "") + (z.getTime() == d.getTime() ? " ui-datepicker-today" :
                                "")) + '"' + ((!F || C) && I[2] ? ' title="' + I[2] + '"' : "") + (L ? "" : ' onclick="DP_jQuery_' + e + ".datepicker._selectDay('#" + a.id + "'," + z.getMonth() + "," + z.getFullYear() + ', this);return false;"') + ">" + (F && !C ? "&#xa0;" : L ? '<span class="ui-state-default">' + z.getDate() + "</span>" : '<a class="ui-state-default' + (z.getTime() == d.getTime() ? " ui-state-highlight" : "") + (z.getTime() == o.getTime() ? " ui-state-active" : "") + (F ? " ui-priority-secondary" : "") + '" href="#">' + z.getDate() + "</a>") + "</td>";
                            z.setDate(z.getDate() + 1);
                            z = this._daylightSavingAdjust(z)
                        }
                        D +=
                            Q + "</tr>"
                    }
                    l++;
                    if (l > 11) {
                        l = 0;
                        r++
                    }
                    D += "</tbody></table>" + (m ? "</div>" + (q[0] > 0 && H == q[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : "");
                    N += D
                }
                K += N
            }
            K += i + (b.browser.msie && parseInt(b.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : "");
            a._keyEvent = false;
            return K
        }, _generateMonthYearHeader:function (a, d, h, i, j, n, q, l) {
            var k = this._get(a, "changeMonth"), m = this._get(a, "changeYear"), o = this._get(a, "showMonthAfterYear"), p = '<div class="ui-datepicker-title">',
                s = "";
            if (n || !k)s += '<span class="ui-datepicker-month">' + q[d] + "</span>"; else {
                q = i && i.getFullYear() == h;
                var r = j && j.getFullYear() == h;
                s += '<select class="ui-datepicker-month" onchange="DP_jQuery_' + e + ".datepicker._selectMonthYear('#" + a.id + "', this, 'M');\" onclick=\"DP_jQuery_" + e + ".datepicker._clickMonthYear('#" + a.id + "');\">";
                for (var u = 0; u < 12; u++)if ((!q || u >= i.getMonth()) && (!r || u <= j.getMonth()))s += '<option value="' + u + '"' + (u == d ? ' selected="selected"' : "") + ">" + l[u] + "</option>";
                s += "</select>"
            }
            o || (p += s + (n || !(k &&
                m) ? "&#xa0;" : ""));
            a.yearshtml = "";
            if (n || !m)p += '<span class="ui-datepicker-year">' + h + "</span>"; else {
                l = this._get(a, "yearRange").split(":");
                var v = (new Date).getFullYear();
                q = function (w) {
                    w = w.match(/c[+-].*/) ? h + parseInt(w.substring(1), 10) : w.match(/[+-].*/) ? v + parseInt(w, 10) : parseInt(w, 10);
                    return isNaN(w) ? v : w
                };
                d = q(l[0]);
                l = Math.max(d, q(l[1] || ""));
                d = i ? Math.max(d, i.getFullYear()) : d;
                l = j ? Math.min(l, j.getFullYear()) : l;
                for (a.yearshtml += '<select class="ui-datepicker-year" onchange="DP_jQuery_' + e + ".datepicker._selectMonthYear('#" +
                    a.id + "', this, 'Y');\" onclick=\"DP_jQuery_" + e + ".datepicker._clickMonthYear('#" + a.id + "');\">"; d <= l; d++)a.yearshtml += '<option value="' + d + '"' + (d == h ? ' selected="selected"' : "") + ">" + d + "</option>";
                a.yearshtml += "</select>";
                if (b.browser.mozilla)p += '<select class="ui-datepicker-year"><option value="' + h + '" selected="selected">' + h + "</option></select>"; else {
                    p += a.yearshtml;
                    a.yearshtml = null
                }
            }
            p += this._get(a, "yearSuffix");
            if (o)p += (n || !(k && m) ? "&#xa0;" : "") + s;
            p += "</div>";
            return p
        }, _adjustInstDate:function (a, d, h) {
            var i =
                a.drawYear + (h == "Y" ? d : 0), j = a.drawMonth + (h == "M" ? d : 0);
            d = Math.min(a.selectedDay, this._getDaysInMonth(i, j)) + (h == "D" ? d : 0);
            i = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(i, j, d)));
            a.selectedDay = i.getDate();
            a.drawMonth = a.selectedMonth = i.getMonth();
            a.drawYear = a.selectedYear = i.getFullYear();
            if (h == "M" || h == "Y")this._notifyChange(a)
        }, _restrictMinMax:function (a, d) {
            var h = this._getMinMaxDate(a, "min");
            a = this._getMinMaxDate(a, "max");
            d = h && d < h ? h : d;
            return d = a && d > a ? a : d
        }, _notifyChange:function (a) {
            var d = this._get(a,
                "onChangeMonthYear");
            if (d)d.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a])
        }, _getNumberOfMonths:function (a) {
            a = this._get(a, "numberOfMonths");
            return a == null ? [1, 1] : typeof a == "number" ? [1, a] : a
        }, _getMinMaxDate:function (a, d) {
            return this._determineDate(a, this._get(a, d + "Date"), null)
        }, _getDaysInMonth:function (a, d) {
            return 32 - (new Date(a, d, 32)).getDate()
        }, _getFirstDayOfMonth:function (a, d) {
            return(new Date(a, d, 1)).getDay()
        }, _canAdjustMonth:function (a, d, h, i) {
            var j = this._getNumberOfMonths(a);
            h = this._daylightSavingAdjust(new Date(h, i + (d < 0 ? d : j[0] * j[1]), 1));
            d < 0 && h.setDate(this._getDaysInMonth(h.getFullYear(), h.getMonth()));
            return this._isInRange(a, h)
        }, _isInRange:function (a, d) {
            var h = this._getMinMaxDate(a, "min");
            a = this._getMinMaxDate(a, "max");
            return(!h || d.getTime() >= h.getTime()) && (!a || d.getTime() <= a.getTime())
        }, _getFormatConfig:function (a) {
            var d = this._get(a, "shortYearCutoff");
            d = typeof d != "string" ? d : (new Date).getFullYear() % 100 + parseInt(d, 10);
            return{shortYearCutoff:d, dayNamesShort:this._get(a,
                "dayNamesShort"), dayNames:this._get(a, "dayNames"), monthNamesShort:this._get(a, "monthNamesShort"), monthNames:this._get(a, "monthNames")}
        }, _formatDate:function (a, d, h, i) {
            if (!d) {
                a.currentDay = a.selectedDay;
                a.currentMonth = a.selectedMonth;
                a.currentYear = a.selectedYear
            }
            d = d ? typeof d == "object" ? d : this._daylightSavingAdjust(new Date(i, h, d)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
            return this.formatDate(this._get(a, "dateFormat"), d, this._getFormatConfig(a))
        }});
    b.fn.datepicker =
        function (a) {
            if (!b.datepicker.initialized) {
                b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);
                b.datepicker.initialized = true
            }
            var d = Array.prototype.slice.call(arguments, 1);
            if (typeof a == "string" && (a == "isDisabled" || a == "getDate" || a == "widget"))return b.datepicker["_" + a + "Datepicker"].apply(b.datepicker, [this[0]].concat(d));
            if (a == "option" && arguments.length == 2 && typeof arguments[1] == "string")return b.datepicker["_" + a + "Datepicker"].apply(b.datepicker, [this[0]].concat(d));
            return this.each(function () {
                typeof a == "string" ? b.datepicker["_" + a + "Datepicker"].apply(b.datepicker, [this].concat(d)) : b.datepicker._attachDatepicker(this, a)
            })
        };
    b.datepicker = new f;
    b.datepicker.initialized = false;
    b.datepicker.uuid = (new Date).getTime();
    b.datepicker.version = "1.8.9";
    window["DP_jQuery_" + e] = b
})(jQuery);
(function (b, c) {
    var f = {buttons:true, height:true, maxHeight:true, maxWidth:true, minHeight:true, minWidth:true, width:true}, g = {maxHeight:true, maxWidth:true, minHeight:true, minWidth:true};
    b.widget("ui.dialog", {options:{autoOpen:true, buttons:{}, closeOnEscape:true, closeText:"close", dialogClass:"", draggable:true, hide:null, height:"auto", maxHeight:false, maxWidth:false, minHeight:150, minWidth:150, modal:false, position:{my:"center", at:"center", collision:"fit", using:function (e) {
        var a = b(this).css(e).offset().top;
        a < 0 &&
        b(this).css("top", e.top - a)
    }}, resizable:true, show:null, stack:true, title:"", width:300, zIndex:1E3}, _create:function () {
        this.originalTitle = this.element.attr("title");
        if (typeof this.originalTitle !== "string")this.originalTitle = "";
        this.options.title = this.options.title || this.originalTitle;
        var e = this, a = e.options, d = a.title || "&#160;", h = b.ui.dialog.getTitleId(e.element), i = (e.uiDialog = b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex",
            -1).css("outline", 0).keydown(
            function (q) {
                if (a.closeOnEscape && q.keyCode && q.keyCode === b.ui.keyCode.ESCAPE) {
                    e.close(q);
                    q.preventDefault()
                }
            }).attr({role:"dialog", "aria-labelledby":h}).mousedown(function (q) {
                e.moveToTop(false, q)
            });
        e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(i);
        var j = (e.uiDialogTitlebar = b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(i), n = b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
            "button").hover(
            function () {
                n.addClass("ui-state-hover")
            },
            function () {
                n.removeClass("ui-state-hover")
            }).focus(
            function () {
                n.addClass("ui-state-focus")
            }).blur(
            function () {
                n.removeClass("ui-state-focus")
            }).click(
            function (q) {
                e.close(q);
                return false
            }).appendTo(j);
        (e.uiDialogTitlebarCloseText = b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(n);
        b("<span></span>").addClass("ui-dialog-title").attr("id", h).html(d).prependTo(j);
        if (b.isFunction(a.beforeclose) && !b.isFunction(a.beforeClose))a.beforeClose =
            a.beforeclose;
        j.find("*").add(j).disableSelection();
        a.draggable && b.fn.draggable && e._makeDraggable();
        a.resizable && b.fn.resizable && e._makeResizable();
        e._createButtons(a.buttons);
        e._isOpen = false;
        b.fn.bgiframe && i.bgiframe()
    }, _init:function () {
        this.options.autoOpen && this.open()
    }, destroy:function () {
        var e = this;
        e.overlay && e.overlay.destroy();
        e.uiDialog.hide();
        e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
        e.uiDialog.remove();
        e.originalTitle &&
        e.element.attr("title", e.originalTitle);
        return e
    }, widget:function () {
        return this.uiDialog
    }, close:function (e) {
        var a = this, d, h;
        if (false !== a._trigger("beforeClose", e)) {
            a.overlay && a.overlay.destroy();
            a.uiDialog.unbind("keypress.ui-dialog");
            a._isOpen = false;
            if (a.options.hide)a.uiDialog.hide(a.options.hide, function () {
                a._trigger("close", e)
            }); else {
                a.uiDialog.hide();
                a._trigger("close", e)
            }
            b.ui.dialog.overlay.resize();
            if (a.options.modal) {
                d = 0;
                b(".ui-dialog").each(function () {
                    if (this !== a.uiDialog[0]) {
                        h = b(this).css("z-index");
                        isNaN(h) || (d = Math.max(d, h))
                    }
                });
                b.ui.dialog.maxZ = d
            }
            return a
        }
    }, isOpen:function () {
        return this._isOpen
    }, moveToTop:function (e, a) {
        var d = this, h = d.options;
        if (h.modal && !e || !h.stack && !h.modal)return d._trigger("focus", a);
        if (h.zIndex > b.ui.dialog.maxZ)b.ui.dialog.maxZ = h.zIndex;
        if (d.overlay) {
            b.ui.dialog.maxZ += 1;
            d.overlay.$el.css("z-index", b.ui.dialog.overlay.maxZ = b.ui.dialog.maxZ)
        }
        e = {scrollTop:d.element.attr("scrollTop"), scrollLeft:d.element.attr("scrollLeft")};
        b.ui.dialog.maxZ += 1;
        d.uiDialog.css("z-index", b.ui.dialog.maxZ);
        d.element.attr(e);
        d._trigger("focus", a);
        return d
    }, open:function () {
        if (!this._isOpen) {
            var e = this, a = e.options, d = e.uiDialog;
            e.overlay = a.modal ? new b.ui.dialog.overlay(e) : null;
            e._size();
            e._position(a.position);
            d.show(a.show);
            e.moveToTop(true);
            a.modal && d.bind("keypress.ui-dialog", function (h) {
                if (h.keyCode === b.ui.keyCode.TAB) {
                    var i = b(":tabbable", this), j = i.filter(":first");
                    i = i.filter(":last");
                    if (h.target === i[0] && !h.shiftKey) {
                        j.focus(1);
                        return false
                    } else if (h.target === j[0] && h.shiftKey) {
                        i.focus(1);
                        return false
                    }
                }
            });
            b(e.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();
            e._isOpen = true;
            e._trigger("open");
            return e
        }
    }, _createButtons:function (e) {
        var a = this, d = false, h = b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), i = b("<div></div>").addClass("ui-dialog-buttonset").appendTo(h);
        a.uiDialog.find(".ui-dialog-buttonpane").remove();
        typeof e === "object" && e !== null && b.each(e, function () {
            return!(d = true)
        });
        if (d) {
            b.each(e, function (j, n) {
                n = b.isFunction(n) ? {click:n, text:j} : n;
                j = b('<button type="button"></button>').attr(n, true).unbind("click").click(
                    function () {
                        n.click.apply(a.element[0], arguments)
                    }).appendTo(i);
                b.fn.button && j.button()
            });
            h.appendTo(a.uiDialog)
        }
    }, _makeDraggable:function () {
        function e(j) {
            return{position:j.position, offset:j.offset}
        }

        var a = this, d = a.options, h = b(document), i;
        a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", handle:".ui-dialog-titlebar", containment:"document", start:function (j, n) {
            i =
                d.height === "auto" ? "auto" : b(this).height();
            b(this).height(b(this).height()).addClass("ui-dialog-dragging");
            a._trigger("dragStart", j, e(n))
        }, drag:function (j, n) {
            a._trigger("drag", j, e(n))
        }, stop:function (j, n) {
            d.position = [n.position.left - h.scrollLeft(), n.position.top - h.scrollTop()];
            b(this).removeClass("ui-dialog-dragging").height(i);
            a._trigger("dragStop", j, e(n));
            b.ui.dialog.overlay.resize()
        }})
    }, _makeResizable:function (e) {
        function a(j) {
            return{originalPosition:j.originalPosition, originalSize:j.originalSize,
                position:j.position, size:j.size}
        }

        e = e === c ? this.options.resizable : e;
        var d = this, h = d.options, i = d.uiDialog.css("position");
        e = typeof e === "string" ? e : "n,e,s,w,se,sw,ne,nw";
        d.uiDialog.resizable({cancel:".ui-dialog-content", containment:"document", alsoResize:d.element, maxWidth:h.maxWidth, maxHeight:h.maxHeight, minWidth:h.minWidth, minHeight:d._minHeight(), handles:e, start:function (j, n) {
            b(this).addClass("ui-dialog-resizing");
            d._trigger("resizeStart", j, a(n))
        }, resize:function (j, n) {
            d._trigger("resize", j, a(n))
        }, stop:function (j, n) {
            b(this).removeClass("ui-dialog-resizing");
            h.height = b(this).height();
            h.width = b(this).width();
            d._trigger("resizeStop", j, a(n));
            b.ui.dialog.overlay.resize()
        }}).css("position", i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
    }, _minHeight:function () {
        var e = this.options;
        return e.height === "auto" ? e.minHeight : Math.min(e.minHeight, e.height)
    }, _position:function (e) {
        var a = [], d = [0, 0], h;
        if (e) {
            if (typeof e === "string" || typeof e === "object" && "0"in e) {
                a = e.split ? e.split(" ") : [e[0], e[1]];
                if (a.length ===
                    1)a[1] = a[0];
                b.each(["left", "top"], function (i, j) {
                    if (+a[i] === a[i]) {
                        d[i] = a[i];
                        a[i] = j
                    }
                });
                e = {my:a.join(" "), at:a.join(" "), offset:d.join(" ")}
            }
            e = b.extend({}, b.ui.dialog.prototype.options.position, e)
        } else e = b.ui.dialog.prototype.options.position;
        (h = this.uiDialog.is(":visible")) || this.uiDialog.show();
        this.uiDialog.css({top:0, left:0}).position(b.extend({of:window}, e));
        h || this.uiDialog.hide()
    }, _setOptions:function (e) {
        var a = this, d = {}, h = false;
        b.each(e, function (i, j) {
            a._setOption(i, j);
            if (i in f)h = true;
            if (i in
                g)d[i] = j
        });
        h && this._size();
        this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", d)
    }, _setOption:function (e, a) {
        var d = this, h = d.uiDialog;
        switch (e) {
            case "beforeclose":
                e = "beforeClose";
                break;
            case "buttons":
                d._createButtons(a);
                break;
            case "closeText":
                d.uiDialogTitlebarCloseText.text("" + a);
                break;
            case "dialogClass":
                h.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + a);
                break;
            case "disabled":
                a ? h.addClass("ui-dialog-disabled") : h.removeClass("ui-dialog-disabled");
                break;
            case "draggable":
                var i = h.is(":data(draggable)");
                i && !a && h.draggable("destroy");
                !i && a && d._makeDraggable();
                break;
            case "position":
                d._position(a);
                break;
            case "resizable":
                (i = h.is(":data(resizable)")) && !a && h.resizable("destroy");
                i && typeof a === "string" && h.resizable("option", "handles", a);
                !i && a !== false && d._makeResizable(a);
                break;
            case "title":
                b(".ui-dialog-title", d.uiDialogTitlebar).html("" + (a || "&#160;"));
                break
        }
        b.Widget.prototype._setOption.apply(d, arguments)
    }, _size:function () {
        var e = this.options, a, d, h =
            this.uiDialog.is(":visible");
        this.element.show().css({width:"auto", minHeight:0, height:0});
        if (e.minWidth > e.width)e.width = e.minWidth;
        a = this.uiDialog.css({height:"auto", width:e.width}).height();
        d = Math.max(0, e.minHeight - a);
        if (e.height === "auto")if (b.support.minHeight)this.element.css({minHeight:d, height:"auto"}); else {
            this.uiDialog.show();
            e = this.element.css("height", "auto").height();
            h || this.uiDialog.hide();
            this.element.height(Math.max(e, d))
        } else this.element.height(Math.max(e.height - a, 0));
        this.uiDialog.is(":data(resizable)") &&
        this.uiDialog.resizable("option", "minHeight", this._minHeight())
    }});
    b.extend(b.ui.dialog, {version:"1.8.9", uuid:0, maxZ:0, getTitleId:function (e) {
        e = e.attr("id");
        if (!e) {
            this.uuid += 1;
            e = this.uuid
        }
        return"ui-dialog-title-" + e
    }, overlay:function (e) {
        this.$el = b.ui.dialog.overlay.create(e)
    }});
    b.extend(b.ui.dialog.overlay, {instances:[], oldInstances:[], maxZ:0, events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),
        function (e) {
            return e + ".dialog-overlay"
        }).join(" "), create:function (e) {
        if (this.instances.length ===
            0) {
            setTimeout(function () {
                b.ui.dialog.overlay.instances.length && b(document).bind(b.ui.dialog.overlay.events, function (d) {
                    if (b(d.target).zIndex() < b.ui.dialog.overlay.maxZ)return false
                })
            }, 1);
            b(document).bind("keydown.dialog-overlay", function (d) {
                if (e.options.closeOnEscape && d.keyCode && d.keyCode === b.ui.keyCode.ESCAPE) {
                    e.close(d);
                    d.preventDefault()
                }
            });
            b(window).bind("resize.dialog-overlay", b.ui.dialog.overlay.resize)
        }
        var a = (this.oldInstances.pop() || b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
            height:this.height()});
        b.fn.bgiframe && a.bgiframe();
        this.instances.push(a);
        return a
    }, destroy:function (e) {
        var a = b.inArray(e, this.instances);
        a != -1 && this.oldInstances.push(this.instances.splice(a, 1)[0]);
        this.instances.length === 0 && b([document, window]).unbind(".dialog-overlay");
        e.remove();
        var d = 0;
        b.each(this.instances, function () {
            d = Math.max(d, this.css("z-index"))
        });
        this.maxZ = d
    }, height:function () {
        var e, a;
        if (b.browser.msie && b.browser.version < 7) {
            e = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
            a = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
            return e < a ? b(window).height() + "px" : e + "px"
        } else return b(document).height() + "px"
    }, width:function () {
        var e, a;
        if (b.browser.msie && b.browser.version < 7) {
            e = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
            a = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
            return e < a ? b(window).width() + "px" : e + "px"
        } else return b(document).width() + "px"
    }, resize:function () {
        var e = b([]);
        b.each(b.ui.dialog.overlay.instances,
            function () {
                e = e.add(this)
            });
        e.css({width:0, height:0}).css({width:b.ui.dialog.overlay.width(), height:b.ui.dialog.overlay.height()})
    }});
    b.extend(b.ui.dialog.overlay.prototype, {destroy:function () {
        b.ui.dialog.overlay.destroy(this.$el)
    }})
})(jQuery);
(function (b) {
    b.ui = b.ui || {};
    var c = /left|center|right/, f = /top|center|bottom/, g = b.fn.position, e = b.fn.offset;
    b.fn.position = function (a) {
        if (!a || !a.of)return g.apply(this, arguments);
        a = b.extend({}, a);
        var d = b(a.of), h = d[0], i = (a.collision || "flip").split(" "), j = a.offset ? a.offset.split(" ") : [0, 0], n, q, l;
        if (h.nodeType === 9) {
            n = d.width();
            q = d.height();
            l = {top:0, left:0}
        } else if (h.setTimeout) {
            n = d.width();
            q = d.height();
            l = {top:d.scrollTop(), left:d.scrollLeft()}
        } else if (h.preventDefault) {
            a.at = "left top";
            n = q = 0;
            l = {top:a.of.pageY,
                left:a.of.pageX}
        } else {
            n = d.outerWidth();
            q = d.outerHeight();
            l = d.offset()
        }
        b.each(["my", "at"], function () {
            var k = (a[this] || "").split(" ");
            if (k.length === 1)k = c.test(k[0]) ? k.concat(["center"]) : f.test(k[0]) ? ["center"].concat(k) : ["center", "center"];
            k[0] = c.test(k[0]) ? k[0] : "center";
            k[1] = f.test(k[1]) ? k[1] : "center";
            a[this] = k
        });
        if (i.length === 1)i[1] = i[0];
        j[0] = parseInt(j[0], 10) || 0;
        if (j.length === 1)j[1] = j[0];
        j[1] = parseInt(j[1], 10) || 0;
        if (a.at[0] === "right")l.left += n; else if (a.at[0] === "center")l.left += n / 2;
        if (a.at[1] === "bottom")l.top +=
            q; else if (a.at[1] === "center")l.top += q / 2;
        l.left += j[0];
        l.top += j[1];
        return this.each(function () {
            var k = b(this), m = k.outerWidth(), o = k.outerHeight(), p = parseInt(b.curCSS(this, "marginLeft", true)) || 0, s = parseInt(b.curCSS(this, "marginTop", true)) || 0, r = m + p + (parseInt(b.curCSS(this, "marginRight", true)) || 0), u = o + s + (parseInt(b.curCSS(this, "marginBottom", true)) || 0), v = b.extend({}, l), w;
            if (a.my[0] === "right")v.left -= m; else if (a.my[0] === "center")v.left -= m / 2;
            if (a.my[1] === "bottom")v.top -= o; else if (a.my[1] === "center")v.top -=
                o / 2;
            v.left = Math.round(v.left);
            v.top = Math.round(v.top);
            w = {left:v.left - p, top:v.top - s};
            b.each(["left", "top"], function (y, B) {
                b.ui.position[i[y]] && b.ui.position[i[y]][B](v, {targetWidth:n, targetHeight:q, elemWidth:m, elemHeight:o, collisionPosition:w, collisionWidth:r, collisionHeight:u, offset:j, my:a.my, at:a.at})
            });
            b.fn.bgiframe && k.bgiframe();
            k.offset(b.extend(v, {using:a.using}))
        })
    };
    b.ui.position = {fit:{left:function (a, d) {
        var h = b(window);
        h = d.collisionPosition.left + d.collisionWidth - h.width() - h.scrollLeft();
        a.left =
            h > 0 ? a.left - h : Math.max(a.left - d.collisionPosition.left, a.left)
    }, top:function (a, d) {
        var h = b(window);
        h = d.collisionPosition.top + d.collisionHeight - h.height() - h.scrollTop();
        a.top = h > 0 ? a.top - h : Math.max(a.top - d.collisionPosition.top, a.top)
    }}, flip:{left:function (a, d) {
        if (d.at[0] !== "center") {
            var h = b(window);
            h = d.collisionPosition.left + d.collisionWidth - h.width() - h.scrollLeft();
            var i = d.my[0] === "left" ? -d.elemWidth : d.my[0] === "right" ? d.elemWidth : 0, j = d.at[0] === "left" ? d.targetWidth : -d.targetWidth, n = -2 * d.offset[0];
            a.left +=
                d.collisionPosition.left < 0 ? i + j + n : h > 0 ? i + j + n : 0
        }
    }, top:function (a, d) {
        if (d.at[1] !== "center") {
            var h = b(window);
            h = d.collisionPosition.top + d.collisionHeight - h.height() - h.scrollTop();
            var i = d.my[1] === "top" ? -d.elemHeight : d.my[1] === "bottom" ? d.elemHeight : 0, j = d.at[1] === "top" ? d.targetHeight : -d.targetHeight, n = -2 * d.offset[1];
            a.top += d.collisionPosition.top < 0 ? i + j + n : h > 0 ? i + j + n : 0
        }
    }}};
    if (!b.offset.setOffset) {
        b.offset.setOffset = function (a, d) {
            if (/static/.test(b.curCSS(a, "position")))a.style.position = "relative";
            var h = b(a),
                i = h.offset(), j = parseInt(b.curCSS(a, "top", true), 10) || 0, n = parseInt(b.curCSS(a, "left", true), 10) || 0;
            i = {top:d.top - i.top + j, left:d.left - i.left + n};
            "using"in d ? d.using.call(a, i) : h.css(i)
        };
        b.fn.offset = function (a) {
            var d = this[0];
            if (!d || !d.ownerDocument)return null;
            if (a)return this.each(function () {
                b.offset.setOffset(this, a)
            });
            return e.call(this)
        }
    }
})(jQuery);
(function (b, c) {
    b.widget("ui.progressbar", {options:{value:0, max:100}, min:0, _create:function () {
        this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar", "aria-valuemin":this.min, "aria-valuemax":this.options.max, "aria-valuenow":this._value()});
        this.valueDiv = b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);
        this.oldValue = this._value();
        this._refreshValue()
    }, destroy:function () {
        this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
        this.valueDiv.remove();
        b.Widget.prototype.destroy.apply(this, arguments)
    }, value:function (f) {
        if (f === c)return this._value();
        this._setOption("value", f);
        return this
    }, _setOption:function (f, g) {
        if (f === "value") {
            this.options.value = g;
            this._refreshValue();
            this._value() === this.options.max && this._trigger("complete")
        }
        b.Widget.prototype._setOption.apply(this, arguments)
    }, _value:function () {
        var f = this.options.value;
        if (typeof f !== "number")f = 0;
        return Math.min(this.options.max, Math.max(this.min, f))
    }, _percentage:function () {
        return 100 *
            this._value() / this.options.max
    }, _refreshValue:function () {
        var f = this.value(), g = this._percentage();
        if (this.oldValue !== f) {
            this.oldValue = f;
            this._trigger("change")
        }
        this.valueDiv.toggleClass("ui-corner-right", f === this.options.max).width(g.toFixed(0) + "%");
        this.element.attr("aria-valuenow", f)
    }});
    b.extend(b.ui.progressbar, {version:"1.8.9"})
})(jQuery);
(function (b) {
    b.widget("ui.slider", b.ui.mouse, {widgetEventPrefix:"slide", options:{animate:false, distance:0, max:100, min:0, orientation:"horizontal", range:false, step:1, value:0, values:null}, _create:function () {
        var c = this, f = this.options;
        this._mouseSliding = this._keySliding = false;
        this._animateOff = true;
        this._handleIndex = null;
        this._detectOrientation();
        this._mouseInit();
        this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all");
        f.disabled && this.element.addClass("ui-slider-disabled ui-disabled");
        this.range = b([]);
        if (f.range) {
            if (f.range === true) {
                this.range = b("<div></div>");
                if (!f.values)f.values = [this._valueMin(), this._valueMin()];
                if (f.values.length && f.values.length !== 2)f.values = [f.values[0], f.values[0]]
            } else this.range = b("<div></div>");
            this.range.appendTo(this.element).addClass("ui-slider-range");
            if (f.range === "min" || f.range === "max")this.range.addClass("ui-slider-range-" + f.range);
            this.range.addClass("ui-widget-header")
        }
        b(".ui-slider-handle", this.element).length === 0 && b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
        if (f.values && f.values.length)for (; b(".ui-slider-handle", this.element).length < f.values.length;)b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
        this.handles = b(".ui-slider-handle", this.element).addClass("ui-state-default ui-corner-all");
        this.handle = this.handles.eq(0);
        this.handles.add(this.range).filter("a").click(
            function (g) {
                g.preventDefault()
            }).hover(
            function () {
                f.disabled || b(this).addClass("ui-state-hover")
            },
            function () {
                b(this).removeClass("ui-state-hover")
            }).focus(
            function () {
                if (f.disabled)b(this).blur();
                else {
                    b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
                    b(this).addClass("ui-state-focus")
                }
            }).blur(function () {
                b(this).removeClass("ui-state-focus")
            });
        this.handles.each(function (g) {
            b(this).data("index.ui-slider-handle", g)
        });
        this.handles.keydown(
            function (g) {
                var e = true, a = b(this).data("index.ui-slider-handle"), d, h, i;
                if (!c.options.disabled) {
                    switch (g.keyCode) {
                        case b.ui.keyCode.HOME:
                        case b.ui.keyCode.END:
                        case b.ui.keyCode.PAGE_UP:
                        case b.ui.keyCode.PAGE_DOWN:
                        case b.ui.keyCode.UP:
                        case b.ui.keyCode.RIGHT:
                        case b.ui.keyCode.DOWN:
                        case b.ui.keyCode.LEFT:
                            e =
                                false;
                            if (!c._keySliding) {
                                c._keySliding = true;
                                b(this).addClass("ui-state-active");
                                d = c._start(g, a);
                                if (d === false)return
                            }
                            break
                    }
                    i = c.options.step;
                    d = c.options.values && c.options.values.length ? (h = c.values(a)) : (h = c.value());
                    switch (g.keyCode) {
                        case b.ui.keyCode.HOME:
                            h = c._valueMin();
                            break;
                        case b.ui.keyCode.END:
                            h = c._valueMax();
                            break;
                        case b.ui.keyCode.PAGE_UP:
                            h = c._trimAlignValue(d + (c._valueMax() - c._valueMin()) / 5);
                            break;
                        case b.ui.keyCode.PAGE_DOWN:
                            h = c._trimAlignValue(d - (c._valueMax() - c._valueMin()) / 5);
                            break;
                        case b.ui.keyCode.UP:
                        case b.ui.keyCode.RIGHT:
                            if (d ===
                                c._valueMax())return;
                            h = c._trimAlignValue(d + i);
                            break;
                        case b.ui.keyCode.DOWN:
                        case b.ui.keyCode.LEFT:
                            if (d === c._valueMin())return;
                            h = c._trimAlignValue(d - i);
                            break
                    }
                    c._slide(g, a, h);
                    return e
                }
            }).keyup(function (g) {
                var e = b(this).data("index.ui-slider-handle");
                if (c._keySliding) {
                    c._keySliding = false;
                    c._stop(g, e);
                    c._change(g, e);
                    b(this).removeClass("ui-state-active")
                }
            });
        this._refreshValue();
        this._animateOff = false
    }, destroy:function () {
        this.handles.remove();
        this.range.remove();
        this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
        this._mouseDestroy();
        return this
    }, _mouseCapture:function (c) {
        var f = this.options, g, e, a, d, h;
        if (f.disabled)return false;
        this.elementSize = {width:this.element.outerWidth(), height:this.element.outerHeight()};
        this.elementOffset = this.element.offset();
        g = this._normValueFromMouse({x:c.pageX, y:c.pageY});
        e = this._valueMax() - this._valueMin() + 1;
        d = this;
        this.handles.each(function (i) {
            var j = Math.abs(g - d.values(i));
            if (e > j) {
                e = j;
                a = b(this);
                h = i
            }
        });
        if (f.range === true && this.values(1) === f.min) {
            h += 1;
            a = b(this.handles[h])
        }
        if (this._start(c,
            h) === false)return false;
        this._mouseSliding = true;
        d._handleIndex = h;
        a.addClass("ui-state-active").focus();
        f = a.offset();
        this._clickOffset = !b(c.target).parents().andSelf().is(".ui-slider-handle") ? {left:0, top:0} : {left:c.pageX - f.left - a.width() / 2, top:c.pageY - f.top - a.height() / 2 - (parseInt(a.css("borderTopWidth"), 10) || 0) - (parseInt(a.css("borderBottomWidth"), 10) || 0) + (parseInt(a.css("marginTop"), 10) || 0)};
        this.handles.hasClass("ui-state-hover") || this._slide(c, h, g);
        return this._animateOff = true
    }, _mouseStart:function () {
        return true
    },
        _mouseDrag:function (c) {
            var f = this._normValueFromMouse({x:c.pageX, y:c.pageY});
            this._slide(c, this._handleIndex, f);
            return false
        }, _mouseStop:function (c) {
            this.handles.removeClass("ui-state-active");
            this._mouseSliding = false;
            this._stop(c, this._handleIndex);
            this._change(c, this._handleIndex);
            this._clickOffset = this._handleIndex = null;
            return this._animateOff = false
        }, _detectOrientation:function () {
            this.orientation = this.options.orientation === "vertical" ? "vertical" : "horizontal"
        }, _normValueFromMouse:function (c) {
            var f;
            if (this.orientation === "horizontal") {
                f = this.elementSize.width;
                c = c.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)
            } else {
                f = this.elementSize.height;
                c = c.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)
            }
            f = c / f;
            if (f > 1)f = 1;
            if (f < 0)f = 0;
            if (this.orientation === "vertical")f = 1 - f;
            c = this._valueMax() - this._valueMin();
            return this._trimAlignValue(this._valueMin() + f * c)
        }, _start:function (c, f) {
            var g = {handle:this.handles[f], value:this.value()};
            if (this.options.values && this.options.values.length) {
                g.value =
                    this.values(f);
                g.values = this.values()
            }
            return this._trigger("start", c, g)
        }, _slide:function (c, f, g) {
            var e;
            if (this.options.values && this.options.values.length) {
                e = this.values(f ? 0 : 1);
                if (this.options.values.length === 2 && this.options.range === true && (f === 0 && g > e || f === 1 && g < e))g = e;
                if (g !== this.values(f)) {
                    e = this.values();
                    e[f] = g;
                    c = this._trigger("slide", c, {handle:this.handles[f], value:g, values:e});
                    this.values(f ? 0 : 1);
                    c !== false && this.values(f, g, true)
                }
            } else if (g !== this.value()) {
                c = this._trigger("slide", c, {handle:this.handles[f],
                    value:g});
                c !== false && this.value(g)
            }
        }, _stop:function (c, f) {
            var g = {handle:this.handles[f], value:this.value()};
            if (this.options.values && this.options.values.length) {
                g.value = this.values(f);
                g.values = this.values()
            }
            this._trigger("stop", c, g)
        }, _change:function (c, f) {
            if (!this._keySliding && !this._mouseSliding) {
                var g = {handle:this.handles[f], value:this.value()};
                if (this.options.values && this.options.values.length) {
                    g.value = this.values(f);
                    g.values = this.values()
                }
                this._trigger("change", c, g)
            }
        }, value:function (c) {
            if (arguments.length) {
                this.options.value =
                    this._trimAlignValue(c);
                this._refreshValue();
                this._change(null, 0)
            }
            return this._value()
        }, values:function (c, f) {
            var g, e, a;
            if (arguments.length > 1) {
                this.options.values[c] = this._trimAlignValue(f);
                this._refreshValue();
                this._change(null, c)
            }
            if (arguments.length)if (b.isArray(arguments[0])) {
                g = this.options.values;
                e = arguments[0];
                for (a = 0; a < g.length; a += 1) {
                    g[a] = this._trimAlignValue(e[a]);
                    this._change(null, a)
                }
                this._refreshValue()
            } else return this.options.values && this.options.values.length ? this._values(c) : this.value();
            else return this._values()
        }, _setOption:function (c, f) {
            var g, e = 0;
            if (b.isArray(this.options.values))e = this.options.values.length;
            b.Widget.prototype._setOption.apply(this, arguments);
            switch (c) {
                case "disabled":
                    if (f) {
                        this.handles.filter(".ui-state-focus").blur();
                        this.handles.removeClass("ui-state-hover");
                        this.handles.attr("disabled", "disabled");
                        this.element.addClass("ui-disabled")
                    } else {
                        this.handles.removeAttr("disabled");
                        this.element.removeClass("ui-disabled")
                    }
                    break;
                case "orientation":
                    this._detectOrientation();
                    this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation);
                    this._refreshValue();
                    break;
                case "value":
                    this._animateOff = true;
                    this._refreshValue();
                    this._change(null, 0);
                    this._animateOff = false;
                    break;
                case "values":
                    this._animateOff = true;
                    this._refreshValue();
                    for (g = 0; g < e; g += 1)this._change(null, g);
                    this._animateOff = false;
                    break
            }
        }, _value:function () {
            var c = this.options.value;
            return c = this._trimAlignValue(c)
        }, _values:function (c) {
            var f, g;
            if (arguments.length) {
                f = this.options.values[c];
                return f = this._trimAlignValue(f)
            } else {
                f = this.options.values.slice();
                for (g = 0; g < f.length; g += 1)f[g] = this._trimAlignValue(f[g]);
                return f
            }
        }, _trimAlignValue:function (c) {
            if (c <= this._valueMin())return this._valueMin();
            if (c >= this._valueMax())return this._valueMax();
            var f = this.options.step > 0 ? this.options.step : 1, g = (c - this._valueMin()) % f;
            alignValue = c - g;
            if (Math.abs(g) * 2 >= f)alignValue += g > 0 ? f : -f;
            return parseFloat(alignValue.toFixed(5))
        }, _valueMin:function () {
            return this.options.min
        }, _valueMax:function () {
            return this.options.max
        },
        _refreshValue:function () {
            var c = this.options.range, f = this.options, g = this, e = !this._animateOff ? f.animate : false, a, d = {}, h, i, j, n;
            if (this.options.values && this.options.values.length)this.handles.each(function (q) {
                a = (g.values(q) - g._valueMin()) / (g._valueMax() - g._valueMin()) * 100;
                d[g.orientation === "horizontal" ? "left" : "bottom"] = a + "%";
                b(this).stop(1, 1)[e ? "animate" : "css"](d, f.animate);
                if (g.options.range === true)if (g.orientation === "horizontal") {
                    if (q === 0)g.range.stop(1, 1)[e ? "animate" : "css"]({left:a + "%"}, f.animate);
                    if (q === 1)g.range[e ? "animate" : "css"]({width:a - h + "%"}, {queue:false, duration:f.animate})
                } else {
                    if (q === 0)g.range.stop(1, 1)[e ? "animate" : "css"]({bottom:a + "%"}, f.animate);
                    if (q === 1)g.range[e ? "animate" : "css"]({height:a - h + "%"}, {queue:false, duration:f.animate})
                }
                h = a
            }); else {
                i = this.value();
                j = this._valueMin();
                n = this._valueMax();
                a = n !== j ? (i - j) / (n - j) * 100 : 0;
                d[g.orientation === "horizontal" ? "left" : "bottom"] = a + "%";
                this.handle.stop(1, 1)[e ? "animate" : "css"](d, f.animate);
                if (c === "min" && this.orientation === "horizontal")this.range.stop(1,
                    1)[e ? "animate" : "css"]({width:a + "%"}, f.animate);
                if (c === "max" && this.orientation === "horizontal")this.range[e ? "animate" : "css"]({width:100 - a + "%"}, {queue:false, duration:f.animate});
                if (c === "min" && this.orientation === "vertical")this.range.stop(1, 1)[e ? "animate" : "css"]({height:a + "%"}, f.animate);
                if (c === "max" && this.orientation === "vertical")this.range[e ? "animate" : "css"]({height:100 - a + "%"}, {queue:false, duration:f.animate})
            }
        }});
    b.extend(b.ui.slider, {version:"1.8.9"})
})(jQuery);
(function (b, c) {
    function f() {
        return++e
    }

    function g() {
        return++a
    }

    var e = 0, a = 0;
    b.widget("ui.tabs", {options:{add:null, ajaxOptions:null, cache:false, cookie:null, collapsible:false, disable:null, disabled:[], enable:null, event:"click", fx:null, idPrefix:"ui-tabs-", load:null, panelTemplate:"<div></div>", remove:null, select:null, show:null, spinner:"<em>Loading&#8230;</em>", tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"}, _create:function () {
        this._tabify(true)
    }, _setOption:function (d, h) {
        if (d == "selected")this.options.collapsible &&
            h == this.options.selected || this.select(h); else {
            this.options[d] = h;
            this._tabify()
        }
    }, _tabId:function (d) {
        return d.title && d.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF-]/g, "") || this.options.idPrefix + f()
    }, _sanitizeSelector:function (d) {
        return d.replace(/:/g, "\\:")
    }, _cookie:function () {
        var d = this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + g());
        return b.cookie.apply(null, [d].concat(b.makeArray(arguments)))
    }, _ui:function (d, h) {
        return{tab:d, panel:h, index:this.anchors.index(d)}
    }, _cleanup:function () {
        this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function () {
            var d =
                b(this);
            d.html(d.data("label.tabs")).removeData("label.tabs")
        })
    }, _tabify:function (d) {
        function h(r, u) {
            r.css("display", "");
            !b.support.opacity && u.opacity && r[0].style.removeAttribute("filter")
        }

        var i = this, j = this.options, n = /^#.+/;
        this.list = this.element.find("ol,ul").eq(0);
        this.lis = b(" > li:has(a[href])", this.list);
        this.anchors = this.lis.map(function () {
            return b("a", this)[0]
        });
        this.panels = b([]);
        this.anchors.each(function (r, u) {
            var v = b(u).attr("href"), w = v.split("#")[0], y;
            if (w && (w === location.toString().split("#")[0] ||
                (y = b("base")[0]) && w === y.href)) {
                v = u.hash;
                u.href = v
            }
            if (n.test(v))i.panels = i.panels.add(i.element.find(i._sanitizeSelector(v))); else if (v && v !== "#") {
                b.data(u, "href.tabs", v);
                b.data(u, "load.tabs", v.replace(/#.*$/, ""));
                v = i._tabId(u);
                u.href = "#" + v;
                u = i.element.find("#" + v);
                if (!u.length) {
                    u = b(j.panelTemplate).attr("id", v).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(i.panels[r - 1] || i.list);
                    u.data("destroy.tabs", true)
                }
                i.panels = i.panels.add(u)
            } else j.disabled.push(r)
        });
        if (d) {
            this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
            this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
            this.lis.addClass("ui-state-default ui-corner-top");
            this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
            if (j.selected === c) {
                location.hash && this.anchors.each(function (r, u) {
                    if (u.hash == location.hash) {
                        j.selected = r;
                        return false
                    }
                });
                if (typeof j.selected !== "number" && j.cookie)j.selected = parseInt(i._cookie(), 10);
                if (typeof j.selected !== "number" && this.lis.filter(".ui-tabs-selected").length)j.selected =
                    this.lis.index(this.lis.filter(".ui-tabs-selected"));
                j.selected = j.selected || (this.lis.length ? 0 : -1)
            } else if (j.selected === null)j.selected = -1;
            j.selected = j.selected >= 0 && this.anchors[j.selected] || j.selected < 0 ? j.selected : 0;
            j.disabled = b.unique(j.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"), function (r) {
                return i.lis.index(r)
            }))).sort();
            b.inArray(j.selected, j.disabled) != -1 && j.disabled.splice(b.inArray(j.selected, j.disabled), 1);
            this.panels.addClass("ui-tabs-hide");
            this.lis.removeClass("ui-tabs-selected ui-state-active");
            if (j.selected >= 0 && this.anchors.length) {
                i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash)).removeClass("ui-tabs-hide");
                this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");
                i.element.queue("tabs", function () {
                    i._trigger("show", null, i._ui(i.anchors[j.selected], i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash))[0]))
                });
                this.load(j.selected)
            }
            b(window).bind("unload", function () {
                i.lis.add(i.anchors).unbind(".tabs");
                i.lis = i.anchors = i.panels = null
            })
        } else j.selected = this.lis.index(this.lis.filter(".ui-tabs-selected"));
        this.element[j.collapsible ? "addClass" : "removeClass"]("ui-tabs-collapsible");
        j.cookie && this._cookie(j.selected, j.cookie);
        d = 0;
        for (var q; q = this.lis[d]; d++)b(q)[b.inArray(d, j.disabled) != -1 && !b(q).hasClass("ui-tabs-selected") ? "addClass" : "removeClass"]("ui-state-disabled");
        j.cache === false && this.anchors.removeData("cache.tabs");
        this.lis.add(this.anchors).unbind(".tabs");
        if (j.event !== "mouseover") {
            var l = function (r, u) {
                u.is(":not(.ui-state-disabled)") && u.addClass("ui-state-" + r)
            }, k = function (r, u) {
                u.removeClass("ui-state-" +
                    r)
            };
            this.lis.bind("mouseover.tabs", function () {
                l("hover", b(this))
            });
            this.lis.bind("mouseout.tabs", function () {
                k("hover", b(this))
            });
            this.anchors.bind("focus.tabs", function () {
                l("focus", b(this).closest("li"))
            });
            this.anchors.bind("blur.tabs", function () {
                k("focus", b(this).closest("li"))
            })
        }
        var m, o;
        if (j.fx)if (b.isArray(j.fx)) {
            m = j.fx[0];
            o = j.fx[1]
        } else m = o = j.fx;
        var p = o ? function (r, u) {
            b(r).closest("li").addClass("ui-tabs-selected ui-state-active");
            u.hide().removeClass("ui-tabs-hide").animate(o, o.duration || "normal",
                function () {
                    h(u, o);
                    i._trigger("show", null, i._ui(r, u[0]))
                })
        } : function (r, u) {
            b(r).closest("li").addClass("ui-tabs-selected ui-state-active");
            u.removeClass("ui-tabs-hide");
            i._trigger("show", null, i._ui(r, u[0]))
        }, s = m ? function (r, u) {
            u.animate(m, m.duration || "normal", function () {
                i.lis.removeClass("ui-tabs-selected ui-state-active");
                u.addClass("ui-tabs-hide");
                h(u, m);
                i.element.dequeue("tabs")
            })
        } : function (r, u) {
            i.lis.removeClass("ui-tabs-selected ui-state-active");
            u.addClass("ui-tabs-hide");
            i.element.dequeue("tabs")
        };
        this.anchors.bind(j.event + ".tabs", function () {
            var r = this, u = b(r).closest("li"), v = i.panels.filter(":not(.ui-tabs-hide)"), w = i.element.find(i._sanitizeSelector(r.hash));
            if (u.hasClass("ui-tabs-selected") && !j.collapsible || u.hasClass("ui-state-disabled") || u.hasClass("ui-state-processing") || i.panels.filter(":animated").length || i._trigger("select", null, i._ui(this, w[0])) === false) {
                this.blur();
                return false
            }
            j.selected = i.anchors.index(this);
            i.abort();
            if (j.collapsible)if (u.hasClass("ui-tabs-selected")) {
                j.selected =
                    -1;
                j.cookie && i._cookie(j.selected, j.cookie);
                i.element.queue("tabs",
                    function () {
                        s(r, v)
                    }).dequeue("tabs");
                this.blur();
                return false
            } else if (!v.length) {
                j.cookie && i._cookie(j.selected, j.cookie);
                i.element.queue("tabs", function () {
                    p(r, w)
                });
                i.load(i.anchors.index(this));
                this.blur();
                return false
            }
            j.cookie && i._cookie(j.selected, j.cookie);
            if (w.length) {
                v.length && i.element.queue("tabs", function () {
                    s(r, v)
                });
                i.element.queue("tabs", function () {
                    p(r, w)
                });
                i.load(i.anchors.index(this))
            } else throw"jQuery UI Tabs: Mismatching fragment identifier.";
            b.browser.msie && this.blur()
        });
        this.anchors.bind("click.tabs", function () {
            return false
        })
    }, _getIndex:function (d) {
        if (typeof d == "string")d = this.anchors.index(this.anchors.filter("[href$=" + d + "]"));
        return d
    }, destroy:function () {
        var d = this.options;
        this.abort();
        this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");
        this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
        this.anchors.each(function () {
            var h =
                b.data(this, "href.tabs");
            if (h)this.href = h;
            var i = b(this).unbind(".tabs");
            b.each(["href", "load", "cache"], function (j, n) {
                i.removeData(n + ".tabs")
            })
        });
        this.lis.unbind(".tabs").add(this.panels).each(function () {
            b.data(this, "destroy.tabs") ? b(this).remove() : b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")
        });
        d.cookie && this._cookie(null, d.cookie);
        return this
    }, add:function (d, h, i) {
        if (i === c)i = this.anchors.length;
        var j = this, n = this.options;
        h = b(n.tabTemplate.replace(/#\{href\}/g, d).replace(/#\{label\}/g, h));
        d = !d.indexOf("#") ? d.replace("#", "") : this._tabId(b("a", h)[0]);
        h.addClass("ui-state-default ui-corner-top").data("destroy.tabs", true);
        var q = j.element.find("#" + d);
        q.length || (q = b(n.panelTemplate).attr("id", d).data("destroy.tabs", true));
        q.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
        if (i >= this.lis.length) {
            h.appendTo(this.list);
            q.appendTo(this.list[0].parentNode)
        } else {
            h.insertBefore(this.lis[i]);
            q.insertBefore(this.panels[i])
        }
        n.disabled = b.map(n.disabled, function (l) {
            return l >= i ? ++l : l
        });
        this._tabify();
        if (this.anchors.length == 1) {
            n.selected = 0;
            h.addClass("ui-tabs-selected ui-state-active");
            q.removeClass("ui-tabs-hide");
            this.element.queue("tabs", function () {
                j._trigger("show", null, j._ui(j.anchors[0], j.panels[0]))
            });
            this.load(0)
        }
        this._trigger("add", null, this._ui(this.anchors[i], this.panels[i]));
        return this
    }, remove:function (d) {
        d = this._getIndex(d);
        var h = this.options, i = this.lis.eq(d).remove(), j = this.panels.eq(d).remove();
        if (i.hasClass("ui-tabs-selected") && this.anchors.length > 1)this.select(d + (d + 1 < this.anchors.length ? 1 : -1));
        h.disabled = b.map(b.grep(h.disabled, function (n) {
            return n != d
        }), function (n) {
            return n >= d ? --n : n
        });
        this._tabify();
        this._trigger("remove", null, this._ui(i.find("a")[0], j[0]));
        return this
    }, enable:function (d) {
        d = this._getIndex(d);
        var h = this.options;
        if (b.inArray(d, h.disabled) != -1) {
            this.lis.eq(d).removeClass("ui-state-disabled");
            h.disabled = b.grep(h.disabled, function (i) {
                return i != d
            });
            this._trigger("enable", null,
                this._ui(this.anchors[d], this.panels[d]));
            return this
        }
    }, disable:function (d) {
        d = this._getIndex(d);
        var h = this.options;
        if (d != h.selected) {
            this.lis.eq(d).addClass("ui-state-disabled");
            h.disabled.push(d);
            h.disabled.sort();
            this._trigger("disable", null, this._ui(this.anchors[d], this.panels[d]))
        }
        return this
    }, select:function (d) {
        d = this._getIndex(d);
        if (d == -1)if (this.options.collapsible && this.options.selected != -1)d = this.options.selected; else return this;
        this.anchors.eq(d).trigger(this.options.event + ".tabs");
        return this
    },
        load:function (d) {
            d = this._getIndex(d);
            var h = this, i = this.options, j = this.anchors.eq(d)[0], n = b.data(j, "load.tabs");
            this.abort();
            if (!n || this.element.queue("tabs").length !== 0 && b.data(j, "cache.tabs"))this.element.dequeue("tabs"); else {
                this.lis.eq(d).addClass("ui-state-processing");
                if (i.spinner) {
                    var q = b("span", j);
                    q.data("label.tabs", q.html()).html(i.spinner)
                }
                this.xhr = b.ajax(b.extend({}, i.ajaxOptions, {url:n, success:function (l, k) {
                    h.element.find(h._sanitizeSelector(j.hash)).html(l);
                    h._cleanup();
                    i.cache && b.data(j,
                        "cache.tabs", true);
                    h._trigger("load", null, h._ui(h.anchors[d], h.panels[d]));
                    try {
                        i.ajaxOptions.success(l, k)
                    } catch (m) {
                    }
                }, error:function (l, k) {
                    h._cleanup();
                    h._trigger("load", null, h._ui(h.anchors[d], h.panels[d]));
                    try {
                        i.ajaxOptions.error(l, k, d, j)
                    } catch (m) {
                    }
                }}));
                h.element.dequeue("tabs");
                return this
            }
        }, abort:function () {
            this.element.queue([]);
            this.panels.stop(false, true);
            this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2));
            if (this.xhr) {
                this.xhr.abort();
                delete this.xhr
            }
            this._cleanup();
            return this
        },
        url:function (d, h) {
            this.anchors.eq(d).removeData("cache.tabs").data("load.tabs", h);
            return this
        }, length:function () {
            return this.anchors.length
        }});
    b.extend(b.ui.tabs, {version:"1.8.9"});
    b.extend(b.ui.tabs.prototype, {rotation:null, rotate:function (d, h) {
        var i = this, j = this.options, n = i._rotate || (i._rotate = function (q) {
            clearTimeout(i.rotation);
            i.rotation = setTimeout(function () {
                var l = j.selected;
                i.select(++l < i.anchors.length ? l : 0)
            }, d);
            q && q.stopPropagation()
        });
        h = i._unrotate || (i._unrotate = !h ? function (q) {
            q.clientX &&
            i.rotate(null)
        } : function () {
            t = j.selected;
            n()
        });
        if (d) {
            this.element.bind("tabsshow", n);
            this.anchors.bind(j.event + ".tabs", h);
            n()
        } else {
            clearTimeout(i.rotation);
            this.element.unbind("tabsshow", n);
            this.anchors.unbind(j.event + ".tabs", h);
            delete this._rotate;
            delete this._unrotate
        }
        return this
    }})
})(jQuery);

(function (g, d, e) {
    d.infinitescroll = function (a, c, b) {
        this.element = d(b);
        this._create(a, c)
    };
    d.infinitescroll.defaults = {callback:function () {
    }, debug:!1, behavior:e, binder:d(g), nextSelector:"div.navigation a:first", loadMsgSelector:null, loadingMsgRevealSpeed:"fast", loadingImg:"http://www.infinite-scroll.com/loading.gif", loadingText:"<em>Loading the next set of posts...</em>", loadingStart:e, loadingEnd:e, donetext:"<em>Congratulations, you've reached the end of the internet.</em>", navSelector:"div.navigation",
        contentSelector:null, extraScrollPx:150, itemSelector:"div.post", animate:!1, pathParse:e, dataType:"html", appendCallback:!0, bufferPx:40, orientation:"height", errorCallback:function () {
        }, currPage:1, infid:0, isDuringAjax:!1, isInvalidPage:!1, isDestroyed:!1, isDone:!1, isPaused:!1, pixelsFromNavToBottom:e, pagesLoaded:null, path:e, loadingMsg:e};
    d.infinitescroll.prototype = {_binding:function (a) {
        var c = this, b = c.options;
        if (b.behavior && this["_binding_" + b.behavior] !== e)this["_binding_" + b.behavior].call(this); else {
            if (a !==
                "bind" && a !== "unbind")return this._debug("Binding value  " + a + " not valid"), !1;
            if (a == "unbind")this.options.binder.unbind("smartscroll.infscr." + c.options.infid); else this.options.binder[a]("smartscroll.infscr." + c.options.infid, function () {
                c.scroll()
            });
            this._debug("Binding", a)
        }
    }, _create:function (a, c) {
        if (!this._validate(a))return!1;
        var b = this.options = d.extend({}, d.infinitescroll.defaults, a), e = d(b.nextSelector).attr("href");
        b.contentSelector = b.contentSelector || this.element;
        b.loadMsgSelector = b.loadMsgSelector ||
            b.contentSelector;
        e ? (b.path = this._determinepath(e), b.loadingMsg = d('<div id="infscr-loading"><img alt="Loading..." src="' + b.loadingImg + '" /><div>' + b.loadingText + "</div></div>"), (new Image).src = b.loadingImg, b.pixelsFromNavToBottom = d(document).height() - d(b.navSelector).offset().top, b.loadingStart = b.loadingStart || function () {
            d(b.navSelector).hide();
            b.loadingMsg.appendTo(b.loadMsgSelector).show(b.loadingMsgRevealSpeed, function () {
                beginAjax(b)
            })
        }, b.loadingEnd = b.loadingEnd || function () {
            b.loadingMsg.fadeOut("normal")
        },
            b.callback = c || function () {
            }, this._setup()) : this._debug("Navigation selector not found")
    }, _debug:function () {
        if (this.options.debug)return g.console && console.log.call(console, arguments)
    }, _determinepath:function (a) {
        var c = this.options;
        if (c.behavior && this["_determinepath_" + c.behavior] !== e)this["_determinepath_" + c.behavior].call(this, a); else {
            if (d.isFunction(c.pathParse))return this._debug("pathParse"), [a]; else if (a.match(/^(.*?)\b2\b(.*?$)/))a = a.match(/^(.*?)\b2\b(.*?$)/).slice(1); else if (a.match(/^(.*?)2(.*?$)/)) {
                if (a.match(/^(.*?page=)2(\/.*|$)/))return a =
                    a.match(/^(.*?page=)2(\/.*|$)/).slice(1);
                a = a.match(/^(.*?)2(.*?$)/).slice(1)
            } else if (a.match(/^(.*?page=)1(\/.*|$)/))return a = a.match(/^(.*?page=)1(\/.*|$)/).slice(1); else this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."), c.isInvalidPage = !0;
            this._debug("determinePath", a);
            return a
        }
    }, _error:function (a) {
        var c = this.options;
        c.behavior &&
            this["_error_" + c.behavior] !== e ? this["_error_" + c.behavior].call(this, a) : (a !== "destroy" && a !== "end" && (a = "unknown"), this._debug("Error", a), a == "end" && this._showdonemsg(), c.isDone = !0, c.currPage = 1, c.isPaused = !1, this.binding("unbind"))
    }, _loadcallback:function (a, c) {
        var b = this.options, i = this.options.callback, f = b.isDone ? "done" : !b.appendCallback ? "no-append" : "append";
        if (b.behavior && this["_loadcallback_" + b.behavior] !== e)this["_loadcallback_" + b.behavior].call(this, a, c); else {
            switch (f) {
                case "done":
                    return this._showdonemsg(),
                        !1;
                case "no-append":
                    b.dataType == "html" && (c = d("<div>" + c + "</div>").find(b.itemSelector));
                    break;
                case "append":
                    var h = a.children();
                    if (h.length == 0)return this._error("end");
                    for (f = document.createDocumentFragment(); a[0].firstChild;)f.appendChild(a[0].firstChild);
                    this._debug("contentSelector", d(b.contentSelector)[0]);
                    d(b.contentSelector)[0].appendChild(f);
                    c = h.get()
            }
            b.loadingEnd.call(d(b.contentSelector)[0], b);
            b.animate && (f = d(g).scrollTop() + d("#infscr-loading").height() + b.extraScrollPx + "px", d("html,body").animate({scrollTop:f},
                800, function () {
                    b.isDuringAjax = !1
                }));
            if (!b.animate)b.isDuringAjax = !1;
            i.call(d(b.contentSelector)[0], c)
        }
    }, _nearbottom:function () {
        var a = this.options, c = 0 + d(document).height() - a.binder.scrollTop() - d(g).height();
        if (a.behavior && this["_nearbottom_" + a.behavior] !== e)this["_nearbottom_" + a.behavior].call(this); else return this._debug("math:", c, a.pixelsFromNavToBottom), c - a.bufferPx < a.pixelsFromNavToBottom
    }, _pausing:function (a) {
        var c = this.options;
        if (c.behavior && this["_pausing_" + c.behavior] !== e)this["_pausing_" +
            c.behavior].call(this, a); else {
            a !== "pause" && a !== "resume" && a !== null && this._debug("Invalid argument. Toggling pause value instead");
            switch (a && (a == "pause" || a == "resume") ? a : "toggle") {
                case "pause":
                    c.isPaused = !0;
                    break;
                case "resume":
                    c.isPaused = !1;
                    break;
                case "toggle":
                    c.isPaused = !c.isPaused
            }
            this._debug("Paused", c.isPaused);
            return!1
        }
    }, _setup:function () {
        var a = this.options;
        if (a.behavior && this["_setup_" + a.behavior] !== e)this["_setup_" + a.behavior].call(this); else return this._binding("bind"), !1
    }, _showdonemsg:function () {
        var a =
            this.options;
        a.behavior && this["_showdonemsg_" + a.behavior] !== e ? this["_showdonemsg_" + a.behavior].call(this) : (a.loadingMsg.find("img").hide().parent().find("div").html(a.donetext).animate({opacity:1}, 2E3, function () {
            d(this).parent().fadeOut("normal")
        }), a.errorCallback.call(d(a.contentSelector)[0], "done"))
    }, _validate:function (a) {
        for (var c in a) {
            if (c.indexOf && c.indexOf("Selector") > -1 && d(a[c]).length === 0)return this._debug("Your " + c + " found no elements."), !1;
            return!0
        }
    }, bind:function () {
        this._binding("bind")
    },
        destroy:function () {
            this.options.isDestroyed = !0;
            return this._error("destroy")
        }, pause:function () {
            this._pausing("pause")
        }, resume:function () {
            this._pausing("resume")
        }, retrieve:function (a) {
            var c = this, b = c.options, i = b.path, f, h, g, j, a = a || null;
            beginAjax = function (a) {
                a.currPage++;
                c._debug("heading into ajax", i);
                f = d(a.contentSelector).is("table") ? d("<tbody/>") : d("<div/>");
                h = d.isFunction(a.pathParse) ? a.pathParse(i.join("2"), a.currPage) : i.join(a.currPage);
                g = a.dataType == "html" || a.dataType == "json" ? a.dataType : "html+callback";
                a.appendCallback && a.dataType == "html" && (g += "+callback");
                switch (g) {
                    case "html+callback":
                        c._debug("Using HTML via .load() method");
                        f.load(h + " " + a.itemSelector, null, function (a) {
                            c._loadcallback(f, a)
                        });
                        break;
                    case "html":
                    case "json":
                        c._debug("Using " + g.toUpperCase() + " via $.ajax() method"), d.ajax({url:h, dataType:a.dataType, complete:function (a, b) {
                            (j = typeof a.isResolved !== "undefined" ? a.isResolved() : b === "success" || b === "notmodified") ? c._loadcallback(f, a.responseText) : c._error("end")
                        }})
                }
            };
            if (b.behavior && this["retrieve_" +
                b.behavior] !== e)this["retrieve_" + b.behavior].call(this, a); else {
                if (b.isDestroyed)return this._debug("Instance is destroyed"), !1;
                b.isDuringAjax = !0;
                b.loadingStart.call(d(b.contentSelector)[0], b)
            }
        }, scroll:function () {
            var a = this.options;
            a.behavior && this["scroll_" + a.behavior] !== e ? this["scroll_" + a.behavior].call(this) : !a.isDuringAjax && !a.isInvalidPage && !a.isDone && !a.isDestroyed && !a.isPaused && this._nearbottom() && this.retrieve()
        }, toggle:function () {
            this._pausing()
        }, unbind:function () {
            this._binding("unbind")
        }};
    d.fn.infinitescroll = function (a, c) {
        switch (typeof a) {
            case "string":
                var b = Array.prototype.slice.call(arguments, 1);
                this.each(function () {
                    var c = d.data(this, "infinitescroll");
                    if (!c)return!1;
                    if (!d.isFunction(c[a]) || a.charAt(0) === "_")return!1;
                    c[a].apply(c, b)
                });
                break;
            case "object":
                this.each(function () {
                    d.data(this, "infinitescroll") || d.data(this, "infinitescroll", new d.infinitescroll(a, c, this))
                })
        }
        return this
    };
    var j = d.event, k;
    j.special.smartscroll = {setup:function () {
        d(this).bind("scroll", j.special.smartscroll.handler)
    },
        teardown:function () {
            d(this).unbind("scroll", j.special.smartscroll.handler)
        }, handler:function (a, c) {
            var b = this, d = arguments;
            a.type = "smartscroll";
            k && clearTimeout(k);
            k = setTimeout(function () {
                jQuery.event.handle.apply(b, d)
            }, c === "execAsap" ? 0 : 100)
        }};
    d.fn.smartscroll = function (a) {
        return a ? this.bind("smartscroll", a) : this.trigger("smartscroll", ["execAsap"])
    }
})(window, jQuery);

(function ($) {
    $.fn.tokenField = function (options) {
        var settings = {
            regex:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,
            delimiters:', ',
            max:0,
            nested:false,
            badToken:function () {
                $(this).val('');
            },
            tooMany:function () {
                $(this).val('');
            }
        };

        if (options) $.extend(settings, options);

        function console_log(text) {
            try {
                console.log(text);
            }
            catch (e) {
            }
        }

        function expandTokens(name, tokens) {
            return $.map(tokens,
                function (v) {
                    return tokenHtml(name, v);
                }).join('');
        }

        function inputHtml(name) {
            return "<div class='token-input'><input type='text' size='1'/><span class='token-input-sizer'>###</span></div>";
        }

        function isDelimiter(ch) {
            return String.fromCharCode(ch).match(RegExp('[' + settings.delimiters + ']'));
        }

        function isToken(text) {
            return text.replace(/\s/g, "") != "";
            /*text.match(settings.regex);*/
        }

        function observeTokenField(tokenField) {
            // focus on input when tokenField clicked
            tokenField.click(function () {
                $('.token-input', this).siblings('.selected-token').removeClass('selected-token');
                $('.token-input input', this).focus();
                return false;
            });
            // adjust size as typing occurs and blur when comma or enter pressed (retaining focus for comma)
            $('.token-input input', tokenField)
                .keydown(function (e) {
                    if (e.which == 9 && $(this).val()) {
                        $(this).blur();
                        $(this).focus();
                        return false;
                    } else if (e.which == 8 && !$(this).val() && $('.token-field a').length > 0) {
                        removeToken($('.token-field a > :last').parent());
                        return true;
                    }
                    return true;
                })
                .keypress(function (e) {
                    $(this).next('.token-input-sizer').html($(this).val() + '###');
                    if (e.which == 13 || isDelimiter(e.which)) {
                        $(this).blur();
                        if (isDelimiter(e.which))
                            $(this).focus();
                        return false;
                    }
                    return true;
                })
                // adjust size as typing occurs
                .keyup(function () {
                    $(this).next('.token-input-sizer').html($(this).val() + '###');
                    return true;
                })
                // fix size when focus is returned
                .focus(function () {
                    $(this).next('.token-input-sizer').html($(this).val() + '###');
                    return true;
                })
                // "parse" and insert token, then clear the input field
                .blur(function (e) {
                    if (!$(this).data('blur')) {
                        $(this).data('blur', true);
                        possible_tokens = [];
                        if ($(this).val().indexOf(settings.delimiters) >= 0) {
                            possible_tokens = $(this).val().split(settings.delimiters);
                        } else if ($(this).val().indexOf(",")) {
                            possible_tokens = $(this).val().split(",");
                        } else {
                            possible_tokens = [$(this).val()];
                        }

                        for (i = 0; i < possible_tokens.length; i++) {
                            if (settings.max == 0 || $(this).closest('.token-input').siblings('.token').length < settings.max) {
                                if (isToken(possible_tokens[i])) {
                                    observeToken($(tokenHtml($(this).attr('name'), possible_tokens[i])).insertBefore($(this).closest('.token-input')));
                                    if (!settings.nested) {
                                        var input = $(this).closest('.token-field').find('input:hidden');
                                        var values = input.val().split(',');
                                        values.splice(0, 0, possible_tokens[i]);
                                        input.val(values.join(','));
                                    }

                                } else {
                                    if (settings.badToken) {
                                        this.badToken = settings.badToken;
                                        this.badToken();
                                    }
                                }

                            } else {
                                if (settings.tooMany) {
                                    this.tooMany = settings.tooMany;
                                    this.tooMany();
                                }
                            }
                        }
                        $(this).val('');
                        $(this).removeData('blur');
                    }
                    return true;
                });
            observeToken($('.token', tokenField));
        }

        function observeToken(token) {
            // select token when token clicked
            token.click(function () {
                $(this).focus();
                return false;
            })
                // remove token when selected and delete/backspace is clicked
                .keydown(function (e) {
                    if ($(this).hasClass('selected-token')) {
                        if (e.which == 8) {
                            removeToken($(this));
                            return false;
                        }
                    }
                    return true;
                })
                // unselect when focus is lost
                .blur(function () {
                    $(this).removeClass('selected-token');
                })
                // select when focused
                .focus(function () {
                    $(this).siblings('.selected-token').removeClass('selected-token');
                    $(this).addClass('selected-token');
                });
            // remove token when "x" clicked
            $('.token-x', token).click(function () {
                $(this).closest('.token').siblings('.selected-token').removeClass('selected-token');
                removeToken($(this).closest('.token'));
                return false;
            });
        }

        function parseTokens(text) {
            text = text.replace(/^\s*(.+)\s*$/, '$1');
            if (!text) return [];
            return $.map(text.split(','), function (v) {
                if (isToken(v)) return v;
                console_log('Warning: ignoring bad token - ' + v);
                return null;
            });
        }

        function removeToken(token) {
            if (!settings.nested) {
                var index = token.siblings('.token').andSelf().index(token);
                var input = token.closest('.token-field').find('input:hidden');
                var values = input.val().split(',');
                values.splice(index, 1);
                input.val(values.join(','));
            }
            token.remove();
        }

        function tokenHtml(name, text) {
            return "<a href='#' class='token'><span><span><span><span>"
                + text
                + (settings.nested ? "<input type='hidden' value='" + text + "' name='" + name + "'/>" : "")
                + "<span href='#' class='token-x'>x</span></span></span></span></span></a>";
        }

        return this.each(function () {
            var id = $(this).attr('id');
            var name = $(this).attr('name');
            var klass = $(this).attr('class');
            var style = '';
            var tokens = parseTokens($(this).val());
            if ($(this).height() > 0)
                style = style + 'min-height: ' + $(this).height() + 'px; height: auto !important; height: ' + $(this).height() + 'px;';
            if ($(this).width() > 0)
                style = style + 'width: ' + $(this).width() + 'px;';
            if (settings.max > 0 && tokens.length > settings.max) {
                console_log('Warning: ignoring extra tokens after maximum of ' + settings.max);
                tokens = tokens.slice(0, settings.max);
            }
            var field = $('<div></div>')
                .attr({'class':klass, 'id':id, 'style':style})
                .addClass('token-field')
                .append(expandTokens(name, tokens))
                .append(inputHtml(name))
                .append("<div style='clear:both'></div>")
                .replaceAll(this);
            if (!settings.nested)
                field.prepend("<input type='hidden' value='" + tokens.join(',') + "' name='" + name + "'/>")
            observeTokenField(field);
        });
    };
})(jQuery);


/*
 *	@name							Show Password
 *	@descripton						
 *	@version						1.3
 *	@requires						Jquery 1.5
 *
 *	@author							Jan Jarfalk
 *	@author-email					jan.jarfalk@unwrongest.com
 *	@author-website					http://www.unwrongest.com
 *
 *	@special-thanks					Michel Gratton
 *
 *	@licens							MIT License - http://www.opensource.org/licenses/mit-license.php
 */
(function ($) {
    $.fn.extend({
        showPassword:function (c) {

            // Setup callback object
            var callback = {'fn':null, 'args':{}}
            callback.fn = c;

            // Clones passwords and turn the clones into text inputs
            var cloneElement = function (element) {

                var $element = $(element);

                $clone = $("<input />");

                // Name added for JQuery Validation compatibility
                // Element name is required to avoid script warning.
                $clone.attr({
                    'type':'text',
                    'class':$element.attr('class'),
                    'style':$element.attr('style'),
                    'size':$element.attr('size'),
                    'name':$element.attr('name') + '-clone',
                    'tabindex':$element.attr('tabindex')
                });

                return $clone;

            };

            // Transfers values between two elements
            var update = function (a, b) {
                b.val(a.val());
            };

            // Shows a or b depending on checkbox
            var setState = function (checkbox, a, b) {

                if (checkbox.is(':checked')) {
                    update(a, b);
                    b.show();
                    a.hide();
                } else {
                    update(b, a);
                    b.hide();
                    a.show();
                }

            };

            return this.each(function () {

                var $input = $(this),
                    $checkbox = $($input.data('typetoggle'));

                // Create clone
                var $clone = cloneElement($input);
                $clone.insertAfter($input);

                // Set callback arguments
                if (callback.fn) {
                    callback.args.input = $input;
                    callback.args.checkbox = $checkbox;
                    callback.args.clone = $clone;
                }


                $checkbox.bind('click', function () {
                    setState($checkbox, $input, $clone);
                });

                $input.bind('keyup', function () {
                    update($input, $clone)
                });

                $clone.bind('keyup', function () {
                    update($clone, $input);

                    // Added for JQuery Validation compatibility
                    // This will trigger validation if it's ON for keyup event
                    $input.trigger('keyup');

                });

                // Added for JQuery Validation compatibility
                // This will trigger validation if it's ON for blur event
                $clone.bind('blur', function () {
                    $input.trigger('focusout');
                });

                setState($checkbox, $input, $clone);

                if (callback.fn) {
                    callback.fn(callback.args);
                }

            });
        }
    });
})(jQuery);

if (typeof(ihqs) == "undefined") {
    ihqs = {}
}

ihqs.wysiwyg = function (selector, editor) {
    this.selector = selector;
    this.handler = editor.library;
    this.set = editor.set;
    this.theme = editor.theme;
}

ihqs.wysiwyg.base_uri = '/bundles/zawidawieinfowysiwyg/js';
ihqs.wysiwyg.handlers = {
    markitup:true,
    ckeditor:'/vendor/ckeditor/ckeditor.js'
}

ihqs.wysiwyg.prototype.initHandler = function () {
    try {
        var self = this;

        // veryfing handler existence
        var exists = ihqs.wysiwyg.handlers[this.handler];
        if (!exists) {
            throw new ihqs.wysiwyg.exception('Handler "' + this.handler + '" is not recognized');
        }
        ihqs.wysiwyg.addScript('/wysiwyg/' + this.handler + '.js', function () {
            self.doInitHandler.apply(self);
        });
    }

    catch (e) {
        console.log('[' + e.name + '] ' + e.message);
    }
}

ihqs.wysiwyg.prototype.doInitHandler = function () {
    var editor_handler = ihqs.wysiwyg[this.handler];
    this.editor = new editor_handler(this.set, this.theme);
    this.editor.handle(this.selector);
}

ihqs.wysiwyg.customSettings = null
ihqs.wysiwyg.setSettings = function (settings) {
    ihqs.wysiwyg.customSettings = settings;
}

ihqs.wysiwyg.exception = function (message) {
    this.name = "ihqs - Wysiwyg Exception";
    this.message = message;
}

ihqs.wysiwyg.addStyle = function (uri) {
    var style = document.createElement('link');
    with (style) {
        rel = 'stylesheet';
        type = 'text/css';
        href = ihqs.wysiwyg.base_uri + uri;
    }
    document.body.appendChild(style);
}

ihqs.wysiwyg.addScript = function (uri, callback) {
    var script = document.createElement('script');

    if (script.addEventListener) {
        script.addEventListener("load", callback, false);
    }
    else {
        script.onreadystatechange = function () {
            if (this.readyState == "loaded") {
                callback.call(this);
            }
        }
    }

    with (script) {
        type = 'text/javascript';
        src = ihqs.wysiwyg.base_uri + uri;
    }
    document.body.appendChild(script);
}
ihqs.wysiwyg.ckeditor = function (settings, theme) {
    this.checkDependencies();

    this.processedSettings = {};

    this.settings = settings;
    this.theme = theme;
}

ihqs.wysiwyg.ckeditor.prototype.checkDependencies = function () {

}

ihqs.wysiwyg.ckeditor.prototype.processSettings = function () {
    if (this.settings != "custom") {
        this.processedSettings = (typeof(this.settings) == "string") ? ihqs.wysiwyg.ckeditor.settings[this.settings] : this.settings;
    }
    else {
        this.processedSettings = ihqs.wysiwyg.customSettings;
    }
}

ihqs.wysiwyg.ckeditor.prototype.processTheme = function () {
    if (!this.processedSettings) {
        this.processedSettings = {}
    }
    ;

    this.processedSettings.skin = this.theme;
}

ihqs.wysiwyg.ckeditor.prototype.handle = function (selector) {
    this.selector = selector;

    this.processSettings();
    this.processTheme();

    if ($('textarea.' + this.selector).length > 0) {
        CKEDITOR.replace($('textarea.' + this.selector).get(0), this.processedSettings);
        CKEDITOR.plugins.addExternal('nuitblanche', '/bundles/ihqsnuitblanche/js/ckeditor/plugins/nuitblanche/');
    }
}

ihqs.wysiwyg.ckeditor.settings = {

    "default":{
        filebrowserUploadUrl:'/news/upload',
        toolbar:[
            ['Format', 'Bold', 'Italic', 'Strike', 'Style', 'FontFormat', 'FontName', 'FontSize', 'RemoveFormat', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', '-', 'Image', 'Link', 'Source']
        ]
    },

    "full":{
        toolbar:'Full'
    }
}

/**
 * This file is part of the FOSCommentBundle package.
 *
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

/**
 * To use this reference javascript, you must also have jQuery and jquery.form.js
 * installed.
 *
 * jquery.form.js is available from: http://malsup.com/jquery/form/
 */

$('form.fos_comment_comment_form').live('submit', function () {
    var $form = $(this).addClass('processing').ajaxSubmit({
        success:function (html) {
            $form.closest('div.fos_comment_thread_show').replaceWith(html);
        },
        error:function (xhr, status, error) {
            $form.addClass('error').removeClass('processing');
        }
    });
    return false;
});

$('button.fos_comment_comment_reply_show_form').live('click', function () {
    var $button = $(this);
    var $container = $button.parent().addClass('replying');
    var $reply = $('div.fos_comment_reply_prototype').clone()
        .removeClass('fos_comment_reply_prototype')
        .find('.fos_comment_reply_name_placeholder').text($button.attr('data-name')).end()
        .find('.fos_comment_comment_form').attr('action', $button.attr('data-url')).end()
        .find('.fos_comment_reply_cancel').click(
        function () {
            $reply.remove();
            $container.removeClass('replying');
        }).end()
        .appendTo($container)
        .find('textarea').focus().end();
});

$('button.fos_comment_comment_loadmore_load').live('click', function () {
    var $button = $(this);
    var $container = $button.parent();

    $container.load($button.attr('data-url'));
});

$('button.fos_comment_comment_vote').live('click', function () {
    var $button = $(this);
    var $container = $button.parent();
    var $score = $container.find('.fos_comment_comment_score');

    $.getJSON($button.attr('data-url'), function (data) {
        $score.text(data.score);
    });
});
