!function(e){e.fn.tipuesearch=function(t){var i=e.extend({show:7,newWindow:!1,showURL:!0,showTitleCount:!0,minimumLength:3,descriptiveWords:25,highlightTerms:!0,highlightEveryTerm:!1,mode:"static",liveDescription:"*",liveContent:"*",contentLocation:"tipuesearch/tipuesearch_content.json",debug:!1},t),r=function(){var e,t={},i=window.location.href.split("?")[1];if(i){i=i.split("&");for(var r=0;r
'),e("#tipue_search_content").show(),(g.match('^"')&&g.match('"$')||g.match("^'")&&g.match("'$"))&&(l=!1),l){var d=g.split(" ");g="";for(var v=0;v=i.minimumLength){if(l){if(r){for(var m=g,v=0;v$1')}if(-1!=n.pages[v].tags.search(C)){var E=n.pages[v].tags.match(C).length;b+=10*E}if(-1!=n.pages[v].url.search(C)&&(b+=20),0!=b)for(var y=0;y$1')}if(-1!=n.pages[v].tags.search(C)){var E=n.pages[v].tags.match(C).length;b+=10*E}if(-1!=n.pages[v].url.search(C)&&(b+=20),0!=b)for(var y=0;y'+tipuesearch_string_2+" "+g+". "+tipuesearch_string_3+' '+m+""),1==_?h+='
'+tipuesearch_string_4+"
":(c_c=_.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),h+='
'+c_c+" "+tipuesearch_string_5+"
"),found.sort(function(e,t){return t.score-e.score});for(var U=0,v=0;v=t&&U"+found[v].title+"",i.debug&&(h+='
Score: '+found[v].score+"
"),i.showURL){var j=found[v].url.toLowerCase();0==j.indexOf("http://")&&(j=j.slice(7)),h+='"}if(found[v].desc){var k=found[v].desc,I="",O=k.split(" ");if(O.length"}}U++}if(_>i.show){var W=Math.ceil(_/i.show),S=t/i.show;if(h+='
"}}else h+='
'+tipuesearch_string_8+"
"}else u?h+='
'+tipuesearch_string_8+". "+tipuesearch_string_9+"
":(h+='
'+tipuesearch_string_10+"
",h+=1==i.minimumLength?'
'+tipuesearch_string_11+"
":'
'+tipuesearch_string_12+" "+i.minimumLength+" "+tipuesearch_string_13+"
");e(".doc_content").hide(),e("#tipue_search_content").hide(),e("#tipue_search_content").html(h),e("#tipue_search_content").slideDown(200),e("#tipue_search_replaced").click(function(){a(0,!1)}),e(".tipue_search_foot_box").click(function(){var t=e(this).attr("id"),i=t.split("_");s({search:e("#tipue_search_input").val(),start:i[0]})})}var n={pages:[]};e.ajaxSetup({async:!1});var c=0;if("live"==i.mode)for(var h=0;h"),c=t.toLowerCase().indexOf("",a+7);if(-1!=a&&-1!=c)var o=t.slice(a+7,c);else var o=tipuesearch_string_1;n.pages.push({title:o,text:s,tags:r,url:tipuesearch_pages[h]})});"json"==i.mode&&e.getJSON(i.base_url+i.contentLocation).done(function(t){n=e.extend({},t)}),"static"==i.mode&&(n=e.extend({},tipuesearch));var o="";i.newWindow&&(o=' target="_blank"'),t(),"onsearch"in document.documentElement?e("#tipue_search_input")[0].addEventListener("search",function(t){s({search:e("#tipue_search_input").val(),start:0})}):(e("#tipue_search_input")[0].addEventListener("input",function(t){var i=e("#tipue_search_input").val();""===i&&s({search:i,start:0})}),e(this).keyup(function(t){"13"==t.keyCode&&s({search:e("#tipue_search_input").val(),start:0})}))})}}(jQuery);