const lightbox=GLightbox({});function openLink(url,target){if(target==="_blank"){window.open(url,"_blank");}else{window.location.href=url;}}
window.GetSearchAutocompleteSuggestions=function(keyword,searchScopeData,ownerId){if(!keyword||keyword.length<3){searchScopeData.searchSuggestions=[];searchScopeData.showSuggestions=false;return;}
fetch('/umbraco/api/SearchAutoCompleteApi/PossibleKeywordLookup?keyword='+encodeURIComponent(keyword)+"&ownerId="+ownerId).then(function(response){response.json().then(function(json){if(!json||json.length===0){searchScopeData.searchSuggestions=[];searchScopeData.showSuggestions=false;return;}
searchScopeData.searchSuggestions=json.map(function(r){let res={text:r,html:keyword+"<b>"+r.slice(keyword.length)+"</b>"};return res;});searchScopeData.showSuggestions=true;});});};;
