jQuery.ui || function(c) { c.ui = { version: "1.8", plugin: { add: function(a, b, e) { a = c.ui[a].prototype; for (var d in e) { a.plugins[d] = a.plugins[d] || []; a.plugins[d].push([b, e[d]]) } }, call: function(a, b, e) { if ((b = a.plugins[b]) && a.element[0].parentNode) for (var d = 0; d < b.length; d++) a.options[b[d][0]] && b[d][1].apply(a.element, e) } }, contains: function(a, b) { return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b) }, hasScroll: function(a, b) { if (c(a).css("overflow") == "hidden") return false; b = b && b == "left" ? "scrollLeft" : "scrollTop"; var e = false; if (a[b] > 0) return true; a[b] = 1; e = a[b] > 0; a[b] = 0; return e }, isOverAxis: function(a, b, e) { return a > b && a < b + e }, isOver: function(a, b, e, d, f, g) { return c.ui.isOverAxis(a, e, f) && c.ui.isOverAxis(b, d, g) }, 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} }; c.fn.extend({ _focus: c.fn.focus, focus: function(a, b) { return typeof a === "number" ? this.each(function() { var e = this; setTimeout(function() { c(e).focus(); b && b.call(e) }, a) }) : this._focus.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 a; a = c.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? 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) : 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")) || !a.length ? c(document) : a }, zIndex: function(a) { if (a !== undefined) return this.css("zIndex", a); if (this.length) { a = c(this[0]); for (var b; a.length && a[0] !== document; ) { b = a.css("position"); if (b == "absolute" || b == "relative" || b == "fixed") { b = parseInt(a.css("zIndex")); if (!isNaN(b) && b != 0) return b } a = a.parent() } } return 0 } }); c.extend(c.expr[":"], { data: function(a, b, e) { return !!c.data(a, e[3]) }, focusable: function(a) { var b = a.nodeName.toLowerCase(), e = c.attr(a, "tabindex"); return (/input|select|textarea|button|object/.test(b) ? !a.disabled : "a" == b || "area" == b ? a.href || !isNaN(e) : !isNaN(e)) && !c(a)["area" == b ? "parents" : "closest"](":hidden").length }, tabbable: function(a) { var b = c.attr(a, "tabindex"); return (isNaN(b) || b >= 0) && c(a).is(":focusable") } }) } (jQuery); (function(c) { var a = c.fn.remove; c.fn.remove = function(b, e) { return this.each(function() { if (!e) if (!b || c.filter(b, [this]).length) c("*", this).add(this).each(function() { c(this).triggerHandler("remove") }); return a.call(c(this), b, e) }) }; c.widget = function(b, e, d) { var f = b.split(".")[0], g; b = b.split(".")[1]; g = f + "-" + b; if (!d) { d = e; e = c.Widget } c.expr[":"][g] = function(h) { return !!c.data(h, b) }; c[f] = c[f] || {}; c[f][b] = function(h, i) { arguments.length && this._createWidget(h, i) }; e = new e; e.options = c.extend({}, e.options); c[f][b].prototype = c.extend(true, e, { namespace: f, widgetName: b, widgetEventPrefix: c[f][b].prototype.widgetEventPrefix || b, widgetBaseClass: g }, d); c.widget.bridge(b, c[f][b]) }; c.widget.bridge = function(b, e) { c.fn[b] = function(d) { var f = typeof d === "string", g = Array.prototype.slice.call(arguments, 1), h = this; d = !f && g.length ? c.extend.apply(null, [true, d].concat(g)) : d; if (f && d.substring(0, 1) === "_") return h; f ? this.each(function() { var i = c.data(this, b), k = i && c.isFunction(i[d]) ? i[d].apply(i, g) : i; if (k !== i && k !== undefined) { h = k; return false } }) : this.each(function() { var i = c.data(this, b); if (i) { d && i.option(d); i._init() } else c.data(this, b, new e(d, this)) }); return h } }; c.Widget = function(b, e) { arguments.length && this._createWidget(b, e) }; c.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", options: { disabled: false }, _createWidget: function(b, e) { this.element = c(e).data(this.widgetName, this); this.options = c.extend(true, {}, this.options, c.metadata && c.metadata.get(e)[this.widgetName], b); var d = this; this.element.bind("remove." + this.widgetName, function() { d.destroy() }); this._create(); this._init() }, _create: function() { }, _init: function() { }, destroy: function() { this.element.unbind("." + this.widgetName).removeData(this.widgetName); this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled " + this.namespace + "-state-disabled") }, widget: function() { return this.element }, option: function(b, e) { var d = b, f = this; if (arguments.length === 0) return c.extend({}, f.options); if (typeof b === "string") { if (e === undefined) return this.options[b]; d = {}; d[b] = e } c.each(d, function(g, h) { f._setOption(g, h) }); return f }, _setOption: function(b, e) { this.options[b] = e; if (b === "disabled") this.widget()[e ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled " + this.namespace + "-state-disabled").attr("aria-disabled", e); return this }, enable: function() { return this._setOption("disabled", false) }, disable: function() { return this._setOption("disabled", true) }, _trigger: function(b, e, d) { var f = this.options[b]; e = c.Event(e); e.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(); d = d || {}; if (e.originalEvent) { b = c.event.props.length; for (var g; b; ) { g = c.event.props[--b]; e[g] = e.originalEvent[g] } } this.element.trigger(e, d); return !(c.isFunction(f) && f.call(this.element[0], e, d) === false || e.isDefaultPrevented()) } } })(jQuery); (function(c) { c.ui = c.ui || {}; var a = /left|center|right/, b = /top|center|bottom/, e = c.fn.position, d = c.fn.offset; c.fn.position = function(f) { if (!f || !f.of) return e.apply(this, arguments); f = c.extend({}, f); var g = c(f.of), h = (f.collision || "flip").split(" "), i = f.offset ? f.offset.split(" ") : [0, 0], k, j, m; if (f.of.nodeType === 9) { k = g.width(); j = g.height(); m = { top: 0, left: 0} } else if (f.of.scrollTo && f.of.document) { k = g.width(); j = g.height(); m = { top: g.scrollTop(), left: g.scrollLeft()} } else if (f.of.preventDefault) { f.at = "left top"; k = j = 0; m = { top: f.of.pageY, left: f.of.pageX} } else { k = g.outerWidth(); j = g.outerHeight(); m = g.offset() } c.each(["my", "at"], function() { var l = (f[this] || "").split(" "); if (l.length === 1) l = a.test(l[0]) ? l.concat(["center"]) : b.test(l[0]) ? ["center"].concat(l) : ["center", "center"]; l[0] = a.test(l[0]) ? l[0] : "center"; l[1] = b.test(l[1]) ? l[1] : "center"; f[this] = l }); if (h.length === 1) h[1] = h[0]; i[0] = parseInt(i[0], 10) || 0; if (i.length === 1) i[1] = i[0]; i[1] = parseInt(i[1], 10) || 0; if (f.at[0] === "right") m.left += k; else if (f.at[0] === "center") m.left += k / 2; if (f.at[1] === "bottom") m.top += j; else if (f.at[1] === "center") m.top += j / 2; m.left += i[0]; m.top += i[1]; return this.each(function() { var l = c(this), o = l.outerWidth(), p = l.outerHeight(), n = c.extend({}, m); if (f.my[0] === "right") n.left -= o; else if (f.my[0] === "center") n.left -= o / 2; if (f.my[1] === "bottom") n.top -= p; else if (f.my[1] === "center") n.top -= p / 2; c.each(["left", "top"], function(q, r) { c.ui.position[h[q]] && c.ui.position[h[q]][r](n, { targetWidth: k, targetHeight: j, elemWidth: o, elemHeight: p, offset: i, my: f.my, at: f.at }) }); c.fn.bgiframe && l.bgiframe(); l.offset(c.extend(n, { using: f.using })) }) }; c.ui.position = { fit: { left: function(f, g) { var h = c(window); g = f.left + g.elemWidth - h.width() - h.scrollLeft(); f.left = g > 0 ? f.left - g : Math.max(0, f.left) }, top: function(f, g) { var h = c(window); g = f.top + g.elemHeight - h.height() - h.scrollTop(); f.top = g > 0 ? f.top - g : Math.max(0, f.top) } }, flip: { left: function(f, g) { if (g.at[0] !== "center") { var h = c(window); h = f.left + g.elemWidth - h.width() - h.scrollLeft(); var i = g.my[0] === "left" ? -g.elemWidth : g.my[0] === "right" ? g.elemWidth : 0, k = -2 * g.offset[0]; f.left += f.left < 0 ? i + g.targetWidth + k : h > 0 ? i - g.targetWidth + k : 0 } }, top: function(f, g) { if (g.at[1] !== "center") { var h = c(window); h = f.top + g.elemHeight - h.height() - h.scrollTop(); var i = g.my[1] === "top" ? -g.elemHeight : g.my[1] === "bottom" ? g.elemHeight : 0, k = g.at[1] === "top" ? g.targetHeight : -g.targetHeight, j = -2 * g.offset[1]; f.top += f.top < 0 ? i + g.targetHeight + j : h > 0 ? i + k + j : 0 } } } }; if (!c.offset.setOffset) { c.offset.setOffset = function(f, g) { if (/static/.test(c.curCSS(f, "position"))) f.style.position = "relative"; var h = c(f), i = h.offset(), k = parseInt(c.curCSS(f, "top", true), 10) || 0, j = parseInt(c.curCSS(f, "left", true), 10) || 0; i = { top: g.top - i.top + k, left: g.left - i.left + j }; "using" in g ? g.using.call(f, i) : h.css(i) }; c.fn.offset = function(f) { var g = this[0]; if (!g || !g.ownerDocument) return null; if (f) return this.each(function() { c.offset.setOffset(this, f) }); return d.call(this) } } })(jQuery); (function(c) { c.widget("ui.accordion", { options: { active: 0, animated: "slide", autoHeight: true, clearStyle: false, collapsible: false, event: "click", fillSpace: false, header: ">  li > :first-child,> :not(li):even", icons: { header: "ui-icon-triangle-1-e", headerSelected: "ui-icon-triangle-1-s" }, navigation: false, navigationFilter: function() { return this.href.toLowerCase() == location.href.toLowerCase() } }, _create: function() { var a = this.options, b = this; this.running = 0; this.element.addClass("ui-accordion ui-widget ui-helper-reset"); this.element[0].nodeName == "UL" && this.element.children("li").addClass("ui-accordion-li-fix"); this.headers = this.element.find(a.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion", function() { c(this).addClass("ui-state-hover") }).bind("mouseleave.accordion", function() { c(this).removeClass("ui-state-hover") }).bind("focus.accordion", function() { c(this).addClass("ui-state-focus") }).bind("blur.accordion", function() { c(this).removeClass("ui-state-focus") }); this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); if (a.navigation) { var e = this.element.find("a").filter(a.navigationFilter); if (e.length) { var d = e.closest(".ui-accordion-header"); this.active = d.length ? d : e.closest(".ui-accordion-content").prev() } } this.active = this._findActive(this.active || a.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"); this._createIcons(); c.browser.msie && this.element.find("a").css("zoom", "1"); this.resize(); this.element.attr("role", "tablist"); this.headers.attr("role", "tab").bind("keydown", function(f) { return b._keydown(f) }).next().attr("role", "tabpanel"); this.headers.not(this.active || "").attr("aria-expanded", "false").attr("tabIndex", "-1").next().hide(); this.active.length ? this.active.attr("aria-expanded", "true").attr("tabIndex", "0") : this.headers.eq(0).attr("tabIndex", "0"); c.browser.safari || this.headers.find("a").attr("tabIndex", "-1"); a.event && this.headers.bind(a.event + ".accordion", function(f) { b._clickHandler.call(b, f, this); f.preventDefault() }) }, _createIcons: function() { var a = this.options; if (a.icons) { c("<span/>").addClass("ui-icon " + a.icons.header).prependTo(this.headers); this.active.find(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected); this.element.addClass("ui-accordion-icons") } }, _destroyIcons: function() { this.headers.children(".ui-icon").remove(); this.element.removeClass("ui-accordion-icons") }, destroy: function() { var a = this.options; 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._destroyIcons(); var b = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active"); if (a.autoHeight || a.fillHeight) b.css("height", ""); return this }, _setOption: function(a, b) { c.Widget.prototype._setOption.apply(this, arguments); a == "active" && this.activate(b); if (a == "icons") { this._destroyIcons(); b && this._createIcons() } }, _keydown: function(a) { var b = c.ui.keyCode; if (!(this.options.disabled || a.altKey || a.ctrlKey)) { var e = this.headers.length, d = this.headers.index(a.target), f = false; switch (a.keyCode) { case b.RIGHT: case b.DOWN: f = this.headers[(d + 1) % e]; break; case b.LEFT: case b.UP: f = this.headers[(d - 1 + e) % e]; break; case b.SPACE: case b.ENTER: this._clickHandler({ target: a.target }, a.target); a.preventDefault() } if (f) { c(a.target).attr("tabIndex", "-1"); c(f).attr("tabIndex", "0"); f.focus(); return false } return true } }, resize: function() { var a = this.options, b; if (a.fillSpace) { if (c.browser.msie) { var e = this.element.parent().css("overflow"); this.element.parent().css("overflow", "hidden") } b = this.element.parent().height(); c.browser.msie && this.element.parent().css("overflow", e); this.headers.each(function() { b -= c(this).outerHeight(true) }); this.headers.next().each(function() { c(this).height(Math.max(0, b - c(this).innerHeight() + c(this).height())) }).css("overflow", "auto") } else if (a.autoHeight) { b = 0; this.headers.next().each(function() { b = Math.max(b, c(this).height()) }).height(b) } return this }, activate: function(a) { this.options.active = a; a = this._findActive(a)[0]; this._clickHandler({ target: a }, a); return this }, _findActive: function(a) { return a ? typeof a == "number" ? this.headers.filter(":eq(" + a + ")") : this.headers.not(this.headers.not(a)) : a === false ? c([]) : this.headers.filter(":eq(0)") }, _clickHandler: function(a, b) { var e = this.options; if (!e.disabled) if (a.target) { a = c(a.currentTarget || b); b = a[0] == this.active[0]; e.active = e.collapsible && b ? false : c(".ui-accordion-header", this.element).index(a); if (!(this.running || !e.collapsible && b)) { this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header); if (!b) { a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(e.icons.header).addClass(e.icons.headerSelected); a.next().addClass("ui-accordion-content-active") } g = a.next(); d = this.active.next(); f = { options: e, newHeader: b && e.collapsible ? c([]) : a, oldHeader: this.active, newContent: b && e.collapsible ? c([]) : g, oldContent: d }; e = this.headers.index(this.active[0]) > this.headers.index(a[0]); this.active = b ? c([]) : a; this._toggle(g, d, f, b, e) } } else if (e.collapsible) { this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(e.icons.headerSelected).addClass(e.icons.header); this.active.next().addClass("ui-accordion-content-active"); var d = this.active.next(), f = { options: e, newHeader: c([]), oldHeader: e.active, newContent: c([]), oldContent: d }, g = this.active = c([]); this._toggle(g, d, f) } }, _toggle: function(a, b, e, d, f) { var g = this.options, h = this; this.toShow = a; this.toHide = b; this.data = e; var i = function() { if (h) return h._completed.apply(h, arguments) }; this._trigger("changestart", null, this.data); this.running = b.size() === 0 ? a.size() : b.size(); if (g.animated) { e = {}; e = g.collapsible && d ? { toShow: c([]), toHide: b, complete: i, down: f, autoHeight: g.autoHeight || g.fillSpace} : { toShow: a, toHide: b, complete: i, down: f, autoHeight: g.autoHeight || g.fillSpace }; if (!g.proxied) g.proxied = g.animated; if (!g.proxiedDuration) g.proxiedDuration = g.duration; g.animated = c.isFunction(g.proxied) ? g.proxied(e) : g.proxied; g.duration = c.isFunction(g.proxiedDuration) ? g.proxiedDuration(e) : g.proxiedDuration; d = c.ui.accordion.animations; var k = g.duration, j = g.animated; if (j && !d[j] && !c.easing[j]) j = "slide"; d[j] || (d[j] = function(m) { this.slide(m, { easing: j, duration: k || 700 }) }); d[j](e) } else { if (g.collapsible && d) a.toggle(); else { b.hide(); a.show() } i(true) } b.prev().attr("aria-expanded", "false").attr("tabIndex", "-1").blur(); a.prev().attr("aria-expanded", "true").attr("tabIndex", "0").focus() }, _completed: function(a) { var b = this.options; this.running = a ? 0 : --this.running; if (!this.running) { b.clearStyle && this.toShow.add(this.toHide).css({ height: "", overflow: "" }); this.toHide.removeClass("ui-accordion-content-active"); this._trigger("change", null, this.data) } } }); c.extend(c.ui.accordion, { version: "1.8", animations: { slide: function(a, b) { a = c.extend({ easing: "swing", duration: 300 }, a, b); if (a.toHide.size()) { var e = a.toHide.height(), d = a.toShow.height() / e, f = a.toShow.css("overflow"); a.toShow.css({ height: 0, overflow: "hidden" }).show(); a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate({ height: "hide" }, { step: function(g) { g = (e - g) * d; if (c.browser.msie || c.browser.opera) g = Math.ceil(g); a.toShow.height(g) }, duration: a.duration, easing: a.easing, complete: function() { a.autoHeight || a.toShow.css("height", "auto"); a.toShow.css({ overflow: f }); a.complete() } }) } else a.toShow.animate({ height: "show" }, a) }, bounceslide: function(a) { this.slide(a, { easing: a.down ? "easeOutBounce" : "swing", duration: a.down ? 1E3 : 200 }) } } }) })(jQuery); (function(c) { c.widget("ui.autocomplete", { options: { minLength: 1, delay: 300 }, _create: function() { var a = this, b = this.element[0].ownerDocument; this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({ role: "textbox", "aria-autocomplete": "list", "aria-haspopup": "true" }).bind("keydown.autocomplete", function(e) { var d = c.ui.keyCode; switch (e.keyCode) { case d.PAGE_UP: a._move("previousPage", e); break; case d.PAGE_DOWN: a._move("nextPage", e); break; case d.UP: a._move("previous", e); e.preventDefault(); break; case d.DOWN: a._move("next", e); e.preventDefault(); break; case d.ENTER: a.menu.active && e.preventDefault(); case d.TAB: if (!a.menu.active) return; a.menu.select(); break; case d.ESCAPE: a.element.val(a.term); a.close(e); break; case d.SHIFT: case d.CONTROL: case 18: break; default: clearTimeout(a.searching); a.searching = setTimeout(function() { a.search(null, e) }, a.options.delay); break } }).bind("focus.autocomplete", function() { a.previous = a.element.val() }).bind("blur.autocomplete", function(e) { clearTimeout(a.searching); a.closing = setTimeout(function() { a.close(e) }, 150) }); this._initSource(); this.response = function() { return a._response.apply(a, arguments) }; this.menu = c("<ul></ul>").addClass("ui-autocomplete").appendTo("body", b).menu({ focus: function(e, d) { e = d.item.data("item.autocomplete"); false !== a._trigger("focus", null, { item: e }) && a.element.val(e.value) }, selected: function(e, d) { d = d.item.data("item.autocomplete"); false !== a._trigger("select", e, { item: d }) && a.element.val(d.value); a.close(e); a.previous = a.element.val(); a.element[0] !== b.activeElement && a.element.focus() }, blur: function() { a.menu.element.is(":visible") && a.element.val(a.term) } }).zIndex(this.element.zIndex() + 1).css({ top: 0, left: 0 }).hide().data("menu"); c.fn.bgiframe && this.menu.element.bgiframe() }, destroy: function() { this.element.removeClass("ui-autocomplete-input ui-widget ui-widget-content").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"); this.menu.element.remove(); c.Widget.prototype.destroy.call(this) }, _setOption: function(a) { c.Widget.prototype._setOption.apply(this, arguments); a === "source" && this._initSource() }, _initSource: function() { var a, b; if (c.isArray(this.options.source)) { a = this.options.source; this.source = function(e, d) { var f = new RegExp(c.ui.autocomplete.escapeRegex(e.term), "i"); d(c.grep(a, function(g) { return f.test(g.label || g.value || g) })) } } else if (typeof this.options.source === "string") { b = this.options.source; this.source = function(e, d) { c.getJSON(b, e, d) } } else this.source = this.options.source }, search: function(a, b) { a = a != null ? a : this.element.val(); if (a.length < this.options.minLength) return this.close(b); clearTimeout(this.closing); if (this._trigger("search") !== false) return this._search(a) }, _search: function(a) { this.term = this.element.addClass("ui-autocomplete-loading").val(); this.source({ term: a }, this.response) }, _response: function(a) { if (a.length) { a = this._normalize(a); this._suggest(a); this._trigger("open") } else this.close(); this.element.removeClass("ui-autocomplete-loading") }, close: function(a) { clearTimeout(this.closing); if (this.menu.element.is(":visible")) { this._trigger("close", a); this.menu.element.hide(); this.menu.deactivate() } this.previous !== this.element.val() && this._trigger("change", a) }, _normalize: function(a) { if (a.length && a[0].label && a[0].value) return a; return c.map(a, function(b) { if (typeof b === "string") return { label: b, value: b }; return c.extend({ label: b.label || b.value, value: b.value || b.label }, b) }) }, _suggest: function(a) { var b = this.menu.element.empty().zIndex(this.element.zIndex() + 1), e; this._renderMenu(b, a); this.menu.deactivate(); this.menu.refresh(); this.menu.element.show().position({ my: "left top", at: "left bottom", of: this.element, collision: "none" }); a = b.width("").width(); e = this.element.width(); b.width(Math.max(a, e)) }, _renderMenu: function(a, b) { var e = this; c.each(b, function(d, f) { e._renderItem(a, f) }) }, _renderItem: function(a, b) { return c("<li></li>").data("item.autocomplete", b).append("<a>" + b.label + "</a>").appendTo(a) }, _move: function(a, b) { if (this.menu.element.is(":visible")) if (this.menu.first() && /^previous/.test(a) || this.menu.last() && /^next/.test(a)) { this.element.val(this.term); this.menu.deactivate() } else this.menu[a](); else this.search(null, b) }, widget: function() { return this.menu.element } }); c.extend(c.ui.autocomplete, { escapeRegex: function(a) { return a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") } }) })(jQuery); (function(c) { c.widget("ui.menu", { _create: function() { var a = this; this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({ role: "listbox", "aria-activedescendant": "ui-active-menuitem" }).click(function(b) { b.preventDefault(); a.select() }); this.refresh() }, refresh: function() { var a = this; this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem").children("a").addClass("ui-corner-all").attr("tabindex", -1).mouseenter(function() { a.activate(c(this).parent()) }).mouseleave(function() { a.deactivate() }) }, activate: function(a) { this.deactivate(); if (this.hasScroll()) { var b = a.offset().top - this.element.offset().top, e = this.element.attr("scrollTop"), d = this.element.height(); if (b < 0) this.element.attr("scrollTop", e + b); else b > d && this.element.attr("scrollTop", e + b - d + a.height()) } this.active = a.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-menuitem").end(); this._trigger("focus", null, { item: a }) }, deactivate: function() { if (this.active) { this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); this._trigger("blur"); this.active = null } }, next: function() { this.move("next", "li:first") }, previous: function() { this.move("prev", "li:last") }, first: function() { return this.active && !this.active.prev().length }, last: function() { return this.active && !this.active.next().length }, move: function(a, b) { if (this.active) { a = this.active[a](); a.length ? this.activate(a) : this.activate(this.element.children(b)) } else this.activate(this.element.children(b)) }, nextPage: function() { if (this.hasScroll()) if (!this.active || this.last()) this.activate(this.element.children(":first")); else { var a = this.active.offset().top, b = this.element.height(), e = this.element.children("li").filter(function() { var d = c(this).offset().top - a - b + c(this).height(); return d < 10 && d > -10 }); e.length || (e = this.element.children(":last")); this.activate(e) } else this.activate(this.element.children(!this.active || this.last() ? ":first" : ":last")) }, previousPage: function() { if (this.hasScroll()) if (!this.active || this.first()) this.activate(this.element.children(":last")); else { var a = this.active.offset().top, b = this.element.height(); result = this.element.children("li").filter(function() { var e = c(this).offset().top - a + b - c(this).height(); return e < 10 && e > -10 }); result.length || (result = this.element.children(":first")); this.activate(result) } else this.activate(this.element.children(!this.active || this.first() ? ":last" : ":first")) }, hasScroll: function() { return this.element.height() < this.element.attr("scrollHeight") }, select: function() { this._trigger("selected", null, { item: this.active }) } }) })(jQuery); (function(c) { function a(e) { var d; if (e && e.constructor == Array && e.length == 3) return e; if (d = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e)) return [parseInt(d[1]), parseInt(d[2]), parseInt(d[3])]; if (d = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e)) return [parseFloat(d[1]) * 2.55, parseFloat(d[2]) * 2.55, parseFloat(d[3]) * 2.55]; if (d = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e)) return [parseInt(d[1], 16), parseInt(d[2], 16), parseInt(d[3], 16)]; if (d = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e)) return [parseInt(d[1] + d[1], 16), parseInt(d[2] + d[2], 16), parseInt(d[3] + d[3], 16)]; return colors[c.trim(e).toLowerCase()] } function b(e, d) { var f; do { f = c.curCSS(e, d); if (f != "" && f != "transparent" || c.nodeName(e, "body")) break; d = "backgroundColor" } while (e = e.parentNode); return a(f) } c.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function(e, d) { c.fx.step[d] = function(f) { if (f.state == 0 || f.start.constructor != Array || f.end.constructor != Array) { f.start = b(f.elem, d); f.end = a(f.end) } f.elem.style[d] = "rgb(" + [Math.max(Math.min(parseInt(f.pos * (f.end[0] - f.start[0]) + f.start[0]), 255), 0), Math.max(Math.min(parseInt(f.pos * (f.end[1] - f.start[1]) + f.start[1]), 255), 0), Math.max(Math.min(parseInt(f.pos * (f.end[2] - f.start[2]) + f.start[2]), 255), 0)].join(",") + ")" } }) })(jQuery); (function(c) { function a(d) { d = d.replace(/left|top/g, "0px"); d = d.replace(/right|bottom/g, "100%"); d = d.replace(/([0-9\.]+)(\s|\)|$)/g, "$1px$2"); d = d.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/); return [parseFloat(d[1], 10), d[2], parseFloat(d[3], 10), d[4]] } if (!document.defaultView || !document.defaultView.getComputedStyle) { var b = jQuery.curCSS; jQuery.curCSS = function(d, f, g) { if (f === "background-position") f = "backgroundPosition"; if (f !== "backgroundPosition" || !d.currentStyle || d.currentStyle[f]) return b.apply(this, arguments); var h = d.style; if (!g && h && h[f]) return h[f]; return b(d, "backgroundPositionX", g) + " " + b(d, "backgroundPositionY", g) } } var e = c.fn.animate; c.fn.animate = function(d) { if ("background-position" in d) { d.backgroundPosition = d["background-position"]; delete d["background-position"] } if ("backgroundPosition" in d) d.backgroundPosition = "(" + d.backgroundPosition; return e.apply(this, arguments) }; c.fx.step.backgroundPosition = function(d) { if (!d.bgPosReady) { var f = c.curCSS(d.elem, "backgroundPosition"); f || (f = "0px 0px"); f = a(f); d.start = [f[0], f[2]]; f = a(d.options.curAnim.backgroundPosition); d.end = [f[0], f[2]]; d.unit = [f[1], f[3]]; d.bgPosReady = true } f = []; f[0] = (d.end[0] - d.start[0]) * d.pos + d.start[0] + d.unit[0]; f[1] = (d.end[1] - d.start[1]) * d.pos + d.start[1] + d.unit[1]; d.elem.style.backgroundPosition = f[0] + " " + f[1] } })(jQuery);
