/*! UIkit 2.10.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ !function(a){var b;jQuery&&jQuery.UIkit&&(b=a(jQuery,jQuery.UIkit)),"function"==typeof define&&define.amd&&define("uikit-search",["uikit"],function(){return b||a(jQuery,jQuery.UIkit)})}(function(a,b){"use strict";b.component("search",{defaults:{msgResultsHeader:"Search Results",msgMoreResults:"More Results",msgNoResults:"No results found",template:'',renderer:function(a){var b=this.options;this.dropdown.append(this.template({items:a.results||[],msgResultsHeader:b.msgResultsHeader,msgMoreResults:b.msgMoreResults,msgNoResults:b.msgNoResults})),this.show()}},init:function(){var a=this;this.autocomplete=b.autocomplete(this.element,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-search"),this.autocomplete.input.on("keyup",function(){a.element[a.autocomplete.input.val()?"addClass":"removeClass"]("uk-active")}).closest("form").on("reset",function(){a.value="",a.element.removeClass("uk-active")}),this.on("autocomplete-select",function(a,b){b.url?location.href=b.url:b.moreresults&&this.autocomplete.input.closest("form").submit()}),this.element.data("search",this)}}),b.$doc.on("focus.search.uikit","[data-uk-search]",function(){var c=a(this);if(!c.data("search")){b.search(c,b.Utils.options(c.attr("data-uk-search")))}})});