'+data.value.replace(RegExp(newval, "gi"), "$1")+'';}}},onSelect: function (suggestion) {if(suggestion.data=='NF'){$.ajax({type: "POST",url: "https://www.gulabicity.com/ajax-postback",data: { action: "InsertUserSearch", _Keyword: suggestion.value},success: function(theResponse) {window.location=$('#hdHeaderSiteName').val()+'search?keyword='+suggestion.value;}});} else {if(suggestion.cateogory=='L'){window.location=$('#hdHeaderSiteName').val()+"collection/"+GetURLLinkStr(suggestion.value)+"?ref=autosuggest";} else if(suggestion.cateogory=='C'){if(suggestion.type!='1'){window.location=$('#hdHeaderSiteName').val()+suggestion.pcode+'/'+suggestion.code+"?ref=autosuggest";} else {window.location=$('#hdHeaderSiteName').val()+suggestion.code+"?ref=autosuggest";}} else if(suggestion.cateogory=='P'){window.location=$('#hdHeaderSiteName').val()+"product/"+suggestion.type+"/"+GetURLLinkStr(suggestion.value)+"?ref=autosuggest";}}},onSearchStart: function () {$("#filter_shop_name_loader").removeClass("hide");$("#btnSearch .fa-search").hide();},onSearchComplete: function (){$("#filter_shop_name_loader").addClass("hide"); $("#btnSearch .fa-search").show();}});});function GetURLLinkStr(str){str=str.trim().replace(/[^a-z0-9]+/gi, '-').toLowerCase();str=str.replace(/-+/gi, '-');str=str.replace(/^-|-$/g, '');str=str.substring(0,80);return str;}function openSearch() {document.getElementById("search-overlay").style.display = "block";}function closeSearch() {document.getElementById("search-overlay").style.display = "none";}function RemoveCart(product,variant){$.ajax({type:"POST",url:"https://www.gulabicity.com/ajax-postback",data:{action:"removefromcart",_Product:product,_Variant:variant},success:function(theResponse){var result=theResponse.split("~");$(".divMiniCart").html(result[1]);$.ajax({type:"POST",url:"https://www.gulabicity.com/ajax-postback",data:{action:"visitlog",param_url:'{RemoveFromCart-'+product+'}'},success:function(theResponse){}});if(parseInt(result[2])==0){}}});}function changecurrency(Currency){$.ajax({type:"POST",url:"https://www.gulabicity.com/ajax-postback",data:{action:"changecurrency", _curr: Currency}, success:function(theResponse){$.ajax({type:"POST",url:"https://www.gulabicity.com/ajax-postback",data:{action:"visitlog",param_url:'{CurrencyChange-EURTO'+Currency+'}'},success:function(theResponse){window.location='https://gulabicity.com/product/1524/multi-color-paisley-print-indian-hand-block-floral-printed-running-fabric-100-co';}});}});}