(function() {
    var L = this,G,Y = L.jQuery,P = L.$,O = L.jQuery = L.$ = function(e, f) {
        return new O.fn.init(e, f)
    },d = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,F = /^.[^:#\[\.,]*$/;
    O.fn = O.prototype = {init:function(e, h) {
        e = e || document;
        if (e.nodeType) {
            this[0] = e;
            this.length = 1;
            this.context = e;
            return this
        }
        if (typeof e === "string") {
            var g = d.exec(e);
            if (g && (g[1] || !h)) {
                if (g[1]) {
                    e = O.clean([g[1]], h)
                } else {
                    var i = document.getElementById(g[3]);
                    if (i && i.id != g[3]) {
                        return O().find(e)
                    }
                    var f = O(i || []);
                    f.context = document;
                    f.selector = e;
                    return f
                }
            } else {
                return O(h).find(e)
            }
        } else {
            if (O.isFunction(e)) {
                return O(document).ready(e)
            }
        }
        if (e.selector && e.context) {
            this.selector = e.selector;
            this.context = e.context
        }
        return this.setArray(O.makeArray(e))
    },selector:"",jquery:"1.3.1",size:function() {
        return this.length
    },get:function(e) {
        return e === G ? O.makeArray(this) : this[e]
    },pushStack:function(f, h, e) {
        var g = O(f);
        g.prevObject = this;
        g.context = this.context;
        if (h === "find") {
            g.selector = this.selector + (this.selector ? " " : "") + e
        } else {
            if (h) {
                g.selector = this.selector + "." + h + "(" + e + ")"
            }
        }
        return g
    },setArray:function(e) {
        this.length = 0;
        Array.prototype.push.apply(this, e);
        return this
    },each:function(f, e) {
        return O.each(this, f, e)
    },index:function(e) {
        return O.inArray(e && e.jquery ? e[0] : e, this)
    },attr:function(f, h, g) {
        var e = f;
        if (typeof f === "string") {
            if (h === G) {
                return this[0] && O[g || "attr"](this[0], f)
            } else {
                e = {};
                e[f] = h
            }
        }
        return this.each(function(j) {
            for (f in e) {
                O.attr(g ? this.style : this, f, O.prop(this, e[f], g, j, f))
            }
        })
    },css:function(e, f) {
        if ((e == "width" || e == "height") && parseFloat(f) < 0) {
            f = G
        }
        return this.attr(e, f, "curCSS")
    },text:function(f) {
        if (typeof f !== "object" && f != null) {
            return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(f))
        }
        var e = "";
        O.each(f || this, function() {
            O.each(this.childNodes, function() {
                if (this.nodeType != 8) {
                    e += this.nodeType != 1 ? this.nodeValue : O.fn.text([this])
                }
            })
        });
        return e
    },wrapAll:function(e) {
        if (this[0]) {
            var f = O(e, this[0].ownerDocument).clone();
            if (this[0].parentNode) {
                f.insertBefore(this[0])
            }
            f.map(
                    function() {
                        var g = this;
                        while (g.firstChild) {
                            g = g.firstChild
                        }
                        return g
                    }).append(this)
        }
        return this
    },wrapInner:function(e) {
        return this.each(function() {
            O(this).contents().wrapAll(e)
        })
    },wrap:function(e) {
        return this.each(function() {
            O(this).wrapAll(e)
        })
    },append:function() {
        return this.domManip(arguments, true, function(e) {
            if (this.nodeType == 1) {
                this.appendChild(e)
            }
        })
    },prepend:function() {
        return this.domManip(arguments, true, function(e) {
            if (this.nodeType == 1) {
                this.insertBefore(e, this.firstChild)
            }
        })
    },before:function() {
        return this.domManip(arguments, false, function(e) {
            this.parentNode.insertBefore(e, this)
        })
    },after:function() {
        return this.domManip(arguments, false, function(e) {
            this.parentNode.insertBefore(e, this.nextSibling)
        })
    },end:function() {
        return this.prevObject || O([])
    },push:[].push,find:function(e) {
        if (this.length === 1 && !/,/.test(e)) {
            var g = this.pushStack([], "find", e);
            g.length = 0;
            O.find(e, this[0], g);
            return g
        } else {
            var f = O.map(this, function(h) {
                return O.find(e, h)
            });
            return this.pushStack(/[^+>] [^+>]/.test(e) ? O.unique(f) : f, "find", e)
        }
    },clone:function(f) {
        var e = this.map(function() {
            if (!O.support.noCloneEvent && !O.isXMLDoc(this)) {
                var i = this.cloneNode(true),h = document.createElement("div");
                h.appendChild(i);
                return O.clean([h.innerHTML])[0]
            } else {
                return this.cloneNode(true)
            }
        });
        var g = e.find("*").andSelf().each(function() {
            if (this[H] !== G) {
                this[H] = null
            }
        });
        if (f === true) {
            this.find("*").andSelf().each(function(j) {
                if (this.nodeType == 3) {
                    return
                }
                var h = O.data(this, "events");
                for (var l in h) {
                    for (var k in h[l]) {
                        O.event.add(g[j], l, h[l][k], h[l][k].data)
                    }
                }
            })
        }
        return e
    },filter:function(e) {
        return this.pushStack(O.isFunction(e) && O.grep(this, function(g, f) {
            return e.call(g, f)
        }) || O.multiFilter(e, O.grep(this, function(f) {
            return f.nodeType === 1
        })), "filter", e)
    },closest:function(e) {
        var f = O.expr.match.POS.test(e) ? O(e) : null;
        return this.map(function() {
            var g = this;
            while (g && g.ownerDocument) {
                if (f ? f.index(g) > -1 : O(g).is(e)) {
                    return g
                }
                g = g.parentNode
            }
        })
    },not:function(e) {
        if (typeof e === "string") {
            if (F.test(e)) {
                return this.pushStack(O.multiFilter(e, this, true), "not", e)
            } else {
                e = O.multiFilter(e, this)
            }
        }
        var f = e.length && e[e.length - 1] !== G && !e.nodeType;
        return this.filter(function() {
            return f ? O.inArray(this, e) < 0 : this != e
        })
    },add:function(e) {
        return this.pushStack(O.unique(O.merge(this.get(), typeof e === "string" ? O(e) : O.makeArray(e))))
    },is:function(e) {
        return !!e && O.multiFilter(e, this).length > 0
    },hasClass:function(e) {
        return !!e && this.is("." + e)
    },val:function(l) {
        if (l === G) {
            var e = this[0];
            if (e) {
                if (O.nodeName(e, "option")) {
                    return(e.attributes.value || {}).specified ? e.value : e.text
                }
                if (O.nodeName(e, "select")) {
                    var j = e.selectedIndex,m = [],n = e.options,h = e.type == "select-one";
                    if (j < 0) {
                        return null
                    }
                    for (var f = h ? j : 0,k = h ? j + 1 : n.length; f < k; f++) {
                        var g = n[f];
                        if (g.selected) {
                            l = O(g).val();
                            if (h) {
                                return l
                            }
                            m.push(l)
                        }
                    }
                    return m
                }
                return(e.value || "").replace(/\r/g, "")
            }
            return G
        }
        if (typeof l === "number") {
            l += ""
        }
        return this.each(function() {
            if (this.nodeType != 1) {
                return
            }
            if (O.isArray(l) && /radio|checkbox/.test(this.type)) {
                this.checked = (O.inArray(this.value, l) >= 0 || O.inArray(this.name, l) >= 0)
            } else {
                if (O.nodeName(this, "select")) {
                    var i = O.makeArray(l);
                    O("option", this).each(function() {
                        this.selected = (O.inArray(this.value, i) >= 0 || O.inArray(this.text, i) >= 0)
                    });
                    if (!i.length) {
                        this.selectedIndex = -1
                    }
                } else {
                    this.value = l
                }
            }
        })
    },html:function(e) {
        return e === G ? (this[0] ? this[0].innerHTML : null) : this.empty().append(e)
    },replaceWith:function(e) {
        return this.after(e).remove()
    },eq:function(e) {
        return this.slice(e, +e + 1)
    },slice:function() {
        return this.pushStack(Array.prototype.slice.apply(this, arguments), "slice", Array.prototype.slice.call(arguments).join(","))
    },map:function(e) {
        return this.pushStack(O.map(this, function(g, f) {
            return e.call(g, f, g)
        }))
    },andSelf:function() {
        return this.add(this.prevObject)
    },domManip:function(m, p, o) {
        if (this[0]) {
            var k = (this[0].ownerDocument || this[0]).createDocumentFragment(),g = O.clean(m, (this[0].ownerDocument || this[0]), k),j = k.firstChild,e = this.length > 1 ? k.cloneNode(true) : k;
            if (j) {
                for (var h = 0,f = this.length; h < f; h++) {
                    o.call(n(this[h], j), h > 0 ? e.cloneNode(true) : k)
                }
            }
            if (g) {
                O.each(g, Z)
            }
        }
        return this;
        function n(i, l) {
            return p && O.nodeName(i, "table") && O.nodeName(l, "tr") ? (i.getElementsByTagName("tbody")[0] || i.appendChild(i.ownerDocument.createElement("tbody"))) : i
        }
    }};
    O.fn.init.prototype = O.fn;
    function Z(e, f) {
        if (f.src) {
            O.ajax({url:f.src,async:false,dataType:"script"})
        } else {
            O.globalEval(f.text || f.textContent || f.innerHTML || "")
        }
        if (f.parentNode) {
            f.parentNode.removeChild(f)
        }
    }

    function E() {
        return +new Date
    }

    O.extend = O.fn.extend = function() {
        var k = arguments[0] || {},h = 1,j = arguments.length,e = false,g;
        if (typeof k === "boolean") {
            e = k;
            k = arguments[1] || {};
            h = 2
        }
        if (typeof k !== "object" && !O.isFunction(k)) {
            k = {}
        }
        if (j == h) {
            k = this;
            --h
        }
        for (; h < j; h++) {
            if ((g = arguments[h]) != null) {
                for (var f in g) {
                    var l = k[f],m = g[f];
                    if (k === m) {
                        continue
                    }
                    if (e && m && typeof m === "object" && !m.nodeType) {
                        k[f] = O.extend(e, l || (m.length != null ? [] : {}), m)
                    } else {
                        if (m !== G) {
                            k[f] = m
                        }
                    }
                }
            }
        }
        return k
    };
    var B = /z-?index|font-?weight|opacity|zoom|line-?height/i,Q = document.defaultView || {},S = Object.prototype.toString;
    O.extend({noConflict:function(e) {
        L.$ = P;
        if (e) {
            L.jQuery = Y
        }
        return O
    },isFunction:function(e) {
        return S.call(e) === "[object Function]"
    },isArray:function(e) {
        return S.call(e) === "[object Array]"
    },isXMLDoc:function(e) {
        return e.nodeType === 9 && e.documentElement.nodeName !== "HTML" || !!e.ownerDocument && O.isXMLDoc(e.ownerDocument)
    },globalEval:function(g) {
        g = O.trim(g);
        if (g) {
            var f = document.getElementsByTagName("head")[0] || document.documentElement,e = document.createElement("script");
            e.type = "text/javascript";
            if (O.support.scriptEval) {
                e.appendChild(document.createTextNode(g))
            } else {
                e.text = g
            }
            f.insertBefore(e, f.firstChild);
            f.removeChild(e)
        }
    },nodeName:function(f, e) {
        return f.nodeName && f.nodeName.toUpperCase() == e.toUpperCase()
    },each:function(g, l, f) {
        var e,h = 0,j = g.length;
        if (f) {
            if (j === G) {
                for (e in g) {
                    if (l.apply(g[e], f) === false) {
                        break
                    }
                }
            } else {
                for (; h < j;) {
                    if (l.apply(g[h++], f) === false) {
                        break
                    }
                }
            }
        } else {
            if (j === G) {
                for (e in g) {
                    if (l.call(g[e], e, g[e]) === false) {
                        break
                    }
                }
            } else {
                for (var k = g[0]; h < j && l.call(k, h, k) !== false; k = g[++h]) {
                }
            }
        }
        return g
    },prop:function(h, j, g, f, e) {
        if (O.isFunction(j)) {
            j = j.call(h, f)
        }
        return typeof j === "number" && g == "curCSS" && !B.test(e) ? j + "px" : j
    },className:{add:function(e, f) {
        O.each((f || "").split(/\s+/), function(g, h) {
            if (e.nodeType == 1 && !O.className.has(e.className, h)) {
                e.className += (e.className ? " " : "") + h
            }
        })
    },remove:function(e, f) {
        if (e.nodeType == 1) {
            e.className = f !== G ? O.grep(e.className.split(/\s+/),
                    function(g) {
                        return !O.className.has(f, g)
                    }).join(" ") : ""
        }
    },has:function(f, e) {
        return f && O.inArray(e, (f.className || f).toString().split(/\s+/)) > -1
    }},swap:function(h, g, i) {
        var e = {};
        for (var f in g) {
            e[f] = h.style[f];
            h.style[f] = g[f]
        }
        i.call(h);
        for (var f in g) {
            h.style[f] = e[f]
        }
    },css:function(g, e, i) {
        if (e == "width" || e == "height") {
            var k,f = {position:"absolute",visibility:"hidden",display:"block"},j = e == "width" ? ["Left","Right"] : ["Top","Bottom"];

            function h() {
                k = e == "width" ? g.offsetWidth : g.offsetHeight;
                var m = 0,l = 0;
                O.each(j, function() {
                    m += parseFloat(O.curCSS(g, "padding" + this, true)) || 0;
                    l += parseFloat(O.curCSS(g, "border" + this + "Width", true)) || 0
                });
                k -= Math.round(m + l)
            }

            if (O(g).is(":visible")) {
                h()
            } else {
                O.swap(g, f, h)
            }
            return Math.max(0, k)
        }
        return O.curCSS(g, e, i)
    },curCSS:function(i, f, g) {
        var l,e = i.style;
        if (f == "opacity" && !O.support.opacity) {
            l = O.attr(e, "opacity");
            return l == "" ? "1" : l
        }
        if (f.match(/float/i)) {
            f = W
        }
        if (!g && e && e[f]) {
            l = e[f]
        } else {
            if (Q.getComputedStyle) {
                if (f.match(/float/i)) {
                    f = "float"
                }
                f = f.replace(/([A-Z])/g, "-$1").toLowerCase();
                var m = Q.getComputedStyle(i, null);
                if (m) {
                    l = m.getPropertyValue(f)
                }
                if (f == "opacity" && l == "") {
                    l = "1"
                }
            } else {
                if (i.currentStyle) {
                    var j = f.replace(/\-(\w)/g, function(n, o) {
                        return o.toUpperCase()
                    });
                    l = i.currentStyle[f] || i.currentStyle[j];
                    if (!/^\d+(px)?$/i.test(l) && /^\d/.test(l)) {
                        var h = e.left,k = i.runtimeStyle.left;
                        i.runtimeStyle.left = i.currentStyle.left;
                        e.left = l || 0;
                        l = e.pixelLeft + "px";
                        e.left = h;
                        i.runtimeStyle.left = k
                    }
                }
            }
        }
        return l
    },clean:function(f, l, j) {
        l = l || document;
        if (typeof l.createElement === "undefined") {
            l = l.ownerDocument || l[0] && l[0].ownerDocument || document
        }
        if (!j && f.length === 1 && typeof f[0] === "string") {
            var h = /^<(\w+)\s*\/?>$/.exec(f[0]);
            if (h) {
                return[l.createElement(h[1])]
            }
        }
        var g = [],e = [],m = l.createElement("div");
        O.each(f, function(q, s) {
            if (typeof s === "number") {
                s += ""
            }
            if (!s) {
                return
            }
            if (typeof s === "string") {
                s = s.replace(/(<(\w+)[^>]*?)\/>/g, function(t, u, i) {
                    return i.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? t : u + "></" + i + ">"
                });
                var p = O.trim(s).toLowerCase();
                var r = !p.indexOf("<opt") && [1,"<select multiple='multiple'>","</select>"] || !p.indexOf("<leg") && [1,"<fieldset>","</fieldset>"] || p.match(/^<(thead|tbody|tfoot|colg|cap)/) && [1,"<table>","</table>"] || !p.indexOf("<tr") && [2,"<table><tbody>","</tbody></table>"] || (!p.indexOf("<td") || !p.indexOf("<th")) && [3,"<table><tbody><tr>","</tr></tbody></table>"] || !p.indexOf("<col") && [2,"<table><tbody></tbody><colgroup>","</colgroup></table>"] || !O.support.htmlSerialize && [1,"div<div>","</div>"] || [0,"",""];
                m.innerHTML = r[1] + s + r[2];
                while (r[0]--) {
                    m = m.lastChild
                }
                if (!O.support.tbody) {
                    var o = !p.indexOf("<table") && p.indexOf("<tbody") < 0 ? m.firstChild && m.firstChild.childNodes : r[1] == "<table>" && p.indexOf("<tbody") < 0 ? m.childNodes : [];
                    for (var n = o.length - 1; n >= 0; --n) {
                        if (O.nodeName(o[n], "tbody") && !o[n].childNodes.length) {
                            o[n].parentNode.removeChild(o[n])
                        }
                    }
                }
                if (!O.support.leadingWhitespace && /^\s/.test(s)) {
                    m.insertBefore(l.createTextNode(s.match(/^\s*/)[0]), m.firstChild)
                }
                s = O.makeArray(m.childNodes)
            }
            if (s.nodeType) {
                g.push(s)
            } else {
                g = O.merge(g, s)
            }
        });
        if (j) {
            for (var k = 0; g[k]; k++) {
                if (O.nodeName(g[k], "script") && (!g[k].type || g[k].type.toLowerCase() === "text/javascript")) {
                    e.push(g[k].parentNode ? g[k].parentNode.removeChild(g[k]) : g[k])
                } else {
                    if (g[k].nodeType === 1) {
                        g.splice.apply(g, [k + 1,0].concat(O.makeArray(g[k].getElementsByTagName("script"))))
                    }
                    j.appendChild(g[k])
                }
            }
            return e
        }
        return g
    },attr:function(j, g, k) {
        if (!j || j.nodeType == 3 || j.nodeType == 8) {
            return G
        }
        var h = !O.isXMLDoc(j),l = k !== G;
        g = h && O.props[g] || g;
        if (j.tagName) {
            var f = /href|src|style/.test(g);
            if (g == "selected" && j.parentNode) {
                j.parentNode.selectedIndex
            }
            if (g in j && h && !f) {
                if (l) {
                    if (g == "type" && O.nodeName(j, "input") && j.parentNode) {
                        throw"type property can't be changed"
                    }
                    j[g] = k
                }
                if (O.nodeName(j, "form") && j.getAttributeNode(g)) {
                    return j.getAttributeNode(g).nodeValue
                }
                if (g == "tabIndex") {
                    var i = j.getAttributeNode("tabIndex");
                    return i && i.specified ? i.value : j.nodeName.match(/(button|input|object|select|textarea)/i) ? 0 : j.nodeName.match(/^(a|area)$/i) && j.href ? 0 : G
                }
                return j[g]
            }
            if (!O.support.style && h && g == "style") {
                return O.attr(j.style, "cssText", k)
            }
            if (l) {
                j.setAttribute(g, "" + k)
            }
            var e = !O.support.hrefNormalized && h && f ? j.getAttribute(g, 2) : j.getAttribute(g);
            return e === null ? G : e
        }
        if (!O.support.opacity && g == "opacity") {
            if (l) {
                j.zoom = 1;
                j.filter = (j.filter || "").replace(/alpha\([^)]*\)/, "") + (parseInt(k) + "" == "NaN" ? "" : "alpha(opacity=" + k * 100 + ")")
            }
            return j.filter && j.filter.indexOf("opacity=") >= 0 ? (parseFloat(j.filter.match(/opacity=([^)]*)/)[1]) / 100) + "" : ""
        }
        g = g.replace(/-([a-z])/ig, function(m, n) {
            return n.toUpperCase()
        });
        if (l) {
            j[g] = k
        }
        return j[g]
    },trim:function(e) {
        return(e || "").replace(/^\s+|\s+$/g, "")
    },makeArray:function(g) {
        var e = [];
        if (g != null) {
            var f = g.length;
            if (f == null || typeof g === "string" || O.isFunction(g) || g.setInterval) {
                e[0] = g
            } else {
                while (f) {
                    e[--f] = g[f]
                }
            }
        }
        return e
    },inArray:function(g, h) {
        for (var e = 0,f = h.length; e < f; e++) {
            if (h[e] === g) {
                return e
            }
        }
        return -1
    },merge:function(h, e) {
        var f = 0,g,j = h.length;
        if (!O.support.getAll) {
            while ((g = e[f++]) != null) {
                if (g.nodeType != 8) {
                    h[j++] = g
                }
            }
        } else {
            while ((g = e[f++]) != null) {
                h[j++] = g
            }
        }
        return h
    },unique:function(m) {
        var g = [],f = {};
        try {
            for (var h = 0,j = m.length; h < j; h++) {
                var l = O.data(m[h]);
                if (!f[l]) {
                    f[l] = true;
                    g.push(m[h])
                }
            }
        } catch(k) {
            g = m
        }
        return g
    },grep:function(f, k, e) {
        var g = [];
        for (var h = 0,j = f.length; h < j; h++) {
            if (!e != !k(f[h], h)) {
                g.push(f[h])
            }
        }
        return g
    },map:function(e, k) {
        var f = [];
        for (var g = 0,h = e.length; g < h; g++) {
            var j = k(e[g], g);
            if (j != null) {
                f[f.length] = j
            }
        }
        return f.concat.apply([], f)
    }});
    var c = navigator.userAgent.toLowerCase();
    O.browser = {version:(c.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0,"0"])[1],safari:/webkit/.test(c),opera:/opera/.test(c),msie:/msie/.test(c) && !/opera/.test(c),mozilla:/mozilla/.test(c) && !/(compatible|webkit)/.test(c)};
    O.each({parent:function(e) {
        return e.parentNode
    },parents:function(e) {
        return O.dir(e, "parentNode")
    },next:function(e) {
        return O.nth(e, 2, "nextSibling")
    },prev:function(e) {
        return O.nth(e, 2, "previousSibling")
    },nextAll:function(e) {
        return O.dir(e, "nextSibling")
    },prevAll:function(e) {
        return O.dir(e, "previousSibling")
    },siblings:function(e) {
        return O.sibling(e.parentNode.firstChild, e)
    },children:function(e) {
        return O.sibling(e.firstChild)
    },contents:function(e) {
        return O.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : O.makeArray(e.childNodes)
    }}, function(e, f) {
        O.fn[e] = function(g) {
            var h = O.map(this, f);
            if (g && typeof g == "string") {
                h = O.multiFilter(g, h)
            }
            return this.pushStack(O.unique(h), e, g)
        }
    });
    O.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"}, function(e, f) {
        O.fn[e] = function() {
            var g = arguments;
            return this.each(function() {
                for (var h = 0,j = g.length; h < j; h++) {
                    O(g[h])[f](this)
                }
            })
        }
    });
    O.each({removeAttr:function(e) {
        O.attr(this, e, "");
        if (this.nodeType == 1) {
            this.removeAttribute(e)
        }
    },addClass:function(e) {
        O.className.add(this, e)
    },removeClass:function(e) {
        O.className.remove(this, e)
    },toggleClass:function(f, e) {
        if (typeof e !== "boolean") {
            e = !O.className.has(this, f)
        }
        O.className[e ? "add" : "remove"](this, f)
    },remove:function(e) {
        if (!e || O.filter(e, [this]).length) {
            O("*", this).add([this]).each(function() {
                O.event.remove(this);
                O.removeData(this)
            });
            if (this.parentNode) {
                this.parentNode.removeChild(this)
            }
        }
    },empty:function() {
        O(">*", this).remove();
        while (this.firstChild) {
            this.removeChild(this.firstChild)
        }
    }}, function(e, f) {
        O.fn[e] = function() {
            return this.each(f, arguments)
        }
    });
    function J(e, f) {
        return e[0] && parseInt(O.curCSS(e[0], f, true), 10) || 0
    }

    var H = "jQuery" + E(),V = 0,a = {};
    O.extend({cache:{},data:function(f, e, g) {
        f = f == L ? a : f;
        var h = f[H];
        if (!h) {
            h = f[H] = ++V
        }
        if (e && !O.cache[h]) {
            O.cache[h] = {}
        }
        if (g !== G) {
            O.cache[h][e] = g
        }
        return e ? O.cache[h][e] : h
    },removeData:function(g, f) {
        g = g == L ? a : g;
        var i = g[H];
        if (f) {
            if (O.cache[i]) {
                delete O.cache[i][f];
                f = "";
                for (f in O.cache[i]) {
                    break
                }
                if (!f) {
                    O.removeData(g)
                }
            }
        } else {
            try {
                delete g[H]
            } catch(h) {
                if (g.removeAttribute) {
                    g.removeAttribute(H)
                }
            }
            delete O.cache[i]
        }
    },queue:function(f, e, h) {
        if (f) {
            e = (e || "fx") + "queue";
            var g = O.data(f, e);
            if (!g || O.isArray(h)) {
                g = O.data(f, e, O.makeArray(h))
            } else {
                if (h) {
                    g.push(h)
                }
            }
        }
        return g
    },dequeue:function(h, g) {
        var e = O.queue(h, g),f = e.shift();
        if (!g || g === "fx") {
            f = e[0]
        }
        if (f !== G) {
            f.call(h)
        }
    }});
    O.fn.extend({data:function(e, g) {
        var h = e.split(".");
        h[1] = h[1] ? "." + h[1] : "";
        if (g === G) {
            var f = this.triggerHandler("getData" + h[1] + "!", [h[0]]);
            if (f === G && this.length) {
                f = O.data(this[0], e)
            }
            return f === G && h[1] ? this.data(h[0]) : f
        } else {
            return this.trigger("setData" + h[1] + "!", [h[0],g]).each(function() {
                O.data(this, e, g)
            })
        }
    },removeData:function(e) {
        return this.each(function() {
            O.removeData(this, e)
        })
    },queue:function(e, f) {
        if (typeof e !== "string") {
            f = e;
            e = "fx"
        }
        if (f === G) {
            return O.queue(this[0], e)
        }
        return this.each(function() {
            var g = O.queue(this, e, f);
            if (e == "fx" && g.length == 1) {
                g[0].call(this)
            }
        })
    },dequeue:function(e) {
        return this.each(function() {
            O.dequeue(this, e)
        })
    }});
    (function() {
        var r = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,l = 0,h = Object.prototype.toString;
        var g = function(x, t, AA, AB) {
            AA = AA || [];
            t = t || document;
            if (t.nodeType !== 1 && t.nodeType !== 9) {
                return[]
            }
            if (!x || typeof x !== "string") {
                return AA
            }
            var y = [],v,AE,AH,e,AC,u,w = true;
            r.lastIndex = 0;
            while ((v = r.exec(x)) !== null) {
                y.push(v[1]);
                if (v[2]) {
                    u = RegExp.rightContext;
                    break
                }
            }
            if (y.length > 1 && m.exec(x)) {
                if (y.length === 2 && i.relative[y[0]]) {
                    AE = j(y[0] + y[1], t)
                } else {
                    AE = i.relative[y[0]] ? [t] : g(y.shift(), t);
                    while (y.length) {
                        x = y.shift();
                        if (i.relative[x]) {
                            x += y.shift()
                        }
                        AE = j(x, AE)
                    }
                }
            } else {
                var AD = AB ? {expr:y.pop(),set:f(AB)} : g.find(y.pop(), y.length === 1 && t.parentNode ? t.parentNode : t, q(t));
                AE = g.filter(AD.expr, AD.set);
                if (y.length > 0) {
                    AH = f(AE)
                } else {
                    w = false
                }
                while (y.length) {
                    var AG = y.pop(),AF = AG;
                    if (!i.relative[AG]) {
                        AG = ""
                    } else {
                        AF = y.pop()
                    }
                    if (AF == null) {
                        AF = t
                    }
                    i.relative[AG](AH, AF, q(t))
                }
            }
            if (!AH) {
                AH = AE
            }
            if (!AH) {
                throw"Syntax error, unrecognized expression: " + (AG || x)
            }
            if (h.call(AH) === "[object Array]") {
                if (!w) {
                    AA.push.apply(AA, AH)
                } else {
                    if (t.nodeType === 1) {
                        for (var z = 0; AH[z] != null; z++) {
                            if (AH[z] && (AH[z] === true || AH[z].nodeType === 1 && k(t, AH[z]))) {
                                AA.push(AE[z])
                            }
                        }
                    } else {
                        for (var z = 0; AH[z] != null; z++) {
                            if (AH[z] && AH[z].nodeType === 1) {
                                AA.push(AE[z])
                            }
                        }
                    }
                }
            } else {
                f(AH, AA)
            }
            if (u) {
                g(u, t, AA, AB)
            }
            return AA
        };
        g.matches = function(e, t) {
            return g(e, null, null, t)
        };
        g.find = function(z, e, AA) {
            var y,w;
            if (!z) {
                return[]
            }
            for (var v = 0,u = i.order.length; v < u; v++) {
                var x = i.order[v],w;
                if ((w = i.match[x].exec(z))) {
                    var t = RegExp.leftContext;
                    if (t.substr(t.length - 1) !== "\\") {
                        w[1] = (w[1] || "").replace(/\\/g, "");
                        y = i.find[x](w, e, AA);
                        if (y != null) {
                            z = z.replace(i.match[x], "");
                            break
                        }
                    }
                }
            }
            if (!y) {
                y = e.getElementsByTagName("*")
            }
            return{set:y,expr:z}
        };
        g.filter = function(AB, AA, AE, v) {
            var u = AB,AG = [],y = AA,x,e;
            while (AB && AA.length) {
                for (var z in i.filter) {
                    if ((x = i.match[z].exec(AB)) != null) {
                        var t = i.filter[z],AF,AD;
                        e = false;
                        if (y == AG) {
                            AG = []
                        }
                        if (i.preFilter[z]) {
                            x = i.preFilter[z](x, y, AE, AG, v);
                            if (!x) {
                                e = AF = true
                            } else {
                                if (x === true) {
                                    continue
                                }
                            }
                        }
                        if (x) {
                            for (var w = 0; (AD = y[w]) != null; w++) {
                                if (AD) {
                                    AF = t(AD, x, w, y);
                                    var AC = v ^ !!AF;
                                    if (AE && AF != null) {
                                        if (AC) {
                                            e = true
                                        } else {
                                            y[w] = false
                                        }
                                    } else {
                                        if (AC) {
                                            AG.push(AD);
                                            e = true
                                        }
                                    }
                                }
                            }
                        }
                        if (AF !== G) {
                            if (!AE) {
                                y = AG
                            }
                            AB = AB.replace(i.match[z], "");
                            if (!e) {
                                return[]
                            }
                            break
                        }
                    }
                }
                AB = AB.replace(/\s*,\s*/, "");
                if (AB == u) {
                    if (e == null) {
                        throw"Syntax error, unrecognized expression: " + AB
                    } else {
                        break
                    }
                }
                u = AB
            }
            return y
        };
        var i = g.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e) {
            return e.getAttribute("href")
        }},relative:{"+":function(w, t) {
            for (var u = 0,e = w.length; u < e; u++) {
                var v = w[u];
                if (v) {
                    var x = v.previousSibling;
                    while (x && x.nodeType !== 1) {
                        x = x.previousSibling
                    }
                    w[u] = typeof t === "string" ? x || false : x === t
                }
            }
            if (typeof t === "string") {
                g.filter(t, w, true)
            }
        },">":function(x, t, y) {
            if (typeof t === "string" && !/\W/.test(t)) {
                t = y ? t : t.toUpperCase();
                for (var u = 0,e = x.length; u < e; u++) {
                    var w = x[u];
                    if (w) {
                        var v = w.parentNode;
                        x[u] = v.nodeName === t ? v : false
                    }
                }
            } else {
                for (var u = 0,e = x.length; u < e; u++) {
                    var w = x[u];
                    if (w) {
                        x[u] = typeof t === "string" ? w.parentNode : w.parentNode === t
                    }
                }
                if (typeof t === "string") {
                    g.filter(t, x, true)
                }
            }
        },"":function(v, t, x) {
            var u = "done" + (l++),e = s;
            if (!t.match(/\W/)) {
                var w = t = x ? t : t.toUpperCase();
                e = p
            }
            e("parentNode", t, u, v, w, x)
        },"~":function(v, t, x) {
            var u = "done" + (l++),e = s;
            if (typeof t === "string" && !t.match(/\W/)) {
                var w = t = x ? t : t.toUpperCase();
                e = p
            }
            e("previousSibling", t, u, v, w, x)
        }},find:{ID:function(t, u, v) {
            if (typeof u.getElementById !== "undefined" && !v) {
                var e = u.getElementById(t[1]);
                return e ? [e] : []
            }
        },NAME:function(e, t, u) {
            if (typeof t.getElementsByName !== "undefined" && !u) {
                return t.getElementsByName(e[1])
            }
        },TAG:function(e, t) {
            return t.getElementsByTagName(e[1])
        }},preFilter:{CLASS:function(v, t, u, e, y) {
            v = " " + v[1].replace(/\\/g, "") + " ";
            var x;
            for (var w = 0; (x = t[w]) != null; w++) {
                if (x) {
                    if (y ^ (" " + x.className + " ").indexOf(v) >= 0) {
                        if (!u) {
                            e.push(x)
                        }
                    } else {
                        if (u) {
                            t[w] = false
                        }
                    }
                }
            }
            return false
        },ID:function(e) {
            return e[1].replace(/\\/g, "")
        },TAG:function(t, e) {
            for (var u = 0; e[u] === false; u++) {
            }
            return e[u] && q(e[u]) ? t[1] : t[1].toUpperCase()
        },CHILD:function(e) {
            if (e[1] == "nth") {
                var t = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2] == "even" && "2n" || e[2] == "odd" && "2n+1" || !/\D/.test(e[2]) && "0n+" + e[2] || e[2]);
                e[2] = (t[1] + (t[2] || 1)) - 0;
                e[3] = t[3] - 0
            }
            e[0] = "done" + (l++);
            return e
        },ATTR:function(t) {
            var e = t[1].replace(/\\/g, "");
            if (i.attrMap[e]) {
                t[1] = i.attrMap[e]
            }
            if (t[2] === "~=") {
                t[4] = " " + t[4] + " "
            }
            return t
        },PSEUDO:function(w, t, u, e, x) {
            if (w[1] === "not") {
                if (w[3].match(r).length > 1) {
                    w[3] = g(w[3], null, null, t)
                } else {
                    var v = g.filter(w[3], t, u, true ^ x);
                    if (!u) {
                        e.push.apply(e, v)
                    }
                    return false
                }
            } else {
                if (i.match.POS.test(w[0])) {
                    return true
                }
            }
            return w
        },POS:function(e) {
            e.unshift(true);
            return e
        }},filters:{enabled:function(e) {
            return e.disabled === false && e.type !== "hidden"
        },disabled:function(e) {
            return e.disabled === true
        },checked:function(e) {
            return e.checked === true
        },selected:function(e) {
            e.parentNode.selectedIndex;
            return e.selected === true
        },parent:function(e) {
            return !!e.firstChild
        },empty:function(e) {
            return !e.firstChild
        },has:function(u, t, e) {
            return !!g(e[3], u).length
        },header:function(e) {
            return/h\d/i.test(e.nodeName)
        },text:function(e) {
            return"text" === e.type
        },radio:function(e) {
            return"radio" === e.type
        },checkbox:function(e) {
            return"checkbox" === e.type
        },file:function(e) {
            return"file" === e.type
        },password:function(e) {
            return"password" === e.type
        },submit:function(e) {
            return"submit" === e.type
        },image:function(e) {
            return"image" === e.type
        },reset:function(e) {
            return"reset" === e.type
        },button:function(e) {
            return"button" === e.type || e.nodeName.toUpperCase() === "BUTTON"
        },input:function(e) {
            return/input|select|textarea|button/i.test(e.nodeName)
        }},setFilters:{first:function(t, e) {
            return e === 0
        },last:function(u, t, e, v) {
            return t === v.length - 1
        },even:function(t, e) {
            return e % 2 === 0
        },odd:function(t, e) {
            return e % 2 === 1
        },lt:function(u, t, e) {
            return t < e[3] - 0
        },gt:function(u, t, e) {
            return t > e[3] - 0
        },nth:function(u, t, e) {
            return e[3] - 0 == t
        },eq:function(u, t, e) {
            return e[3] - 0 == t
        }},filter:{CHILD:function(e, v) {
            var y = v[1],z = e.parentNode;
            var x = v[0];
            if (z && (!z[x] || !e.nodeIndex)) {
                var w = 1;
                for (var t = z.firstChild; t; t = t.nextSibling) {
                    if (t.nodeType == 1) {
                        t.nodeIndex = w++
                    }
                }
                z[x] = w - 1
            }
            if (y == "first") {
                return e.nodeIndex == 1
            } else {
                if (y == "last") {
                    return e.nodeIndex == z[x]
                } else {
                    if (y == "only") {
                        return z[x] == 1
                    } else {
                        if (y == "nth") {
                            var AB = false,u = v[2],AA = v[3];
                            if (u == 1 && AA == 0) {
                                return true
                            }
                            if (u == 0) {
                                if (e.nodeIndex == AA) {
                                    AB = true
                                }
                            } else {
                                if ((e.nodeIndex - AA) % u == 0 && (e.nodeIndex - AA) / u >= 0) {
                                    AB = true
                                }
                            }
                            return AB
                        }
                    }
                }
            }
        },PSEUDO:function(y, u, v, z) {
            var t = u[1],w = i.filters[t];
            if (w) {
                return w(y, v, u, z)
            } else {
                if (t === "contains") {
                    return(y.textContent || y.innerText || "").indexOf(u[3]) >= 0
                } else {
                    if (t === "not") {
                        var x = u[3];
                        for (var v = 0,e = x.length; v < e; v++) {
                            if (x[v] === y) {
                                return false
                            }
                        }
                        return true
                    }
                }
            }
        },ID:function(t, e) {
            return t.nodeType === 1 && t.getAttribute("id") === e
        },TAG:function(t, e) {
            return(e === "*" && t.nodeType === 1) || t.nodeName === e
        },CLASS:function(t, e) {
            return e.test(t.className)
        },ATTR:function(w, u) {
            var e = i.attrHandle[u[1]] ? i.attrHandle[u[1]](w) : w[u[1]] || w.getAttribute(u[1]),x = e + "",v = u[2],t = u[4];
            return e == null ? v === "!=" : v === "=" ? x === t : v === "*=" ? x.indexOf(t) >= 0 : v === "~=" ? (" " + x + " ").indexOf(t) >= 0 : !u[4] ? e : v === "!=" ? x != t : v === "^=" ? x.indexOf(t) === 0 : v === "$=" ? x.substr(x.length - t.length) === t : v === "|=" ? x === t || x.substr(0, t.length + 1) === t + "-" : false
        },POS:function(w, t, u, x) {
            var e = t[2],v = i.setFilters[e];
            if (v) {
                return v(w, u, t, x)
            }
        }}};
        var m = i.match.POS;
        for (var o in i.match) {
            i.match[o] = RegExp(i.match[o].source + /(?![^\[]*\])(?![^\(]*\))/.source)
        }
        var f = function(t, e) {
            t = Array.prototype.slice.call(t);
            if (e) {
                e.push.apply(e, t);
                return e
            }
            return t
        };
        try {
            Array.prototype.slice.call(document.documentElement.childNodes)
        } catch(n) {
            f = function(w, v) {
                var t = v || [];
                if (h.call(w) === "[object Array]") {
                    Array.prototype.push.apply(t, w)
                } else {
                    if (typeof w.length === "number") {
                        for (var u = 0,e = w.length; u < e; u++) {
                            t.push(w[u])
                        }
                    } else {
                        for (var u = 0; w[u]; u++) {
                            t.push(w[u])
                        }
                    }
                }
                return t
            }
        }
        (function() {
            var t = document.createElement("form"),u = "script" + (new Date).getTime();
            t.innerHTML = "<input name='" + u + "'/>";
            var e = document.documentElement;
            e.insertBefore(t, e.firstChild);
            if (!!document.getElementById(u)) {
                i.find.ID = function(w, x, y) {
                    if (typeof x.getElementById !== "undefined" && !y) {
                        var v = x.getElementById(w[1]);
                        return v ? v.id === w[1] || typeof v.getAttributeNode !== "undefined" && v.getAttributeNode("id").nodeValue === w[1] ? [v] : G : []
                    }
                };
                i.filter.ID = function(x, v) {
                    var w = typeof x.getAttributeNode !== "undefined" && x.getAttributeNode("id");
                    return x.nodeType === 1 && w && w.nodeValue === v
                }
            }
            e.removeChild(t)
        })();
        (function() {
            var e = document.createElement("div");
            e.appendChild(document.createComment(""));
            if (e.getElementsByTagName("*").length > 0) {
                i.find.TAG = function(t, x) {
                    var w = x.getElementsByTagName(t[1]);
                    if (t[1] === "*") {
                        var v = [];
                        for (var u = 0; w[u]; u++) {
                            if (w[u].nodeType === 1) {
                                v.push(w[u])
                            }
                        }
                        w = v
                    }
                    return w
                }
            }
            e.innerHTML = "<a href='#'></a>";
            if (e.firstChild && e.firstChild.getAttribute("href") !== "#") {
                i.attrHandle.href = function(t) {
                    return t.getAttribute("href", 2)
                }
            }
        })();
        if (document.querySelectorAll) {
            (function() {
                var e = g,t = document.createElement("div");
                t.innerHTML = "<p class='TEST'></p>";
                if (t.querySelectorAll && t.querySelectorAll(".TEST").length === 0) {
                    return
                }
                g = function(x, w, u, v) {
                    w = w || document;
                    if (!v && w.nodeType === 9 && !q(w)) {
                        try {
                            return f(w.querySelectorAll(x), u)
                        } catch(y) {
                        }
                    }
                    return e(x, w, u, v)
                };
                g.find = e.find;
                g.filter = e.filter;
                g.selectors = e.selectors;
                g.matches = e.matches
            })()
        }
        if (document.getElementsByClassName && document.documentElement.getElementsByClassName) {
            i.order.splice(1, 0, "CLASS");
            i.find.CLASS = function(e, t) {
                return t.getElementsByClassName(e[1])
            }
        }
        function p(t, z, y, AC, AA, AB) {
            for (var w = 0,u = AC.length; w < u; w++) {
                var e = AC[w];
                if (e) {
                    e = e[t];
                    var x = false;
                    while (e && e.nodeType) {
                        var v = e[y];
                        if (v) {
                            x = AC[v];
                            break
                        }
                        if (e.nodeType === 1 && !AB) {
                            e[y] = w
                        }
                        if (e.nodeName === z) {
                            x = e;
                            break
                        }
                        e = e[t]
                    }
                    AC[w] = x
                }
            }
        }

        function s(t, y, x, AB, z, AA) {
            for (var v = 0,u = AB.length; v < u; v++) {
                var e = AB[v];
                if (e) {
                    e = e[t];
                    var w = false;
                    while (e && e.nodeType) {
                        if (e[x]) {
                            w = AB[e[x]];
                            break
                        }
                        if (e.nodeType === 1) {
                            if (!AA) {
                                e[x] = v
                            }
                            if (typeof y !== "string") {
                                if (e === y) {
                                    w = true;
                                    break
                                }
                            } else {
                                if (g.filter(y, [e]).length > 0) {
                                    w = e;
                                    break
                                }
                            }
                        }
                        e = e[t]
                    }
                    AB[v] = w
                }
            }
        }

        var k = document.compareDocumentPosition ? function(t, e) {
            return t.compareDocumentPosition(e) & 16
        } : function(t, e) {
            return t !== e && (t.contains ? t.contains(e) : true)
        };
        var q = function(e) {
            return e.nodeType === 9 && e.documentElement.nodeName !== "HTML" || !!e.ownerDocument && q(e.ownerDocument)
        };
        var j = function(e, z) {
            var v = [],w = "",x,u = z.nodeType ? [z] : z;
            while ((x = i.match.PSEUDO.exec(e))) {
                w += x[0];
                e = e.replace(i.match.PSEUDO, "")
            }
            e = i.relative[e] ? e + "*" : e;
            for (var y = 0,t = u.length; y < t; y++) {
                g(e, u[y], v)
            }
            return g.filter(w, v)
        };
        O.find = g;
        O.filter = g.filter;
        O.expr = g.selectors;
        O.expr[":"] = O.expr.filters;
        g.selectors.filters.hidden = function(e) {
            return"hidden" === e.type || O.css(e, "display") === "none" || O.css(e, "visibility") === "hidden"
        };
        g.selectors.filters.visible = function(e) {
            return"hidden" !== e.type && O.css(e, "display") !== "none" && O.css(e, "visibility") !== "hidden"
        };
        g.selectors.filters.animated = function(e) {
            return O.grep(O.timers,
                    function(t) {
                        return e === t.elem
                    }).length
        };
        O.multiFilter = function(u, e, t) {
            if (t) {
                u = ":not(" + u + ")"
            }
            return g.matches(u, e)
        };
        O.dir = function(u, t) {
            var e = [],v = u[t];
            while (v && v != document) {
                if (v.nodeType == 1) {
                    e.push(v)
                }
                v = v[t]
            }
            return e
        };
        O.nth = function(w, e, u, v) {
            e = e || 1;
            var t = 0;
            for (; w; w = w[u]) {
                if (w.nodeType == 1 && ++t == e) {
                    break
                }
            }
            return w
        };
        O.sibling = function(u, t) {
            var e = [];
            for (; u; u = u.nextSibling) {
                if (u.nodeType == 1 && u != t) {
                    e.push(u)
                }
            }
            return e
        };
        return;
        L.Sizzle = g
    })();
    O.event = {add:function(i, f, h, k) {
        if (i.nodeType == 3 || i.nodeType == 8) {
            return
        }
        if (i.setInterval && i != L) {
            i = L
        }
        if (!h.guid) {
            h.guid = this.guid++
        }
        if (k !== G) {
            var g = h;
            h = this.proxy(g);
            h.data = k
        }
        var e = O.data(i, "events") || O.data(i, "events", {}),j = O.data(i, "handle") || O.data(i, "handle", function() {
            return typeof O !== "undefined" && !O.event.triggered ? O.event.handle.apply(arguments.callee.elem, arguments) : G
        });
        j.elem = i;
        O.each(f.split(/\s+/), function(m, n) {
            var o = n.split(".");
            n = o.shift();
            h.type = o.slice().sort().join(".");
            var l = e[n];
            if (O.event.specialAll[n]) {
                O.event.specialAll[n].setup.call(i, k, o)
            }
            if (!l) {
                l = e[n] = {};
                if (!O.event.special[n] || O.event.special[n].setup.call(i, k, o) === false) {
                    if (i.addEventListener) {
                        i.addEventListener(n, j, false)
                    } else {
                        if (i.attachEvent) {
                            i.attachEvent("on" + n, j)
                        }
                    }
                }
            }
            l[h.guid] = h;
            O.event.global[n] = true
        });
        i = null
    },guid:1,global:{},remove:function(k, h, j) {
        if (k.nodeType == 3 || k.nodeType == 8) {
            return
        }
        var g = O.data(k, "events"),f,e;
        if (g) {
            if (h === G || (typeof h === "string" && h.charAt(0) == ".")) {
                for (var i in g) {
                    this.remove(k, i + (h || ""))
                }
            } else {
                if (h.type) {
                    j = h.handler;
                    h = h.type
                }
                O.each(h.split(/\s+/), function(m, o) {
                    var q = o.split(".");
                    o = q.shift();
                    var n = RegExp("(^|\\.)" + q.slice().sort().join(".*\\.") + "(\\.|$)");
                    if (g[o]) {
                        if (j) {
                            delete g[o][j.guid]
                        } else {
                            for (var p in g[o]) {
                                if (n.test(g[o][p].type)) {
                                    delete g[o][p]
                                }
                            }
                        }
                        if (O.event.specialAll[o]) {
                            O.event.specialAll[o].teardown.call(k, q)
                        }
                        for (f in g[o]) {
                            break
                        }
                        if (!f) {
                            if (!O.event.special[o] || O.event.special[o].teardown.call(k, q) === false) {
                                if (k.removeEventListener) {
                                    k.removeEventListener(o, O.data(k, "handle"), false)
                                } else {
                                    if (k.detachEvent) {
                                        k.detachEvent("on" + o, O.data(k, "handle"))
                                    }
                                }
                            }
                            f = null;
                            delete g[o]
                        }
                    }
                })
            }
            for (f in g) {
                break
            }
            if (!f) {
                var l = O.data(k, "handle");
                if (l) {
                    l.elem = null
                }
                O.removeData(k, "events");
                O.removeData(k, "handle")
            }
        }
    },trigger:function(j, l, i, f) {
        var h = j.type || j;
        if (!f) {
            j = typeof j === "object" ? j[H] ? j : O.extend(O.Event(h), j) : O.Event(h);
            if (h.indexOf("!") >= 0) {
                j.type = h = h.slice(0, -1);
                j.exclusive = true
            }
            if (!i) {
                j.stopPropagation();
                if (this.global[h]) {
                    O.each(O.cache, function() {
                        if (this.events && this.events[h]) {
                            O.event.trigger(j, l, this.handle.elem)
                        }
                    })
                }
            }
            if (!i || i.nodeType == 3 || i.nodeType == 8) {
                return G
            }
            j.result = G;
            j.target = i;
            l = O.makeArray(l);
            l.unshift(j)
        }
        j.currentTarget = i;
        var k = O.data(i, "handle");
        if (k) {
            k.apply(i, l)
        }
        if ((!i[h] || (O.nodeName(i, "a") && h == "click")) && i["on" + h] && i["on" + h].apply(i, l) === false) {
            j.result = false
        }
        if (!f && i[h] && !j.isDefaultPrevented() && !(O.nodeName(i, "a") && h == "click")) {
            this.triggered = true;
            try {
                i[h]()
            } catch(m) {
            }
        }
        this.triggered = false;
        if (!j.isPropagationStopped()) {
            var g = i.parentNode || i.ownerDocument;
            if (g) {
                O.event.trigger(j, l, g, true)
            }
        }
    },handle:function(l) {
        var k,e;
        l = arguments[0] = O.event.fix(l || L.event);
        var m = l.type.split(".");
        l.type = m.shift();
        k = !m.length && !l.exclusive;
        var i = RegExp("(^|\\.)" + m.slice().sort().join(".*\\.") + "(\\.|$)");
        e = (O.data(this, "events") || {})[l.type];
        for (var g in e) {
            var h = e[g];
            if (k || i.test(h.type)) {
                l.handler = h;
                l.data = h.data;
                var f = h.apply(this, arguments);
                if (f !== G) {
                    l.result = f;
                    if (f === false) {
                        l.preventDefault();
                        l.stopPropagation()
                    }
                }
                if (l.isImmediatePropagationStopped()) {
                    break
                }
            }
        }
    },props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(h) {
        if (h[H]) {
            return h
        }
        var f = h;
        h = O.Event(f);
        for (var g = this.props.length,k; g;) {
            k = this.props[--g];
            h[k] = f[k]
        }
        if (!h.target) {
            h.target = h.srcElement || document
        }
        if (h.target.nodeType == 3) {
            h.target = h.target.parentNode
        }
        if (!h.relatedTarget && h.fromElement) {
            h.relatedTarget = h.fromElement == h.target ? h.toElement : h.fromElement
        }
        if (h.pageX == null && h.clientX != null) {
            var j = document.documentElement,e = document.body;
            h.pageX = h.clientX + (j && j.scrollLeft || e && e.scrollLeft || 0) - (j.clientLeft || 0);
            h.pageY = h.clientY + (j && j.scrollTop || e && e.scrollTop || 0) - (j.clientTop || 0)
        }
        if (!h.which && ((h.charCode || h.charCode === 0) ? h.charCode : h.keyCode)) {
            h.which = h.charCode || h.keyCode
        }
        if (!h.metaKey && h.ctrlKey) {
            h.metaKey = h.ctrlKey
        }
        if (!h.which && h.button) {
            h.which = (h.button & 1 ? 1 : (h.button & 2 ? 3 : (h.button & 4 ? 2 : 0)))
        }
        return h
    },proxy:function(f, e) {
        e = e || function() {
            return f.apply(this, arguments)
        };
        e.guid = f.guid = f.guid || e.guid || this.guid++;
        return e
    },special:{ready:{setup:b,teardown:function() {
    }}},specialAll:{live:{setup:function(e, f) {
        O.event.add(this, f[0], C)
    },teardown:function(g) {
        if (g.length) {
            var e = 0,f = RegExp("(^|\\.)" + g[0] + "(\\.|$)");
            O.each((O.data(this, "events").live || {}), function() {
                if (f.test(this.type)) {
                    e++
                }
            });
            if (e < 1) {
                O.event.remove(this, g[0], C)
            }
        }
    }}}};
    O.Event = function(e) {
        if (!this.preventDefault) {
            return new O.Event(e)
        }
        if (e && e.type) {
            this.originalEvent = e;
            this.type = e.type
        } else {
            this.type = e
        }
        this.timeStamp = E();
        this[H] = true
    };
    function K() {
        return false
    }

    function U() {
        return true
    }

    O.Event.prototype = {preventDefault:function() {
        this.isDefaultPrevented = U;
        var f = this.originalEvent;
        if (!f) {
            return
        }
        if (f.preventDefault) {
            f.preventDefault()
        }
        f.returnValue = false
    },stopPropagation:function() {
        this.isPropagationStopped = U;
        var f = this.originalEvent;
        if (!f) {
            return
        }
        if (f.stopPropagation) {
            f.stopPropagation()
        }
        f.cancelBubble = true
    },stopImmediatePropagation:function() {
        this.isImmediatePropagationStopped = U;
        this.stopPropagation()
    },isDefaultPrevented:K,isPropagationStopped:K,isImmediatePropagationStopped:K};
    var A = function(g) {
        var f = g.relatedTarget;
        while (f && f != this) {
            try {
                f = f.parentNode
            } catch(h) {
                f = this
            }
        }
        if (f != this) {
            g.type = g.data;
            O.event.handle.apply(this, arguments)
        }
    };
    O.each({mouseover:"mouseenter",mouseout:"mouseleave"}, function(f, e) {
        O.event.special[e] = {setup:function() {
            O.event.add(this, f, A, e)
        },teardown:function() {
            O.event.remove(this, f, A)
        }}
    });
    O.fn.extend({bind:function(f, g, e) {
        return f == "unload" ? this.one(f, g, e) : this.each(function() {
            O.event.add(this, f, e || g, e && g)
        })
    },one:function(g, h, f) {
        var e = O.event.proxy(f || h, function(i) {
            O(this).unbind(i, e);
            return(f || h).apply(this, arguments)
        });
        return this.each(function() {
            O.event.add(this, g, e, f && h)
        })
    },unbind:function(f, e) {
        return this.each(function() {
            O.event.remove(this, f, e)
        })
    },trigger:function(e, f) {
        return this.each(function() {
            O.event.trigger(e, f, this)
        })
    },triggerHandler:function(e, g) {
        if (this[0]) {
            var f = O.Event(e);
            f.preventDefault();
            f.stopPropagation();
            O.event.trigger(f, g, this[0]);
            return f.result
        }
    },toggle:function(g) {
        var e = arguments,f = 1;
        while (f < e.length) {
            O.event.proxy(g, e[f++])
        }
        return this.click(O.event.proxy(g, function(h) {
            this.lastToggle = (this.lastToggle || 0) % f;
            h.preventDefault();
            return e[this.lastToggle++].apply(this, arguments) || false
        }))
    },hover:function(e, f) {
        return this.mouseenter(e).mouseleave(f)
    },ready:function(e) {
        b();
        if (O.isReady) {
            e.call(document, O)
        } else {
            O.readyList.push(e)
        }
        return this
    },live:function(g, f) {
        var e = O.event.proxy(f);
        e.guid += this.selector + g;
        O(document).bind(I(g, this.selector), this.selector, e);
        return this
    },die:function(f, e) {
        O(document).unbind(I(f, this.selector), e ? {guid:e.guid + this.selector + f} : null);
        return this
    }});
    function C(h) {
        var e = RegExp("(^|\\.)" + h.type + "(\\.|$)"),g = true,f = [];
        O.each(O.data(this, "events").live || [], function(j, k) {
            if (e.test(k.type)) {
                var l = O(h.target).closest(k.data)[0];
                if (l) {
                    f.push({elem:l,fn:k})
                }
            }
        });
        O.each(f, function() {
            if (this.fn.call(this.elem, h, this.fn.data) === false) {
                g = false
            }
        });
        return g
    }

    function I(f, e) {
        return["live",f,e.replace(/\./g, "`").replace(/ /g, "|")].join(".")
    }

    O.extend({isReady:false,readyList:[],ready:function() {
        if (!O.isReady) {
            O.isReady = true;
            if (O.readyList) {
                O.each(O.readyList, function() {
                    this.call(document, O)
                });
                O.readyList = null
            }
            O(document).triggerHandler("ready")
        }
    }});
    var X = false;

    function b() {
        if (X) {
            return
        }
        X = true;
        if (document.addEventListener) {
            document.addEventListener("DOMContentLoaded", function() {
                document.removeEventListener("DOMContentLoaded", arguments.callee, false);
                O.ready()
            }, false)
        } else {
            if (document.attachEvent) {
                document.attachEvent("onreadystatechange", function() {
                    if (document.readyState === "complete") {
                        document.detachEvent("onreadystatechange", arguments.callee);
                        O.ready()
                    }
                });
                if (document.documentElement.doScroll && typeof L.frameElement === "undefined") {
                    (function() {
                        if (O.isReady) {
                            return
                        }
                        try {
                            document.documentElement.doScroll("left")
                        } catch(e) {
                            setTimeout(arguments.callee, 0);
                            return
                        }
                        O.ready()
                    })()
                }
            }
        }
        O.event.add(L, "load", O.ready)
    }

    O.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","), function(f, e) {
        O.fn[e] = function(g) {
            return g ? this.bind(e, g) : this.trigger(e)
        }
    });
    O(L).bind("unload", function() {
        for (var e in O.cache) {
            if (e != 1 && O.cache[e].handle) {
                O.event.remove(O.cache[e].handle.elem)
            }
        }
    });
    (function() {
        O.support = {};
        var g = document.documentElement,h = document.createElement("script"),l = document.createElement("div"),k = "script" + (new Date).getTime();
        l.style.display = "none";
        l.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
        var i = l.getElementsByTagName("*"),f = l.getElementsByTagName("a")[0];
        if (!i || !i.length || !f) {
            return
        }
        O.support = {leadingWhitespace:l.firstChild.nodeType == 3,tbody:!l.getElementsByTagName("tbody").length,objectAll:!!l.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href") === "/a",opacity:f.style.opacity === "0.5",cssFloat:!!f.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};
        h.type = "text/javascript";
        try {
            h.appendChild(document.createTextNode("window." + k + "=1;"))
        } catch(j) {
        }
        g.insertBefore(h, g.firstChild);
        if (L[k]) {
            O.support.scriptEval = true;
            delete L[k]
        }
        g.removeChild(h);
        if (l.attachEvent && l.fireEvent) {
            l.attachEvent("onclick", function() {
                O.support.noCloneEvent = false;
                l.detachEvent("onclick", arguments.callee)
            });
            l.cloneNode(true).fireEvent("onclick")
        }
        O(function() {
            var e = document.createElement("div");
            e.style.width = "1px";
            e.style.paddingLeft = "1px";
            document.body.appendChild(e);
            O.boxModel = O.support.boxModel = e.offsetWidth === 2;
            document.body.removeChild(e)
        })
    })();
    var W = O.support.cssFloat ? "cssFloat" : "styleFloat";
    O.props = {"for":"htmlFor","class":"className","float":W,cssFloat:W,styleFloat:W,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};
    O.fn.extend({_load:O.fn.load,load:function(g, j, k) {
        if (typeof g !== "string") {
            return this._load(g)
        }
        var i = g.indexOf(" ");
        if (i >= 0) {
            var e = g.slice(i, g.length);
            g = g.slice(0, i)
        }
        var h = "GET";
        if (j) {
            if (O.isFunction(j)) {
                k = j;
                j = null
            } else {
                if (typeof j === "object") {
                    j = O.param(j);
                    h = "POST"
                }
            }
        }
        var f = this;
        O.ajax({url:g,type:h,dataType:"html",data:j,complete:function(m, l) {
            if (l == "success" || l == "notmodified") {
                f.html(e ? O("<div/>").append(m.responseText.replace(/<script(.|\s)*?\/script>/g, "")).find(e) : m.responseText)
            }
            if (k) {
                f.each(k, [m.responseText,l,m])
            }
        }});
        return this
    },serialize:function() {
        return O.param(this.serializeArray())
    },serializeArray:function() {
        return this.map(
                function() {
                    return this.elements ? O.makeArray(this.elements) : this
                }).filter(
                function() {
                    return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password/i.test(this.type))
                }).map(
                function(e, f) {
                    var g = O(this).val();
                    return g == null ? null : O.isArray(g) ? O.map(g, function(j, h) {
                        return{name:f.name,value:j}
                    }) : {name:f.name,value:g}
                }).get()
    }});
    O.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(e, f) {
        O.fn[f] = function(g) {
            return this.bind(f, g)
        }
    });
    var R = E();
    O.extend({get:function(e, g, h, f) {
        if (O.isFunction(g)) {
            h = g;
            g = null
        }
        return O.ajax({type:"GET",url:e,data:g,success:h,dataType:f})
    },getScript:function(e, f) {
        return O.get(e, null, f, "script")
    },getJSON:function(e, f, g) {
        return O.get(e, f, g, "json")
    },post:function(e, g, h, f) {
        if (O.isFunction(g)) {
            h = g;
            g = {}
        }
        return O.ajax({type:"POST",url:e,data:g,success:h,dataType:f})
    },ajaxSetup:function(e) {
        O.extend(O.ajaxSettings, e)
    },ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function() {
        return L.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest()
    },accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(n) {
        n = O.extend(true, n, O.extend(true, {}, O.ajaxSettings, n));
        var y,g = /=\?(&|$)/g,t,x,h = n.type.toUpperCase();
        if (n.data && n.processData && typeof n.data !== "string") {
            n.data = O.param(n.data)
        }
        if (n.dataType == "jsonp") {
            if (h == "GET") {
                if (!n.url.match(g)) {
                    n.url += (n.url.match(/\?/) ? "&" : "?") + (n.jsonp || "callback") + "=?"
                }
            } else {
                if (!n.data || !n.data.match(g)) {
                    n.data = (n.data ? n.data + "&" : "") + (n.jsonp || "callback") + "=?"
                }
            }
            n.dataType = "json"
        }
        if (n.dataType == "json" && (n.data && n.data.match(g) || n.url.match(g))) {
            y = "jsonp" + R++;
            if (n.data) {
                n.data = (n.data + "").replace(g, "=" + y + "$1")
            }
            n.url = n.url.replace(g, "=" + y + "$1");
            n.dataType = "script";
            L[y] = function(s) {
                x = s;
                j();
                m();
                L[y] = G;
                try {
                    delete L[y]
                } catch(z) {
                }
                if (i) {
                    i.removeChild(v)
                }
            }
        }
        if (n.dataType == "script" && n.cache == null) {
            n.cache = false
        }
        if (n.cache === false && h == "GET") {
            var f = E();
            var w = n.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + f + "$2");
            n.url = w + ((w == n.url) ? (n.url.match(/\?/) ? "&" : "?") + "_=" + f : "")
        }
        if (n.data && h == "GET") {
            n.url += (n.url.match(/\?/) ? "&" : "?") + n.data;
            n.data = null
        }
        if (n.global && !O.active++) {
            O.event.trigger("ajaxStart")
        }
        var r = /^(\w+:)?\/\/([^\/?#]+)/.exec(n.url);
        if (n.dataType == "script" && h == "GET" && r && (r[1] && r[1] != location.protocol || r[2] != location.host)) {
            var i = document.getElementsByTagName("head")[0];
            var v = document.createElement("script");
            v.src = n.url;
            if (n.scriptCharset) {
                v.charset = n.scriptCharset
            }
            if (!y) {
                var p = false;
                v.onload = v.onreadystatechange = function() {
                    if (!p && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
                        p = true;
                        j();
                        m();
                        i.removeChild(v)
                    }
                }
            }
            i.appendChild(v);
            return G
        }
        var l = false;
        var k = n.xhr();
        if (n.username) {
            k.open(h, n.url, n.async, n.username, n.password)
        } else {
            k.open(h, n.url, n.async)
        }
        try {
            if (n.data) {
                k.setRequestHeader("Content-Type", n.contentType)
            }
            if (n.ifModified) {
                k.setRequestHeader("If-Modified-Since", O.lastModified[n.url] || "Thu, 01 Jan 1970 00:00:00 GMT")
            }
            k.setRequestHeader("X-Requested-With", "XMLHttpRequest");
            k.setRequestHeader("Accept", n.dataType && n.accepts[n.dataType] ? n.accepts[n.dataType] + ", */*" : n.accepts._default)
        } catch(u) {
        }
        if (n.beforeSend && n.beforeSend(k, n) === false) {
            if (n.global && !--O.active) {
                O.event.trigger("ajaxStop")
            }
            k.abort();
            return false
        }
        if (n.global) {
            O.event.trigger("ajaxSend", [k,n])
        }
        var o = function(s) {
            if (k.readyState == 0) {
                if (q) {
                    clearInterval(q);
                    q = null;
                    if (n.global && !--O.active) {
                        O.event.trigger("ajaxStop")
                    }
                }
            } else {
                if (!l && k && (k.readyState == 4 || s == "timeout")) {
                    l = true;
                    if (q) {
                        clearInterval(q);
                        q = null
                    }
                    t = s == "timeout" ? "timeout" : !O.httpSuccess(k) ? "error" : n.ifModified && O.httpNotModified(k, n.url) ? "notmodified" : "success";
                    if (t == "success") {
                        try {
                            x = O.httpData(k, n.dataType, n)
                        } catch(AA) {
                            t = "parsererror"
                        }
                    }
                    if (t == "success") {
                        var z;
                        try {
                            z = k.getResponseHeader("Last-Modified")
                        } catch(AA) {
                        }
                        if (n.ifModified && z) {
                            O.lastModified[n.url] = z
                        }
                        if (!y) {
                            j()
                        }
                    } else {
                        O.handleError(n, k, t)
                    }
                    m();
                    if (s) {
                        k.abort()
                    }
                    if (n.async) {
                        k = null
                    }
                }
            }
        };
        if (n.async) {
            var q = setInterval(o, 13);
            if (n.timeout > 0) {
                setTimeout(function() {
                    if (k && !l) {
                        o("timeout")
                    }
                }, n.timeout)
            }
        }
        try {
            k.send(n.data)
        } catch(u) {
            O.handleError(n, k, null, u)
        }
        if (!n.async) {
            o()
        }
        function j() {
            if (n.success) {
                n.success(x, t)
            }
            if (n.global) {
                O.event.trigger("ajaxSuccess", [k,n])
            }
        }

        function m() {
            if (n.complete) {
                n.complete(k, t)
            }
            if (n.global) {
                O.event.trigger("ajaxComplete", [k,n])
            }
            if (n.global && !--O.active) {
                O.event.trigger("ajaxStop")
            }
        }

        return k
    },handleError:function(g, i, f, h) {
        if (g.error) {
            g.error(i, f, h)
        }
        if (g.global) {
            O.event.trigger("ajaxError", [i,g,h])
        }
    },active:0,httpSuccess:function(g) {
        try {
            return !g.status && location.protocol == "file:" || (g.status >= 200 && g.status < 300) || g.status == 304 || g.status == 1223
        } catch(f) {
        }
        return false
    },httpNotModified:function(h, f) {
        try {
            var i = h.getResponseHeader("Last-Modified");
            return h.status == 304 || i == O.lastModified[f]
        } catch(g) {
        }
        return false
    },httpData:function(j, h, g) {
        var f = j.getResponseHeader("content-type"),e = h == "xml" || !h && f && f.indexOf("xml") >= 0,i = e ? j.responseXML : j.responseText;
        if (e && i.documentElement.tagName == "parsererror") {
            throw"parsererror"
        }
        if (g && g.dataFilter) {
            i = g.dataFilter(i, h)
        }
        if (typeof i === "string") {
            if (h == "script") {
                O.globalEval(i)
            }
            if (h == "json") {
                i = L["eval"]("(" + i + ")")
            }
        }
        return i
    },param:function(e) {
        var g = [];

        function h(i, j) {
            g[g.length] = encodeURIComponent(i) + "=" + encodeURIComponent(j)
        }

        if (O.isArray(e) || e.jquery) {
            O.each(e, function() {
                h(this.name, this.value)
            })
        } else {
            for (var f in e) {
                if (O.isArray(e[f])) {
                    O.each(e[f], function() {
                        h(f, this)
                    })
                } else {
                    h(f, O.isFunction(e[f]) ? e[f]() : e[f])
                }
            }
        }
        return g.join("&").replace(/%20/g, "+")
    }});
    var M = {},N,D = [
        ["height","marginTop","marginBottom","paddingTop","paddingBottom"],
        ["width","marginLeft","marginRight","paddingLeft","paddingRight"],
        ["opacity"]
    ];

    function T(f, e) {
        var g = {};
        O.each(D.concat.apply([], D.slice(0, e)), function() {
            g[this] = f
        });
        return g
    }

    O.fn.extend({show:function(k, n) {
        if (k) {
            return this.animate(T("show", 3), k, n)
        } else {
            for (var h = 0,f = this.length; h < f; h++) {
                var e = O.data(this[h], "olddisplay");
                this[h].style.display = e || "";
                if (O.css(this[h], "display") === "none") {
                    var g = this[h].tagName,m;
                    if (M[g]) {
                        m = M[g]
                    } else {
                        var j = O("<" + g + " />").appendTo("body");
                        m = j.css("display");
                        if (m === "none") {
                            m = "block"
                        }
                        j.remove();
                        M[g] = m
                    }
                    this[h].style.display = O.data(this[h], "olddisplay", m)
                }
            }
            return this
        }
    },hide:function(h, j) {
        if (h) {
            return this.animate(T("hide", 3), h, j)
        } else {
            for (var g = 0,f = this.length; g < f; g++) {
                var e = O.data(this[g], "olddisplay");
                if (!e && e !== "none") {
                    O.data(this[g], "olddisplay", O.css(this[g], "display"))
                }
                this[g].style.display = "none"
            }
            return this
        }
    },_toggle:O.fn.toggle,toggle:function(g, f) {
        var e = typeof g === "boolean";
        return O.isFunction(g) && O.isFunction(f) ? this._toggle.apply(this, arguments) : g == null || e ? this.each(function() {
            var h = e ? g : O(this).is(":hidden");
            O(this)[h ? "show" : "hide"]()
        }) : this.animate(T("toggle", 3), g, f)
    },fadeTo:function(e, g, f) {
        return this.animate({opacity:g}, e, f)
    },animate:function(i, f, h, g) {
        var e = O.speed(f, h, g);
        return this[e.queue === false ? "each" : "queue"](function() {
            var k = O.extend({}, e),m,l = this.nodeType == 1 && O(this).is(":hidden"),j = this;
            for (m in i) {
                if (i[m] == "hide" && l || i[m] == "show" && !l) {
                    return k.complete.call(this)
                }
                if ((m == "height" || m == "width") && this.style) {
                    k.display = O.css(this, "display");
                    k.overflow = this.style.overflow
                }
            }
            if (k.overflow != null) {
                this.style.overflow = "hidden"
            }
            k.curAnim = O.extend({}, i);
            O.each(i, function(o, s) {
                var r = new O.fx(j, k, o);
                if (/toggle|show|hide/.test(s)) {
                    r[s == "toggle" ? l ? "show" : "hide" : s](i)
                } else {
                    var q = s.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),t = r.cur(true) || 0;
                    if (q) {
                        var n = parseFloat(q[2]),p = q[3] || "px";
                        if (p != "px") {
                            j.style[o] = (n || 1) + p;
                            t = ((n || 1) / r.cur(true)) * t;
                            j.style[o] = t + p
                        }
                        if (q[1]) {
                            n = ((q[1] == "-=" ? -1 : 1) * n) + t
                        }
                        r.custom(t, n, p)
                    } else {
                        r.custom(t, s, "")
                    }
                }
            });
            return true
        })
    },stop:function(f, e) {
        var g = O.timers;
        if (f) {
            this.queue([])
        }
        this.each(function() {
            for (var h = g.length - 1; h >= 0; h--) {
                if (g[h].elem == this) {
                    if (e) {
                        g[h](true)
                    }
                    g.splice(h, 1)
                }
            }
        });
        if (!e) {
            this.dequeue()
        }
        return this
    }});
    O.each({slideDown:T("show", 1),slideUp:T("hide", 1),slideToggle:T("toggle", 1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}}, function(e, f) {
        O.fn[e] = function(g, h) {
            return this.animate(f, g, h)
        }
    });
    O.extend({speed:function(g, h, f) {
        var e = typeof g === "object" ? g : {complete:f || !f && h || O.isFunction(g) && g,duration:g,easing:f && h || h && !O.isFunction(h) && h};
        e.duration = O.fx.off ? 0 : typeof e.duration === "number" ? e.duration : O.fx.speeds[e.duration] || O.fx.speeds._default;
        e.old = e.complete;
        e.complete = function() {
            if (e.queue !== false) {
                O(this).dequeue()
            }
            if (O.isFunction(e.old)) {
                e.old.call(this)
            }
        };
        return e
    },easing:{linear:function(g, h, e, f) {
        return e + f * g
    },swing:function(g, h, e, f) {
        return((-Math.cos(g * Math.PI) / 2) + 0.5) * f + e
    }},timers:[],fx:function(f, e, g) {
        this.options = e;
        this.elem = f;
        this.prop = g;
        if (!e.orig) {
            e.orig = {}
        }
    }});
    O.fx.prototype = {update:function() {
        if (this.options.step) {
            this.options.step.call(this.elem, this.now, this)
        }
        (O.fx.step[this.prop] || O.fx.step._default)(this);
        if ((this.prop == "height" || this.prop == "width") && this.elem.style) {
            this.elem.style.display = "block"
        }
    },cur:function(f) {
        if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) {
            return this.elem[this.prop]
        }
        var e = parseFloat(O.css(this.elem, this.prop, f));
        return e && e > -10000 ? e : parseFloat(O.curCSS(this.elem, this.prop)) || 0
    },custom:function(i, h, g) {
        this.startTime = E();
        this.start = i;
        this.end = h;
        this.unit = g || this.unit || "px";
        this.now = this.start;
        this.pos = this.state = 0;
        var e = this;

        function f(j) {
            return e.step(j)
        }

        f.elem = this.elem;
        if (f() && O.timers.push(f) == 1) {
            N = setInterval(function() {
                var k = O.timers;
                for (var j = 0; j < k.length; j++) {
                    if (!k[j]()) {
                        k.splice(j--, 1)
                    }
                }
                if (!k.length) {
                    clearInterval(N)
                }
            }, 13)
        }
    },show:function() {
        this.options.orig[this.prop] = O.attr(this.elem.style, this.prop);
        this.options.show = true;
        this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
        O(this.elem).show()
    },hide:function() {
        this.options.orig[this.prop] = O.attr(this.elem.style, this.prop);
        this.options.hide = true;
        this.custom(this.cur(), 0)
    },step:function(h) {
        var g = E();
        if (h || g >= this.options.duration + this.startTime) {
            this.now = this.end;
            this.pos = this.state = 1;
            this.update();
            this.options.curAnim[this.prop] = true;
            var e = true;
            for (var f in this.options.curAnim) {
                if (this.options.curAnim[f] !== true) {
                    e = false
                }
            }
            if (e) {
                if (this.options.display != null) {
                    this.elem.style.overflow = this.options.overflow;
                    this.elem.style.display = this.options.display;
                    if (O.css(this.elem, "display") == "none") {
                        this.elem.style.display = "block"
                    }
                }
                if (this.options.hide) {
                    O(this.elem).hide()
                }
                if (this.options.hide || this.options.show) {
                    for (var j in this.options.curAnim) {
                        O.attr(this.elem.style, j, this.options.orig[j])
                    }
                }
                this.options.complete.call(this.elem)
            }
            return false
        } else {
            var k = g - this.startTime;
            this.state = k / this.options.duration;
            this.pos = O.easing[this.options.easing || (O.easing.swing ? "swing" : "linear")](this.state, k, 0, 1, this.options.duration);
            this.now = this.start + ((this.end - this.start) * this.pos);
            this.update()
        }
        return true
    }};
    O.extend(O.fx, {speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e) {
        O.attr(e.elem.style, "opacity", e.now)
    },_default:function(e) {
        if (e.elem.style && e.elem.style[e.prop] != null) {
            e.elem.style[e.prop] = e.now + e.unit
        } else {
            e.elem[e.prop] = e.now
        }
    }}});
    if (document.documentElement["getBoundingClientRect"]) {
        O.fn.offset = function() {
            if (!this[0]) {
                return{top:0,left:0}
            }
            if (this[0] === this[0].ownerDocument.body) {
                return O.offset.bodyOffset(this[0])
            }
            var g = this[0].getBoundingClientRect(),j = this[0].ownerDocument,f = j.body,e = j.documentElement,l = e.clientTop || f.clientTop || 0,k = e.clientLeft || f.clientLeft || 0,i = g.top + (self.pageYOffset || O.boxModel && e.scrollTop || f.scrollTop) - l,h = g.left + (self.pageXOffset || O.boxModel && e.scrollLeft || f.scrollLeft) - k;
            return{top:i,left:h}
        }
    } else {
        O.fn.offset = function() {
            if (!this[0]) {
                return{top:0,left:0}
            }
            if (this[0] === this[0].ownerDocument.body) {
                return O.offset.bodyOffset(this[0])
            }
            O.offset.initialized || O.offset.initialize();
            var j = this[0],g = j.offsetParent,f = j,o = j.ownerDocument,m,h = o.documentElement,k = o.body,l = o.defaultView,e = l.getComputedStyle(j, null),n = j.offsetTop,i = j.offsetLeft;
            while ((j = j.parentNode) && j !== k && j !== h) {
                m = l.getComputedStyle(j, null);
                n -= j.scrollTop,i -= j.scrollLeft;
                if (j === g) {
                    n += j.offsetTop,i += j.offsetLeft;
                    if (O.offset.doesNotAddBorder && !(O.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(j.tagName))) {
                        n += parseInt(m.borderTopWidth, 10) || 0,i += parseInt(m.borderLeftWidth, 10) || 0
                    }
                    f = g,g = j.offsetParent
                }
                if (O.offset.subtractsBorderForOverflowNotVisible && m.overflow !== "visible") {
                    n += parseInt(m.borderTopWidth, 10) || 0,i += parseInt(m.borderLeftWidth, 10) || 0
                }
                e = m
            }
            if (e.position === "relative" || e.position === "static") {
                n += k.offsetTop,i += k.offsetLeft
            }
            if (e.position === "fixed") {
                n += Math.max(h.scrollTop, k.scrollTop),i += Math.max(h.scrollLeft, k.scrollLeft)
            }
            return{top:n,left:i}
        }
    }
    O.offset = {initialize:function() {
        if (this.initialized) {
            return
        }
        var l = document.body,f = document.createElement("div"),h,g,n,i,m,e,j = l.style.marginTop,k = '<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>';
        m = {position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};
        for (e in m) {
            f.style[e] = m[e]
        }
        f.innerHTML = k;
        l.insertBefore(f, l.firstChild);
        h = f.firstChild,g = h.firstChild,i = h.nextSibling.firstChild.firstChild;
        this.doesNotAddBorder = (g.offsetTop !== 5);
        this.doesAddBorderForTableAndCells = (i.offsetTop === 5);
        h.style.overflow = "hidden",h.style.position = "relative";
        this.subtractsBorderForOverflowNotVisible = (g.offsetTop === -5);
        l.style.marginTop = "1px";
        this.doesNotIncludeMarginInBodyOffset = (l.offsetTop === 0);
        l.style.marginTop = j;
        l.removeChild(f);
        this.initialized = true
    },bodyOffset:function(e) {
        O.offset.initialized || O.offset.initialize();
        var g = e.offsetTop,f = e.offsetLeft;
        if (O.offset.doesNotIncludeMarginInBodyOffset) {
            g += parseInt(O.curCSS(e, "marginTop", true), 10) || 0,f += parseInt(O.curCSS(e, "marginLeft", true), 10) || 0
        }
        return{top:g,left:f}
    }};
    O.fn.extend({position:function() {
        var i = 0,h = 0,f;
        if (this[0]) {
            var g = this.offsetParent(),j = this.offset(),e = /^body|html$/i.test(g[0].tagName) ? {top:0,left:0} : g.offset();
            j.top -= J(this, "marginTop");
            j.left -= J(this, "marginLeft");
            e.top += J(g, "borderTopWidth");
            e.left += J(g, "borderLeftWidth");
            f = {top:j.top - e.top,left:j.left - e.left}
        }
        return f
    },offsetParent:function() {
        var e = this[0].offsetParent || document.body;
        while (e && (!/^body|html$/i.test(e.tagName) && O.css(e, "position") == "static")) {
            e = e.offsetParent
        }
        return O(e)
    }});
    O.each(["Left","Top"], function(f, e) {
        var g = "scroll" + e;
        O.fn[g] = function(h) {
            if (!this[0]) {
                return null
            }
            return h !== G ? this.each(function() {
                this == L || this == document ? L.scrollTo(!f ? h : O(L).scrollLeft(), f ? h : O(L).scrollTop()) : this[g] = h
            }) : this[0] == L || this[0] == document ? self[f ? "pageYOffset" : "pageXOffset"] || O.boxModel && document.documentElement[g] || document.body[g] : this[0][g]
        }
    });
    O.each(["Height","Width"], function(h, f) {
        var e = h ? "Left" : "Top",g = h ? "Right" : "Bottom";
        O.fn["inner" + f] = function() {
            return this[f.toLowerCase()]() + J(this, "padding" + e) + J(this, "padding" + g)
        };
        O.fn["outer" + f] = function(i) {
            return this["inner" + f]() + J(this, "border" + e + "Width") + J(this, "border" + g + "Width") + (i ? J(this, "margin" + e) + J(this, "margin" + g) : 0)
        };
        var j = f.toLowerCase();
        O.fn[j] = function(i) {
            return this[0] == L ? document.compatMode == "CSS1Compat" && document.documentElement["client" + f] || document.body["client" + f] : this[0] == document ? Math.max(document.documentElement["client" + f], document.body["scroll" + f], document.documentElement["scroll" + f], document.body["offset" + f], document.documentElement["offset" + f]) : i === G ? (this.length ? O.css(this[0], j) : null) : this.css(j, typeof i === "string" ? i : i + "px")
        }
    })
})();
(function(C) {
    var I = C.fn.remove,D = C.browser.mozilla && (parseFloat(C.browser.version) < 1.9);
    C.ui = {version:"1.6rc6",plugin:{add:function(K, L, N) {
        var M = C.ui[K].prototype;
        for (var J in N) {
            M.plugins[J] = M.plugins[J] || [];
            M.plugins[J].push([L,N[J]])
        }
    },call:function(J, L, K) {
        var N = J.plugins[L];
        if (!N) {
            return
        }
        for (var M = 0; M < N.length; M++) {
            if (J.options[N[M][0]]) {
                N[M][1].apply(J.element, K)
            }
        }
    }},contains:function(K, J) {
        return document.compareDocumentPosition ? K.compareDocumentPosition(J) & 16 : K !== J && K.contains(J)
    },cssCache:{},css:function(J) {
        if (C.ui.cssCache[J]) {
            return C.ui.cssCache[J]
        }
        var K = C('<div class="ui-gen"></div>').addClass(J).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");
        C.ui.cssCache[J] = !!((!(/auto|default/).test(K.css("cursor")) || (/^[1-9]/).test(K.css("height")) || (/^[1-9]/).test(K.css("width")) || !(/none/).test(K.css("backgroundImage")) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(K.css("backgroundColor"))));
        try {
            C("body").get(0).removeChild(K.get(0))
        } catch(L) {
        }
        return C.ui.cssCache[J]
    },hasScroll:function(M, K) {
        if (C(M).css("overflow") == "hidden") {
            return false
        }
        var J = (K && K == "left") ? "scrollLeft" : "scrollTop",L = false;
        if (M[J] > 0) {
            return true
        }
        M[J] = 1;
        L = (M[J] > 0);
        M[J] = 0;
        return L
    },isOverAxis:function(K, J, L) {
        return(K > J) && (K < (J + L))
    },isOver:function(O, K, N, M, J, L) {
        return C.ui.isOverAxis(O, N, J) && C.ui.isOverAxis(K, M, L)
    },keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};
    if (D) {
        var F = C.attr,E = C.fn.removeAttr,H = "http://www.w3.org/2005/07/aaa",A = /^aria-/,B = /^wairole:/;
        C.attr = function(K, J, L) {
            var M = L !== undefined;
            return(J == "role" ? (M ? F.call(this, K, J, "wairole:" + L) : (F.apply(this, arguments) || "").replace(B, "")) : (A.test(J) ? (M ? K.setAttributeNS(H, J.replace(A, "aaa:"), L) : F.call(this, K, J.replace(A, "aaa:"))) : F.apply(this, arguments)))
        };
        C.fn.removeAttr = function(J) {
            return(A.test(J) ? this.each(function() {
                this.removeAttributeNS(H, J.replace(A, ""))
            }) : E.call(this, J))
        }
    }
    C.fn.extend({remove:function() {
        C("*", this).add(this).each(function() {
            C(this).triggerHandler("remove")
        });
        return I.apply(this, arguments)
    },enableSelection:function() {
        return this.attr("unselectable", "off").css("MozUserSelect", "").unbind("selectstart.ui")
    },disableSelection:function() {
        return this.attr("unselectable", "on").css("MozUserSelect", "none").bind("selectstart.ui", function() {
            return false
        })
    },scrollParent:function() {
        var J;
        if ((C.browser.msie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
            J = this.parents().filter(
                    function() {
                        return(/(relative|absolute|fixed)/).test(C.curCSS(this, "position", 1)) && (/(auto|scroll)/).test(C.curCSS(this, "overflow", 1) + C.curCSS(this, "overflow-y", 1) + C.curCSS(this, "overflow-x", 1))
                    }).eq(0)
        } else {
            J = this.parents().filter(
                    function() {
                        return(/(auto|scroll)/).test(C.curCSS(this, "overflow", 1) + C.curCSS(this, "overflow-y", 1) + C.curCSS(this, "overflow-x", 1))
                    }).eq(0)
        }
        return(/fixed/).test(this.css("position")) || !J.length ? C(document) : J
    }});
    C.extend(C.expr[":"], {data:function(L, K, J) {
        return !!C.data(L, J[3])
    },focusable:function(K) {
        var L = K.nodeName.toLowerCase(),J = C.attr(K, "tabindex");
        return(/input|select|textarea|button|object/.test(L) ? !K.disabled : "a" == L || "area" == L ? K.href || !isNaN(J) : !isNaN(J)) && !C(K)["area" == L ? "parents" : "closest"](":hidden").length
    },tabbable:function(K) {
        var J = C.attr(K, "tabindex");
        return(isNaN(J) || J >= 0) && C(K).is(":focusable")
    }});
    function G(M, N, O, L) {
        function K(Q) {
            var P = C[M][N][Q] || [];
            return(typeof P == "string" ? P.split(/,?\s+/) : P)
        }

        var J = K("getter");
        if (L.length == 1 && typeof L[0] == "string") {
            J = J.concat(K("getterSetter"))
        }
        return(C.inArray(O, J) != -1)
    }

    C.widget = function(K, J) {
        var L = K.split(".")[0];
        K = K.split(".")[1];
        C.fn[K] = function(P) {
            var N = (typeof P == "string"),O = Array.prototype.slice.call(arguments, 1);
            if (N && P.substring(0, 1) == "_") {
                return this
            }
            if (N && G(L, K, P, O)) {
                var M = C.data(this[0], K);
                return(M ? M[P].apply(M, O) : undefined)
            }
            return this.each(function() {
                var Q = C.data(this, K);
                (!Q && !N && C.data(this, K, new C[L][K](this, P))._init());
                (Q && N && C.isFunction(Q[P]) && Q[P].apply(Q, O))
            })
        };
        C[L] = C[L] || {};
        C[L][K] = function(O, N) {
            var M = this;
            this.namespace = L;
            this.widgetName = K;
            this.widgetEventPrefix = C[L][K].eventPrefix || K;
            this.widgetBaseClass = L + "-" + K;
            this.options = C.extend({}, C.widget.defaults, C[L][K].defaults, C.metadata && C.metadata.get(O)[K], N);
            this.element = C(O).bind("setData." + K,
                    function(Q, P, R) {
                        if (Q.target == O) {
                            return M._setData(P, R)
                        }
                    }).bind("getData." + K,
                    function(Q, P) {
                        if (Q.target == O) {
                            return M._getData(P)
                        }
                    }).bind("remove", function() {
                return M.destroy()
            })
        };
        C[L][K].prototype = C.extend({}, C.widget.prototype, J);
        C[L][K].getterSetter = "option"
    };
    C.widget.prototype = {_init:function() {
    },destroy:function() {
        this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass + "-disabled " + this.namespace + "-state-disabled").removeAttr("aria-disabled")
    },option:function(L, M) {
        var K = L,J = this;
        if (typeof L == "string") {
            if (M === undefined) {
                return this._getData(L)
            }
            K = {};
            K[L] = M
        }
        C.each(K, function(N, O) {
            J._setData(N, O)
        })
    },_getData:function(J) {
        return this.options[J]
    },_setData:function(J, K) {
        this.options[J] = K;
        if (J == "disabled") {
            this.element[K ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled " + this.namespace + "-state-disabled").attr("aria-disabled", K)
        }
    },enable:function() {
        this._setData("disabled", false)
    },disable:function() {
        this._setData("disabled", true)
    },_trigger:function(L, M, N) {
        var P = this.options[L],J = (L == this.widgetEventPrefix ? L : this.widgetEventPrefix + L);
        M = C.Event(M);
        M.type = J;
        if (M.originalEvent) {
            for (var K = C.event.props.length,O; K;) {
                O = C.event.props[--K];
                M[O] = M.originalEvent[O]
            }
        }
        this.element.trigger(M, N);
        return !(C.isFunction(P) && P.call(this.element[0], M, N) === false || M.isDefaultPrevented())
    }};
    C.widget.defaults = {disabled:false};
    C.ui.mouse = {_mouseInit:function() {
        var J = this;
        this.element.bind("mousedown." + this.widgetName,
                function(K) {
                    return J._mouseDown(K)
                }).bind("click." + this.widgetName, function(K) {
            if (J._preventClickEvent) {
                J._preventClickEvent = false;
                return false
            }
        });
        if (C.browser.msie) {
            this._mouseUnselectable = this.element.attr("unselectable");
            this.element.attr("unselectable", "on")
        }
        this.started = false
    },_mouseDestroy:function() {
        this.element.unbind("." + this.widgetName);
        (C.browser.msie && this.element.attr("unselectable", this._mouseUnselectable))
    },_mouseDown:function(L) {
        if (L.originalEvent.mouseHandled) {
            return
        }
        (this._mouseStarted && this._mouseUp(L));
        this._mouseDownEvent = L;
        var K = this,M = (L.which == 1),J = (typeof this.options.cancel == "string" ? C(L.target).parents().add(L.target).filter(this.options.cancel).length : false);
        if (!M || J || !this._mouseCapture(L)) {
            return true
        }
        this.mouseDelayMet = !this.options.delay;
        if (!this.mouseDelayMet) {
            this._mouseDelayTimer = setTimeout(function() {
                K.mouseDelayMet = true
            }, this.options.delay)
        }
        if (this._mouseDistanceMet(L) && this._mouseDelayMet(L)) {
            this._mouseStarted = (this._mouseStart(L) !== false);
            if (!this._mouseStarted) {
                L.preventDefault();
                return true
            }
        }
        this._mouseMoveDelegate = function(N) {
            return K._mouseMove(N)
        };
        this._mouseUpDelegate = function(N) {
            return K._mouseUp(N)
        };
        C(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate);
        (C.browser.safari || L.preventDefault());
        L.originalEvent.mouseHandled = true;
        return true
    },_mouseMove:function(J) {
        if (C.browser.msie && !J.button) {
            return this._mouseUp(J)
        }
        if (this._mouseStarted) {
            this._mouseDrag(J);
            return J.preventDefault()
        }
        if (this._mouseDistanceMet(J) && this._mouseDelayMet(J)) {
            this._mouseStarted = (this._mouseStart(this._mouseDownEvent, J) !== false);
            (this._mouseStarted ? this._mouseDrag(J) : this._mouseUp(J))
        }
        return !this._mouseStarted
    },_mouseUp:function(J) {
        C(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
        if (this._mouseStarted) {
            this._mouseStarted = false;
            this._preventClickEvent = true;
            this._mouseStop(J)
        }
        return false
    },_mouseDistanceMet:function(J) {
        return(Math.max(Math.abs(this._mouseDownEvent.pageX - J.pageX), Math.abs(this._mouseDownEvent.pageY - J.pageY)) >= this.options.distance)
    },_mouseDelayMet:function(J) {
        return this.mouseDelayMet
    },_mouseStart:function(J) {
    },_mouseDrag:function(J) {
    },_mouseStop:function(J) {
    },_mouseCapture:function(J) {
        return true
    }};
    C.ui.mouse.defaults = {cancel:null,distance:1,delay:0}
})(jQuery);
(function(A) {
    A.widget("ui.draggable", A.extend({}, A.ui.mouse, {_init:function() {
        if (this.options.helper == "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
            this.element[0].style.position = "relative"
        }
        (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace + "-draggable"));
        (this.options.disabled && this.element.addClass(this.options.cssNamespace + "-draggable-disabled"));
        this._mouseInit()
    },destroy:function() {
        if (!this.element.data("draggable")) {
            return
        }
        this.element.removeData("draggable").unbind(".draggable").removeClass(this.options.cssNamespace + "-draggable " + this.options.cssNamespace + "-draggable-dragging " + this.options.cssNamespace + "-draggable-disabled");
        this._mouseDestroy()
    },_mouseCapture:function(B) {
        var C = this.options;
        if (this.helper || C.disabled || A(B.target).is("." + this.options.cssNamespace + "-resizable-handle")) {
            return false
        }
        this.handle = this._getHandle(B);
        if (!this.handle) {
            return false
        }
        return true
    },_mouseStart:function(B) {
        var C = this.options;
        this.helper = this._createHelper(B);
        this._cacheHelperProportions();
        if (A.ui.ddmanager) {
            A.ui.ddmanager.current = this
        }
        this._cacheMargins();
        this.cssPosition = this.helper.css("position");
        this.scrollParent = this.helper.scrollParent();
        this.offset = this.element.offset();
        this.offset = {top:this.offset.top - this.margins.top,left:this.offset.left - this.margins.left};
        A.extend(this.offset, {click:{left:B.pageX - this.offset.left,top:B.pageY - this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
        this.originalPosition = this._generatePosition(B);
        this.originalPageX = B.pageX;
        this.originalPageY = B.pageY;
        if (C.cursorAt) {
            this._adjustOffsetFromHelper(C.cursorAt)
        }
        if (C.containment) {
            this._setContainment()
        }
        this._trigger("start", B);
        this._cacheHelperProportions();
        if (A.ui.ddmanager && !C.dropBehaviour) {
            A.ui.ddmanager.prepareOffsets(this, B)
        }
        this.helper.addClass(C.cssNamespace + "-draggable-dragging");
        this._mouseDrag(B, true);
        return true
    },_mouseDrag:function(B, D) {
        this.position = this._generatePosition(B);
        this.positionAbs = this._convertPositionTo("absolute");
        if (!D) {
            var C = this._uiHash();
            this._trigger("drag", B, C);
            this.position = C.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"
        }
        if (A.ui.ddmanager) {
            A.ui.ddmanager.drag(this, B)
        }
        return false
    },_mouseStop:function(C) {
        var D = false;
        if (A.ui.ddmanager && !this.options.dropBehaviour) {
            D = A.ui.ddmanager.drop(this, C)
        }
        if (this.dropped) {
            D = this.dropped;
            this.dropped = false
        }
        if ((this.options.revert == "invalid" && !D) || (this.options.revert == "valid" && D) || this.options.revert === true || (A.isFunction(this.options.revert) && this.options.revert.call(this.element, D))) {
            var B = this;
            A(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
                B._trigger("stop", C);
                B._clear()
            })
        } else {
            this._trigger("stop", C);
            this._clear()
        }
        return false
    },_getHandle:function(B) {
        var C = !this.options.handle || !A(this.options.handle, this.element).length ? true : false;
        A(this.options.handle, this.element).find("*").andSelf().each(function() {
            if (this == B.target) {
                C = true
            }
        });
        return C
    },_createHelper:function(C) {
        var D = this.options;
        var B = A.isFunction(D.helper) ? A(D.helper.apply(this.element[0], [C])) : (D.helper == "clone" ? this.element.clone() : this.element);
        if (!B.parents("body").length) {
            B.appendTo((D.appendTo == "parent" ? this.element[0].parentNode : D.appendTo))
        }
        if (B[0] != this.element[0] && !(/(fixed|absolute)/).test(B.css("position"))) {
            B.css("position", "absolute")
        }
        return B
    },_adjustOffsetFromHelper:function(B) {
        if (B.left != undefined) {
            this.offset.click.left = B.left + this.margins.left
        }
        if (B.right != undefined) {
            this.offset.click.left = this.helperProportions.width - B.right + this.margins.left
        }
        if (B.top != undefined) {
            this.offset.click.top = B.top + this.margins.top
        }
        if (B.bottom != undefined) {
            this.offset.click.top = this.helperProportions.height - B.bottom + this.margins.top
        }
    },_getParentOffset:function() {
        this.offsetParent = this.helper.offsetParent();
        var B = this.offsetParent.offset();
        if (this.cssPosition == "absolute" && this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
            B.left += this.scrollParent.scrollLeft();
            B.top += this.scrollParent.scrollTop()
        }
        if ((this.offsetParent[0] == document.body && A.browser.mozilla) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && A.browser.msie)) {
            B = {top:0,left:0}
        }
        return{top:B.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),left:B.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)}
    },_getRelativeOffset:function() {
        if (this.cssPosition == "relative") {
            var B = this.element.position();
            return{top:B.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),left:B.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 E = this.options;
        if (E.containment == "parent") {
            E.containment = this.helper[0].parentNode
        }
        if (E.containment == "document" || E.containment == "window") {
            this.containment = [0 - this.offset.relative.left - this.offset.parent.left,0 - this.offset.relative.top - this.offset.parent.top,A(E.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left,(A(E.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]
        }
        if (!(/^(document|window|parent)$/).test(E.containment) && E.containment.constructor != Array) {
            var C = A(E.containment)[0];
            if (!C) {
                return
            }
            var D = A(E.containment).offset();
            var B = (A(C).css("overflow") != "hidden");
            this.containment = [D.left + (parseInt(A(C).css("borderLeftWidth"), 10) || 0) + (parseInt(A(C).css("paddingLeft"), 10) || 0) - this.margins.left,D.top + (parseInt(A(C).css("borderTopWidth"), 10) || 0) + (parseInt(A(C).css("paddingTop"), 10) || 0) - this.margins.top,D.left + (B ? Math.max(C.scrollWidth, C.offsetWidth) : C.offsetWidth) - (parseInt(A(C).css("borderLeftWidth"), 10) || 0) - (parseInt(A(C).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left,D.top + (B ? Math.max(C.scrollHeight, C.offsetHeight) : C.offsetHeight) - (parseInt(A(C).css("borderTopWidth"), 10) || 0) - (parseInt(A(C).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
        } else {
            if (E.containment.constructor == Array) {
                this.containment = E.containment
            }
        }
    },_convertPositionTo:function(E, G) {
        if (!G) {
            G = this.position
        }
        var C = E == "absolute" ? 1 : -1;
        var D = this.options,B = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,F = (/(html|body)/i).test(B[0].tagName);
        return{top:(G.top + this.offset.relative.top * C + this.offset.parent.top * C - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (F ? 0 : B.scrollTop())) * C),left:(G.left + this.offset.relative.left * C + this.offset.parent.left * C - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : F ? 0 : B.scrollLeft()) * C)}
    },_generatePosition:function(E) {
        var H = this.options,B = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,I = (/(html|body)/i).test(B[0].tagName);
        if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
            this.offset.relative = this._getRelativeOffset()
        }
        var D = E.pageX;
        var C = E.pageY;
        if (this.originalPosition) {
            if (this.containment) {
                if (E.pageX - this.offset.click.left < this.containment[0]) {
                    D = this.containment[0] + this.offset.click.left
                }
                if (E.pageY - this.offset.click.top < this.containment[1]) {
                    C = this.containment[1] + this.offset.click.top
                }
                if (E.pageX - this.offset.click.left > this.containment[2]) {
                    D = this.containment[2] + this.offset.click.left
                }
                if (E.pageY - this.offset.click.top > this.containment[3]) {
                    C = this.containment[3] + this.offset.click.top
                }
            }
            if (H.grid) {
                var G = this.originalPageY + Math.round((C - this.originalPageY) / H.grid[1]) * H.grid[1];
                C = this.containment ? (!(G - this.offset.click.top < this.containment[1] || G - this.offset.click.top > this.containment[3]) ? G : (!(G - this.offset.click.top < this.containment[1]) ? G - H.grid[1] : G + H.grid[1])) : G;
                var F = this.originalPageX + Math.round((D - this.originalPageX) / H.grid[0]) * H.grid[0];
                D = this.containment ? (!(F - this.offset.click.left < this.containment[0] || F - this.offset.click.left > this.containment[2]) ? F : (!(F - this.offset.click.left < this.containment[0]) ? F - H.grid[0] : F + H.grid[0])) : F
            }
        }
        return{top:(C - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (I ? 0 : B.scrollTop()))),left:(D - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : I ? 0 : B.scrollLeft()))}
    },_clear:function() {
        this.helper.removeClass(this.options.cssNamespace + "-draggable-dragging");
        if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) {
            this.helper.remove()
        }
        this.helper = null;
        this.cancelHelperRemoval = false
    },_trigger:function(B, C, D) {
        D = D || this._uiHash();
        A.ui.plugin.call(this, B, [C,D]);
        if (B == "drag") {
            this.positionAbs = this._convertPositionTo("absolute")
        }
        return A.widget.prototype._trigger.call(this, B, C, D)
    },plugins:{},_uiHash:function(B) {
        return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}
    }}));
    A.extend(A.ui.draggable, {version:"1.6rc6",eventPrefix:"drag",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cssNamespace:"ui",cursor:"default",cursorAt:false,delay:0,distance:1,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}});
    A.ui.plugin.add("draggable", "connectToSortable", {start:function(B, D) {
        var C = A(this).data("draggable"),E = C.options;
        C.sortables = [];
        A(E.connectToSortable).each(function() {
            A(typeof this == "string" ? this + "" : this).each(function() {
                if (A.data(this, "sortable")) {
                    var F = A.data(this, "sortable");
                    C.sortables.push({instance:F,shouldRevert:F.options.revert});
                    F._refreshItems();
                    F._trigger("activate", B, C)
                }
            })
        })
    },stop:function(B, D) {
        var C = A(this).data("draggable");
        A.each(C.sortables, function() {
            if (this.instance.isOver) {
                this.instance.isOver = 0;
                C.cancelHelperRemoval = true;
                this.instance.cancelHelperRemoval = false;
                if (this.shouldRevert) {
                    this.instance.options.revert = true
                }
                this.instance._mouseStop(B);
                this.instance.options.helper = this.instance.options._helper;
                if (C.options.helper == "original") {
                    this.instance.currentItem.css({top:"auto",left:"auto"})
                }
            } else {
                this.instance.cancelHelperRemoval = false;
                this.instance._trigger("deactivate", B, C)
            }
        })
    },drag:function(C, F) {
        var E = A(this).data("draggable"),B = this;
        var D = function(I) {
            var N = this.offset.click.top,M = this.offset.click.left;
            var G = this.positionAbs.top,K = this.positionAbs.left;
            var J = I.height,L = I.width;
            var O = I.top,H = I.left;
            return A.ui.isOver(G + N, K + M, O, H, J, L)
        };
        A.each(E.sortables, function(G) {
            if (D.call(E, this.instance.containerCache)) {
                if (!this.instance.isOver) {
                    this.instance.isOver = 1;
                    this.instance.currentItem = A(B).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 = E.offset.click.top;
                    this.instance.offset.click.left = E.offset.click.left;
                    this.instance.offset.parent.left -= E.offset.parent.left - this.instance.offset.parent.left;
                    this.instance.offset.parent.top -= E.offset.parent.top - this.instance.offset.parent.top;
                    E._trigger("toSortable", C);
                    E.dropped = this.instance.element;
                    this.instance.fromOutside = E
                }
                if (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._mouseStop(C, true);
                    this.instance.options.helper = this.instance.options._helper;
                    this.instance.currentItem.remove();
                    if (this.instance.placeholder) {
                        this.instance.placeholder.remove()
                    }
                    E._trigger("fromSortable", C);
                    E.dropped = false
                }
            }
        })
    }});
    A.ui.plugin.add("draggable", "cursor", {start:function(C, D) {
        var B = A("body"),E = A(this).data("draggable").options;
        if (B.css("cursor")) {
            E._cursor = B.css("cursor")
        }
        B.css("cursor", E.cursor)
    },stop:function(B, C) {
        var D = A(this).data("draggable").options;
        if (D._cursor) {
            A("body").css("cursor", D._cursor)
        }
    }});
    A.ui.plugin.add("draggable", "iframeFix", {start:function(B, C) {
        var D = A(this).data("draggable").options;
        A(D.iframeFix === true ? "iframe" : D.iframeFix).each(function() {
            A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth + "px",height:this.offsetHeight + "px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")
        })
    },stop:function(B, C) {
        A("div.ui-draggable-iframeFix").each(function() {
            this.parentNode.removeChild(this)
        })
    }});
    A.ui.plugin.add("draggable", "opacity", {start:function(C, D) {
        var B = A(D.helper),E = A(this).data("draggable").options;
        if (B.css("opacity")) {
            E._opacity = B.css("opacity")
        }
        B.css("opacity", E.opacity)
    },stop:function(B, C) {
        var D = A(this).data("draggable").options;
        if (D._opacity) {
            A(C.helper).css("opacity", D._opacity)
        }
    }});
    A.ui.plugin.add("draggable", "scroll", {start:function(C, D) {
        var B = A(this).data("draggable");
        if (B.scrollParent[0] != document && B.scrollParent[0].tagName != "HTML") {
            B.overflowOffset = B.scrollParent.offset()
        }
    },drag:function(D, E) {
        var C = A(this).data("draggable"),F = C.options,B = false;
        if (C.scrollParent[0] != document && C.scrollParent[0].tagName != "HTML") {
            if (!F.axis || F.axis != "x") {
                if ((C.overflowOffset.top + C.scrollParent[0].offsetHeight) - D.pageY < F.scrollSensitivity) {
                    C.scrollParent[0].scrollTop = B = C.scrollParent[0].scrollTop + F.scrollSpeed
                } else {
                    if (D.pageY - C.overflowOffset.top < F.scrollSensitivity) {
                        C.scrollParent[0].scrollTop = B = C.scrollParent[0].scrollTop - F.scrollSpeed
                    }
                }
            }
            if (!F.axis || F.axis != "y") {
                if ((C.overflowOffset.left + C.scrollParent[0].offsetWidth) - D.pageX < F.scrollSensitivity) {
                    C.scrollParent[0].scrollLeft = B = C.scrollParent[0].scrollLeft + F.scrollSpeed
                } else {
                    if (D.pageX - C.overflowOffset.left < F.scrollSensitivity) {
                        C.scrollParent[0].scrollLeft = B = C.scrollParent[0].scrollLeft - F.scrollSpeed
                    }
                }
            }
        } else {
            if (!F.axis || F.axis != "x") {
                if (D.pageY - A(document).scrollTop() < F.scrollSensitivity) {
                    B = A(document).scrollTop(A(document).scrollTop() - F.scrollSpeed)
                } else {
                    if (A(window).height() - (D.pageY - A(document).scrollTop()) < F.scrollSensitivity) {
                        B = A(document).scrollTop(A(document).scrollTop() + F.scrollSpeed)
                    }
                }
            }
            if (!F.axis || F.axis != "y") {
                if (D.pageX - A(document).scrollLeft() < F.scrollSensitivity) {
                    B = A(document).scrollLeft(A(document).scrollLeft() - F.scrollSpeed)
                } else {
                    if (A(window).width() - (D.pageX - A(document).scrollLeft()) < F.scrollSensitivity) {
                        B = A(document).scrollLeft(A(document).scrollLeft() + F.scrollSpeed)
                    }
                }
            }
        }
        if (B !== false && A.ui.ddmanager && !F.dropBehaviour) {
            A.ui.ddmanager.prepareOffsets(C, D)
        }
    }});
    A.ui.plugin.add("draggable", "snap", {start:function(C, D) {
        var B = A(this).data("draggable"),E = B.options;
        B.snapElements = [];
        A(E.snap.constructor != String ? (E.snap.items || ":data(draggable)") : E.snap).each(function() {
            var G = A(this);
            var F = G.offset();
            if (this != B.element[0]) {
                B.snapElements.push({item:this,width:G.outerWidth(),height:G.outerHeight(),top:F.top,left:F.left})
            }
        })
    },drag:function(N, K) {
        var E = A(this).data("draggable"),L = E.options;
        var R = L.snapTolerance;
        var Q = K.absolutePosition.left,P = Q + E.helperProportions.width,D = K.absolutePosition.top,C = D + E.helperProportions.height;
        for (var O = E.snapElements.length - 1; O >= 0; O--) {
            var M = E.snapElements[O].left,J = M + E.snapElements[O].width,I = E.snapElements[O].top,T = I + E.snapElements[O].height;
            if (!((M - R < Q && Q < J + R && I - R < D && D < T + R) || (M - R < Q && Q < J + R && I - R < C && C < T + R) || (M - R < P && P < J + R && I - R < D && D < T + R) || (M - R < P && P < J + R && I - R < C && C < T + R))) {
                if (E.snapElements[O].snapping) {
                    (E.options.snap.release && E.options.snap.release.call(E.element, N, A.extend(E._uiHash(), {snapItem:E.snapElements[O].item})))
                }
                E.snapElements[O].snapping = false;
                continue
            }
            if (L.snapMode != "inner") {
                var B = Math.abs(I - C) <= R;
                var S = Math.abs(T - D) <= R;
                var G = Math.abs(M - P) <= R;
                var H = Math.abs(J - Q) <= R;
                if (B) {
                    K.position.top = E._convertPositionTo("relative", {top:I - E.helperProportions.height,left:0}).top - E.margins.top
                }
                if (S) {
                    K.position.top = E._convertPositionTo("relative", {top:T,left:0}).top - E.margins.top
                }
                if (G) {
                    K.position.left = E._convertPositionTo("relative", {top:0,left:M - E.helperProportions.width}).left - E.margins.left
                }
                if (H) {
                    K.position.left = E._convertPositionTo("relative", {top:0,left:J}).left - E.margins.left
                }
            }
            var F = (B || S || G || H);
            if (L.snapMode != "outer") {
                var B = Math.abs(I - D) <= R;
                var S = Math.abs(T - C) <= R;
                var G = Math.abs(M - Q) <= R;
                var H = Math.abs(J - P) <= R;
                if (B) {
                    K.position.top = E._convertPositionTo("relative", {top:I,left:0}).top - E.margins.top
                }
                if (S) {
                    K.position.top = E._convertPositionTo("relative", {top:T - E.helperProportions.height,left:0}).top - E.margins.top
                }
                if (G) {
                    K.position.left = E._convertPositionTo("relative", {top:0,left:M}).left - E.margins.left
                }
                if (H) {
                    K.position.left = E._convertPositionTo("relative", {top:0,left:J - E.helperProportions.width}).left - E.margins.left
                }
            }
            if (!E.snapElements[O].snapping && (B || S || G || H || F)) {
                (E.options.snap.snap && E.options.snap.snap.call(E.element, N, A.extend(E._uiHash(), {snapItem:E.snapElements[O].item})))
            }
            E.snapElements[O].snapping = (B || S || G || H || F)
        }
    }});
    A.ui.plugin.add("draggable", "stack", {start:function(B, C) {
        var E = A(this).data("draggable").options;
        var D = A.makeArray(A(E.stack.group)).sort(function(G, F) {
            return(parseInt(A(G).css("zIndex"), 10) || E.stack.min) - (parseInt(A(F).css("zIndex"), 10) || E.stack.min)
        });
        A(D).each(function(F) {
            this.style.zIndex = E.stack.min + F
        });
        this[0].style.zIndex = E.stack.min + D.length
    }});
    A.ui.plugin.add("draggable", "zIndex", {start:function(C, D) {
        var B = A(D.helper),E = A(this).data("draggable").options;
        if (B.css("zIndex")) {
            E._zIndex = B.css("zIndex")
        }
        B.css("zIndex", E.zIndex)
    },stop:function(B, C) {
        var D = A(this).data("draggable").options;
        if (D._zIndex) {
            A(C.helper).css("zIndex", D._zIndex)
        }
    }})
})(jQuery);
(function(A) {
    A.widget("ui.droppable", {_init:function() {
        var C = this.options,B = C.accept;
        this.isover = 0;
        this.isout = 1;
        this.options.accept = this.options.accept && A.isFunction(this.options.accept) ? this.options.accept : function(D) {
            return D.is(B)
        };
        this.proportions = {width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};
        A.ui.ddmanager.droppables[this.options.scope] = A.ui.ddmanager.droppables[this.options.scope] || [];
        A.ui.ddmanager.droppables[this.options.scope].push(this);
        (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace + "-droppable"))
    },destroy:function() {
        var B = A.ui.ddmanager.droppables[this.options.scope];
        for (var C = 0; C < B.length; C++) {
            if (B[C] == this) {
                B.splice(C, 1)
            }
        }
        this.element.removeClass(this.options.cssNamespace + "-droppable " + this.options.cssNamespace + "-droppable-disabled").removeData("droppable").unbind(".droppable")
    },_setData:function(B, C) {
        if (B == "accept") {
            this.options.accept = C && A.isFunction(C) ? C : function(D) {
                return D.is(accept)
            }
        } else {
            A.widget.prototype._setData.apply(this, arguments)
        }
    },_activate:function(C) {
        var B = A.ui.ddmanager.current;
        if (this.options.activeClass) {
            this.element.addClass(this.options.activeClass)
        }
        (B && this._trigger("activate", C, this.ui(B)))
    },_deactivate:function(C) {
        var B = A.ui.ddmanager.current;
        if (this.options.activeClass) {
            this.element.removeClass(this.options.activeClass)
        }
        (B && this._trigger("deactivate", C, this.ui(B)))
    },_over:function(C) {
        var B = A.ui.ddmanager.current;
        if (!B || (B.currentItem || B.element)[0] == this.element[0]) {
            return
        }
        if (this.options.accept.call(this.element[0], (B.currentItem || B.element))) {
            if (this.options.hoverClass) {
                this.element.addClass(this.options.hoverClass)
            }
            this._trigger("over", C, this.ui(B))
        }
    },_out:function(C) {
        var B = A.ui.ddmanager.current;
        if (!B || (B.currentItem || B.element)[0] == this.element[0]) {
            return
        }
        if (this.options.accept.call(this.element[0], (B.currentItem || B.element))) {
            if (this.options.hoverClass) {
                this.element.removeClass(this.options.hoverClass)
            }
            this._trigger("out", C, this.ui(B))
        }
    },_drop:function(C, D) {
        var B = D || A.ui.ddmanager.current;
        if (!B || (B.currentItem || B.element)[0] == this.element[0]) {
            return false
        }
        var E = false;
        this.element.find(":data(droppable)").not("." + B.options.cssNamespace + "-draggable-dragging").each(function() {
            var F = A.data(this, "droppable");
            if (F.options.greedy && A.ui.intersect(B, A.extend(F, {offset:F.element.offset()}), F.options.tolerance)) {
                E = true;
                return false
            }
        });
        if (E) {
            return false
        }
        if (this.options.accept.call(this.element[0], (B.currentItem || B.element))) {
            if (this.options.activeClass) {
                this.element.removeClass(this.options.activeClass)
            }
            if (this.options.hoverClass) {
                this.element.removeClass(this.options.hoverClass)
            }
            this._trigger("drop", C, this.ui(B));
            return this.element
        }
        return false
    },ui:function(B) {
        return{draggable:(B.currentItem || B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,offset:B.positionAbs}
    }});
    A.extend(A.ui.droppable, {version:"1.6rc6",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,cssNamespace:"ui",greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});
    A.ui.intersect = function(O, I, M) {
        if (!I.offset) {
            return false
        }
        var D = (O.positionAbs || O.position.absolute).left,C = D + O.helperProportions.width,L = (O.positionAbs || O.position.absolute).top,K = L + O.helperProportions.height;
        var F = I.offset.left,B = F + I.proportions.width,N = I.offset.top,J = N + I.proportions.height;
        switch (M) {case"fit":return(F < D && C < B && N < L && K < J);break;case"intersect":return(F < D + (O.helperProportions.width / 2) && C - (O.helperProportions.width / 2) < B && N < L + (O.helperProportions.height / 2) && K - (O.helperProportions.height / 2) < J);break;case"pointer":var G = ((O.positionAbs || O.position.absolute).left + (O.clickOffset || O.offset.click).left),H = ((O.positionAbs || O.position.absolute).top + (O.clickOffset || O.offset.click).top),E = A.ui.isOver(H, G, N, F, I.proportions.height, I.proportions.width);return E;break;case"touch":return((L >= N && L <= J) || (K >= N && K <= J) || (L < N && K > J)) && ((D >= F && D <= B) || (C >= F && C <= B) || (D < F && C > B));break;default:return false;break
        }
    };
    A.ui.ddmanager = {current:null,droppables:{"default":[]},prepareOffsets:function(E, G) {
        var B = A.ui.ddmanager.droppables[E.options.scope];
        var F = G ? G.type : null;
        var H = (E.currentItem || E.element).find(":data(droppable)").andSelf();
        droppablesLoop:for (var D = 0; D < B.length; D++) {
            if (B[D].options.disabled || (E && !B[D].options.accept.call(B[D].element[0], (E.currentItem || E.element)))) {
                continue
            }
            for (var C = 0; C < H.length; C++) {
                if (H[C] == B[D].element[0]) {
                    B[D].proportions.height = 0;
                    continue droppablesLoop
                }
            }
            B[D].visible = B[D].element.css("display") != "none";
            if (!B[D].visible) {
                continue
            }
            B[D].offset = B[D].element.offset();
            B[D].proportions = {width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};
            if (F == "mousedown") {
                B[D]._activate.call(B[D], G)
            }
        }
    },drop:function(B, C) {
        var D = false;
        A.each(A.ui.ddmanager.droppables[B.options.scope], function() {
            if (!this.options) {
                return
            }
            if (!this.options.disabled && this.visible && A.ui.intersect(B, this, this.options.tolerance)) {
                D = this._drop.call(this, C)
            }
            if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0], (B.currentItem || B.element))) {
                this.isout = 1;
                this.isover = 0;
                this._deactivate.call(this, C)
            }
        });
        return D
    },drag:function(B, C) {
        if (B.options.refreshPositions) {
            A.ui.ddmanager.prepareOffsets(B, C)
        }
        A.each(A.ui.ddmanager.droppables[B.options.scope], function() {
            if (this.options.disabled || this.greedyChild || !this.visible) {
                return
            }
            var E = A.ui.intersect(B, this, this.options.tolerance);
            var G = !E && this.isover == 1 ? "isout" : (E && this.isover == 0 ? "isover" : null);
            if (!G) {
                return
            }
            var F;
            if (this.options.greedy) {
                var D = this.element.parents(":data(droppable):eq(0)");
                if (D.length) {
                    F = A.data(D[0], "droppable");
                    F.greedyChild = (G == "isover" ? 1 : 0)
                }
            }
            if (F && G == "isover") {
                F["isover"] = 0;
                F["isout"] = 1;
                F._out.call(F, C)
            }
            this[G] = 1;
            this[G == "isout" ? "isover" : "isout"] = 0;
            this[G == "isover" ? "_over" : "_out"].call(this, C);
            if (F && G == "isout") {
                F["isout"] = 0;
                F["isover"] = 1;
                F._over.call(F, C)
            }
        })
    }}
})(jQuery);
(function(B) {
    B.widget("ui.resizable", B.extend({}, B.ui.mouse, {_init:function() {
        var D = this,H = this.options;
        this.element.addClass("ui-resizable");
        B.extend(this, {_aspectRatio:!!(H.aspectRatio),aspectRatio:H.aspectRatio,originalElement:this.element,proportionallyResize:H.proportionallyResize ? [H.proportionallyResize] : [],_helper:H.helper || H.ghost || H.animate ? H.helper || "ui-resizable-helper" : null});
        if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
            if (/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();
            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});
            if (B.browser.safari && H.preventDefault) {
                this.originalElement.css("resize", "none")
            }
            this.proportionallyResize.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));
            this.originalElement.css({margin:this.originalElement.css("margin")});
            this._proportionallyResize()
        }
        this.handles = H.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 I = this.handles.split(",");
            this.handles = {};
            for (var E = 0; E < I.length; E++) {
                var G = B.trim(I[E]),C = "ui-resizable-" + G;
                var F = B('<div class="ui-resizable-handle ' + C + '"></div>');
                if (/sw|se|ne|nw/.test(G)) {
                    F.css({zIndex:++H.zIndex})
                }
                if ("se" == G) {
                    F.addClass("ui-icon ui-icon-gripsmall-diagonal-se")
                }
                this.handles[G] = ".ui-resizable-" + G;
                this.element.append(F)
            }
        }
        this._renderAxis = function(N) {
            N = N || this.element;
            for (var K in this.handles) {
                if (this.handles[K].constructor == String) {
                    this.handles[K] = B(this.handles[K], this.element).show()
                }
                if (H.transparent) {
                    this.handles[K].css({opacity:0})
                }
                if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
                    var L = B(this.handles[K], this.element),M = 0;
                    M = /sw|ne|nw|se|n|s/.test(K) ? L.outerHeight() : L.outerWidth();
                    var J = ["padding",/ne|nw|n/.test(K) ? "Top" : /se|sw|s/.test(K) ? "Bottom" : /^e$/.test(K) ? "Right" : "Left"].join("");
                    if (!H.transparent) {
                        N.css(J, M)
                    }
                    this._proportionallyResize()
                }
                if (!B(this.handles[K]).length) {
                    continue
                }
            }
        };
        this._renderAxis(this.element);
        this._handles = B(".ui-resizable-handle", this.element);
        if (H.disableSelection) {
            this._handles.disableSelection()
        }
        this._handles.mouseover(function() {
            if (!D.resizing) {
                if (this.className) {
                    var J = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)
                }
                D.axis = J && J[1] ? J[1] : "se"
            }
        });
        if (H.autoHide) {
            this._handles.hide();
            B(this.element).addClass("ui-resizable-autohide").hover(function() {
                B(this).removeClass("ui-resizable-autohide");
                D._handles.show()
            }, function() {
                if (!D.resizing) {
                    B(this).addClass("ui-resizable-autohide");
                    D._handles.hide()
                }
            })
        }
        this._mouseInit()
    },destroy:function() {
        this._mouseDestroy();
        var C = function(D) {
            B(D).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
        };
        if (this.elementIsWrapper) {
            C(this.element);
            this.wrapper.parent().append(this.originalElement.css({position:this.wrapper.css("position"),width:this.wrapper.outerWidth(),height:this.wrapper.outerHeight(),top:this.wrapper.css("top"),left:this.wrapper.css("left")})).end().remove()
        }
        C(this.originalElement)
    },_mouseCapture:function(D) {
        var E = false;
        for (var C in this.handles) {
            if (B(this.handles[C])[0] == D.target) {
                E = true
            }
        }
        return this.options.disabled || !!E
    },_mouseStart:function(E) {
        var H = this.options,D = this.element.position(),C = this.element;
        this.resizing = true;
        this.documentScroll = {top:B(document).scrollTop(),left:B(document).scrollLeft()};
        if (C.is(".ui-draggable") || (/absolute/).test(C.css("position"))) {
            C.css({position:"absolute",top:D.top,left:D.left})
        }
        if (B.browser.opera && (/relative/).test(C.css("position"))) {
            C.css({position:"relative",top:"auto",left:"auto"})
        }
        this._renderProxy();
        var I = A(this.helper.css("left")),F = A(this.helper.css("top"));
        if (H.containment) {
            I += B(H.containment).scrollLeft() || 0;
            F += B(H.containment).scrollTop() || 0
        }
        this.offset = this.helper.offset();
        this.position = {left:I,top:F};
        this.size = this._helper ? {width:C.outerWidth(),height:C.outerHeight()} : {width:C.width(),height:C.height()};
        this.originalSize = this._helper ? {width:C.outerWidth(),height:C.outerHeight()} : {width:C.width(),height:C.height()};
        this.originalPosition = {left:I,top:F};
        this.sizeDiff = {width:C.outerWidth() - C.width(),height:C.outerHeight() - C.height()};
        this.originalMousePosition = {left:E.pageX,top:E.pageY};
        this.aspectRatio = (typeof H.aspectRatio == "number") ? H.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
        if (H.preserveCursor) {
            var G = B(".ui-resizable-" + this.axis).css("cursor");
            B("body").css("cursor", G == "auto" ? this.axis + "-resize" : G)
        }
        this._propagate("start", E);
        return true
    },_mouseDrag:function(C) {
        var F = this.helper,E = this.options,K = {},N = this,H = this.originalMousePosition,L = this.axis;
        var O = (C.pageX - H.left) || 0,M = (C.pageY - H.top) || 0;
        var G = this._change[L];
        if (!G) {
            return false
        }
        var J = G.apply(this, [C,O,M]),I = B.browser.msie && B.browser.version < 7,D = this.sizeDiff;
        if (this._aspectRatio || C.shiftKey) {
            J = this._updateRatio(J, C)
        }
        J = this._respectSize(J, C);
        this._propagate("resize", C);
        F.css({top:this.position.top + "px",left:this.position.left + "px",width:this.size.width + "px",height:this.size.height + "px"});
        if (!this._helper && this.proportionallyResize.length) {
            this._proportionallyResize()
        }
        this._updateCache(J);
        this._trigger("resize", C, this.ui());
        return false
    },_mouseStop:function(F) {
        this.resizing = false;
        var G = this.options,K = this;
        if (this._helper) {
            var E = this.proportionallyResize,C = E.length && (/textarea/i).test(E[0].nodeName),D = C && B.ui.hasScroll(E[0], "left") ? 0 : K.sizeDiff.height,I = C ? 0 : K.sizeDiff.width;
            var L = {width:(K.size.width - I),height:(K.size.height - D)},H = (parseInt(K.element.css("left"), 10) + (K.position.left - K.originalPosition.left)) || null,J = (parseInt(K.element.css("top"), 10) + (K.position.top - K.originalPosition.top)) || null;
            if (!G.animate) {
                this.element.css(B.extend(L, {top:J,left:H}))
            }
            if (this._helper && !G.animate) {
                this._proportionallyResize()
            }
        }
        if (G.preserveCursor) {
            B("body").css("cursor", "auto")
        }
        this._propagate("stop", F);
        if (this._helper) {
            this.helper.remove()
        }
        return false
    },_updateCache:function(C) {
        var D = this.options;
        this.offset = this.helper.offset();
        if (C.left) {
            this.position.left = C.left
        }
        if (C.top) {
            this.position.top = C.top
        }
        if (C.height) {
            this.size.height = C.height
        }
        if (C.width) {
            this.size.width = C.width
        }
    },_updateRatio:function(F, E) {
        var G = this.options,H = this.position,D = this.size,C = this.axis;
        if (F.height) {
            F.width = (D.height * this.aspectRatio)
        } else {
            if (F.width) {
                F.height = (D.width / this.aspectRatio)
            }
        }
        if (C == "sw") {
            F.left = H.left + (D.width - F.width);
            F.top = null
        }
        if (C == "nw") {
            F.top = H.top + (D.height - F.height);
            F.left = H.left + (D.width - F.width)
        }
        return F
    },_respectSize:function(J, E) {
        var Q = function(S) {
            return !isNaN(parseInt(S, 10))
        };
        var H = this.helper,G = this.options,O = this._aspectRatio || E.shiftKey,N = this.axis,R = Q(J.width) && G.maxWidth && (G.maxWidth < J.width),K = Q(J.height) && G.maxHeight && (G.maxHeight < J.height),F = Q(J.width) && G.minWidth && (G.minWidth > J.width),P = Q(J.height) && G.minHeight && (G.minHeight > J.height);
        if (F) {
            J.width = G.minWidth
        }
        if (P) {
            J.height = G.minHeight
        }
        if (R) {
            J.width = G.maxWidth
        }
        if (K) {
            J.height = G.maxHeight
        }
        var D = this.originalPosition.left + this.originalSize.width,M = this.position.top + this.size.height;
        var I = /sw|nw|w/.test(N),C = /nw|ne|n/.test(N);
        if (F && I) {
            J.left = D - G.minWidth
        }
        if (R && I) {
            J.left = D - G.maxWidth
        }
        if (P && C) {
            J.top = M - G.minHeight
        }
        if (K && C) {
            J.top = M - G.maxHeight
        }
        var L = !J.width && !J.height;
        if (L && !J.left && J.top) {
            J.top = null
        } else {
            if (L && !J.top && J.left) {
                J.left = null
            }
        }
        return J
    },_proportionallyResize:function() {
        var H = this.options;
        if (!this.proportionallyResize.length) {
            return
        }
        var E = this.helper || this.element;
        for (var D = 0; D < this.proportionallyResize.length; D++) {
            var F = this.proportionallyResize[D];
            if (!this.borderDif) {
                var C = [F.css("borderTopWidth"),F.css("borderRightWidth"),F.css("borderBottomWidth"),F.css("borderLeftWidth")],G = [F.css("paddingTop"),F.css("paddingRight"),F.css("paddingBottom"),F.css("paddingLeft")];
                this.borderDif = B.map(C, function(I, K) {
                    var J = parseInt(I, 10) || 0,L = parseInt(G[K], 10) || 0;
                    return J + L
                })
            }
            if (B.browser.msie && !(!(B(E).is(":hidden") || B(E).parents(":hidden").length))) {
                continue
            }
            F.css({height:(E.height() - this.borderDif[0] - this.borderDif[2]) || 0,width:(E.width() - this.borderDif[1] - this.borderDif[3]) || 0})
        }
    },_renderProxy:function() {
        var D = this.element,G = this.options;
        this.elementOffset = D.offset();
        if (this._helper) {
            this.helper = this.helper || B('<div style="overflow:hidden;"></div>');
            var C = B.browser.msie && B.browser.version < 7,E = (C ? 1 : 0),F = (C ? 2 : -1);
            this.helper.addClass(this._helper).css({width:this.element.outerWidth() + F,height:this.element.outerHeight() + F,position:"absolute",left:this.elementOffset.left - E + "px",top:this.elementOffset.top - E + "px",zIndex:++G.zIndex});
            this.helper.appendTo("body");
            if (G.disableSelection) {
                this.helper.disableSelection()
            }
        } else {
            this.helper = this.element
        }
    },_change:{e:function(E, D, C) {
        return{width:this.originalSize.width + D}
    },w:function(F, D, C) {
        var H = this.options,E = this.originalSize,G = this.originalPosition;
        return{left:G.left + D,width:E.width - D}
    },n:function(F, D, C) {
        var H = this.options,E = this.originalSize,G = this.originalPosition;
        return{top:G.top + C,height:E.height - C}
    },s:function(E, D, C) {
        return{height:this.originalSize.height + C}
    },se:function(E, D, C) {
        return B.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [E,D,C]))
    },sw:function(E, D, C) {
        return B.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [E,D,C]))
    },ne:function(E, D, C) {
        return B.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [E,D,C]))
    },nw:function(E, D, C) {
        return B.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [E,D,C]))
    }},_propagate:function(D, C) {
        B.ui.plugin.call(this, D, [C,this.ui()]);
        (D != "resize" && this._trigger(D, C, 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.6rc6",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,disableSelection:true,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,preserveCursor:true,preventDefault:true,proportionallyResize:false,transparent:false,zIndex:1000}});
    B.ui.plugin.add("resizable", "alsoResize", {start:function(D, E) {
        var C = B(this).data("resizable"),F = C.options;
        _store = function(G) {
            B(G).each(function() {
                B(this).data("resizable-alsoresize", {width:parseInt(B(this).width(), 10),height:parseInt(B(this).height(), 10),left:parseInt(B(this).css("left"), 10),top:parseInt(B(this).css("top"), 10)})
            })
        };
        if (typeof (F.alsoResize) == "object" && !F.alsoResize.parentNode) {
            if (F.alsoResize.length) {
                F.alsoResize = F.alsoResize[0];
                _store(F.alsoResize)
            } else {
                B.each(F.alsoResize, function(G, H) {
                    _store(G)
                })
            }
        } else {
            _store(F.alsoResize)
        }
    },resize:function(E, G) {
        var D = B(this).data("resizable"),H = D.options,F = D.originalSize,J = D.originalPosition;
        var I = {height:(D.size.height - F.height) || 0,width:(D.size.width - F.width) || 0,top:(D.position.top - J.top) || 0,left:(D.position.left - J.left) || 0},C = function(K, L) {
            B(K).each(function() {
                var O = B(this),P = B(this).data("resizable-alsoresize"),N = {},M = L && L.length ? L : ["width","height","top","left"];
                B.each(M || ["width","height","top","left"], function(Q, S) {
                    var R = (P[S] || 0) + (I[S] || 0);
                    if (R && R >= 0) {
                        N[S] = R || null
                    }
                });
                if (/relative/.test(O.css("position")) && B.browser.opera) {
                    D._revertToRelativePosition = true;
                    O.css({position:"absolute",top:"auto",left:"auto"})
                }
                O.css(N)
            })
        };
        if (typeof (H.alsoResize) == "object" && !H.alsoResize.nodeType) {
            B.each(H.alsoResize, function(K, L) {
                C(K, L)
            })
        } else {
            C(H.alsoResize)
        }
    },stop:function(D, E) {
        var C = B(this).data("resizable");
        if (C._revertToRelativePosition && B.browser.opera) {
            C._revertToRelativePosition = false;
            el.css({position:"relative"})
        }
        B(this).removeData("resizable-alsoresize-start")
    }});
    B.ui.plugin.add("resizable", "animate", {stop:function(G, L) {
        var M = B(this).data("resizable"),H = M.options;
        var F = H.proportionallyResize,C = F && (/textarea/i).test(F.get(0).nodeName),D = C && B.ui.hasScroll(F.get(0), "left") ? 0 : M.sizeDiff.height,J = C ? 0 : M.sizeDiff.width;
        var E = {width:(M.size.width - J),height:(M.size.height - D)},I = (parseInt(M.element.css("left"), 10) + (M.position.left - M.originalPosition.left)) || null,K = (parseInt(M.element.css("top"), 10) + (M.position.top - M.originalPosition.top)) || null;
        M.element.animate(B.extend(E, K && I ? {top:K,left:I} : {}), {duration:H.animateDuration,easing:H.animateEasing,step:function() {
            var N = {width:parseInt(M.element.css("width"), 10),height:parseInt(M.element.css("height"), 10),top:parseInt(M.element.css("top"), 10),left:parseInt(M.element.css("left"), 10)};
            if (F) {
                F.css({width:N.width,height:N.height})
            }
            M._updateCache(N);
            M._propagate("resize", G)
        }})
    }});
    B.ui.plugin.add("resizable", "containment", {start:function(D, N) {
        var P = B(this).data("resizable"),H = P.options,J = P.element;
        var E = H.containment,I = (E instanceof B) ? E.get(0) : (/parent/.test(E)) ? J.parent().get(0) : E;
        if (!I) {
            return
        }
        P.containerElement = B(I);
        if (/document/.test(E) || E == document) {
            P.containerOffset = {left:0,top:0};
            P.containerPosition = {left:0,top:0};
            P.parentData = {element:B(document),left:0,top:0,width:B(document).width(),height:B(document).height() || document.body.parentNode.scrollHeight}
        } else {
            var L = B(I),G = [];
            B(["Top","Right","Left","Bottom"]).each(function(R, Q) {
                G[R] = A(L.css("padding" + Q))
            });
            P.containerOffset = L.offset();
            P.containerPosition = L.position();
            P.containerSize = {height:(L.innerHeight() - G[3]),width:(L.innerWidth() - G[1])};
            var M = P.containerOffset,C = P.containerSize.height,K = P.containerSize.width,F = (B.ui.hasScroll(I, "left") ? I.scrollWidth : K),O = (B.ui.hasScroll(I) ? I.scrollHeight : C);
            P.parentData = {element:I,left:M.left,top:M.top,width:F,height:O}
        }
    },resize:function(E, L) {
        var O = B(this).data("resizable"),G = O.options,D = O.containerSize,K = O.containerOffset,I = O.size,J = O.position,M = G._aspectRatio || E.shiftKey,C = {top:0,left:0},F = O.containerElement;
        if (F[0] != document && (/static/).test(F.css("position"))) {
            C = K
        }
        if (J.left < (O._helper ? K.left : 0)) {
            O.size.width = O.size.width + (O._helper ? (O.position.left - K.left) : (O.position.left - C.left));
            if (M) {
                O.size.height = O.size.width / G.aspectRatio
            }
            O.position.left = G.helper ? K.left : 0
        }
        if (J.top < (O._helper ? K.top : 0)) {
            O.size.height = O.size.height + (O._helper ? (O.position.top - K.top) : O.position.top);
            if (M) {
                O.size.width = O.size.height * G.aspectRatio
            }
            O.position.top = O._helper ? K.top : 0
        }
        var H = Math.abs((O._helper ? O.offset.left - C.left : (O.offset.left - C.left)) + O.sizeDiff.width),N = Math.abs((O._helper ? O.offset.top - C.top : (O.offset.top - K.top)) + O.sizeDiff.height);
        if (H + O.size.width >= O.parentData.width) {
            O.size.width = O.parentData.width - H;
            if (M) {
                O.size.height = O.size.width / G.aspectRatio
            }
        }
        if (N + O.size.height >= O.parentData.height) {
            O.size.height = O.parentData.height - N;
            if (M) {
                O.size.width = O.size.height * G.aspectRatio
            }
        }
    },stop:function(D, K) {
        var M = B(this).data("resizable"),E = M.options,I = M.position,J = M.containerOffset,C = M.containerPosition,F = M.containerElement;
        var G = B(M.helper),N = G.offset(),L = G.outerWidth() - M.sizeDiff.width,H = G.outerHeight() - M.sizeDiff.height;
        if (M._helper && !E.animate && (/relative/).test(F.css("position"))) {
            B(this).css({left:N.left - C.left - J.left,width:L,height:H})
        }
        if (M._helper && !E.animate && (/static/).test(F.css("position"))) {
            B(this).css({left:N.left - C.left - J.left,width:L,height:H})
        }
    }});
    B.ui.plugin.add("resizable", "ghost", {start:function(E, F) {
        var C = B(this).data("resizable"),G = C.options,H = G.proportionallyResize,D = C.size;
        C.ghost = C.originalElement.clone();
        C.ghost.css({opacity:0.25,display:"block",position:"relative",height:D.height,width:D.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof G.ghost == "string" ? G.ghost : "");
        C.ghost.appendTo(C.helper)
    },resize:function(D, E) {
        var C = B(this).data("resizable"),F = C.options;
        if (C.ghost) {
            C.ghost.css({position:"relative",height:C.size.height,width:C.size.width})
        }
    },stop:function(D, E) {
        var C = B(this).data("resizable"),F = C.options;
        if (C.ghost && C.helper) {
            C.helper.get(0).removeChild(C.ghost.get(0))
        }
    }});
    B.ui.plugin.add("resizable", "grid", {resize:function(C, K) {
        var M = B(this).data("resizable"),F = M.options,I = M.size,G = M.originalSize,H = M.originalPosition,L = M.axis,J = F._aspectRatio || C.shiftKey;
        F.grid = typeof F.grid == "number" ? [F.grid,F.grid] : F.grid;
        var E = Math.round((I.width - G.width) / (F.grid[0] || 1)) * (F.grid[0] || 1),D = Math.round((I.height - G.height) / (F.grid[1] || 1)) * (F.grid[1] || 1);
        if (/^(se|s|e)$/.test(L)) {
            M.size.width = G.width + E;
            M.size.height = G.height + D
        } else {
            if (/^(ne)$/.test(L)) {
                M.size.width = G.width + E;
                M.size.height = G.height + D;
                M.position.top = H.top - D
            } else {
                if (/^(sw)$/.test(L)) {
                    M.size.width = G.width + E;
                    M.size.height = G.height + D;
                    M.position.left = H.left - E
                } else {
                    M.size.width = G.width + E;
                    M.size.height = G.height + D;
                    M.position.top = H.top - D;
                    M.position.left = H.left - E
                }
            }
        }
    }});
    var A = function(C) {
        return parseInt(C, 10) || 0
    }
})(jQuery);
(function(A) {
    A.widget("ui.selectable", A.extend({}, A.ui.mouse, {_init:function() {
        var B = this;
        this.element.addClass("ui-selectable");
        this.dragged = false;
        var C;
        this.refresh = function() {
            C = A(B.options.filter, B.element[0]);
            C.each(function() {
                var D = A(this);
                var E = D.offset();
                A.data(this, "selectable-item", {element:this,$element:D,left:E.left,top:E.top,right:E.left + D.outerWidth(),bottom:E.top + D.outerHeight(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})
            })
        };
        this.refresh();
        this.selectees = C.addClass("ui-selectee");
        this._mouseInit();
        this.helper = A(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")
    },destroy:function() {
        this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");
        this._mouseDestroy()
    },_mouseStart:function(D) {
        var B = this;
        this.opos = [D.pageX,D.pageY];
        if (this.options.disabled) {
            return
        }
        var C = this.options;
        this.selectees = A(C.filter, this.element[0]);
        this._trigger("start", D);
        A("body").append(this.helper);
        this.helper.css({"z-index":100,"position":"absolute","left":D.clientX,"top":D.clientY,"width":0,"height":0});
        if (C.autoRefresh) {
            this.refresh()
        }
        this.selectees.filter(".ui-selected").each(function() {
            var E = A.data(this, "selectable-item");
            E.startselected = true;
            if (!D.metaKey) {
                E.$element.removeClass("ui-selected");
                E.selected = false;
                E.$element.addClass("ui-unselecting");
                E.unselecting = true;
                B._trigger("unselecting", D, {unselecting:E.element})
            }
        });
        A(D.target).parents().andSelf().each(function() {
            var E = A.data(this, "selectable-item");
            if (E) {
                E.$element.removeClass("ui-unselecting").addClass("ui-selecting");
                E.unselecting = false;
                E.selecting = true;
                E.selected = true;
                B._trigger("selecting", D, {selecting:E.element});
                return false
            }
        })
    },_mouseDrag:function(I) {
        var C = this;
        this.dragged = true;
        if (this.options.disabled) {
            return
        }
        var E = this.options;
        var D = this.opos[0],H = this.opos[1],B = I.pageX,G = I.pageY;
        if (D > B) {
            var F = B;
            B = D;
            D = F
        }
        if (H > G) {
            var F = G;
            G = H;
            H = F
        }
        this.helper.css({left:D,top:H,width:B - D,height:G - H});
        this.selectees.each(function() {
            var J = A.data(this, "selectable-item");
            if (!J || J.element == C.element[0]) {
                return
            }
            var K = false;
            if (E.tolerance == "touch") {
                K = (!(J.left > B || J.right < D || J.top > G || J.bottom < H))
            } else {
                if (E.tolerance == "fit") {
                    K = (J.left > D && J.right < B && J.top > H && J.bottom < G)
                }
            }
            if (K) {
                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;
                    C._trigger("selecting", I, {selecting:J.element})
                }
            } else {
                if (J.selecting) {
                    if (I.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
                        }
                        C._trigger("unselecting", I, {unselecting:J.element})
                    }
                }
                if (J.selected) {
                    if (!I.metaKey && !J.startselected) {
                        J.$element.removeClass("ui-selected");
                        J.selected = false;
                        J.$element.addClass("ui-unselecting");
                        J.unselecting = true;
                        C._trigger("unselecting", I, {unselecting:J.element})
                    }
                }
            }
        });
        return false
    },_mouseStop:function(D) {
        var B = this;
        this.dragged = false;
        var C = this.options;
        A(".ui-unselecting", this.element[0]).each(function() {
            var E = A.data(this, "selectable-item");
            E.$element.removeClass("ui-unselecting");
            E.unselecting = false;
            E.startselected = false;
            B._trigger("unselected", D, {unselected:E.element})
        });
        A(".ui-selecting", this.element[0]).each(function() {
            var E = A.data(this, "selectable-item");
            E.$element.removeClass("ui-selecting").addClass("ui-selected");
            E.selecting = false;
            E.selected = true;
            E.startselected = true;
            B._trigger("selected", D, {selected:E.element})
        });
        this._trigger("stop", D);
        this.helper.remove();
        return false
    }}));
    A.extend(A.ui.selectable, {version:"1.6rc6",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})
})(jQuery);
(function(A) {
    A.widget("ui.sortable", A.extend({}, A.ui.mouse, {_init:function() {
        var B = this.options;
        this.containerCache = {};
        (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace + "-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(this.options.cssNamespace + "-sortable " + this.options.cssNamespace + "-sortable-disabled").removeData("sortable").unbind(".sortable");
        this._mouseDestroy();
        for (var B = this.items.length - 1; B >= 0; B--) {
            this.items[B].item.removeData("sortable-item")
        }
    },_mouseCapture:function(E, F) {
        if (this.reverting) {
            return false
        }
        if (this.options.disabled || this.options.type == "static") {
            return false
        }
        this._refreshItems(E);
        var D = null,C = this,B = A(E.target).parents().each(function() {
            if (A.data(this, "sortable-item") == C) {
                D = A(this);
                return false
            }
        });
        if (A.data(E.target, "sortable-item") == C) {
            D = A(E.target)
        }
        if (!D) {
            return false
        }
        if (this.options.handle && !F) {
            var G = false;
            A(this.options.handle, D).find("*").andSelf().each(function() {
                if (this == E.target) {
                    G = true
                }
            });
            if (!G) {
                return false
            }
        }
        this.currentItem = D;
        this._removeCurrentsFromItems();
        return true
    },_mouseStart:function(E, F, B) {
        var G = this.options,C = this;
        this.currentContainer = this;
        this.refreshPositions();
        this.helper = this._createHelper(E);
        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");
        A.extend(this.offset, {click:{left:E.pageX - this.offset.left,top:E.pageY - this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
        this.originalPosition = this._generatePosition(E);
        this.originalPageX = E.pageX;
        this.originalPageY = E.pageY;
        if (G.cursorAt) {
            this._adjustOffsetFromHelper(G.cursorAt)
        }
        this.domPosition = {prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
        if (this.helper[0] != this.currentItem[0]) {
            this.currentItem.hide()
        }
        this._createPlaceholder();
        if (G.containment) {
            this._setContainment()
        }
        if (G.cursor) {
            if (A("body").css("cursor")) {
                this._storedCursor = A("body").css("cursor")
            }
            A("body").css("cursor", G.cursor)
        }
        if (G.opacity) {
            if (this.helper.css("opacity")) {
                this._storedOpacity = this.helper.css("opacity")
            }
            this.helper.css("opacity", G.opacity)
        }
        if (G.zIndex) {
            if (this.helper.css("zIndex")) {
                this._storedZIndex = this.helper.css("zIndex")
            }
            this.helper.css("zIndex", G.zIndex)
        }
        if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") {
            this.overflowOffset = this.scrollParent.offset()
        }
        this._trigger("start", E, this._uiHash());
        if (!this._preserveHelperProportions) {
            this._cacheHelperProportions()
        }
        if (!B) {
            for (var D = this.containers.length - 1; D >= 0; D--) {
                this.containers[D]._trigger("activate", E, C._uiHash(this))
            }
        }
        if (A.ui.ddmanager) {
            A.ui.ddmanager.current = this
        }
        if (A.ui.ddmanager && !G.dropBehaviour) {
            A.ui.ddmanager.prepareOffsets(this, E)
        }
        this.dragging = true;
        this.helper.addClass(G.cssNamespace + "-sortable-helper");
        this._mouseDrag(E);
        return true
    },_mouseDrag:function(F) {
        this.position = this._generatePosition(F);
        this.positionAbs = this._convertPositionTo("absolute");
        if (!this.lastPositionAbs) {
            this.lastPositionAbs = this.positionAbs
        }
        if (this.options.scroll) {
            var G = this.options,B = false;
            if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") {
                if ((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - F.pageY < G.scrollSensitivity) {
                    this.scrollParent[0].scrollTop = B = this.scrollParent[0].scrollTop + G.scrollSpeed
                } else {
                    if (F.pageY - this.overflowOffset.top < G.scrollSensitivity) {
                        this.scrollParent[0].scrollTop = B = this.scrollParent[0].scrollTop - G.scrollSpeed
                    }
                }
                if ((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - F.pageX < G.scrollSensitivity) {
                    this.scrollParent[0].scrollLeft = B = this.scrollParent[0].scrollLeft + G.scrollSpeed
                } else {
                    if (F.pageX - this.overflowOffset.left < G.scrollSensitivity) {
                        this.scrollParent[0].scrollLeft = B = this.scrollParent[0].scrollLeft - G.scrollSpeed
                    }
                }
            } else {
                if (F.pageY - A(document).scrollTop() < G.scrollSensitivity) {
                    B = A(document).scrollTop(A(document).scrollTop() - G.scrollSpeed)
                } else {
                    if (A(window).height() - (F.pageY - A(document).scrollTop()) < G.scrollSensitivity) {
                        B = A(document).scrollTop(A(document).scrollTop() + G.scrollSpeed)
                    }
                }
                if (F.pageX - A(document).scrollLeft() < G.scrollSensitivity) {
                    B = A(document).scrollLeft(A(document).scrollLeft() - G.scrollSpeed)
                } else {
                    if (A(window).width() - (F.pageX - A(document).scrollLeft()) < G.scrollSensitivity) {
                        B = A(document).scrollLeft(A(document).scrollLeft() + G.scrollSpeed)
                    }
                }
            }
            if (B !== false && A.ui.ddmanager && !G.dropBehaviour) {
                A.ui.ddmanager.prepareOffsets(this, F)
            }
        }
        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 (var D = this.items.length - 1; D >= 0; D--) {
            var E = this.items[D],C = E.item[0],H = this._intersectsWithPointer(E);
            if (!H) {
                continue
            }
            if (C != this.currentItem[0] && this.placeholder[H == 1 ? "next" : "prev"]()[0] != C && !A.ui.contains(this.placeholder[0], C) && (this.options.type == "semi-dynamic" ? !A.ui.contains(this.element[0], C) : true)) {
                this.direction = H == 1 ? "down" : "up";
                if (this.options.tolerance == "pointer" || this._intersectsWithSides(E)) {
                    this.options.sortIndicator.call(this, F, E)
                } else {
                    break
                }
                this._trigger("change", F, this._uiHash());
                break
            }
        }
        this._contactContainers(F);
        if (A.ui.ddmanager) {
            A.ui.ddmanager.drag(this, F)
        }
        this._trigger("sort", F, this._uiHash());
        this.lastPositionAbs = this.positionAbs;
        return false
    },_mouseStop:function(C, D) {
        if (!C) {
            return
        }
        if (A.ui.ddmanager && !this.options.dropBehaviour) {
            A.ui.ddmanager.drop(this, C)
        }
        if (this.options.revert) {
            var B = this;
            var E = B.placeholder.offset();
            B.reverting = true;
            A(this.helper).animate({left:E.left - this.offset.parent.left - B.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),top:E.top - this.offset.parent.top - B.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)}, parseInt(this.options.revert, 10) || 500, function() {
                B._clear(C)
            })
        } else {
            this._clear(C, D)
        }
        return false
    },cancel:function() {
        var B = this;
        if (this.dragging) {
            this._mouseUp();
            if (this.options.helper == "original") {
                this.currentItem.css(this._storedCSS).removeClass(this.options.cssNamespace + "-sortable-helper")
            } else {
                this.currentItem.show()
            }
            for (var C = this.containers.length - 1; C >= 0; C--) {
                this.containers[C]._trigger("deactivate", null, B._uiHash(this));
                if (this.containers[C].containerCache.over) {
                    this.containers[C]._trigger("out", null, B._uiHash(this));
                    this.containers[C].containerCache.over = 0
                }
            }
        }
        if (this.placeholder[0].parentNode) {
            this.placeholder[0].parentNode.removeChild(this.placeholder[0])
        }
        if (this.options.helper != "original" && this.helper && this.helper[0].parentNode) {
            this.helper.remove()
        }
        A.extend(this, {helper:null,dragging:false,reverting:false,_noFinalSort:null});
        if (this.domPosition.prev) {
            A(this.domPosition.prev).after(this.currentItem)
        } else {
            A(this.domPosition.parent).prepend(this.currentItem)
        }
        return true
    },serialize:function(D) {
        var B = this._getItemsAsjQuery(D && D.connected);
        var C = [];
        D = D || {};
        A(B).each(function() {
            var E = (A(D.item || this).attr(D.attribute || "id") || "").match(D.expression || (/(.+)[-=_](.+)/));
            if (E) {
                C.push((D.key || E[1] + "[]") + "=" + (D.key && D.expression ? E[1] : E[2]))
            }
        });
        return C.join("&")
    },toArray:function(D) {
        var B = this._getItemsAsjQuery(D && D.connected);
        var C = [];
        D = D || {};
        B.each(function() {
            C.push(A(D.item || this).attr(D.attribute || "id") || "")
        });
        return C
    },_intersectsWith:function(K) {
        var D = this.positionAbs.left,C = D + this.helperProportions.width,J = this.positionAbs.top,I = J + this.helperProportions.height;
        var E = K.left,B = E + K.width,L = K.top,H = L + K.height;
        var M = this.offset.click.top,G = this.offset.click.left;
        var F = (J + M) > L && (J + M) < H && (D + G) > E && (D + G) < B;
        if (this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > K[this.floating ? "width" : "height"])) {
            return F
        } else {
            return(E < D + (this.helperProportions.width / 2) && C - (this.helperProportions.width / 2) < B && L < J + (this.helperProportions.height / 2) && I - (this.helperProportions.height / 2) < H)
        }
    },_intersectsWithPointer:function(D) {
        var E = A.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, D.top, D.height),C = A.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, D.left, D.width),G = E && C,B = this._getDragVerticalDirection(),F = this._getDragHorizontalDirection();
        if (!G) {
            return false
        }
        return this.floating ? (((F && F == "right") || B == "down") ? 2 : 1) : (B && (B == "down" ? 2 : 1))
    },_intersectsWithSides:function(E) {
        var C = A.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, E.top + (E.height / 2), E.height),D = A.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, E.left + (E.width / 2), E.width),B = this._getDragVerticalDirection(),F = this._getDragHorizontalDirection();
        if (this.floating && F) {
            return((F == "right" && D) || (F == "left" && !D))
        } else {
            return B && ((B == "down" && C) || (B == "up" && !C))
        }
    },_getDragVerticalDirection:function() {
        var B = this.positionAbs.top - this.lastPositionAbs.top;
        return B != 0 && (B > 0 ? "down" : "up")
    },_getDragHorizontalDirection:function() {
        var B = this.positionAbs.left - this.lastPositionAbs.left;
        return B != 0 && (B > 0 ? "right" : "left")
    },refresh:function(B) {
        this._refreshItems(B);
        this.refreshPositions()
    },_getItemsAsjQuery:function(B) {
        var J = this;
        var G = [];
        var E = [];
        if (this.options.connectWith && B) {
            var H = this.options.connectWith.constructor == String ? [this.options.connectWith] : this.options.connectWith;
            for (var D = H.length - 1; D >= 0; D--) {
                var I = A(H[D]);
                for (var C = I.length - 1; C >= 0; C--) {
                    var F = A.data(I[C], "sortable");
                    if (F && F != this && !F.options.disabled) {
                        E.push([A.isFunction(F.options.items) ? F.options.items.call(F.element) : A(F.options.items, F.element).not("." + F.options.cssNamespace + "-sortable-helper"),F])
                    }
                }
            }
        }
        E.push([A.isFunction(this.options.items) ? this.options.items.call(this.element, null, {options:this.options,item:this.currentItem}) : A(this.options.items, this.element).not("." + this.options.cssNamespace + "-sortable-helper"),this]);
        for (var D = E.length - 1; D >= 0; D--) {
            E[D][0].each(function() {
                G.push(this)
            })
        }
        return A(G)
    },_removeCurrentsFromItems:function() {
        var D = this.currentItem.find(":data(sortable-item)");
        for (var C = 0; C < this.items.length; C++) {
            for (var B = 0; B < D.length; B++) {
                if (D[B] == this.items[C].item[0]) {
                    this.items.splice(C, 1)
                }
            }
        }
    },_refreshItems:function(B) {
        this.items = [];
        this.containers = [this];
        var H = this.items;
        var M = this;
        var F = [
            [A.isFunction(this.options.items) ? this.options.items.call(this.element[0], B, {item:this.currentItem}) : A(this.options.items, this.element),this]
        ];
        if (this.options.connectWith) {
            for (var E = this.options.connectWith.length - 1; E >= 0; E--) {
                var J = A(this.options.connectWith[E]);
                for (var D = J.length - 1; D >= 0; D--) {
                    var G = A.data(J[D], "sortable");
                    if (G && G != this && !G.options.disabled) {
                        F.push([A.isFunction(G.options.items) ? G.options.items.call(G.element[0], B, {item:this.currentItem}) : A(G.options.items, G.element),G]);
                        this.containers.push(G)
                    }
                }
            }
        }
        for (var E = F.length - 1; E >= 0; E--) {
            var I = F[E][1];
            var C = F[E][0];
            for (var D = 0,K = C.length; D < K; D++) {
                var L = A(C[D]);
                L.data("sortable-item", I);
                H.push({item:L,instance:I,width:0,height:0,left:0,top:0})
            }
        }
    },refreshPositions:function(B) {
        if (this.offsetParent && this.helper) {
            this.offset.parent = this._getParentOffset()
        }
        for (var D = this.items.length - 1; D >= 0; D--) {
            var E = this.items[D];
            if (E.instance != this.currentContainer && this.currentContainer && E.item[0] != this.currentItem[0]) {
                continue
            }
            var C = this.options.toleranceElement ? A(this.options.toleranceElement, E.item) : E.item;
            if (!B) {
                if (this.options.accurateIntersection) {
                    E.width = C.outerWidth();
                    E.height = C.outerHeight()
                } else {
                    E.width = C[0].offsetWidth;
                    E.height = C[0].offsetHeight
                }
            }
            var F = C.offset();
            E.left = F.left;
            E.top = F.top
        }
        if (this.options.custom && this.options.custom.refreshContainers) {
            this.options.custom.refreshContainers.call(this)
        } else {
            for (var D = this.containers.length - 1; D >= 0; D--) {
                var F = this.containers[D].element.offset();
                this.containers[D].containerCache.left = F.left;
                this.containers[D].containerCache.top = F.top;
                this.containers[D].containerCache.width = this.containers[D].element.outerWidth();
                this.containers[D].containerCache.height = this.containers[D].element.outerHeight()
            }
        }
    },_createPlaceholder:function(D) {
        var B = D || this,E = B.options;
        if (!E.placeholder || E.placeholder.constructor == String) {
            var C = E.placeholder;
            E.placeholder = {element:function() {
                var F = A(document.createElement(B.currentItem[0].nodeName)).addClass(C || B.currentItem[0].className + " " + B.options.cssNamespace + "-sortable-placeholder").removeClass(B.options.cssNamespace + "-sortable-helper")[0];
                if (!C) {
                    F.style.visibility = "hidden"
                }
                return F
            },update:function(F, G) {
                if (C && !E.forcePlaceholderSize) {
                    return
                }
                if (!G.height()) {
                    G.height(B.currentItem.innerHeight() - parseInt(B.currentItem.css("paddingTop") || 0, 10) - parseInt(B.currentItem.css("paddingBottom") || 0, 10))
                }
                if (!G.width()) {
                    G.width(B.currentItem.innerWidth() - parseInt(B.currentItem.css("paddingLeft") || 0, 10) - parseInt(B.currentItem.css("paddingRight") || 0, 10))
                }
            }}
        }
        B.placeholder = A(E.placeholder.element.call(B.element, B.currentItem));
        B.currentItem.after(B.placeholder);
        E.placeholder.update(B, B.placeholder)
    },_contactContainers:function(D) {
        for (var C = this.containers.length - 1; C >= 0; C--) {
            if (this._intersectsWith(this.containers[C].containerCache)) {
                if (!this.containers[C].containerCache.over) {
                    if (this.currentContainer != this.containers[C]) {
                        var H = 10000;
                        var G = null;
                        var E = this.positionAbs[this.containers[C].floating ? "left" : "top"];
                        for (var B = this.items.length - 1; B >= 0; B--) {
                            if (!A.ui.contains(this.containers[C].element[0], this.items[B].item[0])) {
                                continue
                            }
                            var F = this.items[B][this.containers[C].floating ? "left" : "top"];
                            if (Math.abs(F - E) < H) {
                                H = Math.abs(F - E);
                                G = this.items[B]
                            }
                        }
                        if (!G && !this.options.dropOnEmpty) {
                            continue
                        }
                        this.currentContainer = this.containers[C];
                        G ? this.options.sortIndicator.call(this, D, G, null, true) : this.options.sortIndicator.call(this, D, null, this.containers[C].element, true);
                        this._trigger("change", D, this._uiHash());
                        this.containers[C]._trigger("change", D, this._uiHash(this));
                        this.options.placeholder.update(this.currentContainer, this.placeholder)
                    }
                    this.containers[C]._trigger("over", D, this._uiHash(this));
                    this.containers[C].containerCache.over = 1
                }
            } else {
                if (this.containers[C].containerCache.over) {
                    this.containers[C]._trigger("out", D, this._uiHash(this));
                    this.containers[C].containerCache.over = 0
                }
            }
        }
    },_createHelper:function(C) {
        var D = this.options;
        var B = A.isFunction(D.helper) ? A(D.helper.apply(this.element[0], [C,this.currentItem])) : (D.helper == "clone" ? this.currentItem.clone() : this.currentItem);
        if (!B.parents("body").length) {
            A(D.appendTo != "parent" ? D.appendTo : this.currentItem[0].parentNode)[0].appendChild(B[0])
        }
        if (B[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 (B[0].style.width == "" || D.forceHelperSize) {
            B.width(this.currentItem.width())
        }
        if (B[0].style.height == "" || D.forceHelperSize) {
            B.height(this.currentItem.height())
        }
        return B
    },_adjustOffsetFromHelper:function(B) {
        if (B.left != undefined) {
            this.offset.click.left = B.left + this.margins.left
        }
        if (B.right != undefined) {
            this.offset.click.left = this.helperProportions.width - B.right + this.margins.left
        }
        if (B.top != undefined) {
            this.offset.click.top = B.top + this.margins.top
        }
        if (B.bottom != undefined) {
            this.offset.click.top = this.helperProportions.height - B.bottom + this.margins.top
        }
    },_getParentOffset:function() {
        this.offsetParent = this.helper.offsetParent();
        var B = this.offsetParent.offset();
        if (this.cssPosition == "absolute" && this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
            B.left += this.scrollParent.scrollLeft();
            B.top += this.scrollParent.scrollTop()
        }
        if ((this.offsetParent[0] == document.body && A.browser.mozilla) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && A.browser.msie)) {
            B = {top:0,left:0}
        }
        return{top:B.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),left:B.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)}
    },_getRelativeOffset:function() {
        if (this.cssPosition == "relative") {
            var B = this.currentItem.position();
            return{top:B.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),left:B.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 E = this.options;
        if (E.containment == "parent") {
            E.containment = this.helper[0].parentNode
        }
        if (E.containment == "document" || E.containment == "window") {
            this.containment = [0 - this.offset.relative.left - this.offset.parent.left,0 - this.offset.relative.top - this.offset.parent.top,A(E.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left,(A(E.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]
        }
        if (!(/^(document|window|parent)$/).test(E.containment)) {
            var C = A(E.containment)[0];
            var D = A(E.containment).offset();
            var B = (A(C).css("overflow") != "hidden");
            this.containment = [D.left + (parseInt(A(C).css("borderLeftWidth"), 10) || 0) + (parseInt(A(C).css("paddingLeft"), 10) || 0) - this.margins.left,D.top + (parseInt(A(C).css("borderTopWidth"), 10) || 0) + (parseInt(A(C).css("paddingTop"), 10) || 0) - this.margins.top,D.left + (B ? Math.max(C.scrollWidth, C.offsetWidth) : C.offsetWidth) - (parseInt(A(C).css("borderLeftWidth"), 10) || 0) - (parseInt(A(C).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left,D.top + (B ? Math.max(C.scrollHeight, C.offsetHeight) : C.offsetHeight) - (parseInt(A(C).css("borderTopWidth"), 10) || 0) - (parseInt(A(C).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
        }
    },_convertPositionTo:function(E, G) {
        if (!G) {
            G = this.position
        }
        var C = E == "absolute" ? 1 : -1;
        var D = this.options,B = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,F = (/(html|body)/i).test(B[0].tagName);
        return{top:(G.top + this.offset.relative.top * C + this.offset.parent.top * C - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (F ? 0 : B.scrollTop())) * C),left:(G.left + this.offset.relative.left * C + this.offset.parent.left * C - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : F ? 0 : B.scrollLeft()) * C)}
    },_generatePosition:function(E) {
        var H = this.options,B = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && A.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,I = (/(html|body)/i).test(B[0].tagName);
        if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
            this.offset.relative = this._getRelativeOffset()
        }
        var D = E.pageX;
        var C = E.pageY;
        if (this.originalPosition) {
            if (this.containment) {
                if (E.pageX - this.offset.click.left < this.containment[0]) {
                    D = this.containment[0] + this.offset.click.left
                }
                if (E.pageY - this.offset.click.top < this.containment[1]) {
                    C = this.containment[1] + this.offset.click.top
                }
                if (E.pageX - this.offset.click.left > this.containment[2]) {
                    D = this.containment[2] + this.offset.click.left
                }
                if (E.pageY - this.offset.click.top > this.containment[3]) {
                    C = this.containment[3] + this.offset.click.top
                }
            }
            if (H.grid) {
                var G = this.originalPageY + Math.round((C - this.originalPageY) / H.grid[1]) * H.grid[1];
                C = this.containment ? (!(G - this.offset.click.top < this.containment[1] || G - this.offset.click.top > this.containment[3]) ? G : (!(G - this.offset.click.top < this.containment[1]) ? G - H.grid[1] : G + H.grid[1])) : G;
                var F = this.originalPageX + Math.round((D - this.originalPageX) / H.grid[0]) * H.grid[0];
                D = this.containment ? (!(F - this.offset.click.left < this.containment[0] || F - this.offset.click.left > this.containment[2]) ? F : (!(F - this.offset.click.left < this.containment[0]) ? F - H.grid[0] : F + H.grid[0])) : F
            }
        }
        return{top:(C - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (I ? 0 : B.scrollTop()))),left:(D - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : I ? 0 : B.scrollLeft()))}
    },_rearrange:function(G, F, C, E) {
        C ? C[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 D = this,B = this.counter;
        window.setTimeout(function() {
            if (B == D.counter) {
                D.refreshPositions(!E)
            }
        }, 0)
    },_clear:function(D, E) {
        this.reverting = false;
        var F = [],B = this;
        if (!this._noFinalSort) {
            this.placeholder.before(this.currentItem)
        }
        this._noFinalSort = null;
        if (this.helper[0] == this.currentItem[0]) {
            for (var C in this._storedCSS) {
                if (this._storedCSS[C] == "auto" || this._storedCSS[C] == "static") {
                    this._storedCSS[C] = ""
                }
            }
            this.currentItem.css(this._storedCSS).removeClass(this.options.cssNamespace + "-sortable-helper")
        } else {
            this.currentItem.show()
        }
        if (this.fromOutside && !E) {
            F.push(function(G) {
                this._trigger("receive", G, this._uiHash(this.fromOutside))
            })
        }
        if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not("." + this.options.cssNamespace + "-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !E) {
            F.push(function(G) {
                this._trigger("update", G, this._uiHash())
            })
        }
        if (!A.ui.contains(this.element[0], this.currentItem[0])) {
            if (!E) {
                F.push(function(G) {
                    this._trigger("remove", G, this._uiHash())
                })
            }
            for (var C = this.containers.length - 1; C >= 0; C--) {
                if (A.ui.contains(this.containers[C].element[0], this.currentItem[0]) && !E) {
                    F.push((function(G) {
                        return function(H) {
                            G._trigger("receive", H, this._uiHash(this))
                        }
                    }).call(this, this.containers[C]));
                    F.push((function(G) {
                        return function(H) {
                            G._trigger("update", H, this._uiHash(this))
                        }
                    }).call(this, this.containers[C]))
                }
            }
        }
        for (var C = this.containers.length - 1; C >= 0; C--) {
            if (!E) {
                F.push((function(G) {
                    return function(H) {
                        G._trigger("deactivate", H, this._uiHash(this))
                    }
                }).call(this, this.containers[C]))
            }
            if (this.containers[C].containerCache.over) {
                F.push((function(G) {
                    return function(H) {
                        G._trigger("out", H, this._uiHash(this))
                    }
                }).call(this, this.containers[C]));
                this.containers[C].containerCache.over = 0
            }
        }
        if (this._storedCursor) {
            A("body").css("cursor", this._storedCursor)
        }
        if (this._storedOpacity) {
            this.helper.css("opacity", this._storedCursor)
        }
        if (this._storedZIndex) {
            this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex)
        }
        this.dragging = false;
        if (this.cancelHelperRemoval) {
            if (!E) {
                this._trigger("beforeStop", D, this._uiHash());
                for (var C = 0; C < F.length; C++) {
                    F[C].call(this, D)
                }
                this._trigger("stop", D, this._uiHash())
            }
            return false
        }
        if (!E) {
            this._trigger("beforeStop", D, this._uiHash())
        }
        this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
        if (this.helper[0] != this.currentItem[0]) {
            this.helper.remove()
        }
        this.helper = null;
        if (!E) {
            for (var C = 0; C < F.length; C++) {
                F[C].call(this, D)
            }
            this._trigger("stop", D, this._uiHash())
        }
        this.fromOutside = false;
        return true
    },_trigger:function() {
        if (A.widget.prototype._trigger.apply(this, arguments) === false) {
            this.cancel()
        }
    },_uiHash:function(C) {
        var B = C || this;
        return{helper:B.helper,placeholder:B.placeholder || A([]),position:B.position,absolutePosition:B.positionAbs,offset:B.positionAbs,item:B.currentItem,sender:C ? C.element : null}
    }}));
    A.extend(A.ui.sortable, {getter:"serialize toArray",version:"1.6rc6",defaults:{accurateIntersection:true,appendTo:"parent",cancel:":input,option",connectWith:false,cssNamespace:"ui",delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,handle:false,helper:"original",items:"> *",placeholder:false,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,sortIndicator:A.ui.sortable.prototype._rearrange,tolerance:"intersect",zIndex:1000}})
})(jQuery);
(function(A) {
    A.widget("ui.accordion", {_init:function() {
        var D = this.options,B = this;
        this.running = 0;
        if (D.navigation) {
            var C = this.element.find("a").filter(D.navigationFilter);
            if (C.length) {
                if (C.filter(D.header).length) {
                    this.active = C
                } else {
                    this.active = C.parent().parent().prev();
                    C.addClass("ui-accordion-content-active")
                }
            }
        }
        this.element.addClass("ui-accordion ui-widget ui-helper-reset");
        this.headers = this.element.find(D.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",
                function() {
                    A(this).addClass("ui-state-hover")
                }).bind("mouseleave.accordion", function() {
            A(this).removeClass("ui-state-hover")
        });
        this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
        this.active = this._findActive(this.active || D.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
        this.active.next().addClass("ui-accordion-content-active");
        A("<span/>").addClass("ui-icon " + D.icons.header).prependTo(this.headers);
        this.active.find(".ui-icon").toggleClass(D.icons.header).toggleClass(D.icons.headerSelected);
        if (A.browser.msie) {
            this.element.find("a").css("zoom", "1")
        }
        this.resize();
        this.element.attr("role", "tablist");
        this.headers.attr("role", "tab").bind("keydown",
                function(E) {
                    return B._keydown(E)
                }).next().attr("role", "tabpanel");
        this.headers.not(this.active || "").attr("aria-expanded", "false").attr("tabIndex", "-1").next().hide();
        if (!this.active.length) {
            this.headers.eq(0).attr("tabIndex", "0")
        } else {
            this.active.attr("aria-expanded", "true").attr("tabIndex", "0")
        }
        if (!A.browser.safari) {
            this.headers.find("a").attr("tabIndex", "-1")
        }
        if (D.event) {
            this.element.bind((D.event) + ".accordion", function(E) {
                return B._clickHandler.call(B, E)
            })
        }
    },destroy:function() {
        this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");
        this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
        this.headers.find("a").removeAttr("tabindex");
        this.headers.children(".ui-icon").remove();
        this.headers.next().removeClass("ui-accordion-content ui-accordion-content-active")
    },_keydown:function(E) {
        var G = this.options,F = A.ui.keyCode;
        if (G.disabled || E.altKey || E.ctrlKey) {
            return
        }
        var D = this.headers.length;
        var B = this.headers.index(E.target);
        var C = false;
        switch (E.keyCode) {case F.RIGHT:case F.DOWN:C = this.headers[(B + 1) % D];break;case F.LEFT:case F.UP:C = this.headers[(B - 1 + D) % D];break;case F.SPACE:case F.ENTER:return this._clickHandler({target:E.target})
        }
        if (C) {
            A(E.target).attr("tabIndex", "-1");
            A(C).attr("tabIndex", "0");
            C.focus();
            return false
        }
        return true
    },resize:function() {
        var E = this.options,D;
        if (E.fillSpace) {
            if (A.browser.msie) {
                var B = this.element.parent().css("overflow");
                this.element.parent().css("overflow", "hidden")
            }
            D = this.element.parent().height();
            if (A.browser.msie) {
                this.element.parent().css("overflow", B)
            }
            this.headers.each(function() {
                D -= A(this).outerHeight()
            });
            var C = 0;
            this.headers.next().each(
                    function() {
                        C = Math.max(C, A(this).innerHeight() - A(this).height())
                    }).height(D - C).css("overflow", "auto")
        } else {
            if (E.autoHeight) {
                D = 0;
                this.headers.next().each(
                        function() {
                            D = Math.max(D, A(this).outerHeight())
                        }).height(D)
            }
        }
    },activate:function(B) {
        this._clickHandler({target:this._findActive(B)[0]})
    },_findActive:function(B) {
        return B ? typeof B == "number" ? this.headers.filter(":eq(" + B + ")") : this.headers.not(this.headers.not(B)) : B === false ? A([]) : this.headers.filter(":eq(0)")
    },_clickHandler:function(F) {
        var H = this.options;
        if (H.disabled) {
            return false
        }
        if (!F.target && !H.alwaysOpen) {
            this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(H.icons.headerSelected).addClass(H.icons.header);
            this.active.next().addClass("ui-accordion-content-active");
            var C = this.active.next(),G = {options:H,newHeader:A([]),oldHeader:H.active,newContent:A([]),oldContent:C},B = (this.active = A([]));
            this._toggle(B, C, G);
            return false
        }
        var D = A(F.target);
        D = A(D.parents(H.header)[0] || D);
        var E = D[0] == this.active[0];
        if (this.running || (H.alwaysOpen && E)) {
            return false
        }
        if (!D.is(H.header)) {
            return
        }
        this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(H.icons.headerSelected).addClass(H.icons.header);
        this.active.next().addClass("ui-accordion-content-active");
        if (!E) {
            D.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(H.icons.header).addClass(H.icons.headerSelected);
            D.next().addClass("ui-accordion-content-active")
        }
        var B = D.next(),C = this.active.next(),G = {options:H,newHeader:E && !H.alwaysOpen ? A([]) : D,oldHeader:this.active,newContent:E && !H.alwaysOpen ? A([]) : B.find("> *"),oldContent:C.find("> *")},I = this.headers.index(this.active[0]) > this.headers.index(D[0]);
        this.active = E ? A([]) : D;
        this._toggle(B, C, G, E, I);
        return false
    },_toggle:function(B, I, G, J, K) {
        var D = this.options,M = this;
        this.toShow = B;
        this.toHide = I;
        this.data = G;
        var C = function() {
            if (!M) {
                return
            }
            return M._completed.apply(M, arguments)
        };
        this._trigger("changestart", null, this.data);
        this.running = I.size() === 0 ? B.size() : I.size();
        if (D.animated) {
            var F = {};
            if (!D.alwaysOpen && J) {
                F = {toShow:A([]),toHide:I,complete:C,down:K,autoHeight:D.autoHeight || D.fillSpace}
            } else {
                F = {toShow:B,toHide:I,complete:C,down:K,autoHeight:D.autoHeight || D.fillSpace}
            }
            if (!D.proxied) {
                D.proxied = D.animated
            }
            if (!D.proxiedDuration) {
                D.proxiedDuration = D.duration
            }
            D.animated = A.isFunction(D.proxied) ? D.proxied(F) : D.proxied;
            D.duration = A.isFunction(D.proxiedDuration) ? D.proxiedDuration(F) : D.proxiedDuration;
            var L = A.ui.accordion.animations,E = D.duration,H = D.animated;
            if (!L[H]) {
                L[H] = function(N) {
                    this.slide(N, {easing:H,duration:E || 700})
                }
            }
            L[H](F)
        } else {
            if (!D.alwaysOpen && J) {
                B.toggle()
            } else {
                I.hide();
                B.show()
            }
            C(true)
        }
        I.prev().attr("aria-expanded", "false").attr("tabIndex", "-1");
        B.prev().attr("aria-expanded", "true").attr("tabIndex", "0").focus()
    },_completed:function(B) {
        var C = this.options;
        this.running = B ? 0 : --this.running;
        if (this.running) {
            return
        }
        if (C.clearStyle) {
            this.toShow.add(this.toHide).css({height:"",overflow:""})
        }
        this._trigger("change", null, this.data)
    }});
    A.extend(A.ui.accordion, {version:"1.6rc6",defaults:{active:null,autoHeight:true,alwaysOpen:true,animated:"slide",clearStyle:false,event:"click",fillSpace:false,header:"a",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function() {
        return this.href.toLowerCase() == location.href.toLowerCase()
    }},animations:{slide:function(J, H) {
        J = A.extend({easing:"swing",duration:300}, J, H);
        if (!J.toHide.size()) {
            J.toShow.animate({height:"show"}, J);
            return
        }
        var B = J.toHide.height(),I = J.toShow.height(),C = I / B,D = J.toShow.css("overflow"),E = {},G = {},F = ["height","paddingTop","paddingBottom"];
        A.each(F, function(K, L) {
            G[L] = "hide";
            E[L] = parseFloat(J.toShow.css(L))
        });
        J.toShow.css({height:0,overflow:"hidden"}).show();
        J.toHide.filter(":hidden").each(J.complete).end().filter(":visible").animate(G, {step:function(L, M) {
            if (!J.toShow[0]) {
                return
            }
            var K = M.start != M.end ? (M.now - M.start) / (M.end - M.start) : 0,N = K * E[M.prop];
            if (A.browser.msie || A.browser.opera) {
                N = Math.ceil(N)
            }
            J.toShow[0].style[M.prop] = N + "px"
        },duration:J.duration,easing:J.easing,complete:function() {
            if (!J.autoHeight) {
                J.toShow.css("height", "auto")
            }
            J.toShow.css({overflow:D});
            J.complete()
        }})
    },bounceslide:function(B) {
        this.slide(B, {easing:B.down ? "easeOutBounce" : "swing",duration:B.down ? 1000 : 200})
    },easeslide:function(B) {
        this.slide(B, {easing:"easeinout",duration:700})
    }}})
})(jQuery);
(function(B) {
    var A = {dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};
    B.widget("ui.dialog", {_init:function() {
        this.originalTitle = this.element.attr("title");
        var K = this,L = this.options,I = L.title || this.originalTitle || "&nbsp;",D = B.ui.dialog.getTitleId(this.element),J = (this.uiDialog = B("<div/>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + L.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:L.zIndex}).attr("tabIndex", -1).css("outline", 0).keydown(
                function(M) {
                    (L.closeOnEscape && M.keyCode && M.keyCode == B.ui.keyCode.ESCAPE && K.close(M))
                }).attr({role:"dialog","aria-labelledby":D}).mousedown(function(M) {
            K.moveToTop(M)
        }),F = this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(J),E = (this.uiDialogTitlebar = B("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(J),H = B('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(
                function() {
                    H.addClass("ui-state-hover")
                },
                function() {
                    H.removeClass("ui-state-hover")
                }).focus(
                function() {
                    H.addClass("ui-state-focus")
                }).blur(
                function() {
                    H.removeClass("ui-state-focus")
                }).mousedown(
                function(M) {
                    M.stopPropagation()
                }).click(
                function(M) {
                    K.close(M);
                    return false
                }).appendTo(E),G = (this.uiDialogTitlebarCloseText = B("<span/>")).addClass("ui-icon ui-icon-closethick").text(L.closeText).appendTo(H),C = B("<span/>").addClass("ui-dialog-title").attr("id", D).html(I).prependTo(E);
        E.find("*").add(E).disableSelection();
        (L.draggable && B.fn.draggable && this._makeDraggable());
        (L.resizable && B.fn.resizable && this._makeResizable());
        this._createButtons(L.buttons);
        this._isOpen = false;
        (L.bgiframe && B.fn.bgiframe && J.bgiframe());
        (L.autoOpen && this.open())
    },destroy:function() {
        (this.overlay && this.overlay.destroy());
        (this.shadow && this._destroyShadow());
        this.uiDialog.hide();
        this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
        this.uiDialog.remove();
        (this.originalTitle && this.element.attr("title", this.originalTitle))
    },close:function(C) {
        if (false === this._trigger("beforeclose", C)) {
            return
        }
        (this.overlay && this.overlay.destroy());
        (this.shadow && this._destroyShadow());
        this.uiDialog.hide(this.options.hide).unbind("keypress.ui-dialog");
        this._trigger("close", C);
        B.ui.dialog.overlay.resize();
        this._isOpen = false
    },isOpen:function() {
        return this._isOpen
    },moveToTop:function(G, F) {
        if ((this.options.modal && !G) || (!this.options.stack && !this.options.modal)) {
            return this._trigger("focus", F)
        }
        var E = this.options.zIndex,D = this.options;
        B(".ui-dialog:visible").each(function() {
            E = Math.max(E, parseInt(B(this).css("z-index"), 10) || D.zIndex)
        });
        (this.overlay && this.overlay.$el.css("z-index", ++E));
        (this.shadow && this.shadow.css("z-index", ++E));
        var C = {scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};
        this.uiDialog.css("z-index", ++E);
        this.element.attr(C);
        this._trigger("focus", F)
    },open:function(E) {
        if (this._isOpen) {
            return
        }
        var D = this.options,C = this.uiDialog;
        this.overlay = D.modal ? new B.ui.dialog.overlay(this) : null;
        (C.next().length && C.appendTo("body"));
        this._size();
        this._position(D.position);
        C.show(D.show);
        this.moveToTop(true, E);
        (D.modal && C.bind("keypress.ui-dialog", function(H) {
            if (H.keyCode != B.ui.keyCode.TAB) {
                return
            }
            var G = B(":tabbable", this),I = G.filter(":first")[0],F = G.filter(":last")[0];
            if (H.target == F && !H.shiftKey) {
                setTimeout(function() {
                    I.focus()
                }, 1)
            } else {
                if (H.target == I && H.shiftKey) {
                    setTimeout(function() {
                        F.focus()
                    }, 1)
                }
            }
        }));
        B([]).add(C.find(".ui-dialog-content :tabbable:first")).add(C.find(".ui-dialog-buttonpane :tabbable:first")).add(C.find(".ui-dialog-titlebar :tabbable:first")).filter(":first").focus();
        if (D.shadow) {
            this._createShadow()
        }
        this._trigger("open", E);
        this._isOpen = true
    },_createButtons:function(F) {
        var E = this,C = false,D = B("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
        this.uiDialog.find(".ui-dialog-buttonpane").remove();
        (typeof F == "object" && F !== null && B.each(F, function() {
            return !(C = true)
        }));
        if (C) {
            B.each(F, function(G, H) {
                B('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(G).click(
                        function() {
                            H.apply(E.element[0], arguments)
                        }).hover(
                        function() {
                            B(this).addClass("ui-state-hover")
                        },
                        function() {
                            B(this).removeClass("ui-state-hover")
                        }).focus(
                        function() {
                            B(this).addClass("ui-state-focus")
                        }).blur(
                        function() {
                            B(this).removeClass("ui-state-focus")
                        }).appendTo(D)
            });
            D.appendTo(this.uiDialog)
        }
    },_makeDraggable:function() {
        var C = this,D = this.options;
        this.uiDialog.draggable({cancel:".ui-dialog-content",helper:D.dragHelper,handle:".ui-dialog-titlebar",containment:"document",start:function() {
            (D.dragStart && D.dragStart.apply(C.element[0], arguments));
            if (B.browser.msie && B.browser.version < 7 && C.shadow) {
                C.shadow.hide()
            }
        },drag:function() {
            (D.drag && D.drag.apply(C.element[0], arguments));
            C._refreshShadow(1)
        },stop:function() {
            (D.dragStop && D.dragStop.apply(C.element[0], arguments));
            B.ui.dialog.overlay.resize();
            if (B.browser.msie && B.browser.version < 7 && C.shadow) {
                C.shadow.show()
            }
            C._refreshShadow()
        }})
    },_makeResizable:function(F) {
        F = (F === undefined ? this.options.resizable : F);
        var C = this,E = this.options,D = typeof F == "string" ? F : "n,e,s,w,se,sw,ne,nw";
        this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,helper:E.resizeHelper,maxWidth:E.maxWidth,maxHeight:E.maxHeight,minWidth:E.minWidth,minHeight:E.minHeight,start:function() {
            (E.resizeStart && E.resizeStart.apply(C.element[0], arguments));
            if (B.browser.msie && B.browser.version < 7 && C.shadow) {
                C.shadow.hide()
            }
        },resize:function() {
            (E.resize && E.resize.apply(C.element[0], arguments));
            C._refreshShadow(1)
        },handles:D,stop:function() {
            (E.resizeStop && E.resizeStop.apply(C.element[0], arguments));
            B.ui.dialog.overlay.resize();
            if (B.browser.msie && B.browser.version < 7 && C.shadow) {
                C.shadow.show()
            }
            C._refreshShadow()
        }}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
    },_position:function(H) {
        var D = B(window),E = B(document),F = E.scrollTop(),C = E.scrollLeft(),G = F;
        if (B.inArray(H, ["center","top","right","bottom","left"]) >= 0) {
            H = [H == "right" || H == "left" ? H : "center",H == "top" || H == "bottom" ? H : "middle"]
        }
        if (H.constructor != Array) {
            H = ["center","middle"]
        }
        if (H[0].constructor == Number) {
            C += H[0]
        } else {
            switch (H[0]) {case"left":C += 0;break;case"right":C += D.width() - this.uiDialog.outerWidth();break;default:case"center":C += (D.width() - this.uiDialog.outerWidth()) / 2
            }
        }
        if (H[1].constructor == Number) {
            F += H[1]
        } else {
            switch (H[1]) {case"top":F += 0;break;case"bottom":F += D.height() - this.uiDialog.outerHeight();break;default:case"middle":F += (D.height() - this.uiDialog.outerHeight()) / 2
            }
        }
        F = Math.max(F, G);
        this.uiDialog.css({top:F,left:C})
    },_setData:function(D, E) {
        (A[D] && this.uiDialog.data(A[D], E));
        switch (D) {case"buttons":this._createButtons(E);break;case"closeText":this.uiDialogTitlebarCloseText.text(E);break;case"draggable":(E ? this._makeDraggable() : this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(E);break;case"position":this._position(E);break;case"resizable":var C = this.uiDialog,F = this.uiDialog.is(":data(resizable)");(F && !E && C.resizable("destroy"));(F && typeof E == "string" && C.resizable("option", "handles", E));(F || this._makeResizable(E));break;case"title":B(".ui-dialog-title", this.uiDialogTitlebar).html(E || "&nbsp;");break;case"width":this.uiDialog.width(E);break
        }
        B.widget.prototype._setData.apply(this, arguments)
    },_size:function() {
        var D = this.options;
        this.element.css({height:0,minHeight:0,width:"auto"});
        var C = this.uiDialog.css({height:"auto",width:D.width}).height();
        this.element.css({minHeight:Math.max(D.minHeight - C, 0),height:D.height == "auto" ? "auto" : D.height - C})
    },_createShadow:function() {
        this.shadow = B('<div class="ui-widget-shadow"></div>').css("position", "absolute").appendTo(document.body);
        this._refreshShadow();
        return this.shadow
    },_refreshShadow:function(C) {
        if (C && B.browser.msie && B.browser.version < 7) {
            return
        }
        var D = this.uiDialog.offset();
        this.shadow.css({left:D.left,top:D.top,width:this.uiDialog.outerWidth(),height:this.uiDialog.outerHeight()})
    },_destroyShadow:function() {
        this.shadow.remove();
        this.shadow = null
    }});
    B.extend(B.ui.dialog, {version:"1.6rc6",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",draggable:true,height:"auto",minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,shadow:true,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,getTitleId:function(C) {
        return"ui-dialog-title-" + (C.attr("id") || ++this.uuid)
    },overlay:function(C) {
        this.$el = B.ui.dialog.overlay.create(C)
    }});
    B.extend(B.ui.dialog.overlay, {instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),
            function(C) {
                return C + ".dialog-overlay"
            }).join(" "),create:function(D) {
        if (this.instances.length === 0) {
            setTimeout(function() {
                B("a, :input").bind(B.ui.dialog.overlay.events, function() {
                    var F = false;
                    var H = B(this).parents(".ui-dialog");
                    if (H.length) {
                        var E = B(".ui-dialog-overlay");
                        if (E.length) {
                            var G = parseInt(E.css("z-index"), 10);
                            E.each(function() {
                                G = Math.max(G, parseInt(B(this).css("z-index"), 10))
                            });
                            F = parseInt(H.css("z-index"), 10) > G
                        } else {
                            F = true
                        }
                    }
                    return F
                })
            }, 1);
            B(document).bind("keydown.dialog-overlay", function(E) {
                (D.options.closeOnEscape && E.keyCode && E.keyCode == B.ui.keyCode.ESCAPE && D.close(E))
            });
            B(window).bind("resize.dialog-overlay", B.ui.dialog.overlay.resize)
        }
        var C = B("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});
        (D.options.bgiframe && B.fn.bgiframe && C.bgiframe());
        this.instances.push(C);
        return C
    },destroy:function(C) {
        this.instances.splice(B.inArray(this.instances, C), 1);
        if (this.instances.length === 0) {
            B("a, :input").add([document,window]).unbind(".dialog-overlay")
        }
        C.remove()
    },height:function() {
        if (B.browser.msie && B.browser.version < 7) {
            var D = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
            var C = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
            if (D < C) {
                return B(window).height() + "px"
            } else {
                return D + "px"
            }
        } else {
            return B(document).height() + "px"
        }
    },width:function() {
        if (B.browser.msie && B.browser.version < 7) {
            var C = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
            var D = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
            if (C < D) {
                return B(window).width() + "px"
            } else {
                return C + "px"
            }
        } else {
            return B(document).width() + "px"
        }
    },resize:function() {
        var C = B([]);
        B.each(B.ui.dialog.overlay.instances, function() {
            C = C.add(this)
        });
        C.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(A) {
    A.widget("ui.slider", A.extend({}, A.ui.mouse, {_init:function() {
        var B = this,C = this.options;
        this._keySliding = false;
        this._handleIndex = null;
        this._detectOrientation();
        this._mouseInit();
        this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all");
        this.range = A([]);
        if (C.range) {
            if (C.range === true) {
                this.range = A("<div></div>");
                if (!C.values) {
                    C.values = [this._valueMin(),this._valueMin()]
                }
                if (C.values.length && C.values.length != 2) {
                    C.values = [C.values[0],C.values[0]]
                }
            } else {
                this.range = A("<div></div>")
            }
            this.range.appendTo(this.element).addClass("ui-slider-range ui-widget-header");
            (C.range == "min") && (this.orientation == "horizontal") && this.range.css({left:0});
            (C.range == "max") && (this.orientation == "horizontal") && this.range.css({right:0});
            (C.range == "min") && (this.orientation == "vertical") && this.range.css({bottom:0});
            (C.range == "max") && (this.orientation == "vertical") && this.range.css({top:0})
        }
        if (A(".ui-slider-handle", this.element).length == 0) {
            A('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
        }
        if (C.values && C.values.length) {
            while (A(".ui-slider-handle", this.element).length < C.values.length) {
                A('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")
            }
        }
        this.handles = A(".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(D) {
                    D.preventDefault()
                }).hover(
                function() {
                    A(this).addClass("ui-state-hover")
                },
                function() {
                    A(this).removeClass("ui-state-hover")
                }).focus(
                function() {
                    B.handles.removeClass("ui-state-focus");
                    A(this).addClass("ui-state-focus")
                }).blur(function() {
            A(this).removeClass("ui-state-focus")
        });
        this.handles.each(function(D) {
            A(this).data("index.ui-slider-handle", D)
        });
        this.handles.keydown(
                function(H) {
                    var E = A(this).data("index.ui-slider-handle");
                    if (B.options.disabled) {
                        return
                    }
                    switch (H.keyCode) {case A.ui.keyCode.HOME:case A.ui.keyCode.END:case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if (!B._keySliding) {
                        B._keySliding = true;
                        A(this).addClass("ui-state-active");
                        B._start(H)
                    }break
                    }
                    var F,D,G = B._step();
                    if (B.options.values && B.options.values.length) {
                        F = D = B.values(E)
                    } else {
                        F = D = B.value()
                    }
                    switch (H.keyCode) {case A.ui.keyCode.HOME:D = B._valueMin();break;case A.ui.keyCode.END:D = B._valueMax();break;case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:if (F == B._valueMax()) {
                        return
                    }D = F + G;break;case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if (F == B._valueMin()) {
                        return
                    }D = F - G;break
                    }
                    B._slide(H, E, D)
                }).keyup(function(D) {
            if (B._keySliding) {
                B._stop(D);
                B._change(D);
                B._keySliding = false;
                A(this).removeClass("ui-state-active")
            }
        });
        this._refreshValue()
    },destroy:function() {
        this.handles.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()
    },_mouseCapture:function(D) {
        var E = this.options;
        if (E.disabled) {
            return false
        }
        this._start(D);
        this.elementSize = {width:this.element.outerWidth(),height:this.element.outerHeight()};
        this.elementOffset = this.element.offset();
        var H = {x:D.pageX,y:D.pageY};
        var J = this._normValueFromMouse(H);
        var C = this._valueMax() + 1,F;
        var K = this,I;
        this.handles.each(function(L) {
            var M = Math.abs(J - K.values(L));
            if (C > M) {
                C = M;
                F = A(this);
                I = L
            }
        });
        if (E.range && (this.values(0) + this.values(1)) == 0) {
            F = A(this.handles[++I])
        }
        K._handleIndex = I;
        F.addClass("ui-state-active").focus();
        var G = F.offset();
        var B = !A(D.target).parents().andSelf().is(".ui-slider-handle");
        this._clickOffset = B ? {left:0,top:0} : {left:D.pageX - G.left + (parseInt(F.css("marginLeft"), 10) || 0),top:D.pageY - G.top + (parseInt(F.css("marginTop"), 10) || 0)};
        J = this._normValueFromMouse(H);
        this._slide(D, I, J);
        return true
    },_mouseStart:function(B) {
        return true
    },_mouseDrag:function(D) {
        var B = {x:D.pageX,y:D.pageY};
        var C = this._normValueFromMouse(B);
        this._slide(D, this._handleIndex, C);
        return false
    },_mouseStop:function(B) {
        this.handles.removeClass("ui-state-active");
        this._stop(B);
        this._change(B);
        this._handleIndex = null;
        this._clickOffset = null;
        return false
    },_detectOrientation:function() {
        this.orientation = this.options.orientation == "auto" ? (this.element[0].offsetWidth / this.element[0].offsetHeight > 1 ? "horizontal" : "vertical") : this.options.orientation
    },_normValueFromMouse:function(D) {
        var C,H;
        if ("horizontal" == this.orientation) {
            C = this.elementSize.width;
            H = D.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)
        } else {
            C = this.elementSize.height;
            H = D.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)
        }
        var F = (H / C);
        if (F > 1) {
            F = 1
        }
        if (F < 0) {
            F = 0
        }
        if ("vertical" == this.orientation) {
            F = 1 - F
        }
        var E = this._valueMax() - this._valueMin(),I = F * E,B = I % this.options.step,G = this._valueMin() + I - B;
        if (B > (this.options.step / 2)) {
            G += this.options.step
        }
        return G
    },_start:function(B) {
        this._trigger("start", B, {value:this.value()})
    },_slide:function(F, E, D) {
        var G = this.handles[E];
        if (this.options.values && this.options.values.length) {
            var B = this.values(E ? 0 : 1);
            if ((E == 0 && D >= B) || (E == 1 && D <= B)) {
                D = B
            }
            if (D != this.values(E)) {
                var C = this.values();
                C[E] = D;
                var H = this._trigger("slide", F, {handle:G,value:D,values:C});
                var B = this.values(E ? 0 : 1);
                if (H !== false) {
                    this.values(E, D, !(F.type == "mousedown" && this.options.animate))
                }
            }
        } else {
            if (D != this.value()) {
                var H = this._trigger("slide", F, {handle:G,value:D});
                if (H !== false) {
                    this._setData("value", D, (F.type == "mousedown" && this.options.animate))
                }
            }
        }
    },_stop:function(B) {
        this._trigger("stop", B, {value:this.value()})
    },_change:function(B) {
        this._trigger("change", B, {value:this.value()})
    },value:function(B) {
        if (arguments.length) {
            this._setData("value", B);
            this._change()
        }
        return this._value()
    },values:function(C, D, B) {
        if (!this.options.animate) {
            B = true
        }
        if (arguments.length > 1) {
            this.options.values[C] = D;
            this._refreshValue(!B);
            this._change()
        }
        if (arguments.length) {
            if (this.options.values && this.options.values.length) {
                return this._values(C)
            } else {
                return this.value()
            }
        } else {
            return this._values()
        }
    },_setData:function(B, C) {
        A.widget.prototype._setData.apply(this, arguments);
        switch (B) {case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation);this._refreshValue();break;case"value":this._refreshValue();break
        }
    },_step:function() {
        var B = this.options.step;
        return B
    },_value:function() {
        var B = this.options.value;
        if (B < this._valueMin()) {
            B = this._valueMin()
        }
        if (B > this._valueMax()) {
            B = this._valueMax()
        }
        return B
    },_values:function(B) {
        if (arguments.length) {
            var C = this.options.values[B];
            if (C < this._valueMin()) {
                C = this._valueMin()
            }
            if (C > this._valueMax()) {
                C = this._valueMax()
            }
            return C
        } else {
            return this.options.values
        }
    },_valueMin:function() {
        var B = this.options.min;
        return B
    },_valueMax:function() {
        var B = this.options.max;
        return B
    },_refreshValue:function(E) {
        var H = this.options.range,G = this.options,D = this;
        if (this.options.values && this.options.values.length) {
            var C,I;
            this.handles.each(function(M, K) {
                var L = (D.values(M) - D._valueMin()) / (D._valueMax() - D._valueMin()) * 100;
                var J = {};
                J[D.orientation == "horizontal" ? "left" : "bottom"] = L + "%";
                A(this).stop(1, 1)[E ? "animate" : "css"](J, G.animate);
                if (D.options.range === true) {
                    if (D.orientation == "horizontal") {
                        (M == 0) && D.range.stop(1, 1)[E ? "animate" : "css"]({left:L + "%"}, G.animate);
                        (M == 1) && D.range[E ? "animate" : "css"]({width:(L - lastValPercent) + "%"}, {queue:false,duration:G.animate})
                    } else {
                        (M == 0) && D.range.stop(1, 1)[E ? "animate" : "css"]({bottom:(L) + "%"}, G.animate);
                        (M == 1) && D.range[E ? "animate" : "css"]({height:(L - lastValPercent) + "%"}, {queue:false,duration:G.animate})
                    }
                }
                lastValPercent = L
            })
        } else {
            var F = (this.value() - this._valueMin()) / (this._valueMax() - this._valueMin()) * 100;
            var B = {};
            B[D.orientation == "horizontal" ? "left" : "bottom"] = F + "%";
            this.handle.stop(1, 1)[E ? "animate" : "css"](B, G.animate);
            (H == "min") && (this.orientation == "horizontal") && this.range.stop(1, 1)[E ? "animate" : "css"]({left:0,width:F + "%"}, G.animate);
            (H == "max") && (this.orientation == "horizontal") && this.range[E ? "animate" : "css"]({left:F + "%",width:(100 - F) + "%"}, {queue:false,duration:G.animate});
            (H == "min") && (this.orientation == "vertical") && this.range.stop(1, 1)[E ? "animate" : "css"]({top:(100 - F) + "%",height:F + "%"}, G.animate);
            (H == "max") && (this.orientation == "vertical") && this.range[E ? "animate" : "css"]({bottom:F + "%",height:(100 - F) + "%"}, {queue:false,duration:G.animate})
        }
    }}));
    A.extend(A.ui.slider, {getter:"value values",version:"1.6rc6",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"auto",range:false,step:1,value:0,values:null}})
})(jQuery);
(function(A) {
    A.widget("ui.tabs", {_init:function() {
        this._tabify(true)
    },_setData:function(B, C) {
        if ((/^selected/).test(B)) {
            this.select(C)
        } else {
            this.options[B] = C;
            this._tabify()
        }
    },_tabId:function(B) {
        return B.title && B.title.replace(/\s/g, "_").replace(/[^A-Za-z0-9\-_:\.]/g, "") || this.options.idPrefix + A.data(B)
    },_sanitizeSelector:function(B) {
        return B.replace(/:/g, "\\:")
    },_cookie:function() {
        var B = this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + A.data(this.list[0]));
        return A.cookie.apply(null, [B].concat(A.makeArray(arguments)))
    },_ui:function(C, B) {
        return{tab:C,panel:B,index:this.$tabs.index(C)}
    },_tabify:function(O) {
        this.list = this.element.is("div") ? this.element.children("ul:first, ol:first").eq(0) : this.element;
        this.$lis = A("li:has(a[href])", this.list);
        this.$tabs = this.$lis.map(function() {
            return A("a", this)[0]
        });
        this.$panels = A([]);
        var P = this,D = this.options;
        var C = /^#.+/;
        this.$tabs.each(function(S, Q) {
            var R = A(Q).attr("href");
            if (C.test(R)) {
                P.$panels = P.$panels.add(P._sanitizeSelector(R))
            } else {
                if (R != "#") {
                    A.data(Q, "href.tabs", R);
                    A.data(Q, "load.tabs", R.replace(/#.*$/, ""));
                    var U = P._tabId(Q);
                    Q.href = "#" + U;
                    var T = A("#" + U);
                    if (!T.length) {
                        T = A(D.panelTemplate).attr("id", U).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(P.$panels[S - 1] || P.list);
                        T.data("destroy.tabs", true)
                    }
                    P.$panels = P.$panels.add(T)
                } else {
                    D.disabled.push(S + 1)
                }
            }
        });
        if (O) {
            if (this.element.is("div")) {
                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 (D.selected === undefined) {
                if (location.hash) {
                    this.$tabs.each(function(R, Q) {
                        if (Q.hash == location.hash) {
                            D.selected = R;
                            return false
                        }
                    })
                } else {
                    if (D.cookie) {
                        D.selected = parseInt(P._cookie(), 10)
                    } else {
                        if (this.$lis.filter(".ui-tabs-selected").length) {
                            D.selected = this.$lis.index(this.$lis.filter(".ui-tabs-selected"))
                        } else {
                            D.selected = 0
                        }
                    }
                }
            } else {
                if (D.selected === null) {
                    D.selected = -1
                }
            }
            D.selected = ((D.selected >= 0 && this.$tabs[D.selected]) || D.selected < 0) ? D.selected : 0;
            D.disabled = A.unique(D.disabled.concat(A.map(this.$lis.filter(".ui-state-disabled"), function(R, Q) {
                return P.$lis.index(R)
            }))).sort();
            if (A.inArray(D.selected, D.disabled) != -1) {
                D.disabled.splice(A.inArray(D.selected, D.disabled), 1)
            }
            this.$panels.addClass("ui-tabs-hide");
            this.$lis.removeClass("ui-tabs-selected ui-state-active");
            if (D.selected >= 0 && this.$tabs.length) {
                this.$panels.eq(D.selected).removeClass("ui-tabs-hide");
                var F = ["ui-tabs-selected ui-state-active"];
                if (D.deselectable) {
                    F.push("ui-tabs-deselectable")
                }
                this.$lis.eq(D.selected).addClass(F.join(" "));
                var J = function() {
                    P._trigger("show", null, P._ui(P.$tabs[D.selected], P.$panels[D.selected]))
                };
                if (A.data(this.$tabs[D.selected], "load.tabs")) {
                    this.load(D.selected, J)
                } else {
                    J()
                }
            }
            if (D.event != "mouseover") {
                var K = function(R, Q) {
                    if (Q.is(":not(.ui-state-disabled)")) {
                        Q.toggleClass("ui-state-" + R)
                    }
                };
                this.$lis.bind("mouseover.tabs mouseout.tabs", function() {
                    K("hover", A(this))
                });
                this.$tabs.bind("focus.tabs blur.tabs", function() {
                    K("focus", A(this).parents("li:first"))
                })
            }
            A(window).bind("unload", function() {
                P.$lis.add(P.$tabs).unbind(".tabs");
                P.$lis = P.$tabs = P.$panels = null
            })
        } else {
            D.selected = this.$lis.index(this.$lis.filter(".ui-tabs-selected"))
        }
        if (D.cookie) {
            this._cookie(D.selected, D.cookie)
        }
        for (var H = 0,N; N = this.$lis[H]; H++) {
            A(N)[A.inArray(H, D.disabled) != -1 && !A(N).hasClass("ui-tabs-selected") ? "addClass" : "removeClass"]("ui-state-disabled")
        }
        if (D.cache === false) {
            this.$tabs.removeData("cache.tabs")
        }
        var B,I;
        if (D.fx) {
            if (A.isArray(D.fx)) {
                B = D.fx[0];
                I = D.fx[1]
            } else {
                B = I = D.fx
            }
        }
        function E(Q, R) {
            Q.css({display:""});
            if (A.browser.msie && R.opacity) {
                Q[0].style.removeAttribute("filter")
            }
        }

        var L = I ? function(Q, R) {
            R.hide().removeClass("ui-tabs-hide").animate(I, 500, function() {
                E(R, I);
                P._trigger("show", null, P._ui(Q, R[0]))
            })
        } : function(Q, R) {
            R.removeClass("ui-tabs-hide");
            P._trigger("show", null, P._ui(Q, R[0]))
        };
        var M = B ? function(R, Q, S) {
            Q.animate(B, B.duration || "normal", function() {
                Q.addClass("ui-tabs-hide");
                E(Q, B);
                if (S) {
                    L(R, S)
                }
            })
        } : function(R, Q, S) {
            Q.addClass("ui-tabs-hide");
            if (S) {
                L(R, S)
            }
        };

        function G(S, U, Q, T) {
            var R = ["ui-tabs-selected ui-state-active"];
            if (D.deselectable) {
                R.push("ui-tabs-deselectable")
            }
            U.removeClass("ui-state-default").addClass(R.join(" ")).siblings().removeClass(R.join(" ")).addClass("ui-state-default");
            M(S, Q, T)
        }

        this.$tabs.unbind(".tabs").bind(D.event + ".tabs", function() {
            var T = A(this).parents("li:eq(0)"),Q = P.$panels.filter(":visible"),S = A(P._sanitizeSelector(this.hash));
            if ((T.hasClass("ui-state-active") && !D.deselectable) || T.hasClass("ui-state-disabled") || A(this).hasClass("ui-tabs-loading") || P._trigger("select", null, P._ui(this, S[0])) === false) {
                this.blur();
                return false
            }
            D.selected = P.$tabs.index(this);
            if (D.deselectable) {
                if (T.hasClass("ui-state-active")) {
                    D.selected = -1;
                    if (D.cookie) {
                        P._cookie(D.selected, D.cookie)
                    }
                    T.removeClass("ui-tabs-selected ui-state-active ui-tabs-deselectable").addClass("ui-state-default");
                    P.$panels.stop();
                    M(this, Q);
                    this.blur();
                    return false
                } else {
                    if (!Q.length) {
                        if (D.cookie) {
                            P._cookie(D.selected, D.cookie)
                        }
                        P.$panels.stop();
                        var R = this;
                        P.load(P.$tabs.index(this), function() {
                            T.addClass("ui-tabs-selected ui-state-active ui-tabs-deselectable").removeClass("ui-state-default");
                            L(R, S)
                        });
                        this.blur();
                        return false
                    }
                }
            }
            if (D.cookie) {
                P._cookie(D.selected, D.cookie)
            }
            P.$panels.stop();
            if (S.length) {
                var R = this;
                P.load(P.$tabs.index(this), Q.length ? function() {
                    G(R, T, Q, S)
                } : function() {
                    T.addClass("ui-tabs-selected ui-state-active").removeClass("ui-state-default");
                    L(R, S)
                })
            } else {
                throw"jQuery UI Tabs: Mismatching fragment identifier."
            }
            if (A.browser.msie) {
                this.blur()
            }
            return false
        });
        if (D.event != "click") {
            this.$tabs.bind("click.tabs", function() {
                return false
            })
        }
    },destroy:function() {
        var B = this.options;
        this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
        this.list.unbind(".tabs").removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeData("tabs");
        this.$tabs.each(function() {
            var C = A.data(this, "href.tabs");
            if (C) {
                this.href = C
            }
            var D = A(this).unbind(".tabs");
            A.each(["href","load","cache"], function(E, F) {
                D.removeData(F + ".tabs")
            })
        });
        this.$lis.unbind(".tabs").add(this.$panels).each(function() {
            if (A.data(this, "destroy.tabs")) {
                A(this).remove()
            } else {
                A(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-tabs-deselectable ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")
            }
        });
        if (B.cookie) {
            this._cookie(null, B.cookie)
        }
    },add:function(C, H, F) {
        if (F == undefined) {
            F = this.$tabs.length
        }
        var I = this,E = this.options;
        var G = A(E.tabTemplate.replace(/#\{href\}/g, C).replace(/#\{label\}/g, H));
        G.addClass("ui-state-default ui-corner-top").data("destroy.tabs", true);
        var D = C.indexOf("#") == 0 ? C.replace("#", "") : this._tabId(A("a:first-child", G)[0]);
        var J = A("#" + D);
        if (!J.length) {
            J = A(E.panelTemplate).attr("id", D).data("destroy.tabs", true)
        }
        J.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
        if (F >= this.$lis.length) {
            G.appendTo(this.list);
            J.appendTo(this.list[0].parentNode)
        } else {
            G.insertBefore(this.$lis[F]);
            J.insertBefore(this.$panels[F])
        }
        E.disabled = A.map(E.disabled, function(L, K) {
            return L >= F ? ++L : L
        });
        this._tabify();
        if (this.$tabs.length == 1) {
            G.addClass("ui-tabs-selected ui-state-active");
            J.removeClass("ui-tabs-hide");
            var B = A.data(this.$tabs[0], "load.tabs");
            if (B) {
                this.load(0, function() {
                    I._trigger("show", null, I._ui(I.$tabs[0], I.$panels[0]))
                })
            }
        }
        this._trigger("add", null, this._ui(this.$tabs[F], this.$panels[F]))
    },remove:function(B) {
        var D = this.options,E = this.$lis.eq(B).remove(),C = this.$panels.eq(B).remove();
        if (E.hasClass("ui-tabs-selected") && this.$tabs.length > 1) {
            this.select(B + (B + 1 < this.$tabs.length ? 1 : -1))
        }
        D.disabled = A.map(A.grep(D.disabled, function(G, F) {
            return G != B
        }), function(G, F) {
            return G >= B ? --G : G
        });
        this._tabify();
        this._trigger("remove", null, this._ui(E.find("a")[0], C[0]))
    },enable:function(B) {
        var C = this.options;
        if (A.inArray(B, C.disabled) == -1) {
            return
        }
        this.$lis.eq(B).removeClass("ui-state-disabled");
        C.disabled = A.grep(C.disabled, function(E, D) {
            return E != B
        });
        this._trigger("enable", null, this._ui(this.$tabs[B], this.$panels[B]))
    },disable:function(C) {
        var B = this,D = this.options;
        if (C != D.selected) {
            this.$lis.eq(C).addClass("ui-state-disabled");
            D.disabled.push(C);
            D.disabled.sort();
            this._trigger("disable", null, this._ui(this.$tabs[C], this.$panels[C]))
        }
    },select:function(B) {
        if (typeof B == "string") {
            B = this.$tabs.index(this.$tabs.filter("[href$=" + B + "]"))
        }
        this.$tabs.eq(B).trigger(this.options.event + ".tabs")
    },load:function(G, K) {
        var L = this,D = this.options,E = this.$tabs.eq(G),J = E[0],H = K == undefined || K === false,B = E.data("load.tabs");
        K = K || function() {
        };
        if (!B || !H && A.data(J, "cache.tabs")) {
            K();
            return
        }
        var M = function(N) {
            var O = A(N),P = O.find("*:last");
            return P.length && P.is(":not(img)") && P || O
        };
        var C = function() {
            L.$tabs.filter(".ui-tabs-loading").removeClass("ui-tabs-loading").each(function() {
                if (D.spinner) {
                    M(this).parent().html(M(this).data("label.tabs"))
                }
            });
            L.xhr = null
        };
        if (D.spinner) {
            var I = M(J).html();
            M(J).wrapInner("<em></em>").find("em").data("label.tabs", I).html(D.spinner)
        }
        var F = A.extend({}, D.ajaxOptions, {url:B,success:function(O, N) {
            A(L._sanitizeSelector(J.hash)).html(O);
            C();
            if (D.cache) {
                A.data(J, "cache.tabs", true)
            }
            L._trigger("load", null, L._ui(L.$tabs[G], L.$panels[G]));
            try {
                D.ajaxOptions.success(O, N)
            } catch(P) {
            }
            K()
        }});
        if (this.xhr) {
            this.xhr.abort();
            C()
        }
        E.addClass("ui-tabs-loading");
        L.xhr = A.ajax(F)
    },url:function(C, B) {
        this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs", B)
    },length:function() {
        return this.$tabs.length
    }});
    A.extend(A.ui.tabs, {version:"1.6rc6",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,deselectable:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"Loading&#8230;",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});
    A.extend(A.ui.tabs.prototype, {rotation:null,rotate:function(D, F) {
        var B = this,E = this.options.selected;

        function C() {
            clearTimeout(B.rotation);
            B.rotation = setTimeout(function() {
                E = ++E < B.$tabs.length ? E : 0;
                B.select(E)
            }, D)
        }

        if (D) {
            this.element.bind("tabsshow", C);
            this.$tabs.bind(this.options.event + ".tabs", !F ? function(G) {
                if (G.clientX) {
                    clearTimeout(B.rotation);
                    B.element.unbind("tabsshow", C)
                }
            } : function(G) {
                E = B.options.selected;
                C()
            });
            C()
        } else {
            clearTimeout(B.rotation);
            this.element.unbind("tabsshow", C);
            this.$tabs.unbind(this.options.event + ".tabs", stop)
        }
    }})
})(jQuery);
(function($) {
    $.extend($.ui, {datepicker:{version:"1.6rc6"}});
    var PROP_NAME = "datepicker";

    function Datepicker() {
        this.debug = false;
        this._curInst = null;
        this._keyEvent = false;
        this._disabledInputs = [];
        this._datepickerShowing = false;
        this._inDialog = 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"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};
        this._defaults = {showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};
        $.extend(this._defaults, this.regional[""]);
        this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')
    }

    $.extend(Datepicker.prototype, {markerClassName:"hasDatepicker",log:function() {
        if (this.debug) {
            console.log.apply("", arguments)
        }
    },setDefaults:function(settings) {
        extendRemove(this._defaults, settings || {});
        return this
    },_attachDatepicker:function(target, settings) {
        var inlineSettings = null;
        for (var attrName in this._defaults) {
            var attrValue = target.getAttribute("date:" + attrName);
            if (attrValue) {
                inlineSettings = inlineSettings || {};
                try {
                    inlineSettings[attrName] = eval(attrValue)
                } catch(err) {
                    inlineSettings[attrName] = attrValue
                }
            }
        }
        var nodeName = target.nodeName.toLowerCase();
        var inline = (nodeName == "div" || nodeName == "span");
        if (!target.id) {
            target.id = "dp" + (++this.uuid)
        }
        var inst = this._newInst($(target), inline);
        inst.settings = $.extend({}, settings || {}, inlineSettings || {});
        if (nodeName == "input") {
            this._connectDatepicker(target, inst)
        } else {
            if (inline) {
                this._inlineDatepicker(target, inst)
            }
        }
    },_newInst:function(target, inline) {
        var id = target[0].id.replace(/([:\[\]\.])/g, "\\\\$1");
        return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline ? this.dpDiv : $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}
    },_connectDatepicker:function(target, inst) {
        var input = $(target);
        if (input.hasClass(this.markerClassName)) {
            return
        }
        var appendText = this._get(inst, "appendText");
        var isRTL = this._get(inst, "isRTL");
        if (appendText) {
            input[isRTL ? "before" : "after"]('<span class="' + this._appendClass + '">' + appendText + "</span>")
        }
        var showOn = this._get(inst, "showOn");
        if (showOn == "focus" || showOn == "both") {
            input.focus(this._showDatepicker)
        }
        if (showOn == "button" || showOn == "both") {
            var buttonText = this._get(inst, "buttonText");
            var buttonImage = this._get(inst, "buttonImage");
            var trigger = $(this._get(inst, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}) : $('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage == "" ? buttonText : $("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));
            input[isRTL ? "before" : "after"](trigger);
            trigger.click(function() {
                if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target) {
                    $.datepicker._hideDatepicker()
                } else {
                    $.datepicker._showDatepicker(target)
                }
                return false
            })
        }
        input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",
                function(event, key, value) {
                    inst.settings[key] = value
                }).bind("getData.datepicker", function(event, key) {
            return this._get(inst, key)
        });
        $.data(target, PROP_NAME, inst)
    },_inlineDatepicker:function(target, inst) {
        var divSpan = $(target);
        if (divSpan.hasClass(this.markerClassName)) {
            return
        }
        divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",
                function(event, key, value) {
                    inst.settings[key] = value
                }).bind("getData.datepicker", function(event, key) {
            return this._get(inst, key)
        });
        $.data(target, PROP_NAME, inst);
        this._setDate(inst, this._getDefaultDate(inst));
        this._updateDatepicker(inst);
        this._updateAlternate(inst)
    },_dialogDatepicker:function(input, dateText, onSelect, settings, pos) {
        var inst = this._dialogInst;
        if (!inst) {
            var id = "dp" + (++this.uuid);
            this._dialogInput = $('<input type="text" id="' + id + '" size="1" style="position: absolute; top: -100px;"/>');
            this._dialogInput.keydown(this._doKeyDown);
            $("body").append(this._dialogInput);
            inst = this._dialogInst = this._newInst(this._dialogInput, false);
            inst.settings = {};
            $.data(this._dialogInput[0], PROP_NAME, inst)
        }
        extendRemove(inst.settings, settings || {});
        this._dialogInput.val(dateText);
        this._pos = (pos ? (pos.length ? pos : [pos.pageX,pos.pageY]) : null);
        if (!this._pos) {
            var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
            var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
            var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
            var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
            this._pos = [(browserWidth / 2) - 100 + scrollX,(browserHeight / 2) - 150 + scrollY]
        }
        this._dialogInput.css("left", this._pos[0] + "px").css("top", this._pos[1] + "px");
        inst.settings.onSelect = onSelect;
        this._inDialog = true;
        this.dpDiv.addClass(this._dialogClass);
        this._showDatepicker(this._dialogInput[0]);
        if ($.blockUI) {
            $.blockUI(this.dpDiv)
        }
        $.data(this._dialogInput[0], PROP_NAME, inst);
        return this
    },_destroyDatepicker:function(target) {
        var $target = $(target);
        if (!$target.hasClass(this.markerClassName)) {
            return
        }
        var nodeName = target.nodeName.toLowerCase();
        $.removeData(target, PROP_NAME);
        if (nodeName == "input") {
            $target.siblings("." + this._appendClass).remove().end().siblings("." + this._triggerClass).remove().end().removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress)
        } else {
            if (nodeName == "div" || nodeName == "span") {
                $target.removeClass(this.markerClassName).empty()
            }
        }
    },_enableDatepicker:function(target) {
        var $target = $(target);
        if (!$target.hasClass(this.markerClassName)) {
            return
        }
        var nodeName = target.nodeName.toLowerCase();
        if (nodeName == "input") {
            target.disabled = false;
            $target.siblings("button." + this._triggerClass).each(
                    function() {
                        this.disabled = false
                    }).end().siblings("img." + this._triggerClass).css({opacity:"1.0",cursor:""})
        } else {
            if (nodeName == "div" || nodeName == "span") {
                var inline = $target.children("." + this._inlineClass);
                inline.children().removeClass("ui-state-disabled")
            }
        }
        this._disabledInputs = $.map(this._disabledInputs, function(value) {
            return(value == target ? null : value)
        })
    },_disableDatepicker:function(target) {
        var $target = $(target);
        if (!$target.hasClass(this.markerClassName)) {
            return
        }
        var nodeName = target.nodeName.toLowerCase();
        if (nodeName == "input") {
            target.disabled = true;
            $target.siblings("button." + this._triggerClass).each(
                    function() {
                        this.disabled = true
                    }).end().siblings("img." + this._triggerClass).css({opacity:"0.5",cursor:"default"})
        } else {
            if (nodeName == "div" || nodeName == "span") {
                var inline = $target.children("." + this._inlineClass);
                inline.children().addClass("ui-state-disabled")
            }
        }
        this._disabledInputs = $.map(this._disabledInputs, function(value) {
            return(value == target ? null : value)
        });
        this._disabledInputs[this._disabledInputs.length] = target
    },_isDisabledDatepicker:function(target) {
        if (!target) {
            return false
        }
        for (var i = 0; i < this._disabledInputs.length; i++) {
            if (this._disabledInputs[i] == target) {
                return true
            }
        }
        return false
    },_getInst:function(target) {
        try {
            return $.data(target, PROP_NAME)
        } catch(err) {
            throw"Missing instance data for this datepicker"
        }
    },_optionDatepicker:function(target, name, value) {
        var settings = name || {};
        if (typeof name == "string") {
            settings = {};
            settings[name] = value
        }
        var inst = this._getInst(target);
        if (inst) {
            if (this._curInst == inst) {
                this._hideDatepicker(null)
            }
            extendRemove(inst.settings, settings);
            var date = new Date();
            extendRemove(inst, {rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});
            this._updateDatepicker(inst)
        }
    },_changeDatepicker:function(target, name, value) {
        this._optionDatepicker(target, name, value)
    },_refreshDatepicker:function(target) {
        var inst = this._getInst(target);
        if (inst) {
            this._updateDatepicker(inst)
        }
    },_setDateDatepicker:function(target, date, endDate) {
        var inst = this._getInst(target);
        if (inst) {
            this._setDate(inst, date, endDate);
            this._updateDatepicker(inst);
            this._updateAlternate(inst)
        }
    },_getDateDatepicker:function(target) {
        var inst = this._getInst(target);
        if (inst && !inst.inline) {
            this._setDateFromField(inst)
        }
        return(inst ? this._getDate(inst) : null)
    },_doKeyDown:function(event) {
        var inst = $.datepicker._getInst(event.target);
        var handled = true;
        var isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
        inst._keyEvent = true;
        if ($.datepicker._datepickerShowing) {
            switch (event.keyCode) {case 9:$.datepicker._hideDatepicker(null, "");break;case 13:var sel = $("td." + $.datepicker._dayOverClass + ", td." + $.datepicker._currentClass, inst.dpDiv);if (sel[0]) {
                $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0])
            } else {
                $.datepicker._hideDatepicker(null, $.datepicker._get(inst, "duration"))
            }return false;break;case 27:$.datepicker._hideDatepicker(null, $.datepicker._get(inst, "duration"));break;case 33:$.datepicker._adjustDate(event.target, (event.ctrlKey ? -$.datepicker._get(inst, "stepBigMonths") : -$.datepicker._get(inst, "stepMonths")), "M");break;case 34:$.datepicker._adjustDate(event.target, (event.ctrlKey ? +$.datepicker._get(inst, "stepBigMonths") : +$.datepicker._get(inst, "stepMonths")), "M");break;case 35:if (event.ctrlKey || event.metaKey) {
                $.datepicker._clearDate(event.target)
            }handled = event.ctrlKey || event.metaKey;break;case 36:if (event.ctrlKey || event.metaKey) {
                $.datepicker._gotoToday(event.target)
            }handled = event.ctrlKey || event.metaKey;break;case 37:if (event.ctrlKey || event.metaKey) {
                $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D")
            }handled = event.ctrlKey || event.metaKey;if (event.originalEvent.altKey) {
                $.datepicker._adjustDate(event.target, (event.ctrlKey ? -$.datepicker._get(inst, "stepBigMonths") : -$.datepicker._get(inst, "stepMonths")), "M")
            }break;case 38:if (event.ctrlKey || event.metaKey) {
                $.datepicker._adjustDate(event.target, -7, "D")
            }handled = event.ctrlKey || event.metaKey;break;case 39:if (event.ctrlKey || event.metaKey) {
                $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D")
            }handled = event.ctrlKey || event.metaKey;if (event.originalEvent.altKey) {
                $.datepicker._adjustDate(event.target, (event.ctrlKey ? +$.datepicker._get(inst, "stepBigMonths") : +$.datepicker._get(inst, "stepMonths")), "M")
            }break;case 40:if (event.ctrlKey || event.metaKey) {
                $.datepicker._adjustDate(event.target, +7, "D")
            }handled = event.ctrlKey || event.metaKey;break;default:handled = false
            }
        } else {
            if (event.keyCode == 36 && event.ctrlKey) {
                $.datepicker._showDatepicker(this)
            } else {
                handled = false
            }
        }
        if (handled) {
            event.preventDefault();
            event.stopPropagation()
        }
    },_doKeyPress:function(event) {
        var inst = $.datepicker._getInst(event.target);
        if ($.datepicker._get(inst, "constrainInput")) {
            var chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
            var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
            return event.ctrlKey || (chr < " " || !chars || chars.indexOf(chr) > -1)
        }
    },_showDatepicker:function(input) {
        input = input.target || input;
        if (input.nodeName.toLowerCase() != "input") {
            input = $("input", input.parentNode)[0]
        }
        if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) {
            return
        }
        var inst = $.datepicker._getInst(input);
        var beforeShow = $.datepicker._get(inst, "beforeShow");
        extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input,inst]) : {}));
        $.datepicker._hideDatepicker(null, "");
        $.datepicker._lastInput = input;
        $.datepicker._setDateFromField(inst);
        if ($.datepicker._inDialog) {
            input.value = ""
        }
        if (!$.datepicker._pos) {
            $.datepicker._pos = $.datepicker._findPos(input);
            $.datepicker._pos[1] += input.offsetHeight
        }
        var isFixed = false;
        $(input).parents().each(function() {
            isFixed |= $(this).css("position") == "fixed";
            return !isFixed
        });
        if (isFixed && $.browser.opera) {
            $.datepicker._pos[0] -= document.documentElement.scrollLeft;
            $.datepicker._pos[1] -= document.documentElement.scrollTop
        }
        var offset = {left:$.datepicker._pos[0],top:$.datepicker._pos[1]};
        $.datepicker._pos = null;
        inst.rangeStart = null;
        inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});
        $.datepicker._updateDatepicker(inst);
        offset = $.datepicker._checkOffset(inst, offset, isFixed);
        inst.dpDiv.css({position:($.datepicker._inDialog && $.blockUI ? "static" : (isFixed ? "fixed" : "absolute")),display:"none",left:offset.left + "px",top:offset.top + "px"});
        if (!inst.inline) {
            var showAnim = $.datepicker._get(inst, "showAnim") || "show";
            var duration = $.datepicker._get(inst, "duration");
            var postProcess = function() {
                $.datepicker._datepickerShowing = true;
                if ($.browser.msie && parseInt($.browser.version, 10) < 7) {
                    $("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width() + 4,height:inst.dpDiv.height() + 4})
                }
            };
            if ($.effects && $.effects[showAnim]) {
                inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess)
            } else {
                inst.dpDiv[showAnim](duration, postProcess)
            }
            if (duration == "") {
                postProcess()
            }
            if (inst.input[0].type != "hidden") {
                inst.input[0].focus()
            }
            $.datepicker._curInst = inst
        }
    },_updateDatepicker:function(inst) {
        var dims = {width:inst.dpDiv.width() + 4,height:inst.dpDiv.height() + 4};
        var self = this;
        inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",
                function() {
                    $(this).removeClass("ui-state-hover");
                    if (this.className.indexOf("ui-datepicker-prev") != -1) {
                        $(this).removeClass("ui-datepicker-prev-hover")
                    }
                    if (this.className.indexOf("ui-datepicker-next") != -1) {
                        $(this).removeClass("ui-datepicker-next-hover")
                    }
                }).bind("mouseover",
                function() {
                    if (!self._isDisabledDatepicker(inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
                        $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
                        $(this).addClass("ui-state-hover");
                        if (this.className.indexOf("ui-datepicker-prev") != -1) {
                            $(this).addClass("ui-datepicker-prev-hover")
                        }
                        if (this.className.indexOf("ui-datepicker-next") != -1) {
                            $(this).addClass("ui-datepicker-next-hover")
                        }
                    }
                }).end().find("." + this._dayOverClass + " a").trigger("mouseover").end();
        var numMonths = this._getNumberOfMonths(inst);
        var cols = numMonths[1];
        var width = 17;
        if (cols > 1) {
            inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em")
        } else {
            inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")
        }
        inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi");
        inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl");
        if (inst.input && inst.input[0].type != "hidden" && inst == $.datepicker._curInst) {
            $(inst.input[0]).focus()
        }
    },_checkOffset:function(inst, offset, isFixed) {
        var dpWidth = inst.dpDiv.outerWidth();
        var dpHeight = inst.dpDiv.outerHeight();
        var inputWidth = inst.input ? inst.input.outerWidth() : 0;
        var inputHeight = inst.input ? inst.input.outerHeight() : 0;
        var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();
        var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop();
        offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
        offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
        offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
        offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
        offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight * 2 - viewHeight) : 0;
        return offset
    },_findPos:function(obj) {
        while (obj && (obj.type == "hidden" || obj.nodeType != 1)) {
            obj = obj.nextSibling
        }
        var position = $(obj).offset();
        return[position.left,position.top]
    },_hideDatepicker:function(input, duration) {
        var inst = this._curInst;
        if (!inst || (input && inst != $.data(input, PROP_NAME))) {
            return
        }
        if (inst.stayOpen) {
            this._selectDate("#" + inst.id, this._formatDate(inst, inst.currentDay, inst.currentMonth, inst.currentYear))
        }
        inst.stayOpen = false;
        if (this._datepickerShowing) {
            duration = (duration != null ? duration : this._get(inst, "duration"));
            var showAnim = this._get(inst, "showAnim");
            var postProcess = function() {
                $.datepicker._tidyDialog(inst)
            };
            if (duration != "" && $.effects && $.effects[showAnim]) {
                inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess)
            } else {
                inst.dpDiv[(duration == "" ? "hide" : (showAnim == "slideDown" ? "slideUp" : (showAnim == "fadeIn" ? "fadeOut" : "hide")))](duration, postProcess)
            }
            if (duration == "") {
                this._tidyDialog(inst)
            }
            var onClose = this._get(inst, "onClose");
            if (onClose) {
                onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""),inst])
            }
            this._datepickerShowing = false;
            this._lastInput = null;
            if (this._inDialog) {
                this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});
                if ($.blockUI) {
                    $.unblockUI();
                    $("body").append(this.dpDiv)
                }
            }
            this._inDialog = false
        }
        this._curInst = null
    },_tidyDialog:function(inst) {
        inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
    },_checkExternalClick:function(event) {
        if (!$.datepicker._curInst) {
            return
        }
        var $target = $(event.target);
        if (($target.parents("#" + $.datepicker._mainDivId).length == 0) && !$target.hasClass($.datepicker.markerClassName) && !$target.hasClass($.datepicker._triggerClass) && $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI)) {
            $.datepicker._hideDatepicker(null, "")
        }
    },_adjustDate:function(id, offset, period) {
        var target = $(id);
        var inst = this._getInst(target[0]);
        if (this._isDisabledDatepicker(target[0])) {
            return
        }
        this._adjustInstDate(inst, offset + (period == "M" ? this._get(inst, "showCurrentAtPos") : 0), period);
        this._updateDatepicker(inst)
    },_gotoToday:function(id) {
        var target = $(id);
        var inst = this._getInst(target[0]);
        if (this._get(inst, "gotoCurrent") && inst.currentDay) {
            inst.selectedDay = inst.currentDay;
            inst.drawMonth = inst.selectedMonth = inst.currentMonth;
            inst.drawYear = inst.selectedYear = inst.currentYear
        } else {
            var date = new Date();
            inst.selectedDay = date.getDate();
            inst.drawMonth = inst.selectedMonth = date.getMonth();
            inst.drawYear = inst.selectedYear = date.getFullYear()
        }
        this._notifyChange(inst);
        this._adjustDate(target)
    },_selectMonthYear:function(id, select, period) {
        var target = $(id);
        var inst = this._getInst(target[0]);
        inst._selectingMonthYear = false;
        inst["selected" + (period == "M" ? "Month" : "Year")] = inst["draw" + (period == "M" ? "Month" : "Year")] = parseInt(select.options[select.selectedIndex].value, 10);
        this._notifyChange(inst);
        this._adjustDate(target)
    },_clickMonthYear:function(id) {
        var target = $(id);
        var inst = this._getInst(target[0]);
        if (inst.input && inst._selectingMonthYear && !$.browser.msie) {
            inst.input[0].focus()
        }
        inst._selectingMonthYear = !inst._selectingMonthYear
    },_selectDay:function(id, month, year, td) {
        var target = $(id);
        if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
            return
        }
        var inst = this._getInst(target[0]);
        inst.selectedDay = inst.currentDay = $("a", td).html();
        inst.selectedMonth = inst.currentMonth = month;
        inst.selectedYear = inst.currentYear = year;
        if (inst.stayOpen) {
            inst.endDay = inst.endMonth = inst.endYear = null
        }
        this._selectDate(id, this._formatDate(inst, inst.currentDay, inst.currentMonth, inst.currentYear));
        if (inst.stayOpen) {
            inst.rangeStart = this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
            this._updateDatepicker(inst)
        }
    },_clearDate:function(id) {
        var target = $(id);
        var inst = this._getInst(target[0]);
        inst.stayOpen = false;
        inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
        this._selectDate(target, "")
    },_selectDate:function(id, dateStr) {
        var target = $(id);
        var inst = this._getInst(target[0]);
        dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
        if (inst.input) {
            inst.input.val(dateStr)
        }
        this._updateAlternate(inst);
        var onSelect = this._get(inst, "onSelect");
        if (onSelect) {
            onSelect.apply((inst.input ? inst.input[0] : null), [dateStr,inst])
        } else {
            if (inst.input) {
                inst.input.trigger("change")
            }
        }
        if (inst.inline) {
            this._updateDatepicker(inst)
        } else {
            if (!inst.stayOpen) {
                this._hideDatepicker(null, this._get(inst, "duration"));
                this._lastInput = inst.input[0];
                if (typeof (inst.input[0]) != "object") {
                    inst.input[0].focus()
                }
                this._lastInput = null
            }
        }
    },_updateAlternate:function(inst) {
        var altField = this._get(inst, "altField");
        if (altField) {
            var altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
            var date = this._getDate(inst);
            dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
            $(altField).each(function() {
                $(this).val(dateStr)
            })
        }
    },noWeekends:function(date) {
        var day = date.getDay();
        return[(day > 0 && day < 6),""]
    },iso8601Week:function(date) {
        var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
        var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4);
        var firstDay = firstMon.getDay() || 7;
        firstMon.setDate(firstMon.getDate() + 1 - firstDay);
        if (firstDay < 4 && checkDate < firstMon) {
            checkDate.setDate(checkDate.getDate() - 3);
            return $.datepicker.iso8601Week(checkDate)
        } else {
            if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) {
                firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
                if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) {
                    return 1
                }
            }
        }
        return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1
    },parseDate:function(format, value, settings) {
        if (format == null || value == null) {
            throw"Invalid arguments"
        }
        value = (typeof value == "object" ? value.toString() : value + "");
        if (value == "") {
            return null
        }
        var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
        var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
        var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
        var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
        var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
        var year = -1;
        var month = -1;
        var day = -1;
        var doy = -1;
        var literal = false;
        var lookAhead = function(match) {
            var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
            if (matches) {
                iFormat++
            }
            return matches
        };
        var getNumber = function(match) {
            lookAhead(match);
            var origSize = (match == "@" ? 14 : (match == "y" ? 4 : (match == "o" ? 3 : 2)));
            var size = origSize;
            var num = 0;
            while (size > 0 && iValue < value.length && value.charAt(iValue) >= "0" && value.charAt(iValue) <= "9") {
                num = num * 10 + parseInt(value.charAt(iValue++), 10);
                size--
            }
            if (size == origSize) {
                throw"Missing number at position " + iValue
            }
            return num
        };
        var getName = function(match, shortNames, longNames) {
            var names = (lookAhead(match) ? longNames : shortNames);
            var size = 0;
            for (var j = 0; j < names.length; j++) {
                size = Math.max(size, names[j].length)
            }
            var name = "";
            var iInit = iValue;
            while (size > 0 && iValue < value.length) {
                name += value.charAt(iValue++);
                for (var i = 0; i < names.length; i++) {
                    if (name == names[i]) {
                        return i + 1
                    }
                }
                size--
            }
            throw"Unknown name at position " + iInit
        };
        var checkLiteral = function() {
            if (value.charAt(iValue) != format.charAt(iFormat)) {
                throw"Unexpected literal at position " + iValue
            }
            iValue++
        };
        var iValue = 0;
        for (var iFormat = 0; iFormat < format.length; iFormat++) {
            if (literal) {
                if (format.charAt(iFormat) == "'" && !lookAhead("'")) {
                    literal = false
                } else {
                    checkLiteral()
                }
            } else {
                switch (format.charAt(iFormat)) {case"d":day = getNumber("d");break;case"D":getName("D", dayNamesShort, dayNames);break;case"o":doy = getNumber("o");break;case"m":month = getNumber("m");break;case"M":month = getName("M", monthNamesShort, monthNames);break;case"y":year = getNumber("y");break;case"@":var date = new Date(getNumber("@"));year = date.getFullYear();month = date.getMonth() + 1;day = date.getDate();break;case"'":if (lookAhead("'")) {
                    checkLiteral()
                } else {
                    literal = true
                }break;default:checkLiteral()
                }
            }
        }
        if (year == -1) {
            year = new Date().getFullYear()
        } else {
            if (year < 100) {
                year += new Date().getFullYear() - new Date().getFullYear() % 100 + (year <= shortYearCutoff ? 0 : -100)
            }
        }
        if (doy > -1) {
            month = 1;
            day = doy;
            do{
                var dim = this._getDaysInMonth(year, month - 1);
                if (day <= dim) {
                    break
                }
                month++;
                day -= dim
            } while (true)
        }
        var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
        if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day) {
            throw"Invalid date"
        }
        return date
    },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",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format, date, settings) {
        if (!date) {
            return""
        }
        var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
        var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
        var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
        var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
        var lookAhead = function(match) {
            var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
            if (matches) {
                iFormat++
            }
            return matches
        };
        var formatNumber = function(match, value, len) {
            var num = "" + value;
            if (lookAhead(match)) {
                while (num.length < len) {
                    num = "0" + num
                }
            }
            return num
        };
        var formatName = function(match, value, shortNames, longNames) {
            return(lookAhead(match) ? longNames[value] : shortNames[value])
        };
        var output = "";
        var literal = false;
        if (date) {
            for (var iFormat = 0; iFormat < format.length; iFormat++) {
                if (literal) {
                    if (format.charAt(iFormat) == "'" && !lookAhead("'")) {
                        literal = false
                    } else {
                        output += format.charAt(iFormat)
                    }
                } else {
                    switch (format.charAt(iFormat)) {case"d":output += formatNumber("d", date.getDate(), 2);break;case"D":output += formatName("D", date.getDay(), dayNamesShort, dayNames);break;case"o":var doy = date.getDate();for (var m = date.getMonth() - 1; m >= 0; m--) {
                        doy += this._getDaysInMonth(date.getFullYear(), m)
                    }output += formatNumber("o", doy, 3);break;case"m":output += formatNumber("m", date.getMonth() + 1, 2);break;case"M":output += formatName("M", date.getMonth(), monthNamesShort, monthNames);break;case"y":output += (lookAhead("y") ? date.getFullYear() : (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);break;case"@":output += date.getTime();break;case"'":if (lookAhead("'")) {
                        output += "'"
                    } else {
                        literal = true
                    }break;default:output += format.charAt(iFormat)
                    }
                }
            }
        }
        return output
    },_possibleChars:function(format) {
        var chars = "";
        var literal = false;
        for (var iFormat = 0; iFormat < format.length; iFormat++) {
            if (literal) {
                if (format.charAt(iFormat) == "'" && !lookAhead("'")) {
                    literal = false
                } else {
                    chars += format.charAt(iFormat)
                }
            } else {
                switch (format.charAt(iFormat)) {case"d":case"m":case"y":case"@":chars += "0123456789";break;case"D":case"M":return null;case"'":if (lookAhead("'")) {
                    chars += "'"
                } else {
                    literal = true
                }break;default:chars += format.charAt(iFormat)
                }
            }
        }
        return chars
    },_get:function(inst, name) {
        return inst.settings[name] !== undefined ? inst.settings[name] : this._defaults[name]
    },_setDateFromField:function(inst) {
        var dateFormat = this._get(inst, "dateFormat");
        var dates = inst.input ? inst.input.val() : null;
        inst.endDay = inst.endMonth = inst.endYear = null;
        var date = defaultDate = this._getDefaultDate(inst);
        var settings = this._getFormatConfig(inst);
        try {
            date = this.parseDate(dateFormat, dates, settings) || defaultDate
        } catch(event) {
            this.log(event);
            date = defaultDate
        }
        inst.selectedDay = date.getDate();
        inst.drawMonth = inst.selectedMonth = date.getMonth();
        inst.drawYear = inst.selectedYear = date.getFullYear();
        inst.currentDay = (dates ? date.getDate() : 0);
        inst.currentMonth = (dates ? date.getMonth() : 0);
        inst.currentYear = (dates ? date.getFullYear() : 0);
        this._adjustInstDate(inst)
    },_getDefaultDate:function(inst) {
        var date = this._determineDate(this._get(inst, "defaultDate"), new Date());
        var minDate = this._getMinMaxDate(inst, "min", true);
        var maxDate = this._getMinMaxDate(inst, "max");
        date = (minDate && date < minDate ? minDate : date);
        date = (maxDate && date > maxDate ? maxDate : date);
        return date
    },_determineDate:function(date, defaultDate) {
        var offsetNumeric = function(offset) {
            var date = new Date();
            date.setDate(date.getDate() + offset);
            return date
        };
        var offsetString = function(offset, getDaysInMonth) {
            var date = new Date();
            var year = date.getFullYear();
            var month = date.getMonth();
            var day = date.getDate();
            var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
            var matches = pattern.exec(offset);
            while (matches) {
                switch (matches[2] || "d") {case"d":case"D":day += parseInt(matches[1], 10);break;case"w":case"W":day += parseInt(matches[1], 10) * 7;break;case"m":case"M":month += parseInt(matches[1], 10);day = Math.min(day, getDaysInMonth(year, month));break;case"y":case"Y":year += parseInt(matches[1], 10);day = Math.min(day, getDaysInMonth(year, month));break
                }
                matches = pattern.exec(offset)
            }
            return new Date(year, month, day)
        };
        date = (date == null ? defaultDate : (typeof date == "string" ? offsetString(date, this._getDaysInMonth) : (typeof date == "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
        date = (date && date.toString() == "Invalid Date" ? defaultDate : date);
        if (date) {
            date.setHours(0);
            date.setMinutes(0);
            date.setSeconds(0);
            date.setMilliseconds(0)
        }
        return this._daylightSavingAdjust(date)
    },_daylightSavingAdjust:function(date) {
        if (!date) {
            return null
        }
        date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
        return date
    },_setDate:function(inst, date, endDate) {
        var clear = !(date);
        var origMonth = inst.selectedMonth;
        var origYear = inst.selectedYear;
        date = this._determineDate(date, new Date());
        inst.selectedDay = inst.currentDay = date.getDate();
        inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
        inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
        if (origMonth != inst.selectedMonth || origYear != inst.selectedYear) {
            this._notifyChange(inst)
        }
        this._adjustInstDate(inst);
        if (inst.input) {
            inst.input.val(clear ? "" : this._formatDate(inst))
        }
    },_getDate:function(inst) {
        var startDate = (!inst.currentYear || (inst.input && inst.input.val() == "") ? null : this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
        return startDate
    },_generateHTML:function(inst) {
        var today = new Date();
        today = this._daylightSavingAdjust(new Date(today.getFullYear(), today.getMonth(), today.getDate()));
        var isRTL = this._get(inst, "isRTL");
        var showButtonPanel = this._get(inst, "showButtonPanel");
        var hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext");
        var navigationAsDateFormat = this._get(inst, "navigationAsDateFormat");
        var numMonths = this._getNumberOfMonths(inst);
        var showCurrentAtPos = this._get(inst, "showCurrentAtPos");
        var stepMonths = this._get(inst, "stepMonths");
        var stepBigMonths = this._get(inst, "stepBigMonths");
        var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
        var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
        var minDate = this._getMinMaxDate(inst, "min", true);
        var maxDate = this._getMinMaxDate(inst, "max");
        var drawMonth = inst.drawMonth - showCurrentAtPos;
        var drawYear = inst.drawYear;
        if (drawMonth < 0) {
            drawMonth += 12;
            drawYear--
        }
        if (maxDate) {
            var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
            maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
            while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
                drawMonth--;
                if (drawMonth < 0) {
                    drawMonth = 11;
                    drawYear--
                }
            }
        }
        inst.drawMonth = drawMonth;
        inst.drawYear = drawYear;
        var prevText = this._get(inst, "prevText");
        prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), this._getFormatConfig(inst)));
        var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + "', -" + stepMonths + ", 'M');\" title=\"" + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "e" : "w") + '">' + prevText + "</span></a>" : (hideIfNoPrevNext ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "e" : "w") + '">' + prevText + "</span></a>"));
        var nextText = this._get(inst, "nextText");
        nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), this._getFormatConfig(inst)));
        var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? '<a class="ui-datepicker-next ui-corner-all" onclick="jQuery.datepicker._adjustDate(\'#' + inst.id + "', +" + stepMonths + ", 'M');\" title=\"" + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "w" : "e") + '">' + nextText + "</span></a>" : (hideIfNoPrevNext ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "w" : "e") + '">' + nextText + "</span></a>"));
        var currentText = this._get(inst, "currentText");
        var gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
        currentText = (!navigationAsDateFormat ? currentText : this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
        var controls = '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="jQuery.datepicker._hideDatepicker();">' + this._get(inst, "closeText") + "</button>";
        var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : "") + (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="jQuery.datepicker._gotoToday(\'#' + inst.id + "');\">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
        var firstDay = parseInt(this._get(inst, "firstDay"), 10);
        firstDay = (isNaN(firstDay) ? 0 : firstDay);
        var dayNames = this._get(inst, "dayNames");
        var dayNamesShort = this._get(inst, "dayNamesShort");
        var dayNamesMin = this._get(inst, "dayNamesMin");
        var monthNames = this._get(inst, "monthNames");
        var monthNamesShort = this._get(inst, "monthNamesShort");
        var beforeShowDay = this._get(inst, "beforeShowDay");
        var showOtherMonths = this._get(inst, "showOtherMonths");
        var calculateWeek = this._get(inst, "calculateWeek") || this.iso8601Week;
        var endDate = inst.endDay ? this._daylightSavingAdjust(new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
        var defaultDate = this._getDefaultDate(inst);
        var html = "";
        for (var row = 0; row < numMonths[0]; row++) {
            var group = "";
            for (var col = 0; col < numMonths[1]; col++) {
                var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
                var cornerClass = " ui-corner-all";
                var calender = "";
                if (isMultiMonth) {
                    calender += '<div class="ui-datepicker-group ui-datepicker-group-';
                    switch (col) {case 0:calender += "first";cornerClass = " ui-corner-" + (isRTL ? "right" : "left");break;case numMonths[1] - 1:calender += "last";cornerClass = " ui-corner-" + (isRTL ? "left" : "right");break;default:calender += "middle";cornerClass = "";break
                    }
                    calender += '">'
                }
                calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' + (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : "") + (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : "") + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + '</div><table class="ui-datepicker-calendar"><thead><tr>';
                var thead = "";
                for (var dow = 0; dow < 7; dow++) {
                    var day = (dow + firstDay) % 7;
                    thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + '><span title="' + dayNames[day] + '">' + dayNamesMin[day] + "</span></th>"
                }
                calender += thead + "</tr></thead><tbody>";
                var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
                if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth) {
                    inst.selectedDay = Math.min(inst.selectedDay, daysInMonth)
                }
                var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
                var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7));
                var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
                for (var dRow = 0; dRow < numRows; dRow++) {
                    calender += "<tr>";
                    var tbody = "";
                    for (var dow = 0; dow < 7; dow++) {
                        var daySettings = (beforeShowDay ? beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true,""]);
                        var otherMonth = (printDate.getMonth() != drawMonth);
                        var unselectable = otherMonth || !daySettings[0] || (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
                        tbody += '<td class="' + ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (otherMonth ? " ui-datepicker-other-month" : "") + ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ? " " + this._dayOverClass : "") + (unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "") + (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? " " + this._currentClass : "") + (printDate.getTime() == today.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : "") + (unselectable ? "" : " onclick=\"jQuery.datepicker._selectDay('#" + inst.id + "'," + drawMonth + "," + drawYear + ', this);return false;"') + ">" + (otherMonth ? (showOtherMonths ? printDate.getDate() : "&#xa0;") : (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + "</span>" : '<a class="ui-state-default' + (printDate.getTime() == today.getTime() ? " ui-state-highlight" : "") + (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? " ui-state-active" : "") + '" href="#">' + printDate.getDate() + "</a>")) + "</td>";
                        printDate.setDate(printDate.getDate() + 1);
                        printDate = this._daylightSavingAdjust(printDate)
                    }
                    calender += tbody + "</tr>"
                }
                drawMonth++;
                if (drawMonth > 11) {
                    drawMonth = 0;
                    drawYear++
                }
                calender += "</tbody></table>" + (isMultiMonth ? "</div>" : "");
                group += calender
            }
            html += group
        }
        html += (!inst.inline ? buttonPanel : "") + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !inst.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : "");
        inst._keyEvent = false;
        return html
    },_generateMonthYearHeader:function(inst, drawMonth, drawYear, minDate, maxDate, selectedDate, secondary, monthNames, monthNamesShort) {
        minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
        var changeMonth = this._get(inst, "changeMonth");
        var changeYear = this._get(inst, "changeYear");
        var showMonthAfterYear = this._get(inst, "showMonthAfterYear");
        var html = '<div class="ui-datepicker-title">';
        var monthHtml = "";
        if (secondary || !changeMonth) {
            monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + "</span> "
        } else {
            var inMinYear = (minDate && minDate.getFullYear() == drawYear);
            var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
            monthHtml += '<select class="ui-datepicker-month" onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + "', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#" + inst.id + "');\">";
            for (var month = 0; month < 12; month++) {
                if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
                    monthHtml += '<option value="' + month + '"' + (month == drawMonth ? ' selected="selected"' : "") + ">" + monthNamesShort[month] + "</option>"
                }
            }
            monthHtml += "</select>"
        }
        if (!showMonthAfterYear) {
            html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? "&#xa0;" : "")
        }
        if (secondary || !changeYear) {
            html += '<span class="ui-datepicker-year">' + drawYear + "</span>"
        } else {
            var years = this._get(inst, "yearRange").split(":");
            var year = 0;
            var endYear = 0;
            if (years.length != 2) {
                year = drawYear - 10;
                endYear = drawYear + 10
            } else {
                if (years[0].charAt(0) == "+" || years[0].charAt(0) == "-") {
                    year = drawYear + parseInt(years[0], 10);
                    endYear = drawYear + parseInt(years[1], 10)
                } else {
                    year = parseInt(years[0], 10);
                    endYear = parseInt(years[1], 10)
                }
            }
            year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
            endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
            html += '<select class="ui-datepicker-year" onchange="jQuery.datepicker._selectMonthYear(\'#' + inst.id + "', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#" + inst.id + "');\">";
            for (; year <= endYear; year++) {
                html += '<option value="' + year + '"' + (year == drawYear ? ' selected="selected"' : "") + ">" + year + "</option>"
            }
            html += "</select>"
        }
        if (showMonthAfterYear) {
            html += (secondary || changeMonth || changeYear ? "&#xa0;" : "") + monthHtml
        }
        html += "</div>";
        return html
    },_adjustInstDate:function(inst, offset, period) {
        var year = inst.drawYear + (period == "Y" ? offset : 0);
        var month = inst.drawMonth + (period == "M" ? offset : 0);
        var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period == "D" ? offset : 0);
        var date = this._daylightSavingAdjust(new Date(year, month, day));
        var minDate = this._getMinMaxDate(inst, "min", true);
        var maxDate = this._getMinMaxDate(inst, "max");
        date = (minDate && date < minDate ? minDate : date);
        date = (maxDate && date > maxDate ? maxDate : date);
        inst.selectedDay = date.getDate();
        inst.drawMonth = inst.selectedMonth = date.getMonth();
        inst.drawYear = inst.selectedYear = date.getFullYear();
        if (period == "M" || period == "Y") {
            this._notifyChange(inst)
        }
    },_notifyChange:function(inst) {
        var onChange = this._get(inst, "onChangeMonthYear");
        if (onChange) {
            onChange.apply((inst.input ? inst.input[0] : null), [inst.selectedYear,inst.selectedMonth + 1,inst])
        }
    },_getNumberOfMonths:function(inst) {
        var numMonths = this._get(inst, "numberOfMonths");
        return(numMonths == null ? [1,1] : (typeof numMonths == "number" ? [1,numMonths] : numMonths))
    },_getMinMaxDate:function(inst, minMax, checkRange) {
        var date = this._determineDate(this._get(inst, minMax + "Date"), null);
        return(!checkRange || !inst.rangeStart ? date : (!date || inst.rangeStart > date ? inst.rangeStart : date))
    },_getDaysInMonth:function(year, month) {
        return 32 - new Date(year, month, 32).getDate()
    },_getFirstDayOfMonth:function(year, month) {
        return new Date(year, month, 1).getDay()
    },_canAdjustMonth:function(inst, offset, curYear, curMonth) {
        var numMonths = this._getNumberOfMonths(inst);
        var date = this._daylightSavingAdjust(new Date(curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1));
        if (offset < 0) {
            date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()))
        }
        return this._isInRange(inst, date)
    },_isInRange:function(inst, date) {
        var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
        newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
        var minDate = newMinDate || this._getMinMaxDate(inst, "min");
        var maxDate = this._getMinMaxDate(inst, "max");
        return((!minDate || date >= minDate) && (!maxDate || date <= maxDate))
    },_getFormatConfig:function(inst) {
        var shortYearCutoff = this._get(inst, "shortYearCutoff");
        shortYearCutoff = (typeof shortYearCutoff != "string" ? shortYearCutoff : new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
        return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst, "dayNamesShort"),dayNames:this._get(inst, "dayNames"),monthNamesShort:this._get(inst, "monthNamesShort"),monthNames:this._get(inst, "monthNames")}
    },_formatDate:function(inst, day, month, year) {
        if (!day) {
            inst.currentDay = inst.selectedDay;
            inst.currentMonth = inst.selectedMonth;
            inst.currentYear = inst.selectedYear
        }
        var date = (day ? (typeof day == "object" ? day : this._daylightSavingAdjust(new Date(year, month, day))) : this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
        return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst))
    }});
    function extendRemove(target, props) {
        $.extend(target, props);
        for (var name in props) {
            if (props[name] == null || props[name] == undefined) {
                target[name] = props[name]
            }
        }
        return target
    }

    function isArray(a) {
        return(a && (($.browser.safari && typeof a == "object" && a.length) || (a.constructor && a.constructor.toString().match(/\Array\(\)/))))
    }

    $.fn.datepicker = function(options) {
        if (!$.datepicker.initialized) {
            $(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);
            $.datepicker.initialized = true
        }
        var otherArgs = Array.prototype.slice.call(arguments, 1);
        if (typeof options == "string" && (options == "isDisabled" || options == "getDate")) {
            return $.datepicker["_" + options + "Datepicker"].apply($.datepicker, [this[0]].concat(otherArgs))
        }
        return this.each(function() {
            typeof options == "string" ? $.datepicker["_" + options + "Datepicker"].apply($.datepicker, [this].concat(otherArgs)) : $.datepicker._attachDatepicker(this, options)
        })
    };
    $.datepicker = new Datepicker();
    $.datepicker.initialized = false;
    $.datepicker.uuid = new Date().getTime();
    $.datepicker.version = "1.6rc6"
})(jQuery);
(function(A) {
    A.widget("ui.progressbar", {_init:function() {
        var B = this,C = this.options;
        this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});
        this.valueDiv = A('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);
        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").removeData("progressbar").unbind(".progressbar");
        this.valueDiv.remove();
        A.widget.prototype.destroy.apply(this, arguments)
    },value:function(B) {
        arguments.length && this._setData("value", B);
        return this._value()
    },_setData:function(B, C) {
        switch (B) {case"value":this.options.value = C;this._refreshValue();this._trigger("change", null, {});break
        }
        A.widget.prototype._setData.apply(this, arguments)
    },_value:function() {
        var B = this.options.value;
        if (B < this._valueMin()) {
            B = this._valueMin()
        }
        if (B > this._valueMax()) {
            B = this._valueMax()
        }
        return B
    },_valueMin:function() {
        var B = 0;
        return B
    },_valueMax:function() {
        var B = 100;
        return B
    },_refreshValue:function() {
        var B = this.value();
        this.valueDiv[B == this._valueMax() ? "addClass" : "removeClass"]("ui-corner-right");
        this.valueDiv.width(B + "%");
        this.element.attr("aria-valuenow", B)
    }});
    A.extend(A.ui.progressbar, {version:"1.6rc6",defaults:{value:0}})
})(jQuery);
(function(D) {
    D.effects = D.effects || {};
    D.extend(D.effects, {version:"1.6rc6",save:function(G, H) {
        for (var F = 0; F < H.length; F++) {
            if (H[F] !== null) {
                G.data("ec.storage." + H[F], G[0].style[H[F]])
            }
        }
    },restore:function(G, H) {
        for (var F = 0; F < H.length; F++) {
            if (H[F] !== null) {
                G.css(H[F], G.data("ec.storage." + H[F]))
            }
        }
    },setMode:function(F, G) {
        if (G == "toggle") {
            G = F.is(":hidden") ? "show" : "hide"
        }
        return G
    },getBaseline:function(G, H) {
        var I,F;
        switch (G[0]) {case"top":I = 0;break;case"middle":I = 0.5;break;case"bottom":I = 1;break;default:I = G[0] / H.height
        }
        switch (G[1]) {case"left":F = 0;break;case"center":F = 0.5;break;case"right":F = 1;break;default:F = G[1] / H.width
        }
        return{x:F,y:I}
    },createWrapper:function(F) {
        if (F.parent().is(".ui-effects-wrapper")) {
            return F.parent()
        }
        var G = {width:F.outerWidth(true),height:F.outerHeight(true),"float":F.css("float")};
        F.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
        var J = F.parent();
        if (F.css("position") == "static") {
            J.css({position:"relative"});
            F.css({position:"relative"})
        } else {
            var I = F.css("top");
            if (isNaN(parseInt(I, 10))) {
                I = "auto"
            }
            var H = F.css("left");
            if (isNaN(parseInt(H, 10))) {
                H = "auto"
            }
            J.css({position:F.css("position"),top:I,left:H,zIndex:F.css("z-index")}).show();
            F.css({position:"relative",top:0,left:0})
        }
        J.css(G);
        return J
    },removeWrapper:function(F) {
        if (F.parent().is(".ui-effects-wrapper")) {
            return F.parent().replaceWith(F)
        }
        return F
    },setTransition:function(G, I, F, H) {
        H = H || {};
        D.each(I, function(K, J) {
            unit = G.cssUnit(J);
            if (unit[0] > 0) {
                H[J] = unit[0] * F + unit[1]
            }
        });
        return H
    },animateClass:function(H, I, K, J) {
        var F = (typeof K == "function" ? K : (J ? J : null));
        var G = (typeof K == "string" ? K : null);
        return this.each(function() {
            var P = {};
            var N = D(this);
            var O = N.attr("style") || "";
            if (typeof O == "object") {
                O = O["cssText"]
            }
            if (H.toggle) {
                N.hasClass(H.toggle) ? H.remove = H.toggle : H.add = H.toggle
            }
            var L = D.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle));
            if (H.add) {
                N.addClass(H.add)
            }
            if (H.remove) {
                N.removeClass(H.remove)
            }
            var M = D.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle));
            if (H.add) {
                N.removeClass(H.add)
            }
            if (H.remove) {
                N.addClass(H.remove)
            }
            for (var Q in M) {
                if (typeof M[Q] != "function" && M[Q] && Q.indexOf("Moz") == -1 && Q.indexOf("length") == -1 && M[Q] != L[Q] && (Q.match(/color/i) || (!Q.match(/color/i) && !isNaN(parseInt(M[Q], 10)))) && (L.position != "static" || (L.position == "static" && !Q.match(/left|top|bottom|right/)))) {
                    P[Q] = M[Q]
                }
            }
            N.animate(P, I, G, function() {
                if (typeof D(this).attr("style") == "object") {
                    D(this).attr("style")["cssText"] = "";
                    D(this).attr("style")["cssText"] = O
                } else {
                    D(this).attr("style", O)
                }
                if (H.add) {
                    D(this).addClass(H.add)
                }
                if (H.remove) {
                    D(this).removeClass(H.remove)
                }
                if (F) {
                    F.apply(this, arguments)
                }
            })
        })
    }});
    function C(G, F) {
        var I = G[1] && G[1].constructor == Object ? G[1] : {};
        if (F) {
            I.mode = F
        }
        var H = G[1] && G[1].constructor != Object ? G[1] : I.duration;
        H = D.fx.off ? 0 : typeof H === "number" ? H : D.fx.speeds[H] || D.fx.speeds._default;
        var J = I.callback || (D.isFunction(G[2]) && G[2]) || (D.isFunction(G[3]) && G[3]);
        return[G[0],I,H,J]
    }

    D.fn.extend({_show:D.fn.show,_hide:D.fn.hide,__toggle:D.fn.toggle,_addClass:D.fn.addClass,_removeClass:D.fn.removeClass,_toggleClass:D.fn.toggleClass,effect:function(G, F, H, I) {
        return D.effects[G] ? D.effects[G].call(this, {method:G,options:F || {},duration:H,callback:I}) : null
    },show:function() {
        if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) {
            return this._show.apply(this, arguments)
        } else {
            return this.effect.apply(this, C(arguments, "show"))
        }
    },hide:function() {
        if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) {
            return this._hide.apply(this, arguments)
        } else {
            return this.effect.apply(this, C(arguments, "hide"))
        }
    },toggle:function() {
        if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (arguments[0].constructor == Function)) {
            return this.__toggle.apply(this, arguments)
        } else {
            return this.effect.apply(this, C(arguments, "toggle"))
        }
    },addClass:function(G, F, I, H) {
        return F ? D.effects.animateClass.apply(this, [
            {add:G},
            F,
            I,
            H
        ]) : this._addClass(G)
    },removeClass:function(G, F, I, H) {
        return F ? D.effects.animateClass.apply(this, [
            {remove:G},
            F,
            I,
            H
        ]) : this._removeClass(G)
    },toggleClass:function(G, F, I, H) {
        return((typeof F !== "boolean") && F) ? D.effects.animateClass.apply(this, [
            {toggle:G},
            F,
            I,
            H
        ]) : this._toggleClass(G, F)
    },morph:function(F, H, G, J, I) {
        return D.effects.animateClass.apply(this, [
            {add:H,remove:F},
            G,
            J,
            I
        ])
    },switchClass:function() {
        return this.morph.apply(this, arguments)
    },cssUnit:function(F) {
        var G = this.css(F),H = [];
        D.each(["em","px","%","pt"], function(I, J) {
            if (G.indexOf(J) > 0) {
                H = [parseFloat(G),J]
            }
        });
        return H
    }});
    D.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"], function(G, F) {
        D.fx.step[F] = function(H) {
            if (H.state == 0) {
                H.start = E(H.elem, F);
                H.end = B(H.end)
            }
            H.elem.style[F] = "rgb(" + [Math.max(Math.min(parseInt((H.pos * (H.end[0] - H.start[0])) + H.start[0], 10), 255), 0),Math.max(Math.min(parseInt((H.pos * (H.end[1] - H.start[1])) + H.start[1], 10), 255), 0),Math.max(Math.min(parseInt((H.pos * (H.end[2] - H.start[2])) + H.start[2], 10), 255), 0)].join(",") + ")"
        }
    });
    function B(G) {
        var F;
        if (G && G.constructor == Array && G.length == 3) {
            return G
        }
        if (F = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(G)) {
            return[parseInt(F[1], 10),parseInt(F[2], 10),parseInt(F[3], 10)]
        }
        if (F = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(G)) {
            return[parseFloat(F[1]) * 2.55,parseFloat(F[2]) * 2.55,parseFloat(F[3]) * 2.55]
        }
        if (F = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(G)) {
            return[parseInt(F[1], 16),parseInt(F[2], 16),parseInt(F[3], 16)]
        }
        if (F = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(G)) {
            return[parseInt(F[1] + F[1], 16),parseInt(F[2] + F[2], 16),parseInt(F[3] + F[3], 16)]
        }
        if (F = /rgba\(0, 0, 0, 0\)/.exec(G)) {
            return A["transparent"]
        }
        return A[D.trim(G).toLowerCase()]
    }

    function E(H, F) {
        var G;
        do{
            G = D.curCSS(H, F);
            if (G != "" && G != "transparent" || D.nodeName(H, "body")) {
                break
            }
            F = "backgroundColor"
        } while (H = H.parentNode);
        return B(G)
    }

    var A = {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]};
    D.easing.jswing = D.easing.swing;
    D.extend(D.easing, {def:"easeOutQuad",swing:function(G, H, F, J, I) {
        return D.easing[D.easing.def](G, H, F, J, I)
    },easeInQuad:function(G, H, F, J, I) {
        return J * (H /= I) * H + F
    },easeOutQuad:function(G, H, F, J, I) {
        return -J * (H /= I) * (H - 2) + F
    },easeInOutQuad:function(G, H, F, J, I) {
        if ((H /= I / 2) < 1) {
            return J / 2 * H * H + F
        }
        return -J / 2 * ((--H) * (H - 2) - 1) + F
    },easeInCubic:function(G, H, F, J, I) {
        return J * (H /= I) * H * H + F
    },easeOutCubic:function(G, H, F, J, I) {
        return J * ((H = H / I - 1) * H * H + 1) + F
    },easeInOutCubic:function(G, H, F, J, I) {
        if ((H /= I / 2) < 1) {
            return J / 2 * H * H * H + F
        }
        return J / 2 * ((H -= 2) * H * H + 2) + F
    },easeInQuart:function(G, H, F, J, I) {
        return J * (H /= I) * H * H * H + F
    },easeOutQuart:function(G, H, F, J, I) {
        return -J * ((H = H / I - 1) * H * H * H - 1) + F
    },easeInOutQuart:function(G, H, F, J, I) {
        if ((H /= I / 2) < 1) {
            return J / 2 * H * H * H * H + F
        }
        return -J / 2 * ((H -= 2) * H * H * H - 2) + F
    },easeInQuint:function(G, H, F, J, I) {
        return J * (H /= I) * H * H * H * H + F
    },easeOutQuint:function(G, H, F, J, I) {
        return J * ((H = H / I - 1) * H * H * H * H + 1) + F
    },easeInOutQuint:function(G, H, F, J, I) {
        if ((H /= I / 2) < 1) {
            return J / 2 * H * H * H * H * H + F
        }
        return J / 2 * ((H -= 2) * H * H * H * H + 2) + F
    },easeInSine:function(G, H, F, J, I) {
        return -J * Math.cos(H / I * (Math.PI / 2)) + J + F
    },easeOutSine:function(G, H, F, J, I) {
        return J * Math.sin(H / I * (Math.PI / 2)) + F
    },easeInOutSine:function(G, H, F, J, I) {
        return -J / 2 * (Math.cos(Math.PI * H / I) - 1) + F
    },easeInExpo:function(G, H, F, J, I) {
        return(H == 0) ? F : J * Math.pow(2, 10 * (H / I - 1)) + F
    },easeOutExpo:function(G, H, F, J, I) {
        return(H == I) ? F + J : J * (-Math.pow(2, -10 * H / I) + 1) + F
    },easeInOutExpo:function(G, H, F, J, I) {
        if (H == 0) {
            return F
        }
        if (H == I) {
            return F + J
        }
        if ((H /= I / 2) < 1) {
            return J / 2 * Math.pow(2, 10 * (H - 1)) + F
        }
        return J / 2 * (-Math.pow(2, -10 * --H) + 2) + F
    },easeInCirc:function(G, H, F, J, I) {
        return -J * (Math.sqrt(1 - (H /= I) * H) - 1) + F
    },easeOutCirc:function(G, H, F, J, I) {
        return J * Math.sqrt(1 - (H = H / I - 1) * H) + F
    },easeInOutCirc:function(G, H, F, J, I) {
        if ((H /= I / 2) < 1) {
            return -J / 2 * (Math.sqrt(1 - H * H) - 1) + F
        }
        return J / 2 * (Math.sqrt(1 - (H -= 2) * H) + 1) + F
    },easeInElastic:function(G, I, F, M, L) {
        var J = 1.70158;
        var K = 0;
        var H = M;
        if (I == 0) {
            return F
        }
        if ((I /= L) == 1) {
            return F + M
        }
        if (!K) {
            K = L * 0.3
        }
        if (H < Math.abs(M)) {
            H = M;
            var J = K / 4
        } else {
            var J = K / (2 * Math.PI) * Math.asin(M / H)
        }
        return -(H * Math.pow(2, 10 * (I -= 1)) * Math.sin((I * L - J) * (2 * Math.PI) / K)) + F
    },easeOutElastic:function(G, I, F, M, L) {
        var J = 1.70158;
        var K = 0;
        var H = M;
        if (I == 0) {
            return F
        }
        if ((I /= L) == 1) {
            return F + M
        }
        if (!K) {
            K = L * 0.3
        }
        if (H < Math.abs(M)) {
            H = M;
            var J = K / 4
        } else {
            var J = K / (2 * Math.PI) * Math.asin(M / H)
        }
        return H * Math.pow(2, -10 * I) * Math.sin((I * L - J) * (2 * Math.PI) / K) + M + F
    },easeInOutElastic:function(G, I, F, M, L) {
        var J = 1.70158;
        var K = 0;
        var H = M;
        if (I == 0) {
            return F
        }
        if ((I /= L / 2) == 2) {
            return F + M
        }
        if (!K) {
            K = L * (0.3 * 1.5)
        }
        if (H < Math.abs(M)) {
            H = M;
            var J = K / 4
        } else {
            var J = K / (2 * Math.PI) * Math.asin(M / H)
        }
        if (I < 1) {
            return -0.5 * (H * Math.pow(2, 10 * (I -= 1)) * Math.sin((I * L - J) * (2 * Math.PI) / K)) + F
        }
        return H * Math.pow(2, -10 * (I -= 1)) * Math.sin((I * L - J) * (2 * Math.PI) / K) * 0.5 + M + F
    },easeInBack:function(G, H, F, K, J, I) {
        if (I == undefined) {
            I = 1.70158
        }
        return K * (H /= J) * H * ((I + 1) * H - I) + F
    },easeOutBack:function(G, H, F, K, J, I) {
        if (I == undefined) {
            I = 1.70158
        }
        return K * ((H = H / J - 1) * H * ((I + 1) * H + I) + 1) + F
    },easeInOutBack:function(G, H, F, K, J, I) {
        if (I == undefined) {
            I = 1.70158
        }
        if ((H /= J / 2) < 1) {
            return K / 2 * (H * H * (((I *= (1.525)) + 1) * H - I)) + F
        }
        return K / 2 * ((H -= 2) * H * (((I *= (1.525)) + 1) * H + I) + 2) + F
    },easeInBounce:function(G, H, F, J, I) {
        return J - D.easing.easeOutBounce(G, I - H, 0, J, I) + F
    },easeOutBounce:function(G, H, F, J, I) {
        if ((H /= I) < (1 / 2.75)) {
            return J * (7.5625 * H * H) + F
        } else {
            if (H < (2 / 2.75)) {
                return J * (7.5625 * (H -= (1.5 / 2.75)) * H + 0.75) + F
            } else {
                if (H < (2.5 / 2.75)) {
                    return J * (7.5625 * (H -= (2.25 / 2.75)) * H + 0.9375) + F
                } else {
                    return J * (7.5625 * (H -= (2.625 / 2.75)) * H + 0.984375) + F
                }
            }
        }
    },easeInOutBounce:function(G, H, F, J, I) {
        if (H < I / 2) {
            return D.easing.easeInBounce(G, H * 2, 0, J, I) * 0.5 + F
        }
        return D.easing.easeOutBounce(G, H * 2 - I, 0, J, I) * 0.5 + J * 0.5 + F
    }})
})(jQuery);
(function(A) {
    A.effects.blind = function(B) {
        return this.queue(function() {
            var D = A(this),C = ["position","top","left"];
            var H = A.effects.setMode(D, B.options.mode || "hide");
            var G = B.options.direction || "vertical";
            A.effects.save(D, C);
            D.show();
            var J = A.effects.createWrapper(D).css({overflow:"hidden"});
            var E = (G == "vertical") ? "height" : "width";
            var I = (G == "vertical") ? J.height() : J.width();
            if (H == "show") {
                J.css(E, 0)
            }
            var F = {};
            F[E] = H == "show" ? I : 0;
            J.animate(F, B.duration, B.options.easing, function() {
                if (H == "hide") {
                    D.hide()
                }
                A.effects.restore(D, C);
                A.effects.removeWrapper(D);
                if (B.callback) {
                    B.callback.apply(D[0], arguments)
                }
                D.dequeue()
            })
        })
    }
})(jQuery);
(function(A) {
    A.effects.bounce = function(B) {
        return this.queue(function() {
            var E = A(this),K = ["position","top","left"];
            var J = A.effects.setMode(E, B.options.mode || "effect");
            var M = B.options.direction || "up";
            var C = B.options.distance || 20;
            var D = B.options.times || 5;
            var G = B.duration || 250;
            if (/show|hide/.test(J)) {
                K.push("opacity")
            }
            A.effects.save(E, K);
            E.show();
            A.effects.createWrapper(E);
            var F = (M == "up" || M == "down") ? "top" : "left";
            var O = (M == "up" || M == "left") ? "pos" : "neg";
            var C = B.options.distance || (F == "top" ? E.outerHeight({margin:true}) / 3 : E.outerWidth({margin:true}) / 3);
            if (J == "show") {
                E.css("opacity", 0).css(F, O == "pos" ? -C : C)
            }
            if (J == "hide") {
                C = C / (D * 2)
            }
            if (J != "hide") {
                D--
            }
            if (J == "show") {
                var H = {opacity:1};
                H[F] = (O == "pos" ? "+=" : "-=") + C;
                E.animate(H, G / 2, B.options.easing);
                C = C / 2;
                D--
            }
            for (var I = 0; I < D; I++) {
                var N = {},L = {};
                N[F] = (O == "pos" ? "-=" : "+=") + C;
                L[F] = (O == "pos" ? "+=" : "-=") + C;
                E.animate(N, G / 2, B.options.easing).animate(L, G / 2, B.options.easing);
                C = (J == "hide") ? C * 2 : C / 2
            }
            if (J == "hide") {
                var H = {opacity:0};
                H[F] = (O == "pos" ? "-=" : "+=") + C;
                E.animate(H, G / 2, B.options.easing, function() {
                    E.hide();
                    A.effects.restore(E, K);
                    A.effects.removeWrapper(E);
                    if (B.callback) {
                        B.callback.apply(this, arguments)
                    }
                })
            } else {
                var N = {},L = {};
                N[F] = (O == "pos" ? "-=" : "+=") + C;
                L[F] = (O == "pos" ? "+=" : "-=") + C;
                E.animate(N, G / 2, B.options.easing).animate(L, G / 2, B.options.easing, function() {
                    A.effects.restore(E, K);
                    A.effects.removeWrapper(E);
                    if (B.callback) {
                        B.callback.apply(this, arguments)
                    }
                })
            }
            E.queue("fx", function() {
                E.dequeue()
            });
            E.dequeue()
        })
    }
})(jQuery);
(function(A) {
    A.effects.clip = function(B) {
        return this.queue(function() {
            var F = A(this),J = ["position","top","left","height","width"];
            var I = A.effects.setMode(F, B.options.mode || "hide");
            var K = B.options.direction || "vertical";
            A.effects.save(F, J);
            F.show();
            var C = A.effects.createWrapper(F).css({overflow:"hidden"});
            var E = F[0].tagName == "IMG" ? C : F;
            var G = {size:(K == "vertical") ? "height" : "width",position:(K == "vertical") ? "top" : "left"};
            var D = (K == "vertical") ? E.height() : E.width();
            if (I == "show") {
                E.css(G.size, 0);
                E.css(G.position, D / 2)
            }
            var H = {};
            H[G.size] = I == "show" ? D : 0;
            H[G.position] = I == "show" ? 0 : D / 2;
            E.animate(H, {queue:false,duration:B.duration,easing:B.options.easing,complete:function() {
                if (I == "hide") {
                    F.hide()
                }
                A.effects.restore(F, J);
                A.effects.removeWrapper(F);
                if (B.callback) {
                    B.callback.apply(F[0], arguments)
                }
                F.dequeue()
            }})
        })
    }
})(jQuery);
(function(A) {
    A.effects.drop = function(B) {
        return this.queue(function() {
            var E = A(this),D = ["position","top","left","opacity"];
            var I = A.effects.setMode(E, B.options.mode || "hide");
            var H = B.options.direction || "left";
            A.effects.save(E, D);
            E.show();
            A.effects.createWrapper(E);
            var F = (H == "up" || H == "down") ? "top" : "left";
            var C = (H == "up" || H == "left") ? "pos" : "neg";
            var J = B.options.distance || (F == "top" ? E.outerHeight({margin:true}) / 2 : E.outerWidth({margin:true}) / 2);
            if (I == "show") {
                E.css("opacity", 0).css(F, C == "pos" ? -J : J)
            }
            var G = {opacity:I == "show" ? 1 : 0};
            G[F] = (I == "show" ? (C == "pos" ? "+=" : "-=") : (C == "pos" ? "-=" : "+=")) + J;
            E.animate(G, {queue:false,duration:B.duration,easing:B.options.easing,complete:function() {
                if (I == "hide") {
                    E.hide()
                }
                A.effects.restore(E, D);
                A.effects.removeWrapper(E);
                if (B.callback) {
                    B.callback.apply(this, arguments)
                }
                E.dequeue()
            }})
        })
    }
})(jQuery);
(function(A) {
    A.effects.explode = function(B) {
        return this.queue(function() {
            var I = B.options.pieces ? Math.round(Math.sqrt(B.options.pieces)) : 3;
            var E = B.options.pieces ? Math.round(Math.sqrt(B.options.pieces)) : 3;
            B.options.mode = B.options.mode == "toggle" ? (A(this).is(":visible") ? "hide" : "show") : B.options.mode;
            var H = A(this).show().css("visibility", "hidden");
            var J = H.offset();
            J.top -= parseInt(H.css("marginTop")) || 0;
            J.left -= parseInt(H.css("marginLeft")) || 0;
            var G = H.outerWidth(true);
            var C = H.outerHeight(true);
            for (var F = 0; F < I; F++) {
                for (var D = 0; D < E; D++) {
                    H.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-D * (G / E),top:-F * (C / I)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:G / E,height:C / I,left:J.left + D * (G / E) + (B.options.mode == "show" ? (D - Math.floor(E / 2)) * (G / E) : 0),top:J.top + F * (C / I) + (B.options.mode == "show" ? (F - Math.floor(I / 2)) * (C / I) : 0),opacity:B.options.mode == "show" ? 0 : 1}).animate({left:J.left + D * (G / E) + (B.options.mode == "show" ? 0 : (D - Math.floor(E / 2)) * (G / E)),top:J.top + F * (C / I) + (B.options.mode == "show" ? 0 : (F - Math.floor(I / 2)) * (C / I)),opacity:B.options.mode == "show" ? 1 : 0}, B.duration || 500)
                }
            }
            setTimeout(function() {
                B.options.mode == "show" ? H.css({visibility:"visible"}) : H.css({visibility:"visible"}).hide();
                if (B.callback) {
                    B.callback.apply(H[0])
                }
                H.dequeue();
                A("div.ui-effects-explode").remove()
            }, B.duration || 500)
        })
    }
})(jQuery);
(function(A) {
    A.effects.fold = function(B) {
        return this.queue(function() {
            var E = A(this),K = ["position","top","left"];
            var H = A.effects.setMode(E, B.options.mode || "hide");
            var O = B.options.size || 15;
            var N = !(!B.options.horizFirst);
            var G = B.duration ? B.duration / 2 : A.fx.speeds._default / 2;
            A.effects.save(E, K);
            E.show();
            var D = A.effects.createWrapper(E).css({overflow:"hidden"});
            var I = ((H == "show") != N);
            var F = I ? ["width","height"] : ["height","width"];
            var C = I ? [D.width(),D.height()] : [D.height(),D.width()];
            var J = /([0-9]+)%/.exec(O);
            if (J) {
                O = parseInt(J[1]) / 100 * C[H == "hide" ? 0 : 1]
            }
            if (H == "show") {
                D.css(N ? {height:0,width:O} : {height:O,width:0})
            }
            var M = {},L = {};
            M[F[0]] = H == "show" ? C[0] : O;
            L[F[1]] = H == "show" ? C[1] : 0;
            D.animate(M, G, B.options.easing).animate(L, G, B.options.easing, function() {
                if (H == "hide") {
                    E.hide()
                }
                A.effects.restore(E, K);
                A.effects.removeWrapper(E);
                if (B.callback) {
                    B.callback.apply(E[0], arguments)
                }
                E.dequeue()
            })
        })
    }
})(jQuery);
(function(A) {
    A.effects.highlight = function(B) {
        return this.queue(function() {
            var E = A(this),D = ["backgroundImage","backgroundColor","opacity"];
            var H = A.effects.setMode(E, B.options.mode || "show");
            var C = B.options.color || "#ffff99";
            var G = E.css("backgroundColor");
            A.effects.save(E, D);
            E.show();
            E.css({backgroundImage:"none",backgroundColor:C});
            var F = {backgroundColor:G};
            if (H == "hide") {
                F["opacity"] = 0
            }
            E.animate(F, {queue:false,duration:B.duration,easing:B.options.easing,complete:function() {
                if (H == "hide") {
                    E.hide()
                }
                A.effects.restore(E, D);
                if (H == "show" && A.browser.msie) {
                    this.style.removeAttribute("filter")
                }
                if (B.callback) {
                    B.callback.apply(this, arguments)
                }
                E.dequeue()
            }})
        })
    }
})(jQuery);
(function(A) {
    A.effects.pulsate = function(B) {
        return this.queue(function() {
            var D = A(this);
            var G = A.effects.setMode(D, B.options.mode || "show");
            var F = B.options.times || 5;
            var E = B.duration ? B.duration / 2 : A.fx.speeds._default / 2;
            if (G == "hide") {
                F--
            }
            if (D.is(":hidden")) {
                D.css("opacity", 0);
                D.show();
                D.animate({opacity:1}, E, B.options.easing);
                F = F - 2
            }
            for (var C = 0; C < F; C++) {
                D.animate({opacity:0}, E, B.options.easing).animate({opacity:1}, E, B.options.easing)
            }
            if (G == "hide") {
                D.animate({opacity:0}, E, B.options.easing, function() {
                    D.hide();
                    if (B.callback) {
                        B.callback.apply(this, arguments)
                    }
                })
            } else {
                D.animate({opacity:0}, E, B.options.easing).animate({opacity:1}, E, B.options.easing, function() {
                    if (B.callback) {
                        B.callback.apply(this, arguments)
                    }
                })
            }
            D.queue("fx", function() {
                D.dequeue()
            });
            D.dequeue()
        })
    }
})(jQuery);
(function(A) {
    A.effects.puff = function(B) {
        return this.queue(function() {
            var F = A(this);
            var C = A.extend(true, {}, B.options);
            var H = A.effects.setMode(F, B.options.mode || "hide");
            var G = parseInt(B.options.percent) || 150;
            C.fade = true;
            var E = {height:F.height(),width:F.width()};
            var D = G / 100;
            F.from = (H == "hide") ? E : {height:E.height * D,width:E.width * D};
            C.from = F.from;
            C.percent = (H == "hide") ? G : 100;
            C.mode = H;
            F.effect("scale", C, B.duration, B.callback);
            F.dequeue()
        })
    };
    A.effects.scale = function(B) {
        return this.queue(function() {
            var G = A(this);
            var D = A.extend(true, {}, B.options);
            var J = A.effects.setMode(G, B.options.mode || "effect");
            var H = parseInt(B.options.percent) || (parseInt(B.options.percent) == 0 ? 0 : (J == "hide" ? 0 : 100));
            var I = B.options.direction || "both";
            var C = B.options.origin;
            if (J != "effect") {
                D.origin = C || ["middle","center"];
                D.restore = true
            }
            var F = {height:G.height(),width:G.width()};
            G.from = B.options.from || (J == "show" ? {height:0,width:0} : F);
            var E = {y:I != "horizontal" ? (H / 100) : 1,x:I != "vertical" ? (H / 100) : 1};
            G.to = {height:F.height * E.y,width:F.width * E.x};
            if (B.options.fade) {
                if (J == "show") {
                    G.from.opacity = 0;
                    G.to.opacity = 1
                }
                if (J == "hide") {
                    G.from.opacity = 1;
                    G.to.opacity = 0
                }
            }
            D.from = G.from;
            D.to = G.to;
            D.mode = J;
            G.effect("size", D, B.duration, B.callback);
            G.dequeue()
        })
    };
    A.effects.size = function(B) {
        return this.queue(function() {
            var C = A(this),N = ["position","top","left","width","height","overflow","opacity"];
            var M = ["position","top","left","overflow","opacity"];
            var J = ["width","height","overflow"];
            var P = ["fontSize"];
            var K = ["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];
            var F = ["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];
            var G = A.effects.setMode(C, B.options.mode || "effect");
            var I = B.options.restore || false;
            var E = B.options.scale || "both";
            var O = B.options.origin;
            var D = {height:C.height(),width:C.width()};
            C.from = B.options.from || D;
            C.to = B.options.to || D;
            if (O) {
                var H = A.effects.getBaseline(O, D);
                C.from.top = (D.height - C.from.height) * H.y;
                C.from.left = (D.width - C.from.width) * H.x;
                C.to.top = (D.height - C.to.height) * H.y;
                C.to.left = (D.width - C.to.width) * H.x
            }
            var L = {from:{y:C.from.height / D.height,x:C.from.width / D.width},to:{y:C.to.height / D.height,x:C.to.width / D.width}};
            if (E == "box" || E == "both") {
                if (L.from.y != L.to.y) {
                    N = N.concat(K);
                    C.from = A.effects.setTransition(C, K, L.from.y, C.from);
                    C.to = A.effects.setTransition(C, K, L.to.y, C.to)
                }
                if (L.from.x != L.to.x) {
                    N = N.concat(F);
                    C.from = A.effects.setTransition(C, F, L.from.x, C.from);
                    C.to = A.effects.setTransition(C, F, L.to.x, C.to)
                }
            }
            if (E == "content" || E == "both") {
                if (L.from.y != L.to.y) {
                    N = N.concat(P);
                    C.from = A.effects.setTransition(C, P, L.from.y, C.from);
                    C.to = A.effects.setTransition(C, P, L.to.y, C.to)
                }
            }
            A.effects.save(C, I ? N : M);
            C.show();
            A.effects.createWrapper(C);
            C.css("overflow", "hidden").css(C.from);
            if (E == "content" || E == "both") {
                K = K.concat(["marginTop","marginBottom"]).concat(P);
                F = F.concat(["marginLeft","marginRight"]);
                J = N.concat(K).concat(F);
                C.find("*[width]").each(function() {
                    child = A(this);
                    if (I) {
                        A.effects.save(child, J)
                    }
                    var Q = {height:child.height(),width:child.width()};
                    child.from = {height:Q.height * L.from.y,width:Q.width * L.from.x};
                    child.to = {height:Q.height * L.to.y,width:Q.width * L.to.x};
                    if (L.from.y != L.to.y) {
                        child.from = A.effects.setTransition(child, K, L.from.y, child.from);
                        child.to = A.effects.setTransition(child, K, L.to.y, child.to)
                    }
                    if (L.from.x != L.to.x) {
                        child.from = A.effects.setTransition(child, F, L.from.x, child.from);
                        child.to = A.effects.setTransition(child, F, L.to.x, child.to)
                    }
                    child.css(child.from);
                    child.animate(child.to, B.duration, B.options.easing, function() {
                        if (I) {
                            A.effects.restore(child, J)
                        }
                    })
                })
            }
            C.animate(C.to, {queue:false,duration:B.duration,easing:B.options.easing,complete:function() {
                if (G == "hide") {
                    C.hide()
                }
                A.effects.restore(C, I ? N : M);
                A.effects.removeWrapper(C);
                if (B.callback) {
                    B.callback.apply(this, arguments)
                }
                C.dequeue()
            }})
        })
    }
})(jQuery);
(function(A) {
    A.effects.shake = function(B) {
        return this.queue(function() {
            var E = A(this),K = ["position","top","left"];
            var J = A.effects.setMode(E, B.options.mode || "effect");
            var M = B.options.direction || "left";
            var C = B.options.distance || 20;
            var D = B.options.times || 3;
            var G = B.duration || B.options.duration || 140;
            A.effects.save(E, K);
            E.show();
            A.effects.createWrapper(E);
            var F = (M == "up" || M == "down") ? "top" : "left";
            var O = (M == "up" || M == "left") ? "pos" : "neg";
            var H = {},N = {},L = {};
            H[F] = (O == "pos" ? "-=" : "+=") + C;
            N[F] = (O == "pos" ? "+=" : "-=") + C * 2;
            L[F] = (O == "pos" ? "-=" : "+=") + C * 2;
            E.animate(H, G, B.options.easing);
            for (var I = 1; I < D; I++) {
                E.animate(N, G, B.options.easing).animate(L, G, B.options.easing)
            }
            E.animate(N, G, B.options.easing).animate(H, G / 2, B.options.easing, function() {
                A.effects.restore(E, K);
                A.effects.removeWrapper(E);
                if (B.callback) {
                    B.callback.apply(this, arguments)
                }
            });
            E.queue("fx", function() {
                E.dequeue()
            });
            E.dequeue()
        })
    }
})(jQuery);
(function(A) {
    A.effects.slide = function(B) {
        return this.queue(function() {
            var E = A(this),D = ["position","top","left"];
            var I = A.effects.setMode(E, B.options.mode || "show");
            var H = B.options.direction || "left";
            A.effects.save(E, D);
            E.show();
            A.effects.createWrapper(E).css({overflow:"hidden"});
            var F = (H == "up" || H == "down") ? "top" : "left";
            var C = (H == "up" || H == "left") ? "pos" : "neg";
            var J = B.options.distance || (F == "top" ? E.outerHeight({margin:true}) : E.outerWidth({margin:true}));
            if (I == "show") {
                E.css(F, C == "pos" ? -J : J)
            }
            var G = {};
            G[F] = (I == "show" ? (C == "pos" ? "+=" : "-=") : (C == "pos" ? "-=" : "+=")) + J;
            E.animate(G, {queue:false,duration:B.duration,easing:B.options.easing,complete:function() {
                if (I == "hide") {
                    E.hide()
                }
                A.effects.restore(E, D);
                A.effects.removeWrapper(E);
                if (B.callback) {
                    B.callback.apply(this, arguments)
                }
                E.dequeue()
            }})
        })
    }
})(jQuery);
(function(A) {
    A.effects.transfer = function(B) {
        return this.queue(function() {
            var E = A(this);
            var G = A.effects.setMode(E, B.options.mode || "effect");
            var F = A(B.options.to);
            var C = E.offset();
            var D = A('<div class="ui-effects-transfer"></div>').appendTo(document.body);
            if (B.options.className) {
                D.addClass(B.options.className)
            }
            D.addClass(B.options.className);
            D.css({top:C.top,left:C.left,height:E.outerHeight() - parseInt(D.css("borderTopWidth")) - parseInt(D.css("borderBottomWidth")),width:E.outerWidth() - parseInt(D.css("borderLeftWidth")) - parseInt(D.css("borderRightWidth")),position:"absolute"});
            C = F.offset();
            animation = {top:C.top,left:C.left,height:F.outerHeight() - parseInt(D.css("borderTopWidth")) - parseInt(D.css("borderBottomWidth")),width:F.outerWidth() - parseInt(D.css("borderLeftWidth")) - parseInt(D.css("borderRightWidth"))};
            D.animate(animation, B.duration, B.options.easing, function() {
                D.remove();
                if (B.callback) {
                    B.callback.apply(E[0], arguments)
                }
                E.dequeue()
            })
        })
    }
})(jQuery);
(function(D) {
    D.widget("ui.widget", {yield:null,returnValues:{},before:function(G, F) {
        var E = this[G];
        this[G] = function() {
            F.apply(this, arguments);
            return E.apply(this, arguments)
        }
    },after:function(G, F) {
        var E = this[G];
        this[G] = function() {
            this.returnValues[G] = E.apply(this, arguments);
            return F.apply(this, arguments)
        }
    },around:function(G, F) {
        var E = this[G];
        this[G] = function() {
            var I = this.yield;
            this.yield = E;
            var H = F.apply(this, arguments);
            this.yield = I;
            return H
        }
    }});
    D.ui.widget.defaults = {extend:D.extend};
    var C = (function(E) {
        return(function(F) {
            E.prototype = F;
            return new E()
        })
    })(function() {
    });
    var A = /xyz/.test(function() {
        xyz
    }) ? /\b_super\b/ : /.*/;
    D.ui.widget.subclass = function B(E) {
        D.widget(E);
        E = E.split(".");
        var H = D[E[0]][E[1]],K = this,J = K.prototype;
        var G = arguments[0] = H.prototype = C(J);
        D.extend.apply(null, arguments);
        H.subclass = B;
        H.defaults = C(K.defaults);
        H.getter = this.getter;
        H.getterSetter = this.getterSetter;
        G.super_ = J;
        for (key in G) {
            if (G.hasOwnProperty(key)) {
                switch (key) {case"_init":var I = G._init;G._init = function() {
                    J._init.apply(this);
                    I.apply(this)
                };break;case"destroy":var F = G.destroy;G.destroy = function() {
                    F.apply(this);
                    J.destroy.apply(this)
                };break;default:if (D.isFunction(G[key]) && D.isFunction(J[key]) && A.test(G[key])) {
                    G[key] = (function(L, M) {
                        return function() {
                            var O = this._super;
                            this._super = J[L];
                            try {
                                var N = M.apply(this, arguments)
                            } finally {
                                this._super = O
                            }
                            return N
                        }
                    })(key, G[key])
                }break
                }
            }
        }
    }
})(jQuery);
jQuery.timer = function(A, B) {
    var A = A || 100;
    if (!B) {
        return false
    }
    _timer = function(D, E) {
        this.stop = function() {
            clearInterval(C.id)
        };
        this.internalCallback = function() {
            E(C)
        };
        this.reset = function(F) {
            if (C.id) {
                clearInterval(C.id)
            }
            var F = F || 100;
            this.id = setInterval(this.internalCallback, F)
        };
        this.interval = D;
        this.id = setInterval(this.internalCallback, this.interval);
        var C = this
    };
    return new _timer(A, B)
};
(function(B) {
    B.dimensions = {version:"@VERSION"};
    B.each(["Height","Width"], function(D, C) {
        B.fn["inner" + C] = function() {
            if (!this[0]) {
                return
            }
            var F = C == "Height" ? "Top" : "Left",E = C == "Height" ? "Bottom" : "Right";
            return this.is(":visible") ? this[0]["client" + C] : A(this, C.toLowerCase()) + A(this, "padding" + F) + A(this, "padding" + E)
        };
        B.fn["outer" + C] = function(F) {
            if (!this[0]) {
                return
            }
            var H = C == "Height" ? "Top" : "Left",E = C == "Height" ? "Bottom" : "Right";
            F = B.extend({margin:false}, F || {});
            var G = this.is(":visible") ? this[0]["offset" + C] : A(this, C.toLowerCase()) + A(this, "border" + H + "Width") + A(this, "border" + E + "Width") + A(this, "padding" + H) + A(this, "padding" + E);
            return G + (F.margin ? (A(this, "margin" + H) + A(this, "margin" + E)) : 0)
        }
    });
    B.each(["Left","Top"], function(D, C) {
        B.fn["scroll" + C] = function(E) {
            if (!this[0]) {
                return
            }
            return E != undefined ? this.each(function() {
                this == window || this == document ? window.scrollTo(C == "Left" ? E : B(window)["scrollLeft"](), C == "Top" ? E : B(window)["scrollTop"]()) : this["scroll" + C] = E
            }) : this[0] == window || this[0] == document ? self[(C == "Left" ? "pageXOffset" : "pageYOffset")] || B.boxModel && document.documentElement["scroll" + C] || document.body["scroll" + C] : this[0]["scroll" + C]
        }
    });
    B.fn.extend({position:function() {
        var H = 0,G = 0,F = this[0],I,C,E,D;
        if (F) {
            E = this.offsetParent();
            I = this.offset();
            C = E.offset();
            I.top -= A(F, "marginTop");
            I.left -= A(F, "marginLeft");
            C.top += A(E, "borderTopWidth");
            C.left += A(E, "borderLeftWidth");
            D = {top:I.top - C.top,left:I.left - C.left}
        }
        return D
    },offsetParent:function() {
        var C = this[0].offsetParent;
        while (C && (!/^body|html$/i.test(C.tagName) && B.css(C, "position") == "static")) {
            C = C.offsetParent
        }
        return B(C)
    }});
    function A(C, D) {
        return parseInt(B.curCSS(C.jquery ? C[0] : C, D, true)) || 0
    }
})(jQuery);
(function(A) {
    var B = function(D, F, C, E) {
        this.x1 = D;
        this.x2 = C;
        this.y1 = F;
        this.y2 = E
    };
    B.prototype.contains = function(C) {
        return(this.x1 <= C.x1 && C.x2 <= this.x2) && (this.y1 <= C.y1 && C.y2 <= this.y2)
    };
    B.prototype.transform = function(C, D) {
        return new B(this.x1 + C, this.y1 + D, this.x2 + C, this.y2 + D)
    };
    A.fn.positionBy = function(I) {
        var K = new Date();
        if (this.length == 0) {
            return this
        }
        var I = A.extend({target:null,targetPos:null,elementPos:null,x:null,y:null,positions:null,addClass:false,force:false,container:window,hideAfterPosition:false}, I);
        if (I.x != null) {
            var F = I.x;
            var G = I.y;
            var E = 0;
            var J = 0
        } else {
            var C = A(A(I.target)[0]);
            var E = C.outerWidth();
            var J = C.outerHeight();
            var H = C.offset();
            var F = H.left;
            var G = H.top
        }
        var D = F + E;
        var L = G + J;
        return this.each(function() {
            var Z = A(this);
            if (!Z.is(":visible")) {
                Z.css({left:-3000,top:-3000}).show()
            }
            var a = Z.outerWidth();
            var Y = Z.outerHeight();
            var R = [];
            var Q = [];
            R[0] = new B(D, G, D + a, G + Y);
            Q[0] = [1,7,4];
            R[1] = new B(D, L - Y, D + a, L);
            Q[1] = [0,6,4];
            R[2] = new B(D, L, D + a, L + Y);
            Q[2] = [1,3,10];
            R[3] = new B(D - a, L, D, L + Y);
            Q[3] = [1,6,10];
            R[4] = new B(F, L, F + a, L + Y);
            Q[4] = [1,6,9];
            R[5] = new B(F - a, L, F, L + Y);
            Q[5] = [6,4,9];
            R[6] = new B(F - a, L - Y, F, L);
            Q[6] = [7,1,4];
            R[7] = new B(F - a, G, F, G + Y);
            Q[7] = [6,0,4];
            R[8] = new B(F - a, G - Y, F, G);
            Q[8] = [7,9,4];
            R[9] = new B(F, G - Y, F + a, G);
            Q[9] = [0,7,4];
            R[10] = new B(D - a, G - Y, D, G);
            Q[10] = [0,7,3];
            R[11] = new B(D, G - Y, D + a, G);
            Q[11] = [0,10,3];
            R[12] = new B(D - a, G, D, G + Y);
            Q[12] = [13,7,10];
            R[13] = new B(D - a, L - Y, D, L);
            Q[13] = [12,6,3];
            R[14] = new B(F, L - Y, F + a, L);
            Q[14] = [15,1,4];
            R[15] = new B(F, G, F + a, G + Y);
            Q[15] = [14,0,9];
            if (I.positions !== null) {
                var W = I.positions[0]
            } else {
                if (I.targetPos != null && I.elementPos != null) {
                    var W = [];
                    W[0] = [];
                    W[0][0] = 15;
                    W[0][1] = 7;
                    W[0][2] = 8;
                    W[0][3] = 9;
                    W[1] = [];
                    W[1][0] = 0;
                    W[1][1] = 12;
                    W[1][2] = 10;
                    W[1][3] = 11;
                    W[2] = [];
                    W[2][0] = 2;
                    W[2][1] = 3;
                    W[2][2] = 13;
                    W[2][3] = 1;
                    W[3] = [];
                    W[3][0] = 4;
                    W[3][1] = 5;
                    W[3][2] = 6;
                    W[3][3] = 14;
                    var W = W[I.targetPos][I.elementPos]
                }
            }
            var P = R[W];
            var O = W;
            if (!I.force) {
                $window = A(window);
                var X = $window.scrollLeft();
                var V = $window.scrollTop();
                var M = new B(X, V, X + $window.width(), V + $window.height());
                var U;
                if (I.positions) {
                    U = I.positions
                } else {
                    U = [W]
                }
                var T = [];
                while (U.length > 0) {
                    var N = U.shift();
                    if (T[N]) {
                        continue
                    }
                    T[N] = true;
                    if (!M.contains(R[N])) {
                        if (I.positions === null) {
                            U = jQuery.merge(U, Q[N])
                        }
                    } else {
                        P = R[N];
                        break
                    }
                }
            }
            Z.parents().each(function() {
                var c = A(this);
                if (c.css("position") != "static") {
                    var b = c.offset();
                    P = P.transform(-b.left, -b.top);
                    return false
                }
            });
            var S = {left:P.x1,top:P.y1};
            if (I.hideAfterPosition) {
                S["display"] = "none"
            }
            Z.css(S);
            if (I.addClass) {
                Z.removeClass("positionBy0 positionBy1 positionBy2 positionBy3 positionBy4 positionBy5 positionBy6 positionBy7 positionBy8 positionBy9 positionBy10 positionBy11 positionBy12 positionBy13 positionBy14 positionBy15").addClass("positionBy" + N)
            }
        })
    }
})(jQuery);
(function(A) {
    A.fn.bgIframe = A.fn.bgiframe = function(C) {
        if ($.browser.msie && $.browser.version=="6.0") {
            C = A.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"}, C || {});
            var D = function(E) {
                return E && E.constructor == Number ? E + "px" : E
            },B = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="' + C.src + '"style="display:block;position:absolute;z-index:-1;' + (C.opacity !== false ? "filter:Alpha(Opacity='0');" : "") + "top:" + (C.top == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')" : D(C.top)) + ";left:" + (C.left == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')" : D(C.left)) + ";width:" + (C.width == "auto" ? "expression(this.parentNode.offsetWidth+'px')" : D(C.width)) + ";height:" + (C.height == "auto" ? "expression(this.parentNode.offsetHeight+'px')" : D(C.height)) + ';"/>';
            return this.each(function() {
                if (A("> iframe.bgiframe", this).length == 0) {
                    this.insertBefore(document.createElement(B), this.firstChild)
                }
            })
        }
        return this
    }
})(jQuery);
(function(D) {
    function C(E) {
        var F = D.data(D(E).parents().andSelf().filter("ul.jd_menu")[0], "jdMenuSettings");
        D("> li", E).bind("mouseenter.jdmenu mouseleave.jdmenu",
                function(G) {
                    D(this).toggleClass("jdm_hover");
                    var H = D("> ul", this);
                    if (H.length == 1) {
                        clearTimeout(this.$jdTimer);
                        var J = (G.type == "mouseenter");
                        var I = (J ? B : A);
                        this.$jdTimer = setTimeout(function() {
                            I(H[0], F.onAnimate, F.isVertical)
                        }, J ? F.showDelay : F.hideDelay)
                    }
                }).bind("click.jdmenu",
                function(H) {
                    var I = D("> ul", this);
                    if (I.length == 1 && (F.disableLinks == true || D(this).hasClass("accessible"))) {
                        B(I, F.onAnimate, F.isVertical);
//                        return false
                    }
                    if (H.target == this) {
                        var J = D("> a", H.target).not(".accessible");
                        if (J.length > 0) {
                            var G = J[0];
                            if (!G.onclick) {
                                window.open(G.href, G.target || "_self")
                            } else {
                                D(G).trigger("click")
                            }
                        }
                    }
                    if (F.disableLinks || (!F.disableLinks && !D(this).parent().hasClass("jd_menu"))) {
                        H.stopPropagation()
                    }
                }).find("> a").bind("focus.jdmenu blur.jdmenu",
                function(G) {
                    var H = D(this).parents("li:eq(0)");
                    if (G.type == "focus") {
                        H.addClass("jdm_hover")
                    } else {
                        H.removeClass("jdm_hover")
                    }
                }).filter(".accessible").bind("click.jdmenu", function(G) {
            G.preventDefault()
        })
    }

    function B(H, G, F) {
        var H = D(H);
        if (H.is(":visible")) {
            return
        }
        H.bgiframe();
        var E = H.parent();
        H.trigger("jdMenuShow").positionBy({target:E[0],targetPos:(F === true || !E.parent().hasClass("jd_menu") ? 1 : 3),elementPos:0,hideAfterPosition:true});
        if (!H.hasClass("jdm_events")) {
            H.addClass("jdm_events");
            C(H)
        }
        E.addClass("jdm_active").siblings("li").find("> ul:eq(0):visible").each(function() {
            A(this)
        });
        if (G === undefined) {
            H.show()
        } else {
            G.apply(H[0], [true])
        }
    }

    function A(F, E) {
        var F = D(F);
        D(".bgiframe", F).remove();
        F.filter(":not(.jd_menu)").find("> li > ul:eq(0):visible").each(
                function() {
                    A(this)
                }).end();
        if (E === undefined) {
            F.hide()
        } else {
            E.apply(F[0], [false])
        }
        F.trigger("jdMenuHide").parents("li:eq(0)").removeClass("jdm_active jdm_hover").end().find("> li").removeClass("jdm_active jdm_hover")
    }

    D.fn.jdMenu = function(E) {
        var E = D.extend({showDelay:50,hideDelay:50,disableLinks:false}, E);
        if (!D.isFunction(E.onAnimate)) {
            E.onAnimate = undefined
        }
        return this.filter("ul.jd_menu").each(function() {
            D.data(this, "jdMenuSettings", D.extend({isVertical:D(this).hasClass("jd_menu_vertical")}, E));
            C(this)
        })
    };
    D.fn.jdMenuUnbind = function() {
        D("ul.jdm_events", this).unbind(".jdmenu").find("> a").unbind(".jdmenu")
    };
    D.fn.jdMenuHide = function() {
        return this.filter("ul").each(function() {
            A(this)
        })
    };
    D(window).bind("click.jdmenu", function() {
        D("ul.jd_menu ul:visible").jdMenuHide()
    })
})(jQuery);
(function(F) {
    var E = [],L = [],J = activeItem = null,C = F('<div class="menu-div outerbox" style="position:absolute;top:0;left:0;display:none;"><div class="shadowbox1"></div><div class="shadowbox2"></div><div class="shadowbox3"></div></div>')[0],B = F('<ul class="menu-ul innerbox"></ul>')[0],K = F('<li style="position:relative;"><div class="menu-item"></div></li>')[0],I = F('<img class="menu-item-arrow" />')[0],H = F('<div id="root-menu-div" style="position:absolute;top:0;left:0;"></div>'),D = {showDelay:200,hideDelay:200,hoverOpenDelay:0,offsetTop:0,offsetLeft:0,minWidth:0,onOpen:null,onClose:null,onClick:null,arrowSrc:null,addExpando:false,copyClassAttr:false};
    F(function() {
        H.appendTo("body")
    });
    F.extend({MenuCollection:function(M) {
        this.menus = [];
        this.init(M)
    }});
    F.extend(F.MenuCollection, {prototype:{init:function(M) {
        if (M && M.length) {
            for (var N = 0; N < M.length; N++) {
                this.addMenu(M[N]);
                M[N].menuCollection = this
            }
        }
    },addMenu:function(N) {
        if (N instanceof F.Menu) {
            this.menus.push(N)
        }
        N.menuCollection = this;
        var M = this;
        F(N.target).hover(function() {
            if (N.visible) {
                return
            }
            for (var O = 0; O < M.menus.length; O++) {
                if (M.menus[O].visible) {
                    M.menus[O].hide();
                    N.show();
                    return
                }
            }
        }, function() {
        })
    }}});
    F.extend({Menu:function(O, M, N) {
        this.menuItems = [];
        this.subMenus = [];
        this.visible = false;
        this.active = false;
        this.parentMenuItem = null;
        this.settings = F.extend({}, D, N);
        this.target = O;
        this.$eDIV = null;
        this.$eUL = null;
        this.timer = null;
        this.menuCollection = null;
        this.openTimer = null;
        this.visibleItems = 3;
        this.init();
        if (M && M.constructor == Array) {
            this.addItems(M)
        }
    }});
    F.extend(F.Menu, {checkMouse:function(N) {
        var M = N.target;
        if (L.length && M == L[0].target) {
            return
        }
        while (M.parentNode && M.parentNode != H[0]) {
            M = M.parentNode
        }
        if (!F(L).filter(
                function() {
                    return this.$eDIV[0] == M
                }).length) {
            F.Menu.closeAll()
        }
    },checkKey:function(R) {
        switch (R.keyCode) {case 13:if (activeItem) {
            activeItem.click(R, activeItem.$eLI[0])
        }break;case 27:F.Menu.closeAll();break;case 37:if (!J) {
            J = L[0]
        }var N = J;if (N && N.parentMenuItem) {
            var P = N.parentMenuItem;
            P.$eLI.unbind("mouseout").unbind("mouseover");
            N.hide();
            P.hoverIn(true);
            setTimeout(function() {
                P.bindHover()
            })
        } else {
            if (N && N.menuCollection) {
                var S,O = N.menuCollection.menus;
                if ((S = F.inArray(N, O)) > -1) {
                    if (--S < 0) {
                        S = O.length - 1
                    }
                    F.Menu.closeAll();
                    O[S].show();
                    O[S].setActive();
                    if (O[S].menuItems.length) {
                        O[S].menuItems[0].hoverIn(true)
                    }
                }
            }
        }break;case 38:if (J) {
            J.selectNextItem(-1)
        }break;case 39:if (!J) {
            J = L[0]
        }var M,N = J,Q = activeItem ? activeItem.subMenu : null;if (N) {
            if (Q && Q.menuItems.length) {
                Q.show();
                Q.menuItems[0].hoverIn()
            } else {
                if ((N = N.inMenuCollection())) {
                    var S,O = N.menuCollection.menus;
                    if ((S = F.inArray(N, O)) > -1) {
                        if (++S >= O.length) {
                            S = 0
                        }
                        F.Menu.closeAll();
                        O[S].show();
                        O[S].setActive();
                        if (O[S].menuItems.length) {
                            O[S].menuItems[0].hoverIn(true)
                        }
                    }
                }
            }
        }break;case 40:if (!J) {
            if (L.length && L[0].menuItems.length) {
                L[0].menuItems[0].hoverIn()
            }
        } else {
            J.selectNextItem()
        }break
        }
        if (R.keyCode > 36 && R.keyCode < 41) {
            return false
        }
    },closeAll:function() {
        while (L.length) {
            L[0].hide()
        }
    },setDefaults:function(M) {
        F.extend(D, M)
    },prototype:{init:function() {
        var M = this;
        if (!this.target) {
            return
        } else {
            if (this.target instanceof F.MenuItem) {
                this.parentMenuItem = this.target;
                this.target.addSubMenu(this);
                this.target = this.target.$eLI
            }
        }
        E.push(this);
        this.$eDIV = F(C.cloneNode(1));
        this.$eUL = F(B.cloneNode(1));
        this.$eDIV[0].appendChild(this.$eUL[0]);
        H[0].appendChild(this.$eDIV[0]);
        if (!this.parentMenuItem) {
            F(this.target).click(
                    function(N) {
//                        if(N.target.tagName == "A"){
//                            M.click(N.target, M)
//                        } else {
                            M.onClick(N)
//                        }
                    }).hover(function(N) {
//                M.setActive();
//                M.onClick(N)
                if (M.settings.hoverOpenDelay) {
                    M.openTimer = setTimeout(function() {
                        if (!M.visible) {
                            M.onClick(N)
                        }
                    }, M.settings.hoverOpenDelay)
                }
            }, function() {
                if (!M.visible) {
                    F(this).removeClass("activetarget")
                }
                if (M.openTimer) {
                    clearTimeout(M.openTimer)
                }
            })
        } else {
            this.$eDIV.hover(function() {
//                M.setActive()
            }, function() {
            })
        }
    },setActive:function() {
        if (!this.parentMenuItem) {
            F(this.target).addClass("activetarget")
        } else {
            this.active = true
        }
    },addItem:function(M) {
        if (M instanceof F.MenuItem) {
            if (F.inArray(M, this.menuItems) == -1) {
                if (M.visibleItem){
                    var old = F(M.visibleItem[0])
                    M.$eLI.insertBefore(old);
//                    M.$eLI[0].css('positiontio','static')
                    old.remove();
                } else {
                    this.$eUL.append(M.$eLI);
                }
                this.menuItems.push(M);
                M.parentMenu = this;
                if (M.subMenu) {
                    this.subMenus.push(M.subMenu)
                }
            }
        } else {
            this.addItem(new F.MenuItem(M, this.settings))
        }
    },addItems:function(M) {
        for (var N = 0; N < M.length; N++) {
//            M[N].visibleItem = (this.visibleItems - 1 > N)
            this.addItem(M[N])
        }
    },removeItem:function(M) {
        var N = F.inArray(M, this.menuItems);
        if (N > -1) {
            this.menuItems.splice(N, 1)
        }
        M.parentMenu = null
    },hide:function() {
        if (!this.visible) {
            return
        }
        var M,N = F.inArray(this, L);
        this.$eDIV.hide();
        if (N >= 0) {
            L.splice(N, 1)
        }
        this.visible = this.active = false;
        F(this.target).removeClass("activetarget");
        for (M = 0; M < this.subMenus.length; M++) {
            this.subMenus[M].hide()
        }
        for (M = 0; M < this.menuItems.length; M++) {
            if (this.menuItems[M].active) {
                this.menuItems[M].setInactive()
            }
        }
        if (!L.length) {
            F(document).unbind("mousedown", F.Menu.checkMouse).unbind("keydown", F.Menu.checkKey)
        }
        if (J == this) {
            J = null
        }
        if (this.settings.onClose) {
            this.settings.onClose.call(this)
        }
    },show:function(O) {
        if (this.visible) {
            return
        }
        var N,M = this.parentMenuItem;
        if (this.menuItems.length) {
            if (M) {
                N = parseInt(M.parentMenu.$eDIV.css("z-index"));
                this.$eDIV.css("z-index", (isNaN(N) ? 1 : N + 1))
            }
            this.$eDIV.css({visibility:"hidden",display:"block"});
            if (this.settings.minWidth) {
                if (this.$eDIV.width() < this.settings.minWidth) {
                    this.$eDIV.css("width", this.settings.minWidth)
                }
            }
            this.setPosition();
            this.$eDIV.css({display:"none",visibility:""}).show();
            if (F.browser.msie) {
                this.$eUL.css("width", parseInt(F.browser.version) == 6 ? this.$eDIV.width() - 7 : this.$eUL.width())
            }
            if (this.settings.onOpen) {
                this.settings.onOpen.call(this)
            }
        }
        if (L.length == 0) {
            F(document).bind("mousedown", F.Menu.checkMouse).bind("keydown", F.Menu.checkKey);
            F(document).bind("mouseout", F.Menu.checkMouse)
        }
        this.visible = true;
        L.push(this)
    },setPosition:function() {
        var S,Q,O,M,V,W,R,T = F(window).width(),N = F(window).height(),X = this.parentMenuItem,Y = this.$eDIV[0].clientHeight,P = this.$eDIV[0].clientWidth,U;
        if (X) {
            Q = X.$eLI.offset();
            O = Q.left + X.$eLI.width();
            M = Q.top
        } else {
            S = F(this.target);
            Q = S.offset();
            O = Q.left + this.settings.offsetLeft;
            M = Q.top + S.height() + this.settings.offsetTop
        }
        if (F.fn.scrollTop) {
            W = F(window).scrollTop();
            if (N < Y) {
                M = W
            } else {
                if (N + W < M + Y) {
                    if (X) {
                        V = X.parentMenu.$eDIV.offset();
                        U = X.parentMenu.$eDIV[0].clientHeight;
                        if (Y <= U) {
                            M = V.top + U - Y
                        } else {
                            M = V.top
                        }
                        if (N + W < M + Y) {
                            M -= M + Y - (N + W)
                        }
                    } else {
                        M -= M + Y - (N + W)
                    }
                }
            }
        }
        if (F.fn.scrollLeft) {
            R = F(window).scrollLeft();
            if (T + R < O + P) {
                if (X) {
                    O -= X.$eLI.width() + P;
                    if (O < R) {
                        O = R
                    }
                } else {
                    O -= O + P - (T + R)
                }
            }
        }
        this.$eDIV.css({left:O,top:M})
    },onClick:function(M) {
        if (this.visible) {
            this.hide();
            this.setActive()
        } else {
            F.Menu.closeAll();
            this.show(M)
        }
    },addTimer:function(O, N) {
        var M = this;
        this.timer = setTimeout(function() {
            O.call(M);
            M.timer = null
        }, N)
    },removeTimer:function() {
        if (this.timer) {
            clearTimeout(this.timer);
            this.timer = null
        }
    },selectNextItem:function(P) {
        var M,Q = 0,N = this.menuItems.length,O = P || 1;
        for (M = 0; M < N; M++) {
            if (this.menuItems[M].active) {
                Q = M;
                break
            }
        }
        this.menuItems[Q].hoverOut();
        do{
            Q += O;
            if (Q >= N) {
                Q = 0
            } else {
                if (Q < 0) {
                    Q = N - 1
                }
            }
        } while (this.menuItems[Q].separator);
        this.menuItems[Q].hoverIn(true)
    },inMenuCollection:function() {
        var M = this;
        while (M.parentMenuItem) {
            M = M.parentMenuItem.parentMenu
        }
        return M.menuCollection ? M : null
    },destroy:function() {
        var N,M;
        this.hide();
        if (!this.parentMenuItem) {
            F(this.target).unbind("click").unbind("mouseover").unbind("mouseout")
        } else {
            this.$eDIV.unbind("mouseover").unbind("mouseout")
        }
        while (this.menuItems.length) {
            M = this.menuItems[0];
            M.destroy();
            delete M
        }
        if ((N = F.inArray(this, E)) > -1) {
            E.splice(N, 1)
        }
        if (this.menuCollection) {
            if ((N = F.inArray(this, this.menuCollection.menus)) > -1) {
                this.menuCollection.menus.splice(N, 1)
            }
        }
        this.$eDIV.remove()
    }}});
    F.extend({MenuItem:function(N, M) {
        if (typeof N == "string") {
            N = {src:N}
        }
        this.src = N.src || "";
        this.visibleItem = N.visibleItem || false;
        this.url = N.url || null;
        this.urlTarget = N.target || null;
        this.addClass = N.addClass || null;
        this.data = N.data || null;
        this.$eLI = null;
        this.parentMenu = null;
        this.subMenu = null;
        this.settings = F.extend({}, D, M);
        this.active = false;
        this.enabled = true;
        this.separator = false;
        this.init();
        if (N.subMenu) {
            new F.Menu(this, N.subMenu, M)
        }
    }});
    F.extend(F.MenuItem, {prototype:{init:function() {
        var O,N,P = this.src,M = this;
//        this.$eLI = K.visibleItem ? F(K):F(K.cloneNode(1))

        if (this.visibleItem){
            this.$eLI = F(this.visibleItem[0].cloneNode(1))
        } else {
        this.$eLI = F(K.cloneNode(1));
        if (this.addClass) {
            this.$eLI[0].setAttribute("class", this.addClass)
        }
        if (this.settings.addExpando && this.data) {
            this.$eLI[0].menuData = this.data
        }
        if (P == "") {
            this.$eLI.addClass("menu-separator");
            this.separator = true
        } else {
            N = typeof P == "string";
            if (N && this.url) {
                P = F('<a href="' + this.url + '"' + (this.urlTarget ? 'target="' + this.urlTarget + '"' : "") + ">" + P + "</a>")
            } else {
                if (N || !P.length) {
                    P = [P]
                }
            }
            for (O = 0; O < P.length; O++) {
                if (typeof P[O] == "string") {
                    elem = document.createElement("span");
                    elem.innerHTML = P[O];
                    this.$eLI[0].firstChild.appendChild(elem)
                } else {
                    this.$eLI[0].firstChild.appendChild(P[O].cloneNode(1))
                }
            }
        }
        }
        this.$eLI.click(function(Q) {
            M.click(Q, this)
        });
        this.bindHover()
//        !K.visibleItem ? this.bindHover() : null;
    },click:function(N, M) {
        if (this.enabled && this.settings.onClick) {
            this.settings.onClick.call(M, N, this)
        }
    },bindHover:function() {
        var M = this;
        this.$eLI.hover(function() {
            M.hoverIn()
        }, function() {
            M.hoverOut()
        })
    },hoverIn:function(N) {
        this.removeTimer();
        var O,Q = this.parentMenu.subMenus,P = this.parentMenu.menuItems,M = this;
        if (this.parentMenu.timer) {
            this.parentMenu.removeTimer()
        }
        if (!this.enabled) {
            return
        }
        for (O = 0; O < P.length; O++) {
            if (P[O].active) {
                P[O].setInactive()
            }
        }
        this.setActive();
        J = this.parentMenu;
        for (O = 0; O < Q.length; O++) {
            if (Q[O].visible && Q[O] != this.subMenu && !Q[O].timer) {
                Q[O].addTimer(function() {
                    this.hide()
                }, Q[O].settings.hideDelay)
            }
        }
        if (this.subMenu && !N) {
            this.subMenu.addTimer(function() {
                this.show()
            }, this.subMenu.settings.showDelay)
        }
    },hoverOut:function() {
        this.removeTimer();
        if (!this.enabled) {
            return
        }
        if (!this.subMenu || !this.subMenu.visible) {
            this.setInactive()
        }
    },removeTimer:function() {
        if (this.subMenu) {
            this.subMenu.removeTimer()
        }
    },setActive:function() {
        this.active = true;
        this.$eLI.addClass("active");
        var M = this.parentMenu.parentMenuItem;
        if (M && !M.active) {
            M.setActive()
        }
        activeItem = this
    },setInactive:function() {
        this.active = false;
        this.$eLI.removeClass("active");
        if (this == activeItem) {
            activeItem = null
        }
    },enable:function() {
        this.$eLI.removeClass("disabled");
        this.enabled = true
    },disable:function() {
        this.$eLI.addClass("disabled");
        this.enabled = false
    },destroy:function() {
        this.removeTimer();
        this.$eLI.remove();
        this.$eLI.unbind("mouseover").unbind("mouseout").unbind("click");
        if (this.subMenu) {
            this.subMenu.destroy();
            delete this.subMenu
        }
        this.parentMenu.removeItem(this)
    },addSubMenu:function(N) {
        if (this.subMenu) {
            return
        }
        this.subMenu = N;
        if (this.parentMenu && F.inArray(N, this.parentMenu.subMenus) == -1) {
            this.parentMenu.subMenus.push(N)
        }
        if (this.settings.arrowSrc) {
            var M = I.cloneNode(0);
            M.setAttribute("src", this.settings.arrowSrc);
            this.$eLI[0].firstChild.appendChild(M)
        }
    }}});
    F.extend(F.fn, {menuFromElement:function(N, P, O) {
        var M = function(X) {
            var T = [],V,S,a,Y,U,Z,R,W,Q = null;
            a = G(X, "LI");
            for (U = 0; U < a.length; U++) {
                V = [];
                if (!a[U].childNodes.length) {
                    T.push(new F.MenuItem("", N));
                    continue
                }
                if ((Z = A(a[U], "UL"))) {
                    V = M(Z);
                    F(Z).remove()
                }
                Y = F(a[U]);
                if (Y[0].childNodes.length == 1 && Y[0].childNodes[0].nodeType == 3) {
                    W = Y[0].childNodes[0].nodeValue
                } else {
                    W = Y[0].childNodes
                }
                if (N && N.copyClassAttr) {
                    Q = Y.attr("class")
                }

                S = new F.MenuItem({src:W,addClass:Q,visibleItem:(2 > U) ? Y : false}, N);
                T.push(S);
                if (V.length) {
                    new F.Menu(S, V, N)
                }
            }
            return T
        };
        return this.each(function() {
            var R,Q;
            if (P || (R = A(this, "UL"))) {
                R = P ? F(P).clone(true)[0] : R;
                menuItems = M(R);
                if (menuItems.length) {
                    Q = new F.Menu(this, menuItems, N);
                    if (O) {
                        O.addMenu(Q)
                    }
                }
//                F(R).hide()
                var lis = G(R, 'LI');
                for (var T = 0; T < lis.length; T++) {
                    if (T >= 2) {
                        F(lis[T]).hide()
                    }
                }
            }
        })
    },menuBarFromUL:function(M) {
        return this.each(function() {
            var O,N = G(this, "LI");
            if (N.length) {
                bar = new F.MenuCollection();
                for (O = 0; O < N.length; O++) {
                    F(N[O]).menuFromElement(M, null, bar)
                }
            }
        })
    },menu:function(N, M) {
        return this.each(function() {
            if (M && M.constructor == Array) {
                new F.Menu(this, M, N)
            } else {
                var T = (R = A(this, "UL"))
                var U = G(R, "LI");
                if (this.nodeName.toUpperCase() == "UL") {
                    F(this).menuBarFromUL(N)
                } else {
                    if (U.length > 2) F(this).addClass("activeMenu")
                    F(this).menuFromElement(N, M)
                }
            }
        })
    }});
    var A = function(N, M) {
        if (!N) {
            return null
        }
        var O = N.firstChild;
        for (; O; O = O.nextSibling) {
            if (O.nodeType == 1 && O.nodeName.toUpperCase() == M) {
                return O
            }
        }
        return null
    };
    var G = function(O, M) {
        if (!O) {
            return[]
        }
        var N = [],P = O.firstChild;
        for (; P; P = P.nextSibling) {
            if (P.nodeType == 1 && P.nodeName.toUpperCase() == M) {
                N[N.length] = P
            }
        }
        return N
    }
})(jQuery);
(function(B) {
    B.fn.ajaxSubmit = function(M) {
        if (!this.length) {
            A("ajaxSubmit: skipping submit process - no element selected");
            return this
        }
        if (typeof M == "function") {
            M = {success:M}
        }
        M = B.extend({url:this.attr("action") || window.location.toString(),type:this.attr("method") || "GET"}, M || {});
        var O = {};
        this.trigger("form-pre-serialize", [this,M,O]);
        if (O.veto) {
            A("ajaxSubmit: submit vetoed via form-pre-serialize trigger");
            return this
        }
        if (M.beforeSerialize && M.beforeSerialize(this, M) === false) {
            A("ajaxSubmit: submit aborted via beforeSerialize callback");
            return this
        }
        var I = this.formToArray(M.semantic);
        if (M.data) {
            M.extraData = M.data;
            for (var E in M.data) {
                if (M.data[E] instanceof Array) {
                    for (var F in M.data[E]) {
                        I.push({name:E,value:M.data[E][F]})
                    }
                } else {
                    I.push({name:E,value:M.data[E]})
                }
            }
        }
        if (M.beforeSubmit && M.beforeSubmit(I, this, M) === false) {
            A("ajaxSubmit: submit aborted via beforeSubmit callback");
            return this
        }
        this.trigger("form-submit-validate", [I,this,M,O]);
        if (O.veto) {
            A("ajaxSubmit: submit vetoed via form-submit-validate trigger");
            return this
        }
        var D = B.param(I);
        if (M.type.toUpperCase() == "GET") {
            M.url += (M.url.indexOf("?") >= 0 ? "&" : "?") + D;
            M.data = null
        } else {
            M.data = D
        }
        var N = this,H = [];
        if (M.resetForm) {
            H.push(function() {
                N.resetForm()
            })
        }
        if (M.clearForm) {
            H.push(function() {
                N.clearForm()
            })
        }
        if (!M.dataType && M.target) {
            var K = M.success || function() {
            };
            H.push(function(P) {
                B(M.target).html(P).each(K, arguments)
            })
        } else {
            if (M.success) {
                H.push(M.success)
            }
        }
        M.success = function(S, Q) {
            for (var R = 0,P = H.length; R < P; R++) {
                H[R].apply(M, [S,Q,N])
            }
        };
        var C = B("input:file", this).fieldValue();
        var L = false;
        for (var G = 0; G < C.length; G++) {
            if (C[G]) {
                L = true
            }
        }
        if (M.iframe || L) {
            if (M.closeKeepAlive) {
                B.get(M.closeKeepAlive, J)
            } else {
                J()
            }
        } else {
            B.ajax(M)
        }
        this.trigger("form-submit-notify", [this,M]);
        return this;
        function J() {
            var T = N[0];
            if (B(":input[name=submit]", T).length) {
                alert('Error: Form elements must not be named "submit".');
                return
            }
            var R = B.extend({}, B.ajaxSettings, M);
            var d = jQuery.extend(true, {}, B.extend(true, {}, B.ajaxSettings), R);
            var S = "jqFormIO" + (new Date().getTime());
            var Z = B('<iframe id="' + S + '" name="' + S + '" src="about:blank" />');
            var b = Z[0];
            Z.css({position:"absolute",top:"-1000px",left:"-1000px"});
            var c = {aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function() {
            },getResponseHeader:function() {
            },setRequestHeader:function() {
            },abort:function() {
                this.aborted = 1;
                Z.attr("src", "about:blank")
            }};
            var a = R.global;
            if (a && !B.active++) {
                B.event.trigger("ajaxStart")
            }
            if (a) {
                B.event.trigger("ajaxSend", [c,R])
            }
            if (d.beforeSend && d.beforeSend(c, d) === false) {
                d.global && jQuery.active--;
                return
            }
            if (c.aborted) {
                return
            }
            var Q = 0;
            var V = 0;
            var P = T.clk;
            if (P) {
                var U = P.name;
                if (U && !P.disabled) {
                    M.extraData = M.extraData || {};
                    M.extraData[U] = P.value;
                    if (P.type == "image") {
                        M.extraData[name + ".x"] = T.clk_x;
                        M.extraData[name + ".y"] = T.clk_y
                    }
                }
            }
            setTimeout(function() {
                var g = N.attr("target"),e = N.attr("action");
                T.setAttribute("target", S);
                if (T.getAttribute("method") != "POST") {
                    T.setAttribute("method", "POST")
                }
                if (T.getAttribute("action") != R.url) {
                    T.setAttribute("action", R.url)
                }
                if (!M.skipEncodingOverride) {
                    N.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})
                }
                if (R.timeout) {
                    setTimeout(function() {
                        V = true;
                        W()
                    }, R.timeout)
                }
                var f = [];
                try {
                    if (M.extraData) {
                        for (var h in M.extraData) {
                            f.push(B('<input type="hidden" name="' + h + '" value="' + M.extraData[h] + '" />').appendTo(T)[0])
                        }
                    }
                    Z.appendTo("body");
                    b.attachEvent ? b.attachEvent("onload", W) : b.addEventListener("load", W, false);
                    T.submit()
                } finally {
                    T.setAttribute("action", e);
                    g ? T.setAttribute("target", g) : N.removeAttr("target");
                    B(f).remove()
                }
            }, 10);
            var X = 0;

            function W() {
                if (Q++) {
                    return
                }
                b.detachEvent ? b.detachEvent("onload", W) : b.removeEventListener("load", W, false);
                var g = true;
                try {
                    if (V) {
                        throw"timeout"
                    }
                    var h,j;
                    j = b.contentWindow ? b.contentWindow.document : b.contentDocument ? b.contentDocument : b.document;
                    if ((j.body == null || j.body.innerHTML == "") && !X) {
                        X = 1;
                        Q--;
                        setTimeout(W, 100);
                        return
                    }
                    c.responseText = j.body ? j.body.innerHTML : null;
                    c.responseXML = j.XMLDocument ? j.XMLDocument : j;
                    c.getResponseHeader = function(k) {
                        var e = {"content-type":R.dataType};
                        return e[k]
                    };
                    if (R.dataType == "json" || R.dataType == "script") {
                        var f = j.getElementsByTagName("textarea")[0];
                        c.responseText = f ? f.value : c.responseText
                    } else {
                        if (R.dataType == "xml" && !c.responseXML && c.responseText != null) {
                            c.responseXML = Y(c.responseText)
                        }
                    }
                    h = B.httpData(c, R.dataType)
                } catch(i) {
                    g = false;
                    B.handleError(R, c, "error", i)
                }
                if (g) {
                    R.success(h, "success");
                    if (a) {
                        B.event.trigger("ajaxSuccess", [c,R])
                    }
                }
                if (a) {
                    B.event.trigger("ajaxComplete", [c,R])
                }
                if (a && !--B.active) {
                    B.event.trigger("ajaxStop")
                }
                if (R.complete) {
                    R.complete(c, g ? "success" : "error")
                }
                setTimeout(function() {
                    Z.remove();
                    c.responseXML = null
                }, 100)
            }

            function Y(e, f) {
                if (window.ActiveXObject) {
                    f = new ActiveXObject("Microsoft.XMLDOM");
                    f.async = "false";
                    f.loadXML(e)
                } else {
                    f = (new DOMParser()).parseFromString(e, "text/xml")
                }
                return(f && f.documentElement && f.documentElement.tagName != "parsererror") ? f : null
            }
        }
    };
    B.fn.ajaxForm = function(C) {
        return this.ajaxFormUnbind().bind("submit.form-plugin",
                function() {
                    B(this).ajaxSubmit(C);
                    return false
                }).each(function() {
            B(":submit,input:image", this).bind("click.form-plugin", function(E) {
                var D = this.form;
                D.clk = this;
                if (this.type == "image") {
                    if (E.offsetX != undefined) {
                        D.clk_x = E.offsetX;
                        D.clk_y = E.offsetY
                    } else {
                        if (typeof B.fn.offset == "function") {
                            var F = B(this).offset();
                            D.clk_x = E.pageX - F.left;
                            D.clk_y = E.pageY - F.top
                        } else {
                            D.clk_x = E.pageX - this.offsetLeft;
                            D.clk_y = E.pageY - this.offsetTop
                        }
                    }
                }
                setTimeout(function() {
                    D.clk = D.clk_x = D.clk_y = null
                }, 10)
            })
        })
    };
    B.fn.ajaxFormUnbind = function() {
        this.unbind("submit.form-plugin");
        return this.each(function() {
            B(":submit,input:image", this).unbind("click.form-plugin")
        })
    };
    B.fn.formToArray = function(N) {
        var M = [];
        if (this.length == 0) {
            return M
        }
        var D = this[0];
        var H = N ? D.getElementsByTagName("*") : D.elements;
        if (!H) {
            return M
        }
        for (var I = 0,K = H.length; I < K; I++) {
            var E = H[I];
            var F = E.name;
            if (!F) {
                continue
            }
            if (N && D.clk && E.type == "image") {
                if (!E.disabled && D.clk == E) {
                    M.push({name:F + ".x",value:D.clk_x}, {name:F + ".y",value:D.clk_y})
                }
                continue
            }
            var O = B.fieldValue(E, true);
            if (O && O.constructor == Array) {
                for (var G = 0,C = O.length; G < C; G++) {
                    M.push({name:F,value:O[G]})
                }
            } else {
                if (O !== null && typeof O != "undefined") {
                    M.push({name:F,value:O})
                }
            }
        }
        if (!N && D.clk) {
            var J = D.getElementsByTagName("input");
            for (var I = 0,K = J.length; I < K; I++) {
                var L = J[I];
                var F = L.name;
                if (F && !L.disabled && L.type == "image" && D.clk == L) {
                    M.push({name:F + ".x",value:D.clk_x}, {name:F + ".y",value:D.clk_y})
                }
            }
        }
        return M
    };
    B.fn.formSerialize = function(C) {
        return B.param(this.formToArray(C))
    };
    B.fn.fieldSerialize = function(D) {
        var C = [];
        this.each(function() {
            var H = this.name;
            if (!H) {
                return
            }
            var F = B.fieldValue(this, D);
            if (F && F.constructor == Array) {
                for (var G = 0,E = F.length; G < E; G++) {
                    C.push({name:H,value:F[G]})
                }
            } else {
                if (F !== null && typeof F != "undefined") {
                    C.push({name:this.name,value:F})
                }
            }
        });
        return B.param(C)
    };
    B.fn.fieldValue = function(H) {
        for (var G = [],E = 0,C = this.length; E < C; E++) {
            var F = this[E];
            var D = B.fieldValue(F, H);
            if (D === null || typeof D == "undefined" || (D.constructor == Array && !D.length)) {
                continue
            }
            D.constructor == Array ? B.merge(G, D) : G.push(D)
        }
        return G
    };
    B.fieldValue = function(C, I) {
        var E = C.name,N = C.type,O = C.tagName.toLowerCase();
        if (typeof I == "undefined") {
            I = true
        }
        if (I && (!E || C.disabled || N == "reset" || N == "button" || (N == "checkbox" || N == "radio") && !C.checked || (N == "submit" || N == "image") && C.form && C.form.clk != C || O == "select" && C.selectedIndex == -1)) {
            return null
        }
        if (O == "select") {
            var J = C.selectedIndex;
            if (J < 0) {
                return null
            }
            var L = [],D = C.options;
            var G = (N == "select-one");
            var K = (G ? J + 1 : D.length);
            for (var F = (G ? J : 0); F < K; F++) {
                var H = D[F];
                if (H.selected) {
                    var M = H.value;
                    if (!M) {
                        M = (H.attributes && H.attributes["value"] && !(H.attributes["value"].specified)) ? H.text : H.value
                    }
                    if (G) {
                        return M
                    }
                    L.push(M)
                }
            }
            return L
        }
        return C.value
    };
    B.fn.clearForm = function() {
        return this.each(function() {
            B("input,select,textarea", this).clearFields()
        })
    };
    B.fn.clearFields = B.fn.clearInputs = function() {
        return this.each(function() {
            var D = this.type,C = this.tagName.toLowerCase();
            if (D == "text" || D == "password" || C == "textarea") {
                this.value = ""
            } else {
                if (D == "checkbox" || D == "radio") {
                    this.checked = false
                } else {
                    if (C == "select") {
                        this.selectedIndex = -1
                    }
                }
            }
        })
    };
    B.fn.resetForm = function() {
        return this.each(function() {
            if (typeof this.reset == "function" || (typeof this.reset == "object" && !this.reset.nodeType)) {
                this.reset()
            }
        })
    };
    B.fn.enable = function(C) {
        if (C == undefined) {
            C = true
        }
        return this.each(function() {
            this.disabled = !C
        })
    };
    B.fn.selected = function(C) {
        if (C == undefined) {
            C = true
        }
        return this.each(function() {
            var D = this.type;
            if (D == "checkbox" || D == "radio") {
                this.checked = C
            } else {
                if (this.tagName.toLowerCase() == "option") {
                    var E = B(this).parent("select");
                    if (C && E[0] && E[0].type == "select-one") {
                        E.find("option").selected(false)
                    }
                    this.selected = C
                }
            }
        })
    };
    function A() {
        if (B.fn.ajaxSubmit.debug && window.console && window.console.log) {
            window.console.log("[jquery.form] " + Array.prototype.join.call(arguments, ""))
        }
    }
})(jQuery);
(function(E) {
    var B = {},K,M,O,J = E.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent),A = false;
    E.tooltip = {blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:-35,left:15,id:"tooltip"},block:function() {
        E.tooltip.blocked = !E.tooltip.blocked
    }};
    E.fn.extend({tooltip:function(P) {
        P = E.extend({}, E.tooltip.defaults, P);
        H(P);
        return this.each(
                function() {
                    E.data(this, "tooltip", P);
                    this.tOpacity = B.parent.css("opacity");
                    this.tooltipText = this.title;
                    E(this).removeAttr("title");
                    this.alt = ""
                }).mouseover(L).mouseout(F).click(F)
    },fixPNG:J ? function() {
        return this.each(function() {
            var P = E(this).css("backgroundImage");
            if (P.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
                P = RegExp.$1;
                E(this).css({"backgroundImage":"none","filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + P + "')"}).each(function() {
                    var Q = E(this).css("position");
                    if (Q != "absolute" && Q != "relative") {
                        E(this).css("position", "relative")
                    }
                })
            }
        })
    } : function() {
        return this
    },unfixPNG:J ? function() {
        return this.each(function() {
            E(this).css({"filter":"",backgroundImage:""})
        })
    } : function() {
        return this
    },hideWhenEmpty:function() {
        return this.each(function() {
            E(this)[E(this).html() ? "show" : "hide"]()
        })
    },url:function() {
        return this.attr("href") || this.attr("src")
    }});
    function H(P) {
        if (B.parent) {
            return
        }
        B.parent = E('<div id="' + P.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();
        if (E.fn.bgiframe) {
            B.parent.bgiframe()
        }
        B.title = E("h3", B.parent);
        B.body = E("div.body", B.parent);
        B.url = E("div.url", B.parent)
    }

    function C(P) {
        return E.data(P, "tooltip")
    }

    function G(P) {
        if (C(this).delay) {
            O = setTimeout(N, C(this).delay)
        } else {
            N()
        }
        A = !!C(this).track;
        E(document.body).bind("mousemove", D);
        D(P)
    }

    function L() {
        if (E.tooltip.blocked || this == K || (!this.tooltipText && !C(this).bodyHandler)) {
            return
        }
        K = this;
        M = this.tooltipText;
        if (C(this).bodyHandler) {
            B.title.hide();
            var S = C(this).bodyHandler.call(this);
            if (S.nodeType || S.jquery) {
                B.body.empty().append(S)
            } else {
                B.body.html(S)
            }
            B.body.show()
        } else {
            if (C(this).showBody) {
                var R = M.split(C(this).showBody);
                B.title.html(R.shift()).show();
                B.body.empty();
                for (var Q = 0,P; (P = R[Q]); Q++) {
                    if (Q > 0) {
                        B.body.append("<br/>")
                    }
                    B.body.append(P)
                }
                B.body.hideWhenEmpty()
            } else {
                B.title.html(M).show();
                B.body.hide()
            }
        }
        if (C(this).showURL && E(this).url()) {
            B.url.html(E(this).url().replace("http://", "")).show()
        } else {
            B.url.hide()
        }
        B.parent.addClass(C(this).extraClass);
        if (C(this).fixPNG) {
            B.parent.fixPNG()
        }
        G.apply(this, arguments)
    }

    function N() {
        O = null;
        if ((!J || !E.fn.bgiframe) && C(K).fade) {
            if (B.parent.is(":animated")) {
                B.parent.stop().show().fadeTo(C(K).fade, K.tOpacity)
            } else {
                B.parent.is(":visible") ? B.parent.fadeTo(C(K).fade, K.tOpacity) : B.parent.fadeIn(C(K).fade)
            }
        } else {
            B.parent.show()
        }
        D()
    }

    function D(S) {
        if (E.tooltip.blocked) {
            return
        }
        if (S && S.target.tagName == "OPTION") {
            return
        }
        if (!A && B.parent.is(":visible")) {
            E(document.body).unbind("mousemove", D)
        }
        if (K == null) {
            E(document.body).unbind("mousemove", D);
            return
        }
        B.parent.removeClass("viewport-right").removeClass("viewport-bottom");
        var U = B.parent[0].offsetLeft;
        var T = B.parent[0].offsetTop;
        if (S) {
            U = S.pageX + C(K).left;
            T = S.pageY + C(K).top;
            var Q = "auto";
            if (C(K).positionLeft) {
                Q = E(window).width() - U;
                U = "auto"
            }
            B.parent.css({left:U,right:Q,top:T})
        }
        var P = I(),R = B.parent[0];
        if (P.x + P.cx < R.offsetLeft + R.offsetWidth) {
            U -= R.offsetWidth + 20 + C(K).left;
            B.parent.css({left:U + "px"}).addClass("viewport-right")
        }
        if (P.y + P.cy < R.offsetTop + R.offsetHeight) {
            T -= R.offsetHeight + 20 + C(K).top;
            B.parent.css({top:T + "px"}).addClass("viewport-bottom")
        }
    }

    function I() {
        return{x:E(window).scrollLeft(),y:E(window).scrollTop(),cx:E(window).width(),cy:E(window).height()}
    }

    function F(R) {
        if (E.tooltip.blocked) {
            return
        }
        if (O) {
            clearTimeout(O)
        }
        K = null;
        var Q = C(this);

        function P() {
            B.parent.removeClass(Q.extraClass).hide().css("opacity", "")
        }

        if ((!J || !E.fn.bgiframe) && Q.fade) {
            if (B.parent.is(":animated")) {
                B.parent.stop().fadeTo(Q.fade, 0, P)
            } else {
                B.parent.stop().fadeOut(Q.fade, P)
            }
        } else {
            P()
        }
        if (C(this).fixPNG) {
            B.parent.unfixPNG()
        }
    }
})(jQuery);
jQuery.request = jQuery.fn.request = function() {
    var complete = function(callback) {
        return function(XMLHttpRequest, textStatus) {
            if (callback.container) {
                callback.container.loading("destroy")
            }
            if ((textStatus == "error" || textStatus == "timeout") && callback.failure) {
                callback.failure.call(callback.scope || window, {responseText:XMLHttpRequest.responseText,arguments:callback.arguments})
            } else {
                if (callback.success) {
                    callback.success.call(callback.scope || window, {responseText:XMLHttpRequest.responseText,arguments:callback.arguments})
                }
            }
        }
    };
    var getJSON = function(responce) {
        return eval("new Object(" + responce.responseText + ")")
    };
    var successHandler = function(responce) {
        try{
            var json = getJSON(responce);
        }catch(err){
//            alert(responce.responseText)
            return false
        }
        var json = getJSON(responce);
        if (json && responce.arguments && responce.arguments.func) {
            responce.arguments.func.call(this, json, responce.arguments)
        }
    };
    var failureHandler = function(responce) {
    };
    var get = function(options) {
        var params = {data:(options.data) ? options.data : null,dataType:"text",type:"GET",url:(options.url) ? options.url : null,complete:complete({scope:(options.scope) ? options.scope : this,failure:failureHandler,success:successHandler,container:((options.container) ? options.container : null),arguments:$.extend((options.arguments) ? options.arguments : {}, {func:(options.func) ? options.func : null})})};
        if (options.container) {
            options.container.loading()
        }
        jQuery.ajax(params)
    };
    var post = function(options) {
        if (options.form) {
            var params = {type:"POST",url:(options.url) ? options.url : null,complete:complete({scope:(options.scope) ? options.scope : this,failure:failureHandler,success:successHandler,container:((options.container) ? options.container : null),arguments:$.extend((options.arguments) ? options.arguments : {}, {func:(options.func) ? options.func : null})})};
            if (options.container) {
                options.container.loading()
            }
            options.form.ajaxSubmit(params)
        }
    };
    if (arguments[0] && (typeof arguments[0] === "object")) {
        var options = arguments[0];
        if (options.type && (options.type == "post")) {
            post(options)
        } else {
            get(options)
        }
    }
};
jQuery.plugin = jQuery.fn.plugin = function(object, plugin, func, params) {
    var cmd_ = "";
    var paramsStr = "";
    if ((params) && (params instanceof Array)) {
        for (var i = 0; i < params.length; i++) {
            paramsStr += ", params[" + i + "]"
        }
    }
    if (typeof func === "string") {
        cmd_ = "'" + func + "'"
    } else {
        if (typeof func === "object") {
            cmd_ = "func"
        }
    }
    var cmd = "object." + plugin + "(" + cmd_ + "" + paramsStr + ");";
    return eval(cmd)
};
jQuery.loading = jQuery.fn.loading = function() {
    var B = function(C) {
        var C = $(document);
        modal = (this.modal = $("<div/>")).addClass("loading").height(C.height()).width(C.width());
        modal.hide();
        $("body").prepend(modal);
        modal.show()
    };
    var A = function(C) {
        var C = $(document);
        C.find(".loading").remove()
    };
    if (!arguments[0]) {
        B(this)
    } else {
        if (arguments[0] && (typeof arguments[0] === "string") && (arguments[0] == "destroy")) {
            A(this)
        }
    }
};
function number_format(F, C, I, E) {
    var B = F,A = C;
    B = !isFinite(+B) ? 0 : +B;
    A = !isFinite(+A) ? 0 : Math.abs(A);
    var L = (typeof E == "undefined") ? "," : E;
    var D = (typeof I == "undefined") ? "." : I;
    var K = (A > 0) ? B.toFixed(A) : Math.round(B).toFixed(A);
    var J = Math.abs(B).toFixed(A);
    var H,G;
    if (J >= 1000) {
        H = J.split(/\D/);
        G = H[0].length % 3 || 3;
        H[0] = K.slice(0, G + (B < 0)) + H[0].slice(G).replace(/(\d{3})/g, L + "$1");
        K = H.join(D)
    } else {
        K = K.replace(".", D)
    }
    return K
}
$.ui.widget.subclass("ui.component");
$.ui.component.subclass("ui.form", {_init:function() {
    var H = this,I = this.options,A = this.form = H.element,B = this.formHeader = A.find(" > ." + I.headerClass),C = this.formBody = A.find("> ." + I.bodyClass),F = this.formBodyFieldSet = C.find(" > form").find("." + I.bodyFieldSetClass),D = this.formBodyFieldSetContent = F.find("." + I.bodyFieldSetContentClass),G = this.formBodyButtonSet = C.find("> ." + I.bodyButtonSetClass),E = this.formFooter = A.find("> ." + I.footerClass);
    this.create()
},hide:function(A) {
    if (this.options.dialog) {
        this.form.dialog("close")
    }
    this.form.hide()
},show:function(A) {
    if (this.options.dialog) {
        this.form.dialog("open")
    }
    this.form.show()
},close:function() {
    this.hide()
},reset_:function() {
    return this.form.find("form").clearForm()
},reset:function() {
    if (confirm("Clear all entered information?")) {
        return this.reset_()
    } else {
        return false
    }
},create:function(A) {
    this.createHeader();
    this.createBody();
    if (this.options.dialog) {
        form.dialog()
    }
    this.createFooter()
},destroy:function(A) {
    if (this.options.dialog) {
        this.form.dialog("destroy")
    }
    this.destroyHeader();
    this.destroyBody();
    this.destroyFooter()
},getBodyObject:function(A) {
    return this.formBody.find(A)
},createHeader:function() {
    var A = this;
    this.formHeader.find(".close").each(function() {
        $(this).unbind("click");
        $(this).bind("click", function() {
            A.close()
        })
    })
},destroyHeader:function() {
    this.formHeader.find(".close").each(function() {
        $(this).unbind("click")
    })
},createBody:function() {
    this.createFieldSet();
    this.createButtonSet()
},destroyBody:function() {
    this.destroyButtonSet();
    this.destroyFieldSet()
},createFooter:function() {
},destroyFooter:function() {
},createFieldSet:function() {
    var A = this;
    this.formBodyFieldSetContent.find(".help").tooltip();
    this.formBodyFieldSetContent.find(".error").each(function() {
        $(this).unbind();
        $(this).bind("click", function() {
            $(this).fadeOut(500)
        })
    });
    this.formBodyFieldSetContent.find(".messager").each(function() {
        var B = $(this);
        B.unbind();
        B.bind("click", function() {
            $(this).fadeOut(500)
        });
        $.timer(5500, function(C) {
            B.fadeOut(500);
            C.stop()
        })
    });
    this.form.find("form").unbind("keypress");
    this.form.find("form").bind("keypress", function(B) {
        if (B.keyCode == 13) {
            if (B.target && B.target.tagName && (String(B.target.tagName).toUpperCase() != "TEXTAREA")) {
                A.submit();
                return false
            } else {
                return true
            }
        }
    })
    this.formBodyFieldSetContent.find("input").each(function() {
        $(this).placeholder('#777777');
    })
},destroyFieldSet:function() {
    this.formBodyFieldSetContent.find(".error").each(function() {
        $(this).unbind()
    });
    this.formBodyFieldSetContent.find(".messager").each(function() {
        $(this).unbind()
    });
    this.formBodyFieldSetContent.find(".messager").remove()
},recreateFieldSet:function(A) {
    this.destroyFieldSet();
    this.formBodyFieldSetContent.html(A);
    this.createFieldSet()
},createButtonSet:function() {
    var A = this;
    this.formBodyButtonSet.find(".submit").each(function() {
        $(this).bind("click", function() {
            A.submit();
            return false
        })
    });
    this.formBodyButtonSet.find(".reset").each(function() {
        $(this).bind("click", function() {
            A.reset();
            return false
        })
    });
    this.formBodyButtonSet.find(".close").each(function() {
        $(this).bind("click", function() {
            A.close();
            return false
        })
    })
},destroyButtonSet:function() {
    this.formBodyButtonSet.find(".submit").each(function() {
        $(this).unbind("click")
    });
    this.formBodyButtonSet.find(".reset").each(function() {
        $(this).unbind("click")
    });
    this.formBodyButtonSet.find(".close").each(function() {
        $(this).unbind("click")
    })
},getURL:function() {
    return this.form.find("form").attr("action")
},submitHandler:function(A) {
    if (A) {
        if (A.redirect_url) {
            return window.location = A.redirect_url
        }
        if (A.html) {
            if (A.html.fieldset_content) {
                this.recreateFieldSet(A.html.fieldset_content)
            }
        }
    }
},post:function(B, C) {
    var A = this.getURL();
    if (C) {
        A += C
    }
    $.request({url:A,type:"post",form:this.form.find("form"),container:this.form,scope:this,func:B})
},submit:function(A) {
    this.post(this.submitHandler, A)
}});
$.ui.form.defaults.extend({headerClass:"form-header",bodyClass:"form-body",bodyFieldSetClass:"form-body-fieldset",bodyFieldSetContentClass:"form-body-fieldset-content",bodyButtonSetClass:"form-body-buttonset",footerClass:"form-footer",dialog:false});
$.ui.form.subclass("ui.tree_field_form", {changeOption:function() {
},createFieldSet:function() {
    this._super();
    var A = this;
    this.formBodyFieldSetContent.find(".tree-field").each(function() {
        var B = $(this).find("select");
        B.selectList({sort:true,addAnimate:false,removeAnimate:false,onChange:function() {
            A.changeOption()
        }})
    })
},destroyFieldSet:function() {
    this._super()
}});
$.ui.form.subclass("ui.rich_text_field_form", {getEditorStyleSheet:function() {
    return this.formBodyFieldSetContent.find(".richtext").attr("stylesheet_")
},getEditorConfig:function() {
    var A = this.getEditorStyleSheet();
    return{mode:"specific_textareas",editor_selector:"richtext",theme:"advanced",plugins:"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",theme_advanced_buttons1:"newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",theme_advanced_buttons2:"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",theme_advanced_buttons3:"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",theme_advanced_buttons4:"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",entity_encoding:"raw",content_css:A,theme_advanced_resizing:true,auto_resize:true,convert_urls:false}
},toggleEditors:function() {
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        var A = $(this).attr("id");
        if (tinyMCE) {
            if (tinyMCE.getInstanceById(A) == null) {
                tinyMCE.execCommand("mceAddControl", false, A)
            } else {
                tinyMCE.execCommand("mceRemoveControl", false, A)
            }
        }
    })
},createFieldSet:function() {
    this._super();
    var A = this;
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        if (tinyMCE) {
            tinyMCE.init(A.getEditorConfig())
        }
    });
    this.formBodyFieldSetContent.find(".toggle-editor").each(function() {
        $(this).bind("click", function() {
            A.toggleEditors()
        })
    })
},destroyFieldSet:function() {
    this._super();
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        if (tinyMCE) {
            var A = tinyMCE.get($(this).attr("id"));
            if (A) {
                tinyMCE.remove(A)
            }
        }
    });
    this.formBodyFieldSetContent.find(".toggle-editor").each(function() {
        $(this).unbind("click")
    })
},submit:function() {
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        tinyMCE.execCommand("mceToggleEditor", true, $(this).attr("id"))
    });
    this._super()
}});
$.ui.component.subclass("ui.page", {_init:function() {
    var A = this,B = this.options,E = (this.page) = A.element,D = this.pageHeader = E.find("." + B.headerClass),F = this.pageBody = E.find("." + B.bodyClass),C = this.pageFooter = E.find("." + B.footerClass);
    this.create()
},getBodyObject:function(A) {
    return this.pageBody.find(A)
},create:function() {
    this.createCommonSignInForm();
    this.createTopBar();
    this.createMenu();
    this.createMessager()
},createMenu:function() {
    $("#user-menu").find("ul.jd_menu").jdMenu()
},createCommonSignInForm:function() {
    this.commonSignInForm = this.pageHeader.find("#common_sign_in_form").form()
},createMessager:function() {
    this.pageBody.find(".page-messager").each(function() {
        $(this).find(".messager").each(function() {
            var A = $(this);
            A.unbind();
            A.bind("click", function() {
                $(this).fadeOut(500)
            });
            $.timer(25000, function(B) {
                A.fadeOut(500);
                B.stop()
            })
        })
    })
},createTopBar:function() {
    this.pageHeader.find(".top-bar").each(function() {
        $(this).find(".user-credits").each(function() {
            $(this).find(".help").tooltip()
        })
    })
}});
$.ui.page.defaults.extend({headerClass:"page-header",bodyClass:"page-body",footerClass:"page-footer"});
$.ui.form.subclass("ui.grid_form", {_init:function() {
    var A = this.grid = this.options.grid
},callGrid:function(B, A) {
    if (this.grid && this.options.grid_widget) {
        return $.plugin(this.grid, this.options.grid_widget, B, A)
    } else {
        return false
    }
},createHeader:function() {
    this._super()
},createFooter:function() {
    this._super()
},submitHandler:function(A) {
    this._super(A);
    if (A) {
        if (A.result && !A.close) {
            this.close()
        }
        if (A.html && A.html.dataset_content) {
            this.callGrid("recreateDataSet", [A.html.dataset_content])
        }
    }
}});
$.ui.grid_form.defaults.extend({});
$.ui.grid_form.subclass("ui.rich_text_field_grid_form", {getEditorStyleSheet:function() {
    return this.formBodyFieldSetContent.find(".richtext").attr("stylesheet_")
},getEditorConfig:function() {
    var A = this.getEditorStyleSheet();
    return{mode:"specific_textareas",editor_selector:"richtext",theme:"advanced",plugins:"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",theme_advanced_buttons1:"newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",theme_advanced_buttons2:"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",theme_advanced_buttons3:"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",theme_advanced_buttons4:"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",entity_encoding:"raw",content_css:A,theme_advanced_resizing:true,auto_resize:true,convert_urls:false}
},toggleEditors:function() {
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        var A = $(this).attr("id");
        if (tinyMCE) {
            if (tinyMCE.getInstanceById(A) == null) {
                tinyMCE.execCommand("mceAddControl", false, A)
            } else {
                tinyMCE.execCommand("mceRemoveControl", false, A)
            }
        }
    })
},createFieldSet:function() {
    this._super();
    var A = this;
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        if (tinyMCE) {
            tinyMCE.init(A.getEditorConfig())
        }
    });
    this.formBodyFieldSetContent.find(".toggle-editor").each(function() {
        $(this).bind("click", function() {
            A.toggleEditors()
        })
    })
},destroyFieldSet:function() {
    this._super();
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        if (tinyMCE) {
            var A = tinyMCE.get($(this).attr("id"));
            if (A) {
                tinyMCE.remove(A)
            }
        }
    });
    this.formBodyFieldSetContent.find(".toggle-editor").each(function() {
        $(this).unbind("click")
    })
},submit:function() {
    this.formBodyFieldSetContent.find(".richtext").each(function() {
        tinyMCE.execCommand("mceToggleEditor", true, $(this).attr("id"))
    });
    this._super()
}});
$.ui.grid_form.subclass("ui.grid_advanced_search_form", {submitHandler:function(A) {
    if (A) {
        if (A.redirect_url) {
            return window.location = A.redirect_url
        }
        if (A.html) {
            if (A.html.fieldset_content) {
                this.recreateFieldSet(A.html.fieldset_content)
            }
            if (A.html.dataset_content) {
                this.callGrid("recreateDataSet", [A.html.dataset_content])
            }
        }
    }
}});
$.ui.grid_form.defaults.extend({});
$.ui.component.subclass("ui.grid", {_init:function() {
    var B = this,C = this.options,D = this.grid = B.element,F = this.gridHeader = D.find("." + C.headerClass),A = this.gridButtons = D.find("." + C.buttonsClass),G = this.gridBody = D.find("." + C.bodyClass),H = this.gridDataSet = G.find("." + C.dataSetClass),E = this.gridFooter = D.find("." + C.footerClass);
    this.create()
},getBodyObject:function(A) {
    return this.gridBody.find(A)
},create:function() {
    this.createBody();
    this.createHeader();
    this.createButtons()
},destroy:function() {
    this.destroyHeader();
    this.destroyBody();
    this.destroyButtons()
},createHeader:function() {
},destroyHeader:function() {
},createButtons:function() {
    var A = this;
    this.gridButtons.find("." + this.options.addButtonClass).each(function() {
        $(this).bind("click", function() {
            A.add()
        })
    });
    this.gridButtons.find("." + this.options.advancedSearchButtonClass).each(function() {
        $(this).bind("click", function() {
            A.advancedSearch()
        })
    });
    this.gridButtons.find("." + this.options.resetButtonClass).each(function() {
        $(this).bind("click", function() {
            A.reset_()
        })
    })
},destroyButtons:function() {
    this.gridButtons.find("." + this.options.addButtonClass).each(function() {
        $(this).unbind("click")
    });
    this.gridButtons.find("." + this.options.advancedSearchButtonClass).each(function() {
        $(this).unbind("click")
    });
    this.gridButtons.find("." + this.options.resetButtonClass).each(function() {
        $(this).unbind("click")
    })
},createBody:function() {
    this.createViewPanel();
    this.createAdvancedSearchForm();
    this.createAddForm();
    this.createEditForm();
    this.createDataSet()
},destroyBody:function() {
    this.destroyViewPanel();
    this.destroyAdvancedSearchForm();
    this.destroyAddForm();
    this.destroyEditForm();
    this.destroyDataSet()
},callAdvancedSearchForm:function(B, A) {
    if ($.ui.form) {
        return $.plugin(this.getBodyObject("." + this.options.advancedSearchForm.widgetClass), this.options.advancedSearchForm.widget, B, A)
    } else {
        return false
    }
},destroyAdvancedSearchForm:function() {
    this.callAdvancedSearchForm("destroy")
},createAdvancedSearchForm:function() {
    this.callAdvancedSearchForm({grid:this.grid,grid_widget:this.options.widget});
    this.callAdvancedSearchForm("hide")
},callViewPanel:function(B, A) {
    if ($.ui.panel) {
        return $.plugin(this.getBodyObject("." + this.options.viewPanel.widgetClass), this.options.viewPanel.widget, B, A)
    } else {
        return false
    }
},destroyViewPanel:function() {
    this.callViewPanel("destroy")
},createViewPanel:function() {
    this.viewPanel = this.callViewPanel();
    this.callViewPanel("hide")
},callAddForm:function(B, A) {
    return $.plugin(this.getBodyObject("." + this.options.addForm.widgetClass), this.options.addForm.widget, B, A)
},destroyAddForm:function() {
    this.callAddForm("destroy")
},createAddForm:function() {
    this.addForm = this.callAddForm({grid:this.grid,grid_widget:this.options.widget});
    this.callAddForm("hide")
},callEditForm:function(B, A) {
    return $.plugin(this.getBodyObject("." + this.options.editForm.widgetClass), this.options.editForm.widget, B, A)
},destroyEditForm:function() {
    this.callEditForm("destroy")
},createEditForm:function() {
    this.editForm = this.callEditForm({grid:this.grid,grid_widget:this.options.widget});
    this.callEditForm("hide")
},getDataSetContent:function() {
    return this.gridDataSet.find("." + this.options.dataSetContentClass)
},createDataSet:function() {
    this.createColumnSet();
    this.createRecordSet();
    var A = this;
    this.gridDataSet.find("." + this.options.pageButtonClass).each(function() {
        $(this).unbind("click");
        $(this).bind("click", function() {
            A.page($(this).attr("key"))
        })
    });
    this.gridDataSet.find("." + this.options.messagerClass).each(function() {
        var B = $(this);
        B.unbind();
        B.bind("click", function() {
            $(this).fadeOut(500)
        });
        $.timer(5500, function(C) {
            B.fadeOut(500);
            C.stop()
        })
    })
},destroyDataSet:function() {
    this.destroyRecordSet();
    this.destroyColumnSet();
    this.gridDataSet.find("." + this.options.pageButtonClass).each(function() {
        $(this).unbind("click")
    });
    this.gridDataSet.find("." + this.options.messagerClass).each(function() {
        $(this).unbind()
    })
},recreateDataSet:function(A) {
    this.destroyDataSet();
    this.gridDataSet.html(A);
    this.createDataSet()
},createColumnSet:function() {
    var A = this;
    this.getDataSetContent().find("." + this.options.sortButtonClass).each(function() {
        $(this).unbind("click");
        $(this).bind("click", function() {
            A.sort($(this).attr("column"), $(this).attr("dir_"))
        })
    });
    this.getDataSetContent().find(".help").tooltip()
},destroyColumnSet:function() {
    this.getDataSetContent().find("." + this.options.sortButtonClass).each(function() {
        $(this).unbind("click")
    })
},createRecordSet:function() {
    var A = this;
    this.getDataSetContent().find("div.menu-options").each(function() {
        $(this).menu({hoverOpenDelay:0,hideDelay:1,showDelay:1,winWidth:200,onClick:function(E, D) {
            var C = $(this).find("a");
            var B = C.attr("class");
            if (B == A.options.viewButtonClass) {
                A.view(C.attr("key"))
            } else {
                if (B == A.options.editButtonClass) {
                    A.edit(C.attr("key"))
                } else {
                    if (B == A.options.deleteButtonClass) {
                        A.delete_(C.attr("key"), C.attr("message"))
                    }
                }
            }
        }})
    });
    this.getDataSetContent().find("." + this.options.viewButtonClass).each(function() {
        $(this).unbind("click");
        $(this).bind("click", function() {
            A.view($(this).attr("key"))
        })
    });
    this.getDataSetContent().find("." + this.options.editButtonClass).each(function() {
        $(this).unbind("click");
        $(this).bind("click", function() {
            A.edit($(this).attr("key"))
        })
    });
    this.getDataSetContent().find("." + this.options.deleteButtonClass).each(function() {
        $(this).unbind("click");
        $(this).bind("click", function() {
            A.delete_($(this).attr("key"), $(this).attr("message"))
        })
    })
},destroyRecordSet:function() {
    this.getDataSetContent().find("." + this.options.viewButtonClass).each(function() {
        $(this).unbind("click")
    });
    this.getDataSetContent().find("." + this.options.editButtonClass).each(function() {
        $(this).unbind("click")
    });
    this.getDataSetContent().find("." + this.options.deleteButtonClass).each(function() {
        $(this).unbind("click")
    })
},hideControls:function() {
    this.callAddForm("hide");
    this.callAdvancedSearchForm("hide");
    this.callEditForm("hide");
    this.callViewPanel("hide")
},getURL:function() {
    return this.grid.attr("url")
},getId:function() {
    return this.grid.attr("id")
},cmdViewHandler:function(A, B) {
    if (A.html) {
        this.callViewPanel("recreateFieldSet", [A.html.fieldset_content]);
        this.callViewPanel("show")
    }
},cmdAddHandler:function(A, B) {
    if (A.html) {
        this.callAddForm("recreateFieldSet", [A.html.fieldset_content]);
        this.callAddForm("show")
    }
},cmdEditHandler:function(A, B) {
    if (A.html) {
        this.callEditForm("recreateFieldSet", [A.html.fieldset_content]);
        this.callEditForm("show")
    }
},cmdCustomHandler:function(A, B) {
},cmdHandler:function(A, B) {
    if (B.cmd) {
        if (B.cmd == "view") {
            this.cmdViewHandler(A, B)
        }
        if (B.cmd == "add") {
            this.cmdAddHandler(A, B)
        }
        if (B.cmd == "edit") {
            this.cmdEditHandler(A, B)
        }
        this.cmdCustomHandler(A, B);
        if (A.html && A.html.dataset_content) {
            this.recreateDataSet(A.html.dataset_content)
        }
    }
},cmd:function(C, B) {
    var A = this.getURL() + "&cmd=" + C;
    if (B) {
        A += "&" + B
    }
    $.request({url:A,scope:this,func:this.cmdHandler,container:this.gridDataSet.find(".grid-dataset-content"),arguments:{cmd:C,query:B}})
},sort:function(B, A) {
    this.cmd("sort", "column=" + B + "&dir=" + A)
},page:function(B, A) {
    this.cmd("page", "page=" + B)
},view:function(A) {
    this.hideControls();
    this.cmd("view", "id=" + A)
},add:function() {
    this.hideControls();
    this.cmd("add")
},edit:function(A) {
    this.hideControls();
    this.cmd("edit", "id=" + A)
},reset_:function() {
    this.cmd("reset")
},advancedSearch:function() {
    this.hideControls();
    this.callAdvancedSearchForm("show")
},delete_:function(B, A) {
    if (confirm(A)) {
        this.cmd("delete", "id=" + B)
    }
}});
$.ui.grid.defaults.extend({widget:"grid",headerClass:"grid-header",advancedSearchButtonClass:"advanced-search",resetButtonClass:"reset",addButtonClass:"add",editButtonClass:"edit",viewButtonClass:"view",deleteButtonClass:"delete",messagerClass:"messager",buttonsClass:"grid-buttons",bodyClass:"grid-body",dataSetClass:"grid-dataset",dataSetContentClass:"grid-dataset-content",sortButtonClass:"sort",pageButtonClass:"page",footerClass:"grid-footer",viewPanel:{widget:"panel",widgetClass:"view-panel"},advancedSearchForm:{widget:"grid_advanced_search_form",widgetClass:"advanced-search-form"},addForm:{widget:"grid_form",widgetClass:"add-form"},editForm:{widget:"grid_form",widgetClass:"edit-form"}});
(function($) {

    $.fn.placeholder = function(color) {
        if (!Modernizr.input.placeholder && $(this).attr('placeholder')) {
            if (($.browser.msie)&&$(this).attr('type')=='password'){
                return true;
            }
            function changeType(val){
                if (!$.browser.msie){
                var oldBox = $(val);
                var newBox = oldBox.clone(true);
                newBox.attr("type", ( oldBox.attr('type')=='password'?'text':'password' ) );
//                newBox[0].setAttribute('type',( oldBox.attr('type')=='password'?'text':'password' ));
                newBox.insertBefore(oldBox);
                oldBox.remove();
                }
                return newBox;
            }
            var color = color || '#a9a9a9';
            $(this).css('color', color);
            var is_pass = false
            if ($(this).attr('type') == 'password') {
                is_pass = true;
            }
            $(this).focus(function() {
                if ($(this).val() == $(this).attr('placeholder')) {
                    $(this)
                            .val('')
                            .css('color', '');
                    if (is_pass) (changeType(this)).focus();
                }
            });

            $(this).blur(function() {
                if ($(this).val() == '') {
                    $(this)
                            .val($(this).attr('placeholder'))
                            .css('color', color);
                    if (is_pass) changeType(this);
                }
            });
            if (is_pass){
                if (!$(this).val() || $(this).val()==$(this).attr('placeholder')){
                    $(this).val($(this).attr('placeholder'))
                    changeType(this)
                }
            } else {
                if (!$(this).val())  $(this).val($(this).attr('placeholder'))
            }

        }
    };

})(jQuery);

/* Modernizr custom build of 1.7: borderradius | input */
window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)

