(function(c){var b=c.ui.autocomplete.prototype,d=b._initSource;function a(g,e){var f=new RegExp(c.ui.autocomplete.escapeRegex(e),"i");return c.grep(g,function(h){return f.test(c("<div>").html(h.label||h.value||h).text())})}c.extend(b,{_initSource:function(){if(this.options.html&&c.isArray(this.options.source)){this.source=function(f,e){e(a(this.options.source,f.term))}}else{d.call(this)}},_renderItem:function(e,f){return c("<li></li>").data("item.autocomplete",f).append(c("<a></a>")[this.options.html?"html":"text"](f.label)).appendTo(e)}})})(jQuery);(function(a){a(".ui-autocomplete-input").live("autocompleteopen",function(){var b=a(this).data("autocomplete"),c=b.menu;if(!b.options.selectFirst){return}c.activate(a.Event({type:"mouseenter"}),c.element.children().first())})}(jQuery));