/*! * jQuery UI 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI *//* * jQuery UI 1.8rc3 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */jQuery.ui		|| (function(b) {			var a = b.browser.mozilla && (parseFloat(b.browser.version) < 1.9);			b.ui = {				version : "1.8rc3",				plugin : {					add : function(d, e, g) {						var f = b.ui[d].prototype;						for ( var c in g) {							f.plugins[c] = f.plugins[c] || [];							f.plugins[c].push( [ e, g[c] ])						}					},					call : function(c, e, d) {						var g = c.plugins[e];						if (!g || !c.element[0].parentNode) {							return						}						for ( var f = 0; f < g.length; f++) {							if (c.options[g[f][0]]) {								g[f][1].apply(c.element, d)							}						}					}				},				contains : function(d, c) {					return document.compareDocumentPosition ? d							.compareDocumentPosition(c) & 16 : d !== c							&& d.contains(c)				},				hasScroll : function(f, d) {					if (b(f).css("overflow") == "hidden") {						return false					}					var c = (d && d == "left") ? "scrollLeft" : "scrollTop", e = false;					if (f[c] > 0) {						return true					}					f[c] = 1;					e = (f[c] > 0);					f[c] = 0;					return e				},				isOverAxis : function(d, c, e) {					return (d > c) && (d < (c + e))				},				isOver : function(h, d, g, f, c, e) {					return b.ui.isOverAxis(h, g, c) && b.ui.isOverAxis(d, f, e)				},				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				}			};			b.fn					.extend( {						_focus : b.fn.focus,						focus : function(c, d) {							return typeof c === "number" ? this									.each(function() {										var e = this;										setTimeout(function() {											b(e).focus();											(d && d.call(e))										}, c)									}) : 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 c;							if ((b.browser.msie && (/(static|relative)/)									.test(this.css("position")))									|| (/absolute/).test(this.css("position"))) {								c = this										.parents()										.filter(												function() {													return (/(relative|absolute|fixed)/)															.test(b.curCSS(																	this,																	"position",																	1))															&& (/(auto|scroll)/)																	.test(b																			.curCSS(																					this,																					"overflow",																					1)																			+ b																					.curCSS(																							this,																							"overflow-y",																							1)																			+ b																					.curCSS(																							this,																							"overflow-x",																							1))												}).eq(0)							} else {								c = this										.parents()										.filter(												function() {													return (/(auto|scroll)/)															.test(b.curCSS(																	this,																	"overflow",																	1)																	+ b																			.curCSS(																					this,																					"overflow-y",																					1)																	+ b																			.curCSS(																					this,																					"overflow-x",																					1))												}).eq(0)							}							return (/fixed/).test(this.css("position"))									|| !c.length ? b(document) : c						},						zIndex : function(f) {							if (f !== undefined) {								return this.css("zIndex", f)							}							if (this.length) {								var d = b(this[0]), c, e;								while (d.length && d[0] !== document) {									c = d.css("position");									if (c == "absolute" || c == "relative"											|| c == "fixed") {										e = parseInt(d.css("zIndex"));										if (!isNaN(e) && e != 0) {											return e										}									}									d = d.parent()								}							}							return 0						}					});			b.extend(b.expr[":"],					{						data : function(e, d, c) {							return !!b.data(e, c[3])						},						focusable : function(d) {							var e = d.nodeName.toLowerCase(), c = b.attr(d,									"tabindex");							return (/input|select|textarea|button|object/									.test(e) ? !d.disabled : "a" == e									|| "area" == e ? d.href || !isNaN(c)									: !isNaN(c))									&& !b(d)["area" == e ? "parents"											: "closest"](":hidden").length						},						tabbable : function(d) {							var c = b.attr(d, "tabindex");							return (isNaN(c) || c >= 0)									&& b(d).is(":focusable")						}					})		})(jQuery);;/*					 * !					 * 					 * jQuery UI Widget 1.8rc3					 * 					 * 					 * 					 * Copyright (c) 2010 AUTHORS.txt					 * (http://jqueryui.com/about)					 * 					 * Dual licensed under the MIT (MIT-LICENSE.txt)					 * 					 * and GPL (GPL-LICENSE.txt) licenses.					 * 					 * 					 * 					 * http://docs.jquery.com/UI/Widget					 * 					 *//* *  * jQuery UI Widget 1.8rc3 *  *  *  * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) *  * Dual licensed under the MIT (MIT-LICENSE.txt) *  * and GPL (GPL-LICENSE.txt) licenses. *  *  *  * http://docs.jquery.com/UI/Widget *  */(function(b) {	var a = b.fn.remove;	b.fn.remove = function(c, d) {		return this.each(function() {			if (!d) {				if (!c || b.filter(c, [ this ]).length) {					b("*", this).add(this).each(function() {						b(this).triggerHandler("remove")					})				}			}			return a.call(b(this), c, d)		})	};	b.widget = function(d, f, c) {		var e = d.split(".")[0], h;		d = d.split(".")[1];		h = e + "-" + d;		if (!c) {			c = f;			f = b.Widget		}		b.expr[":"][h] = function(i) {			return !!b.data(i, d)		};		b[e] = b[e] || {};		b[e][d] = function(i, j) {			if (arguments.length) {				this._createWidget(i, j)			}		};		var g = new f();		g.options = b.extend( {}, g.options);		b[e][d].prototype = b.extend(true, g, {			namespace : e,			widgetName : d,			widgetEventPrefix : b[e][d].prototype.widgetEventPrefix || d,			widgetBaseClass : h		}, c);		b.widget.bridge(d, b[e][d])	};	b.widget.bridge = function(d, c) {		b.fn[d] = function(g) {			var e = typeof g === "string", f = Array.prototype.slice.call(					arguments, 1), h = this;			g = !e && f.length ? b.extend.apply(null, [ true, g ].concat(f))					: g;			if (e && g.substring(0, 1) === "_") {				return h			}			if (e) {				this.each(function() {					var i = b.data(this, d), j = i && b.isFunction(i[g]) ? i[g]							.apply(i, f) : i;					if (j !== i && j !== undefined) {						h = j;						return false					}				})			} else {				this.each(function() {					var i = b.data(this, d);					if (i) {						if (g) {							i.option(g)						}						i._init()					} else {						b.data(this, d, new c(g, this))					}				})			}			return h		}	};	b.Widget = function(c, d) {		if (arguments.length) {			this._createWidget(c, d)		}	};	b.Widget.prototype = {		widgetName : "widget",		widgetEventPrefix : "",		options : {			disabled : false		},		_createWidget : function(d, e) {			this.element = b(e).data(this.widgetName, this);			this.options = b.extend(true, {}, this.options, b.metadata					&& b.metadata.get(e)[this.widgetName], d);			var c = this;			this.element.bind("remove." + this.widgetName, function() {				c.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(e, f) {			var d = e, c = this;			if (arguments.length === 0) {				return b.extend( {}, c.options)			}			if (typeof e === "string") {				if (f === undefined) {					return this.options[e]				}				d = {};				d[e] = f			}			b.each(d, function(g, h) {				c._setOption(g, h)			});			return c		},		_setOption : function(c, d) {			this.options[c] = d;			if (c === "disabled") {				this.widget()[d ? "addClass" : "removeClass"](						this.widgetBaseClass + "-disabled " + this.namespace								+ "-state-disabled").attr("aria-disabled", d)			}			return this		},		enable : function() {			return this._setOption("disabled", false)		},		disable : function() {			return this._setOption("disabled", true)		},		_trigger : function(d, e, f) {			var h = this.options[d];			e = b.Event(e);			e.type = (d === this.widgetEventPrefix ? d : this.widgetEventPrefix					+ d).toLowerCase();			f = f || {};			if (e.originalEvent) {				for ( var c = b.event.props.length, g; c;) {					g = b.event.props[--c];					e[g] = e.originalEvent[g]				}			}			this.element.trigger(e, f);			return !(b.isFunction(h) && h.call(this.element[0], e, f) === false || e					.isDefaultPrevented())		}	}})(jQuery);;/*			 * !			 * 			 * jQuery UI Mouse 1.8rc3			 * 			 * 			 * 			 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)			 * 			 * Dual licensed under the MIT (MIT-LICENSE.txt)			 * 			 * and GPL (GPL-LICENSE.txt) licenses.			 * 			 * 			 * 			 * http://docs.jquery.com/UI/Mouse			 * 			 * 			 * 			 * Depends:			 * 			 * jquery.ui.widget.js			 * 			 *//* *  * jQuery UI Mouse 1.8rc3 *  *  *  * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) *  * Dual licensed under the MIT (MIT-LICENSE.txt) *  * and GPL (GPL-LICENSE.txt) licenses. *  *  *  * http://docs.jquery.com/UI/Mouse *  *  *  * Depends: *  * jquery.ui.widget.js *  */(function(a) {	a			.widget(					"ui.mouse",					{						options : {							cancel : ":input,option",							distance : 1,							delay : 0						},						_mouseInit : function() {							var b = this;							this.element.bind("mousedown." + this.widgetName,									function(c) {										return b._mouseDown(c)									}).bind("click." + this.widgetName,									function(c) {										if (b._preventClickEvent) {											b._preventClickEvent = false;											c.stopImmediatePropagation();											return false										}									});							this.started = false						},						_mouseDestroy : function() {							this.element.unbind("." + this.widgetName)						},						_mouseDown : function(d) {							d.originalEvent = d.originalEvent || {};							if (d.originalEvent.mouseHandled) {								return							}							(this._mouseStarted && this._mouseUp(d));							this._mouseDownEvent = d;							var c = this, e = (d.which == 1), b = (typeof this.options.cancel == "string" ? a(									d.target).parents().add(d.target).filter(									this.options.cancel).length									: false);							if (!e || b || !this._mouseCapture(d)) {								return true							}							this.mouseDelayMet = !this.options.delay;							if (!this.mouseDelayMet) {								this._mouseDelayTimer = setTimeout(function() {									c.mouseDelayMet = true								}, this.options.delay)							}							if (this._mouseDistanceMet(d)									&& this._mouseDelayMet(d)) {								this._mouseStarted = (this._mouseStart(d) !== false);								if (!this._mouseStarted) {									d.preventDefault();									return true								}							}							this._mouseMoveDelegate = function(f) {								return c._mouseMove(f)							};							this._mouseUpDelegate = function(f) {								return c._mouseUp(f)							};							a(document).bind("mousemove." + this.widgetName,									this._mouseMoveDelegate).bind(									"mouseup." + this.widgetName,									this._mouseUpDelegate);							(a.browser.safari || d.preventDefault());							d.originalEvent.mouseHandled = true;							return true						},						_mouseMove : function(b) {							if (a.browser.msie && !b.button) {								return this._mouseUp(b)							}							if (this._mouseStarted) {								this._mouseDrag(b);								return b.preventDefault()							}							if (this._mouseDistanceMet(b)									&& this._mouseDelayMet(b)) {								this._mouseStarted = (this._mouseStart(										this._mouseDownEvent, b) !== false);								(this._mouseStarted ? this._mouseDrag(b) : this										._mouseUp(b))							}							return !this._mouseStarted						},						_mouseUp : function(b) {							a(document).unbind("mousemove." + this.widgetName,									this._mouseMoveDelegate).unbind(									"mouseup." + this.widgetName,									this._mouseUpDelegate);							if (this._mouseStarted) {								this._mouseStarted = false;								this._preventClickEvent = (b.target == this._mouseDownEvent.target);								this._mouseStop(b)							}							return false						},						_mouseDistanceMet : function(b) {							return (Math.max(Math									.abs(this._mouseDownEvent.pageX - b.pageX),									Math.abs(this._mouseDownEvent.pageY											- b.pageY)) >= this.options.distance)						},						_mouseDelayMet : function(b) {							return this.mouseDelayMet						},						_mouseStart : function(b) {						},						_mouseDrag : function(b) {						},						_mouseStop : function(b) {						},						_mouseCapture : function(b) {							return true						}					})})(jQuery);;/*			 * 			 * jQuery UI Position 1.8rc3			 * 			 * 			 * 			 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)			 * 			 * Dual licensed under the MIT (MIT-LICENSE.txt)			 * 			 * and GPL (GPL-LICENSE.txt) licenses.			 * 			 * 			 * 			 * http://docs.jquery.com/UI/Position			 * 			 */(function(f) {	f.ui = f.ui || {};	var c = /left|center|right/, e = "center", d = /top|center|bottom/, g = "center", a = f.fn.position;	f.fn.position = function(i) {		if (!i || !i.of) {			return a.apply(this, arguments)		}		i = f.extend( {}, i);		var l = f(i.of), n = (i.collision || "flip").split(" "), m = i.offset ? i.offset				.split(" ")				: [ 0, 0 ], k, h, j;		if (i.of.nodeType === 9) {			k = l.width();			h = l.height();			j = {				top : 0,				left : 0			}		} else {			if (i.of.scrollTo && i.of.document) {				k = l.width();				h = l.height();				j = {					top : l.scrollTop(),					left : l.scrollLeft()				}			} else {				if (i.of.preventDefault) {					i.at = "left top";					k = h = 0;					j = {						top : i.of.pageY,						left : i.of.pageX					}				} else {					k = l.outerWidth();					h = l.outerHeight();					j = l.offset()				}			}		}		f.each( [ "my", "at" ], function() {			var o = (i[this] || "").split(" ");			if (o.length === 1) {				o = c.test(o[0]) ? o.concat( [ g ]) : d.test(o[0]) ? [ e ]						.concat(o) : [ e, g ]			}			o[0] = c.test(o[0]) ? o[0] : e;			o[1] = d.test(o[1]) ? o[1] : g;			i[this] = o		});		if (n.length === 1) {			n[1] = n[0]		}		m[0] = parseInt(m[0], 10) || 0;		if (m.length === 1) {			m[1] = m[0]		}		m[1] = parseInt(m[1], 10) || 0;		if (i.at[0] === "right") {			j.left += k		} else {			if (i.at[0] === e) {				j.left += k / 2			}		}		if (i.at[1] === "bottom") {			j.top += h		} else {			if (i.at[1] === g) {				j.top += h / 2			}		}		j.left += m[0];		j.top += m[1];		return this.each(function() {			var t = f(this), s = t.outerWidth(), r = t.outerHeight(), p = f					.extend( {}, j), u, o, q;			if (i.my[0] === "right") {				p.left -= s			} else {				if (i.my[0] === e) {					p.left -= s / 2				}			}			if (i.my[1] === "bottom") {				p.top -= r			} else {				if (i.my[1] === g) {					p.top -= r / 2				}			}			f.each( [ "left", "top" ], function(w, v) {				if (f.ui.position[n[w]]) {					f.ui.position[n[w]][v](p, {						targetWidth : k,						targetHeight : h,						elemWidth : s,						elemHeight : r,						offset : m,						my : i.my,						at : i.at					})				}			});			if (f.fn.bgiframe) {				t.bgiframe()			}			t.offset(f.extend(p, {				using : i.using			}))		})	};	f.ui.position = {		fit : {			left : function(h, i) {				var k = f(window), j = h.left + i.elemWidth - k.width()						- k.scrollLeft();				h.left = j > 0 ? h.left - j : Math.max(0, h.left)			},			top : function(h, i) {				var k = f(window), j = h.top + i.elemHeight - k.height()						- k.scrollTop();				h.top = j > 0 ? h.top - j : Math.max(0, h.top)			}		},		flip : {			left : function(i, j) {				if (j.at[0] === "center") {					return				}				var l = f(window), k = i.left + j.elemWidth - l.width()						- l.scrollLeft(), h = j.my[0] === "left" ? -j.elemWidth						: j.my[0] === "right" ? j.elemWidth : 0, m = -2						* j.offset[0];				i.left += i.left < 0 ? h + j.targetWidth + m : k > 0 ? h						- j.targetWidth + m : 0			},			top : function(i, k) {				if (k.at[1] === "center") {					return				}				var m = f(window), l = i.top + k.elemHeight - m.height()						- m.scrollTop(), h = k.my[1] === "top" ? -k.elemHeight						: k.my[1] === "bottom" ? k.elemHeight : 0, j = k.at[1] === "top" ? k.targetHeight						: -k.targetHeight, n = -2 * k.offset[1];				i.top += i.top < 0 ? h + k.targetHeight + n : l > 0 ? h + j + n						: 0			}		}	};	if (!f.offset.setOffset) {		f.offset.setOffset = function(l, i) {			if (/static/.test(jQuery.curCSS(l, "position"))) {				l.style.position = "relative"			}			var k = jQuery(l), n = k.offset(), h = parseInt(jQuery.curCSS(l,					"top", true), 10) || 0, m = parseInt(jQuery.curCSS(l,					"left", true), 10) || 0, j = {				top : (i.top - n.top) + h,				left : (i.left - n.left) + m			};			if ("using" in i) {				i.using.call(l, j)			} else {				k.css(j)			}		};		var b = f.fn.offset;		f.fn.offset = function(h) {			var i = this[0];			if (!i || !i.ownerDocument) {				return null			}			if (h) {				return this.each(function() {					f.offset.setOffset(this, h)				})			}			return b.call(this)		}	}})(jQuery);;/*			 * 			 * jQuery UI Autocomplete 1.8rc3			 * 			 * 			 * 			 * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)			 * 			 * Dual licensed under the MIT (MIT-LICENSE.txt)			 * 			 * and GPL (GPL-LICENSE.txt) licenses.			 * 			 * 			 * 			 * http://docs.jquery.com/UI/Autocomplete			 * 			 * 			 * 			 * Depends:			 * 			 * jquery.ui.core.js			 * 			 * jquery.ui.widget.js			 * 			 * jquery.ui.position.js			 * 			 */(function(a) {	a.widget("ui.autocomplete", {		options : {			minLength : 1,			delay : 300		},		_create : function() {			var b = this;			this.element.addClass("ui-autocomplete-input").attr("autocomplete",					"off").attr( {				role : "textbox",				"aria-autocomplete" : "list",				"aria-haspopup" : "true"			}).bind("keydown.autocomplete", function(c) {				var d = a.ui.keyCode;				switch (c.keyCode) {				case d.PAGE_UP:					b._move("previousPage", c);					break;				case d.PAGE_DOWN:					b._move("nextPage", c);					break;				case d.UP:					b._move("previous", c);					c.preventDefault();					break;				case d.DOWN:					b._move("next", c);					c.preventDefault();					break;				case d.ENTER:					if (b.menu.active) {						c.preventDefault()					}				case d.TAB:					if (!b.menu.active) {						return					}					b.menu.select();					break;				case d.ESCAPE:					b.element.val(b.term);					b.close(c);					break;				case 16:				case 17:				case 18:					break;				default:					clearTimeout(b.searching);					b.searching = setTimeout(function() {						b.search(null, c)					}, b.options.delay);					break				}			}).bind("focus.autocomplete", function() {				b.previous = b.element.val()			}).bind("blur.autocomplete", function(c) {				clearTimeout(b.searching);				b.closing = setTimeout(function() {					b.close(c)				}, 150)			});			this._initSource();			this.response = function() {				return b._response.apply(b, arguments)			};			this.menu = a("<ul></ul>").addClass("ui-autocomplete").appendTo(					this.element.parent()).menu( {				focus : function(d, e) {					var c = e.item.data("item.autocomplete");					if (false !== b._trigger("focus", null, {						item : c					})) {						b.element.val(c.value)					}				},				selected : function(d, e) {					var c = e.item.data("item.autocomplete");					if (false !== b._trigger("select", d, {						item : c					})) {						b.element.val(c.value)					}					b.close(d);					b.previous = b.element.val();					if (b.element[0] != document.activeElement) {						b.element.focus()					}				}			}).zIndex(this.element.zIndex() + 1).css( {				top : 0,				left : 0			}).hide().data("menu");			if (a.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();			a.Widget.prototype.destroy.call(this)		},		_setOption : function(b) {			a.Widget.prototype._setOption.apply(this, arguments);			if (b == "source") {				this._initSource()			}		},		_initSource : function() {			if (a.isArray(this.options.source)) {				var c = this.options.source;				this.source = function(e, d) {					var f = new RegExp(a.ui.autocomplete.escapeRegex(e.term),							"i");					d(a.grep(c, function(g) {						return f.test(g.value || g.label || g)					}))				}			} else {				if (typeof this.options.source == "string") {					var b = this.options.source;					this.source = function(e, d) {						a.getJSON(b, e, d)					}				} else {					this.source = this.options.source				}			}		},		search : function(c, b) {			c = c != null ? c : this.element.val();			if (c.length < this.options.minLength) {				return this.close(b)			}			clearTimeout(this.closing);			if (this._trigger("search") === false) {				return			}			return this._search(c)		},		_search : function(b) {			this.term = this.element.addClass("ui-autocomplete-loading").val();			this.source( {				term : b			}, this.response)		},		_response : function(b) {			if (b.length) {				b = this._normalize(b);				this._trigger("open");				this._suggest(b)			} else {				this.close()			}			this.element.removeClass("ui-autocomplete-loading")		},		close : function(b) {			clearTimeout(this.closing);			if (this.menu.element.is(":visible")) {				this._trigger("close", b);				this.menu.element.hide();				this.menu.deactivate()			}			if (this.previous != this.element.val()) {				this._trigger("change", b)			}		},		_normalize : function(b) {			if (b.length && b[0].label && b[0].value) {				return b			}			return a.map(b, function(c) {				if (typeof c == "string") {					return {						label : c,						value : c					}				}				return a.extend( {					label : c.label || c.value,					value : c.value || c.label				}, c)			})		},		_suggest : function(c) {			var b = this, d = this.menu.element.empty();			this._renderMenu(d, c);			this.menu.deactivate();			this.menu.refresh();			this.menu.element.show().position( {				my : "left top",				at : "left bottom",				of : this.element,				collision : "none"			});			if (d.width() <= this.element.width()) {				d.width(this.element.width())			}		},		_renderMenu : function(d, c) {			var b = this;			a.each(c, function(e, f) {				b._renderItem(d, f)			})		},		_renderItem : function(b, c) {			return a("<li></li>").data("item.autocomplete", c).append(					"<a>" + c.label + "</a>").appendTo(b)		},		_move : function(c, b) {			if (!this.menu.element.is(":visible")) {				this.search(null, b);				return			}			if (this.menu.first() && /^previous/.test(c) || this.menu.last()					&& /^next/.test(c)) {				this.element.val(this.term);				this.menu.deactivate();				return			}			this.menu[c]()		},		widget : function() {			return this.menu.element		}	});	a.extend(a.ui.autocomplete, {		escapeRegex : function(b) {			return b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1")		}	})})(jQuery);(function(a) {	a			.widget(					"ui.menu",					{						_create : function() {							var b = this;							this.element									.addClass(											"ui-menu ui-widget ui-widget-content ui-corner-all")									.attr(											{												role : "menu",												"aria-activedescendant" : "ui-active-menuitem"											}).click(function(c) {										c.preventDefault();										b.select()									});							this.refresh()						},						refresh : function() {							var c = this;							var b = this.element.children(									"li:not(.ui-menu-item):has(a)").addClass(									"ui-menu-item").attr("role", "menuitem");							b.children("a").addClass("ui-corner-all").attr(									"tabindex", -1).mouseenter(function() {								c.activate(a(this).parent())							})						},						activate : function(d) {							this.deactivate();							this.active = d.eq(0).children("a").addClass(									"ui-state-hover").attr("id",									"ui-active-menuitem").end();							this._trigger("focus", null, {								item : d							});							if (this.hasScroll()) {								var e = d.offset().top										- this.element.offset().top, b = this.element										.attr("scrollTop"), c = this.element										.height();								if (e < 0) {									this.element.attr("scrollTop", b + e)								} else {									if (e > c) {										this.element.attr("scrollTop", b + e												- c + d.height())									}								}							}						},						deactivate : function() {							if (!this.active) {								return							}							this.active.children("a").removeClass(									"ui-state-hover").removeAttr("id");							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(d, c) {							if (!this.active) {								this.activate(this.element.children(c));								return							}							var b = this.active[d]();							if (b.length) {								this.activate(b)							} else {								this.activate(this.element.children(c))							}						},						nextPage : function() {							if (this.hasScroll()) {								if (!this.active || this.last()) {									this.activate(this.element											.children(":first"));									return								}								var d = this.active.offset().top, c = this.element										.height(), b = this.element.children(										"li").filter(										function() {											var e = a(this).offset().top - d													- c + a(this).height();											return e < 10 && e > -10										});								if (!b.length) {									b = this.element.children(":last")								}								this.activate(b)							} 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"));									return								}								var c = this.active.offset().top, b = this.element										.height();								result = this.element.children("li").filter(										function() {											var d = a(this).offset().top - c													+ b - a(this).height();											return d < 10 && d > -10										});								if (!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);;
