		function deactivateAutoComplete() {
			autocomp.deactivateAuto();
		}
		
		function activateAutoComplete() {	
			autocomp.activateAuto();
		}
		
		
		function initActivateAutoComplete() {
			autocomp = $("#suchbegriff2").autocomplete("/app/search/SuggestionSearch",{
													extraParams:{resultJsp:"/resultpages/resultForAutocomplete.jsp",indexname:"aonet",schrittweite:"20",field:"word"},
													cacheLength:1,
													matchSubset:false,
													max:8,
													highlight:function(value, term) {
														return "<span class='suggestterm'>" + term + "</span>" + value.substring(term.length);
													},
													width:"177px",
													delay:200,
													selectFirst:false
												});
			$("#suchbegriff2").result(function() {
				$("#searchform").submit();
			});
		}
		$(document).ready(function(){
			initActivateAutoComplete();
		    $(".searchresults li").hover(
		      function () {
		        $(this).addClass("searchresultshover")
		      }, 
		      function () {
		        $(this).removeClass("searchresultshover")
		      }
		    );
			$(".searchresults li").click(function(){
		    	window.location=$(this).find("a").attr("href");return false;
			});
		
		});
