function removeAllHandlers(n){var i=n.attributes,t,u,r;if($(n).unbind(),i)for(t=0;t<i.length;++t)r=i[t].name,typeof n[r]=="function"&&(n[r]=null);if(i=n.childNodes,i)for(u=i.length,t=0;t<u;++t)removeAllHandlers(n.childNodes[t])}function showClientPopUp(n,t,i,r){removeAllHandlers($("#clientPopUp .popUpContents")[0]);$("#clientPopUp .popUpContents").html(n);t==null&&(t=unableToPerformOperation);i==null&&(i="");r==null&&(clientPopUp,r=close);$("#clientPopUp .popUpAction").html(i+' <button onclick="hidePopUp()" type="button" class="bigButton">'+r+"<\/button>");removeAllHandlers($(".pop-up-div")[0]);$(".pop-up-div").html($("#clientPopUp").html());popUp(t);updateClientPopupStyling()}function updateClientPopupStyling(){$(".ui-dialog").addClass("updateClientPopupBody");$(".ui-dialog-titlebar").addClass("updateClientPopupTitlebar");$(".popUpView").addClass("updateClientPopupView");$(".popUpAction").addClass("updateClientPopupAction")}function showCustomPopUp(n,t){removeAllHandlers($(".frontDiv")[0]);$(".frontDiv").html(n);popUp(t)}function showPopUp(n){if(checkIfNewPopUp(n))removeAllHandlers($(".frontDiv")[0]),$(".frontDiv").html(n);else{removeAllHandlers($(".pop-up-div")[0]);$(".pop-up-div").html(n);var t=$(".pop-up-div .popUpTitle").text();popUp(t)}}function popUp(n){$(".pop-up-div").dialog({title:DecodeText(n),dialogClass:"no-close",width:"auto !important",modal:!0,resizable:!1,closeOnEscape:!1}).keydown(globalExceptionHandler.exceptionHandler(function(n){n.which===$.ui.keyCode.ENTER&&$(".pop-up-div .popUpAction input:eq(0)").click()}));$(".pop-up-div").siblings("div.ui-dialog-titlebar").remove()}function findArrayIndexWithAttr(n,t,i){for(var r=0;r<n.length;r+=1)if(n[r][t]===i)return r;return-1}function expireNotification(n){performAjaxCall("ExpireNotification",n,"#notificationBox",null,null,!0);var t=$("#notificationBox .notificationContent .notificationCount").val();$("#notificationBox .notificationContent .notificationCount").val(t-1);updateNotificationCount()}var mapResults=function(){var t=null,i=null,e=null,u=0,n=null,o=-1,r,f=0,s=-180,h=180,c=180,l=-180,a,v,y,p,w,b,k=window.matchMedia("(forced-colors: active)");return mapLoaded=!1,{pushPinsData:[],LoadMap:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){var t,n;if(dashboard.mapScriptLoadEventCompleted){for(mapResults.map==null&&mapResults.getMap(!1),t=0;t<mapResults.pushPinsData.length;t++)n=mapResults.pushPinsData[t],mapResults.mapPushPinLocation(n.latitude,n.longitude,n.address,n.businessName,n.count);setTimeout(mapResults.adjustMap,300)}else setTimeout(mapResults.LoadMap,300)}),getMap:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){t=new Microsoft.Maps.Map("#mapDiv",{credentials:mkey,mapTypeId:Microsoft.Maps.MapTypeId.road,enableSearchLogo:!1,showZoomButtons:!1,showLocateMeButton:!1,showMapTypeSelector:!1});mapResults.initMapElements();mapLoaded=!0;var n=function(){k.matches?t.getMapTypeId()==Microsoft.Maps.MapTypeId.road&&t.setMapType("hc"):t.getMapTypeId()=="hc"&&t.setMapType(Microsoft.Maps.MapTypeId.road)};n();k.addListener(n)}),initMapElements:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){i===null&&(n=[],f=0,i=new Microsoft.Maps.Layer,e=new Microsoft.Maps.Layer)}),showPushPins:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){t.layers.insert(i);t.layers.insert(e)}),resetPushPin:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){n.setOptions({visible:!0,icon:"/Images/pushpin.png"});e.remove(n)}),showPushPinOverOthersInBlack:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){n.setOptions({visible:!0,icon:"/Images/pushpinhover.png"});e.add(n)}),adjustMap:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){mapResults.showPushPins();mapResults.compureExtremeLatLongOnSearch();v=h-.05*(l-h)-.001;a=.05*(s-c)+s+.001;y=.05*(l-h)+l+.001;p=c-.05*(s-c)-.001;mapResults.setViewSearchMap()}),changePinColor:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(i){if(u==0&&t!=null){var f=t.getZoom();f>r&&(r=f);n[0]!=null&&mapResults.resetPushPin(n[0]);mapResults.showPushPinOverOthersInBlack(n[i]);b=t.getBounds();b.contains(new Microsoft.Maps.Location(n[i].lat,n[i].long))||t.setView({center:new Microsoft.Maps.Location(n[i].lat,n[i].long),zoom:r})}}),resumePinColor:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(i){if(u==0&&t!=null){var f=t.getZoom();f>r&&(r=f);mapResults.resetPushPin(n[i]);t.setView({zoom:r})}}),highlightFirstPin:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){mapResults.showPushPinOverOthersInBlack(n[0])}),changePinColorOnMouseClick:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(i){var r,f,e;t!=null&&(r=15,u==1?o!=i?(e=document.getElementById(o),$(e).removeClass("mouseClicked"),mapResults.resetPushPin(n[o]),o=i,mapResults.showPushPinOverOthersInBlack(n[i]),f=t.getZoom(),f>r&&(r=f),t.setView({center:new Microsoft.Maps.Location(n[i].lat,n[i].long),zoom:r})):(u=0,mapResults.resumePinColor(i),e=document.getElementById(i),$(e).removeClass("mouseClicked"),mapResults.setViewSearchMap()):(o=i,u=1,mapResults.showPushPinOverOthersInBlack(n[i]),f=t.getZoom(),f>r&&(r=f),t.setView({center:new Microsoft.Maps.Location(n[i].lat,n[i].long),zoom:r})))}),compureExtremeLatLongOnSearch:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){for(var t=0;t<n.length;t++)s<n[t].long&&(s=n[t].long),c>n[t].long&&(c=n[t].long),h>n[t].lat&&(h=n[t].lat),l<n[t].lat&&(l=n[t].lat)}),mapPushPinLocation:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(t,r,u,e){clusterLoaded=!1;f=f+1;var s={text:f.toString(),visible:!0,icon:"/Images/pushpin.png",height:28,width:28},o=new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(parseFloat(t),parseFloat(r)),s);o.Id=f-1;o.lat=parseFloat(t);o.long=parseFloat(r);o.Title=e;o.Description=u;n[f-1]=o;f==1&&(mapResults.highlightFirstPin(),w=o);Microsoft.Maps.Events.addHandler(o,"mouseover",mapResults.highlightPin);Microsoft.Maps.Events.addHandler(o,"mouseout",mapResults.removeHighlightFromPin);i.add(o)}),setViewSearchMap:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){var n=Microsoft.Maps.LocationRect.fromEdges(y,p,v,a);t.setView({bounds:n});setTimeout(function(){r=t.getZoom()},200)}),highlightPin:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){var i,f;u==0&&(i=t.getZoom(),i>r&&(r=i),mapResults.defaultPin!=null&&mapResults.resetPushPin(w),mapResults.showPushPinOverOthersInBlack(n.target),f=document.getElementById(n.target.Id),$(f).addClass("hoverControlSelected"))}),removeHighlightFromPin:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){if(u==0){mapResults.resetPushPin(n.target);var t=document.getElementById(n.target.Id);$(t).removeClass("hoverControlSelected")}}),showLocalityOnMap:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){mapResults.clearMapElements();loadSearchModuleI(t,n)}),createPushPinPreview:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){i&&i.add||(i=new Microsoft.Maps.Layer,e=new Microsoft.Maps.Layer);var r=new Microsoft.Maps.Pushpin(n,{visible:!0,icon:"/Images/pushpin.png",draggable:!0,width:56,height:56});i.add(r);t.setView({center:n})}),clearMapElements:globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){t.layers.clear();i=new Microsoft.Maps.Layer;e=new Microsoft.Maps.Layer})}}();SetSearchCondition=globalExceptionHandler.exceptionHandler(function(n,t,i){var u,r,f,e,o,s;dashboard.firstTimeMapLoad||dashboard.mapScriptLoadEventCompleted!==!0?setTimeout(function(){typeof SetSearchCondition!="undefined"&&SetSearchCondition(n,t,i)},500):(u=$("#countryDropDown").val(),r=$("#PhoneNumber").val(),u==""||r==undefined||r==""?$("#SearchCond").val("SearchByBusinessNameAndCity"):$("#SearchCond").val("SearchByCountryAndPhoneNumber"),f=$("#countryDropDown").val(),n.indexOf(f)!==-1?(blockContainer($(".middlePane")),e=$("#City").val()+" "+$("#countryDropDown :selected").text(),geoCodeMap=new Microsoft.Maps.Map("#mapDiv",{credentials:mkey,mapTypeId:Microsoft.Maps.MapTypeId.road,enableSearchLogo:!1,showZoomButtons:!1,showLocateMeButton:!1,showMapTypeSelector:!1}),o=new Microsoft.Maps.Search.SearchManager(geoCodeMap),s={where:e,count:1,userData:{longId:t,latId:i},callback:addressGeocodeCallback,errorCallback:addressGeocodeError},o.geocode(s)):($("#IsGeoLocationRecieved").val("false"),$(".left-pane form").submit()));dashboard.firstTimeMapLoad=!1});addressGeocodeCallback=globalExceptionHandler.exceptionHandler(function(n,t){n.results.length>0&&($("#"+t.latId).val(n.results[0].location.latitude),$("#"+t.longId).val(n.results[0].location.longitude),$("#IsGeoLocationRecieved").val("true"));$(".left-pane form").submit()});addressGeocodeError=globalExceptionHandler.exceptionHandler(function(){$("#IsGeoLocationRecieved").val("false");$(".left-pane form").submit()});HandleCountryChange=globalExceptionHandler.exceptionHandler(function(){$(".countryDropDown").change(globalExceptionHandler.exceptionHandler(function(){var i=$("input[name=TraceId]").val(),r=$(this).val(),u=$(".searchCriteriaBusinessTypeDropDown").val(),t,n;r==otherCountries?performAjaxCallCustomValues("ShowRequestCountrySupport","traceId="+i,".newCountrySupport",function(){$("#searchItems").show();smallPhoneApi.reduceSearchPageSize()}):(t=smallBusinessType,u!=undefined?t=u:searchCriteriaBusinessTypeModelValue!=undefined&&(t=searchCriteriaBusinessTypeModelValue),n="/DashBoard/SearchBusiness?market="+r+"&traceId="+i,hideBusinessTypeDropdown=="True"?(n+="&HideBusinessTypeDropdown="+(!0).toString(),n+="&searchCriteriaBusinessType="+smallBusinessType):n+="&searchCriteriaBusinessType="+t,hideImportGmbOption=="True"&&(n+="&HideImportGmbOption="+(!0).toString()),showImportGmbFailureMessage=="True"&&(n+="&ShowImportGmbFailureMessage="+(!0).toString()),window.location=n)}))});HandleSearchCriteriaBusinessTypeChange=globalExceptionHandler.exceptionHandler(function(){$(".searchCriteriaBusinessTypeDropDown").change(globalExceptionHandler.exceptionHandler(function(){var n=$(this).val();setSearchCriteriaDropDownValue(n)}))});searchPageOnReady=globalExceptionHandler.exceptionHandler(function(n,t,i,r){r!==""?($("#searchByCountry").click(function(n){$("#searchByBusinessName input").blur().removeClass("input-validation-error").val("");$("#searchByBusinessName input").addClass("disabledBackground");$("#searchByBusinessName span.field-validation-error").empty();$("#searchByCountry *").removeClass("disabledBackground");$(n.target).prev("input").focus()}),$("#searchByBusinessName").click(function(n){$("#searchByCountry input").blur().removeClass("input-validation-error").val("");$("#searchByCountry input").addClass("disabledBackground");$("#searchByCountry span.field-validation-error").empty();$("#searchByBusinessName *").removeClass("disabledBackground");$(n.target).prev("input").focus()})):$("#searchItems").hide();HandleCountryChange();HandleSearchCriteriaBusinessTypeChange();loadMapOnSearchPage(n);$(".hoverControl a").click(function(n){n.stopPropagation()})});loadMapOnSearchPage=globalExceptionHandler.exceptionHandler(function(n){dashboard.firstTimeMapLoad||dashboard.mapScriptLoadEventCompleted!==!0?setTimeout(function(){typeof loadMapOnSearchPage!="undefined"&&loadMapOnSearchPage(n)},500):(mapResults.getMap(),n&&($("#mapDiv").hide(),mapResults.showLocalityOnMap($(".countryDropDown option:selected").text())));dashboard.firstTimeMapLoad=!1});showAdvancedSearch=globalExceptionHandler.exceptionHandler(function(){$("#searchdiv").removeClass("hide");$("#searchPageId").removeClass("hide");$(".modify-link-div").addClass("hide");$(".busuinessSearchAndResultsSchrollBarDiv").mCustomScrollbar("scrollTo","top")});showSearchPageIfSmallBusiness=globalExceptionHandler.exceptionHandler(function(n,t){t==n&&$("#searchPageId").removeClass("hide")});setSearchCriteriaDropDownValue=globalExceptionHandler.exceptionHandler(function(n){n!=null&&($("#searchCriteriaBusinessTypeDropDown").val(n),n==smallBusinessType?($("#searchPageId").removeClass("hide"),$("#searchResultsDiv").removeClass("hide"),$("#notificationForOnlineBusinessDiv").addClass("hide")):n==agencyBusinessType?($("#searchPageId").addClass("hide"),$("#notificationForOnlineBusinessDiv").addClass("hide"),$("#searchResultsDiv").addClass("hide"),performAjaxCallCustomValues("BingPlacesAPIPromptPopup","",".left-pane")):n==chainBusinessType?($("#searchPageId").addClass("hide"),$("#notificationForOnlineBusinessDiv").addClass("hide"),$("#searchResultsDiv").addClass("hide"),window.location="/DashBoard/RegisterChain/"):n==onlineBusinessType&&($("#searchPageId").addClass("hide"),$("#searchResultsDiv").addClass("hide"),$("#notificationForOnlineBusinessDiv").removeClass("hide")))});EnableHoverandClickAttributeOnSearchResults=globalExceptionHandler.exceptionHandler(function(){$(".hoverControl").mouseover(globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(this).addClass("hoverControlSelected");mapResults.changePinColor(this.id);showBusinessPreview($(this).attr("id"))}));$(".hoverControl").mouseout(globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(this).removeClass("hoverControlSelected");mapResults.resumePinColor(this.id);hideBusinessPreview()}));$(".hoverControl").click(globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(this).addClass("mouseClicked");mapResults.changePinColorOnMouseClick(this.id)}));$(".hoverControl").focusin(globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(this).addClass("hoverControlSelected");mapResults.changePinColor(this.id);showBusinessPreview($(this).attr("id"))}));$(".hoverControl").focusout(globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(this).removeClass("hoverControlSelected");mapResults.resumePinColor(this.id);hideBusinessPreview()}));$(".hoverControl").keypress(globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){(event.keyCode==13||event.keyCode==32)&&($(this).addClass("mouseClicked"),mapResults.changePinColorOnMouseClick(this.id))}))});showBusinessPreview=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){$(".search-business-preview .address-placeholder").html($("#"+n).find(".address-preview").html());$(".search-business-preview .phone-placeholder").html($("#"+n).find(".hiddden-phone").html());$(".search-business-preview .website-placeholder").html($("#"+n).find(".hiddden-website").html());$(".search-business-preview .hoursPreview").html($("#"+n).find(".hiddden-hours").html());$(".search-business-preview .hoursPreview .col-sm-3").addClass("col-sm-4").removeClass("col-sm-3");$(".search-business-preview").removeClass("hide");$(".search-business-preview-background").removeClass("hide")});hideBusinessPreview=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(".search-business-preview").addClass("hide");$(".search-business-preview-background").addClass("hide")});var globalData=new GlobalDataAttributes,hideFlag=!0,timeOut,mapLoaded=!1,pluginNode=null,sendToMessengerPluginClass="fb-send-to-messenger";window.onerror=function(n,t,i){LogError("message=window.onerror:"+encodeURIComponent(n)+"&fileName="+encodeURIComponent(t)+"&lineNumber="+encodeURIComponent(i))};String.format||(String.format=function(n){var t=Array.prototype.slice.call(arguments,1);return n.replace(/{(\d+)}/g,function(n,i){return typeof t[i]!="undefined"?t[i]:n})});var anyBPPopUpVisible=function(){return $(".BpPopUp:visible").length>0},broswerDetails={getBrowserName:function(){try{return typeof document.documentMode!="undefined"?"InternetExplorer"+document.documentMode:window.StyleMedia?"Edge":typeof InstallTrigger!="undefined"?"Firefox":!window.chrome||!window.chrome.webstore?!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0?"Opera":/constructor/i.test(window.HTMLElement)||function(n){return n.toString()==="[object SafariRemoteNotification]"}(!window.safari||safari.pushNotification)?"Safari":"Other":"GoogleChrome"}catch(n){return LogError("message=Error in getting browser name. Exception:"+encodeURIComponent(n.toString())),"exception occurred while fetching browser name."}},isBrowserIEorEdge:function(){var n=this.getBrowserName();return n.indexOf("InternetExplorer")>=0||n.indexOf("Edge")>=0}},clientDetails={isClientOnAndroid:function(){try{if(navigator.userAgent.match(/Android/i))return!0}catch(n){LogError("message=Error in getting client is on android. Exception:"+encodeURIComponent(n.toString()))}return!1},isClientOniOS:function(){try{if(navigator.userAgent.match(/iPad|iPhone|iPod/i)&&!window.MSStream)return!0}catch(n){LogError("message=Error in getting client is on iOS. Exception:"+encodeURIComponent(n.toString()))}return!1},getClientAgent:function(){return deviceInfo.isPhone()?this.isClientOnAndroid?"Android":this.isClientOniOS?"iOS":"Unknown":deviceInfo.isSmallDevice()?"Tablet":"Desktop"}},getMessengerTrackingDetails=function(n){var t=n.indexOf("_");return n.substring(0,t)},renderFbPlugin=globalExceptionHandler.exceptionHandler(function(n){var t=pluginNode.children()[0].outerHTML;t=t.replace(encodeURIComponent(pluginNode.attr("cta_text")),encodeURIComponent($(n).attr("cta_text")));t=t.replace(encodeURIComponent(pluginNode.attr("data-ref")),encodeURIComponent($(n).attr("data-ref")));t=t.replace(encodeURIComponent(pluginNode.attr("color")),encodeURIComponent($(n).attr("color")));n.innerHTML=t;LogJavaScriptMessageWithTracker("SendToMessengerPlugin",getMessengerTrackingDetails($(n).attr("data-ref"))+"_Rendered")}),renderEmptySendToMessengerPlugin=globalExceptionHandler.exceptionHandler(function(){var n=$("."+sendToMessengerPluginClass);pluginNode!==null&&n.length>0&&n.length!==n.children().length&&n.each(function(){$(this).children().length===0&&renderFbPlugin(this)})}),ajax={ajaxCall:globalExceptionHandler.exceptionHandler(function(n,t,i,r){$.ajax(n).done(globalExceptionHandler.exceptionHandler(function(n){t&&t(n)})).fail(globalExceptionHandler.exceptionHandler(function(n,t,r){i&&i(n,t,r)})).always(globalExceptionHandler.exceptionHandler(function(){r&&r()}))}),ajaxJsonForAutoComplete:globalExceptionHandler.exceptionHandler(function(n,t,i,r){this.ajaxCall({url:n,type:"POST",cache:!1,contentType:"application/json",dataType:"json",headers:i,data:t},function(n){var t=n;t!==null&&typeof t.Status!="undefined"&&t.Status!==null&&checkIfRedirect(t.Status)?window.location.href=t.RedirectUrl:r!=null&&r(n)},function(n,t,i){showClientPopUp(i)})}),ajaxCallForUI:globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f,e,o){var s={},h="";o&&typeof o=="object"&&(h="&"+o.getUrlArgs());this.ajaxCall({url:n,type:"POST",cache:!1,data:t+"&ApplicationContextId="+$("#ApplicationContextId").val()+h},function(n){if(checkIfRedirect(n))$("body").append(n);else{if(checkIfPopUp(n))showPopUp(n),$(".frontDiv form").length&&$.validator.unobtrusive.parseDynamicContent(".frontDiv form"),renderEmptySendToMessengerPlugin();else{if(e!=null&&checkIfError(n)&&(i=e),(fullPageGuidIndex=getFullPageGuidIndex(n))!=-1){var t=n.indexOf("<body>",fullPageGuidIndex)+6,r=n.lastIndexOf("<\/body>")-1;n=n.substr(t,r);i=$("body")}i!=null&&($.browser.msie&&parseInt($.browser.version)==8&&removeChilds(i[0].childNodes),i.html(n),i.find(".input-validation-error:not(.ignoreValidation)").length==0?deviceInfo.isSmallDevice()?window.scrollTo(0,0):i.scrollTop(0):ScrollToFirstValidationError(i),updateTitleBar(),typeof deviceCompatibility.resize!="undefined"&&deviceCompatibility.resize(),$.validator.unobtrusive.parseDynamicContent("form"))}$("span.field-validation-error").each(function(){var n=$(this).text(),t=$(this).attr("data-valmsg-for");n.length!=0&&(s[$("[name='"+t+"']").attr("id")]=n)})}u!=null&&u(n)},function(){u!=null&&u()},function(){var n,r,t;resetAllInputs();for(n in s)s.hasOwnProperty(n)&&(r=$("#"+n),t=$("span[data-valmsg-for='"+r.attr("name")+"']"),t.text().length==0&&(t.text(s[n]),t.removeClass("field-validation-valid").addClass("field-validation-error"),r.removeClass("valid").addClass("input-validation-error")));i!=null&&unblockContainer(i)});f==null&&(hidePopUp(),i!=null&&blockContainer(i))}),ajaxAppend:globalExceptionHandler.exceptionHandler(function(n,t,i,r){return $(n).hide(),$(n).next("img.dynamicLoading").show(),this.ajaxCall({url:n.href,type:"POST",cache:!1,data:AddAntiForgeryToken()},function(n){checkIfPopUp(n)?showPopUp(n):($("#"+t).append(n),r==null&&(r=1),$("#"+t).find('input[type="text"]').eq(-r).focus(),resetAllInputs())},null,function(){limitAddButton(t,n,i);$(n).next("img").hide()}),!1})};AddWarningCallBackForWebsiteUrl=globalExceptionHandler.exceptionHandler(function(n){n=="failure"});removeWarning=globalExceptionHandler.exceptionHandler(function(n){n.hasClass("input-validation-warning")&&(n.removeClass("input-validation-warning"),$("span[data-valmsg-for='"+n[0].name+"']").removeClass("field-validation-warning").addClass("field-validation-valid"))});checkForWarningIfNoError=globalExceptionHandler.exceptionHandler(function(n){n.hasClass("input-validation-error")||performAjaxCallCustomValues("IsSiteLive","site="+encodeURIComponent(n.val()),null,AddWarningCallBackForWebsiteUrl)});removeWarning=globalExceptionHandler.exceptionHandler(function(n){n.hasClass("input-validation-warning")&&(n.removeClass("input-validation-warning"),$("span[data-valmsg-for='"+n[0].name+"']").removeClass("field-validation-warning").addClass("field-validation-valid"))});AddWarningCallBack=globalExceptionHandler.exceptionHandler(function(n,t){(!n.hasClass("input-validation-error")||n.hasClass("input-validation-warning"))&&(n.addClass("input-validation-warning"),$("span[data-valmsg-for='"+n[0].name+"']").removeClass("field-validation-valid").addClass("field-validation-warning"),$("span[data-valmsg-for='"+n[0].name+"']").html(t))});limitAddButton=globalExceptionHandler.exceptionHandler(function(n,t,i){var r=$("#"+n+" input:visible").length;r<i?$(t).show():$(t).hide();hideDeleteButtonwhenSingleRowIsPresent()});hideDeleteButtonwhenSingleRowIsPresent=globalExceptionHandler.exceptionHandler(function(){$(".dynamic-rows").each(function(){$(this).find(".delete-dynamic-row").length==1?$(this).find(".delete-dynamic-row").hide():$(this).find(".delete-dynamic-row").show()})});showSurveyQuestion=globalExceptionHandler.exceptionHandler(function(n,t,i){surveyVariables.isSurveyOperating==="true"&&performAjaxCallCustomValues("ShowSurveyQuestion","traceId="+n+"&question="+t+"&redirect="+i)});mapItemToAutoComplete=globalExceptionHandler.exceptionHandler(function(n){return{id:n.ID,label:n.Name,value:n.Name}});mapCategoryItemToAutoComplete=globalExceptionHandler.exceptionHandler(function(n){return{id:n.Id,label:n.Name,value:n.Name,displayValue:n.RootNodeName!=null&&n.RootNodeName?n.RootNodeName+" > <b>"+n.Name+"<\/b>":"<b>"+n.Name+"<\/b>",supportedBy:n.SupportedBy,hasAffinitySuggestions:n.HasSuggestions}});mapGmbCategoryItemToAutoComplete=globalExceptionHandler.exceptionHandler(function(n){return{id:n.CategoryId,label:n.DisplayName,value:n.DisplayName,displayValue:"<b>"+n.DisplayName+"<\/b>"}});updateTitleBar=globalExceptionHandler.exceptionHandler(function(){var n=$(".middlePane #titleBarContent").html();$(".middlePane #titleBarContent").remove();$("#titleBar").html(n);$("#profileBar").length==1&&(editBusinessUtil.listingProfileCompletion.updateProfileCompletionData(),$("#ProfileIncompleteMSG").hide())});blockContainer=globalExceptionHandler.exceptionHandler(function(n){n.addClass("loading");var t=$('<span class="loadingDiv"/>');deviceInfo.isSmallDevice()?t.css("height","100%"):t.css("height",n.prop("scrollHeight")+"px");n.append(t)});unblockContainer=globalExceptionHandler.exceptionHandler(function(n){n.removeClass("loading");n.find(".loadingDiv").remove()});removeChilds=globalExceptionHandler.exceptionHandler(function(n){for(i=0;i<n.length;++i)removeAllHandlers(n[i]),n[i].parentNode.removeChild(n[i])});performAjaxCall=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f,e,o){if(t=t!=null?t:".middlePane",i=i!=null?i:t,$(t).length>0&&$(i).length>0)ajax.ajaxCallForUI("/DashBoard/"+n,$(t).serialize()+GetAntiForgeryToken($(t)),$(i),r,u,f,e!=null?$(e):null,o);else throw containerNotExists;});performAjaxCallCustomValues=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f){t=t!=null?t:"";t+="&"+AddAntiForgeryToken();$(i).length>0?ajax.ajaxCallForUI("/DashBoard/"+n,t,$(i),null,r,u,null,f):ajax.ajaxCallForUI("/DashBoard/"+n,t,null,null,r,u,null,f)});performAjaxCallToOtherController=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f){t=t!=null?t:"";t+="&"+AddAntiForgeryToken();$(i).length>0?ajax.ajaxCallForUI(n,t,$(i),null,r,u,null,f):ajax.ajaxCallForUI(n,t,null,null,r,u,null,f)});ValidateAndAjaxToOtherController=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f,e,o){if(t=t!=null?t:".middlePane",i=i!=null?i:t,$(t).length>0&&$(i).length>0)ajax.ajaxCallForUI(n,$(t).serialize()+GetAntiForgeryToken($(t)),$(i),r,u,f,e!=null?$(e):null,o);else throw containerNotExists;});performAjaxCallForErrorMessage=globalExceptionHandler.exceptionHandler(function(n,t){t=t!=null?t:"";ajax.ajaxCall({url:"/Dashboard/"+n,type:"POST",cache:!1,data:t},function(n){showPopUp(n)})});ValidateAndPerformConfideceAndAjaxCallOnBusinessSubmit=function(n,t){if($("#LatLongValidator").val()=="false"){showClientPopUp(pinUnReliableLocationSubmit,locationOnMap);return}n(t)};ValidateAndPerformAjaxCallOnBusinessSubmit=globalExceptionHandler.exceptionHandler(function(n,t,i,r){var u=listingCategory.ClientSideBusinessCategoryValidation()||listingServiceAreas.ClientSideBusinessServiceAreasValidation();ValidateAndPerformAjaxCall(n,t,i,r,u)});ValidateAndPerformAjaxCall=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f,e,o,s){t=t!=null?t:".middlePane";i=i!=null?i:t;(o==null||o==!1)&&blockContainer($(i));setTimeout(globalExceptionHandler.exceptionHandler(function(){var h=$(t).data("validator");h.settings.ignore=".ignoreValidation";$(t).validate().form();$(t).valid()&&!u?performAjaxCall(n,t,i,r,f,e,s):($(".collapse-expand:not(:eq(0))").each(globalExceptionHandler.exceptionHandler(function(){ClientValidationExpandIfError(this)})),ScrollToFirstValidationError($(t)),unblockContainer($(i)),o!=null&&o&&f!=null&&f(!1))}),0)});ValidateAndPerformAjaxCallHybrid=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f){t=t!=null?t:".middlePane";$(t).validate().form();$(t).valid()?performAjaxCall(n,t,i,r,f):ScrollToFirstValidationError($(t))});ScrollToFirstValidationError=globalExceptionHandler.exceptionHandler(function(n){var t=n.find(".input-validation-error:not(.ignoreValidation)").first(),i;$(t).is(":visible")?$(t).focus():n.find(":visible").offset()&&(i=$(t).closest(":visible").offset().top-n.find(":visible").offset().top,n.animate({scrollTop:i},500))});showLogin=globalExceptionHandler.exceptionHandler(function(){$(".loginBox").slideToggle()});showLoginOption=globalExceptionHandler.exceptionHandler(function(){var n=$(".loginTable tr").length;n==1?window.location.href=$(".loginTable tr a:first").attr("href"):$(".loginBox").slideToggle()});checkIfNewPopUp=globalExceptionHandler.exceptionHandler(function(n){var t=n.indexOf("6fb448a6-27ab-427a-a8ae-d4dc2d3487d1");return t==-1?!1:!0});hidePopUp=globalExceptionHandler.exceptionHandler(function(){$(".pop-up-div.ui-dialog-content").dialog("close")});focusTextBox=globalExceptionHandler.exceptionHandler(function(n){$(n).prev("input,textarea").focus().trigger("focus")});resetGivenInputs=globalExceptionHandler.exceptionHandler(function(n){$(n).each(function(){resetInput($(this))});resetAllSpans();inlineHelperhelpImageHoverMovements()});resetAllInputs=globalExceptionHandler.exceptionHandler(function(){$("input[type='text'], textarea").each(function(){resetInput($(this))});resetAllSpans();inlineHelperhelpImageHoverMovements()});resetInput=globalExceptionHandler.exceptionHandler(function(n){var t,i,r;n.attr("title")!=null&&n.parent().attr("class")!="textDiv"&&(n.wrap("<div class='textDiv' />"),t=n.attr("title"),n.attr("data-val-required")!=null&&(t+=" <b>*<\/b>"),n.val()===""?n.after("<span onclick='focusTextBox(this)' class='textLabel textSpanLeft'>"+t+"<\/span>"):(n.after("<span onclick='focusTextBox(this)' class='textLabel textSpanRight'>"+t+"<\/span>"),i=n.siblings("span.textLabel"),r=textWidth(n,i),r>=n.width()&&i.hide()),n.focus(globalExceptionHandler.exceptionHandler(function(){n.siblings("span.textSpanRight").hide();typeof $(this).attr("inlineHelpText")!="undefined"&&showInlineHelperButton($(this))})),n.blur(globalExceptionHandler.exceptionHandler(function(){var t=n.siblings("span.textLabel"),i=textWidth(n,t);n.val()!=""?i<$(this).width()&&(t.removeClass("textSpanLeft"),t.addClass("textSpanRight"),t.show()):(t.removeClass("textSpanRight"),t.addClass("textSpanLeft"),t.show())})),n.bind("dblclick keydown",globalExceptionHandler.exceptionHandler(function(){n.siblings("span.textLabel").hide()})),n.keyup(globalExceptionHandler.exceptionHandler(function(){var i=n.val(),t=n.siblings("span.textLabel");i==""&&(t.removeClass("textSpanRight"),t.addClass("textSpanLeft"),t.show())})))});textWidth=globalExceptionHandler.exceptionHandler(function(n,t){for(var r=n.val().split("\n"),u="",f=0,i=0;i<r.length;++i)r[i].length>f&&(f=r[i].length,u=r[i]);return $("#textMeasureSpan").text(u).width()+t.width()});htmlEncode=globalExceptionHandler.exceptionHandler(function(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")});escapeSingleQuote=globalExceptionHandler.exceptionHandler(function(n){return n.replace(/'/g,"\\'")});DecodeText=globalExceptionHandler.exceptionHandler(function(n){return decodedText=$("#textMeasureSpan").html(n).text()});resetAllSpans=globalExceptionHandler.exceptionHandler(function(){$("input[type='text'], textarea").each(globalExceptionHandler.exceptionHandler(function(){var n=$(this).attr("readonly");n&&n.toLowerCase()!=="false"?$(this).next("span").attr("disabled","disabled"):$(this).next("span").attr("disabled",!1);$(this).css("display")==="none"&&$(this).next("span").hide()}))});resetGivenSpanForInput=globalExceptionHandler.exceptionHandler(function(n){$(n).css("display")==="none"?$(n).next("span").hide():$(n).next("span").show()});$(document).ready(globalExceptionHandler.exceptionHandler(function(){$.ajaxSetup({cache:!0});updateTitleBar();$(window).resize();resetAllInputs();$("body").click(globalExceptionHandler.exceptionHandler(function(n){var t=$(n.target);t[0]!=undefined&&t[0].correspondingUseElement!=undefined&&(t=$(t[0].correspondingUseElement));t.attr("id")==="languageButton"||t.parents("#languageButton").length||$(".languageBox").slideUp();t.attr("id")==="loginButton"||t.parents("#loginButton").length||$(".loginBox").slideUp();t.parents(".dropDownList").length||changeDropDownValue(".dropDownList ul a.selected",".dropDownList ul");t.parents("#userNotifications").length||$("#notificationBox").slideUp();t.parents(".additionalMenu").length||$(".additionalMenu").slideUp();t.parents("#profileBarRow").length||t.parents("#ProfileIncompleteMSG").length||$("#ProfileIncompleteMSG").fadeOut(500);!deviceInfo.isSmallDevice()||t.parents(".addBusinessMenu").length||t.parents("#searchBusinessDiv").length||($("#searchBusinessDiv").hide(),$("#topSearchLink").removeClass("searchEnabled"));t.parents("#filterContainerDiv").length||$("#filterBoxDiv").slideUp();t.closest("#help-titlebar-link").length==0&&$(".help-question-dropdown").is(":visible")&&$(".help-question-dropdown").addClass("hide");$(t).attr("id")!=="inlineHelperQuestionMarkImg"&&t.closest("[inlinehelptext]").length==0&&$(".inlineHelperDiv").removeClass("showInlineHelp");$(".mobile-app-notification").length!=0&&$(".mobile-app-notification").is(":visible")&&t.closest(".mobile-app-notification").length==0&&!t.hasClass("mobileAppButton")&&closeMobileAppNotification()}));$(document).keydown(globalExceptionHandler.exceptionHandler(function(n){n.which===$.ui.keyCode.ESCAPE&&($('.frontDiv .popUpAction input[onclick="hidePopUp()"]').click(),$('.frontDiv .surveyActions input[onclick="dismiss();"]').click())}));$(".displayLanguageDropDown").change(changeCultureMobile);TrackMobileAppMetrics()}));convertTo2400Format=globalExceptionHandler.exceptionHandler(function(n){return n=n.replace(/[: ]/g,""),parseInt(n)});operatingHourCallBackFunctionForPreview=globalExceptionHandler.exceptionHandler(function(n){return function(t){GenerateOperationHoursPreview($("#"+n),t)}});convert2400FormatToString=globalExceptionHandler.exceptionHandler(function(n){return("0"+parseInt(n/100)).slice(-2)+":"+("0"+parseInt(n%100)).slice(-2)});convert2400To12HrFormat=globalExceptionHandler.exceptionHandler(function(n,t){var u,r;t!=null&&t==!0?(u=amString,r=pmString):(u="AM",r="PM");var f=u,i=Math.floor(n/100),e=("0"+n%100).slice(-2);return i==0||i==24?i=12:i==12?f=r:i>12&&(i=i-12,f=r),i+":"+e+f});convert12HrFormatTo2400=globalExceptionHandler.exceptionHandler(function(n,t){n=n.replace(/[: ]/g,"");time=n.replace(/\D/g,"");var u=parseInt(time),i=Math.floor(u/100),f=u%100,r=helperFunction.findMeridian(n,time,t);return meridian=r==2?pmString:amString,r==2&&i<12?i=i+12:r==1&&i==12&&(i=0),i*100+f});changeCultureMobile=globalExceptionHandler.exceptionHandler(function(){var n=$(this).val();changeCulture(n)});showLanguages=globalExceptionHandler.exceptionHandler(function(){$(".languageBox").slideToggle()});languageSelect=globalExceptionHandler.exceptionHandler(function(n,t){var i=$("#languageText").text().trim();n=n.trim();$(".languageBox").toggle();i===n||(typeof surveyVariables!="undefined"&&surveyVariables!==null&&(surveyVariables.isBodyClicked=!0),$("#languageText").text(n),changeCulture(t))});changeCulture=globalExceptionHandler.exceptionHandler(function(n){ajax.ajaxCall({url:"/Home/SetCulture",type:"GET",cache:!1,data:{culture:n}},function(){location.reload(!0)},function(n,t,i){showClientPopUp(i)})});jQuery.validator.unobtrusive.adapters.add("checkboxtrue",globalExceptionHandler.exceptionHandler(function(n){n.element.tagName.toUpperCase()=="INPUT"&&n.element.type.toUpperCase()=="CHECKBOX"&&(n.rules.required=!0,n.message&&(n.messages.required=n.message))}));jQuery.validator.addMethod("greaterThan",globalExceptionHandler.exceptionHandler(function(n){var i=new Date,r=i.getFullYear(),t=!1;return r>=n&&(t=!0),t}));jQuery.validator.addMethod("positiveNumberString",globalExceptionHandler.exceptionHandler(function(n){var t=!1,i=parseInt(n);return i>0&&(t=!0),t}));jQuery.validator.addMethod("minPermissibleNumberString",globalExceptionHandler.exceptionHandler(function(n){var t=!1,r=parseInt(n),i=10;return ChainCountInfo!=null&&(i=ChainCountInfo.getminChainCount()),r>parseInt(i)&&(t=!0),t}));jQuery.validator.addMethod("blacklistedemaildomains",globalExceptionHandler.exceptionHandler(function(n){var t=!0,i;return n==null||n==undefined||n==""?t:(i=n.split("@")[1].split(".")[0].toLowerCase(),(i==undefined||$.inArray(i,blacklistedEmailDomains)>-1)&&(t=!1),t)}));jQuery.validator.addMethod("bool",function(n,t){return $(t).attr("value").toLowerCase()==="true"});jQuery.validator.unobtrusive.adapters.add("bool",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.bool=!0;n.messages.bool=n.message}));jQuery.validator.addMethod("autoCompleteValidation",globalExceptionHandler.exceptionHandler(function(n,t){var i,r;if(n=$.trim(n.toLowerCase()),i=globalData.stateList[$(t).attr("country")],i!=null&&i.length>0&&n.length!=0){for(r=0;r<i.length;++r)if(n==i[r].Name.toLowerCase())return!0;return!1}return!0}));jQuery.validator.addMethod("combinedMaxLengthValidation",globalExceptionHandler.exceptionHandler(function(n,t){return $('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').length==0||$('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').val().length==0||n.length==0||($('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').val()+n).length<=parseInt($(t).attr("combinedMaxLength"))?($(t).removeClass("combinedMaxLengthError"),$('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').length!=0&&$('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').hasClass("combinedMaxLengthError")&&$('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').valid(),!0):($(t).addClass("combinedMaxLengthError"),$('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').hasClass("combinedMaxLengthError")||$('[name="'+$(t).attr("combinedMaxLengthElement")+'"]').valid(),!1)}));jQuery.validator.addMethod("dontAllowSocialSitesValidation",globalExceptionHandler.exceptionHandler(function(n){return typeof restrictedWebsites=="undefined"||restrictedWebsites==null?!0:validateSpamForField(n,restrictedWebsites)}));jQuery.validator.addMethod("phoneNumberAPIValidation",globalExceptionHandler.exceptionHandler(function(n){var u=n,t=$("#Market").val(),i,r;return t==null&&(t=$("#countryDropDown").val()),t==null&&(t=$("#AddressDetail_Country").val()),i=!1,r="phoneNumber="+u+"&market="+t,ajax.ajaxCall({url:"/Dashboard/PhoneValidation",type:"POST",cache:!1,data:r,async:!1},function(n){n=="True"&&(i=!0)}),i}));AddErrorCallBackPhoneNumber=globalExceptionHandler.exceptionHandler(function(n){phoneValid=n=="True"?!0:!1});jQuery.validator.addMethod("businessnamespamdetectionValidation",globalExceptionHandler.exceptionHandler(function(n){return typeof restrictedBusinessNamesContent=="undefined"||restrictedBusinessNamesContent==null?!0:validateSpamForField(n,restrictedBusinessNamesContent)}));jQuery.validator.addMethod("businessaddressspamdetectionValidation",globalExceptionHandler.exceptionHandler(function(n){return typeof restrictedAddressContent=="undefined"||restrictedAddressContent==null?!0:validateSpamForField(n,restrictedAddressContent)}));validateSpamForField=globalExceptionHandler.exceptionHandler(function(n,t){n=$.trim(n.toLowerCase());for(var i=0;i<t.length;i++)if(n.search(new RegExp(t[i]))>=0)return!1;return!0});jQuery.validator.addMethod("websitetypeDetectionValidation",globalExceptionHandler.exceptionHandler(function(n,t){var r=t.id,i=n,u=new RegExp("facebook.[a-zA-ZÀ-ž]{2,6}","i"),f=new RegExp("twitter.[a-zA-ZÀ-ž]{2,6}","i"),e=new RegExp("yelp.[a-zA-ZÀ-ž]{2,6}","i"),o=new RegExp("tripadvisor.[a-zA-ZÀ-ž]{2,6}","i");return i&&(r=="FACEBOOK"&&i.search(u)==-1||r=="TWITTER"&&i.search(f)==-1||r=="YELP"&&i.search(e)==-1||r=="TRIPADVISOR"&&i.search(o)==-1||r=="UNKNOWN"&&(i.search(f)>=0||i.search(u)>=0||i.search(e)>=0||i.search(o)>=0))?!1:!0}));jQuery.validator.addMethod("operationHoursValidation",globalExceptionHandler.exceptionHandler(function(n,t){var u=!0,f=$(".operatingHourOptions input:checked").val(),i,r;if(f==="Custom"){if(i=$(t).closest("tr"),$(i).find('[for="isClosed"]').val().toLowerCase()==="true")return!0;r=[];bpOperationHourClass.populateTimeArray(r,i);u=bpOperationHourClass.isRegexMatching(r)}return u}));jQuery.validator.addMethod("FieldEmptyValidation",globalExceptionHandler.exceptionHandler(function(n,t){var u=!0,f=$(".operatingHourOptions input:checked").val(),i,r;if(f==="Custom"){if(i=$(t).closest("tr"),$(i).find('[for="isClosed"]').val().toLowerCase()==="true")return!0;r=[];bpOperationHourClass.populateTimeArray(r,i);u=!bpOperationHourClass.isFieldEmpty(r)}return u}));jQuery.validator.addMethod("checkDateConflict",globalExceptionHandler.exceptionHandler(function(n,t){var i=!0,r=[];return $(t).closest('[for="specialHoo"]').find("[id^='provideHolidayHours']").is(":checked")?$(t).closest("tr").hasClass("hide")?!0:($(t).closest(".opHourDisplay").find('tr:not(.hide) [for="specialDateValue"]').each(function(){r.push($(this).val())}),r.filter(function(t){return Date.parse(t.split(" ")[0])==Date.parse(n)}).length>1&&(i=!1),i):!0}));jQuery.validator.addMethod("checkDateLessThanMonths",globalExceptionHandler.exceptionHandler(function(n,t,i){var u=t.value,r,f;return u===""?!0:(r=new Date,f=parseInt(i.months),r.setMonth(r.getMonth()+f),Date.parse(u)<=Date.parse(r))}));jQuery.validator.addMethod("checkDefaultDate",globalExceptionHandler.exceptionHandler(function(n,t){var i=!0,r=new Date(defaultHolidayDate);return $(t).closest('[for="specialHoo"]').find("[id^='provideHolidayHours']").is(":checked")?$(t).closest("tr").hasClass("hide")?!0:(Date.parse(n)==Date.parse(r)&&(i=!1),i):!0}));jQuery.validator.addMethod("checkTimeConflict",globalExceptionHandler.exceptionHandler(function(n,t){var u=!0,f=$(".operatingHourOptions input:checked").val(),i,r;if(f==="Custom"){if(i=$(t).closest("tr"),$(i).find('[for="isClosed"]').val().toLowerCase()==="true")return!0;r=[];bpOperationHourClass.populateTimeArray(r,i);u=!bpOperationHourClass.isTimeConflicting(r)}return u}));jQuery.validator.addMethod("bingAdsXIDRequiredValidation",globalExceptionHandler.exceptionHandler(function(n,t){var i=!0;return(n==null||n=="")&&$(t).closest("div.row").find("input:radio").is(":checked")&&(i=!1),i}));jQuery.validator.addMethod("npimatchValidation",globalExceptionHandler.exceptionHandler(function(n){var t=!0,i;return n==null||n==""?t=!0:listingCategory.isDoctorCategoryPresent&&(i=new RegExp("^[1-9][0-9]{9}$"),i.test(n)||(t=!1)),t}));jQuery.validator.addMethod("categorySegmentValidation",globalExceptionHandler.exceptionHandler(function(n){var t=!0,i=$("#BasicDetails_Listing_Type").is(":checked");return i==!1&&(n==null||n=="")&&(t=!1),t}));jQuery.validator.addMethod("checkforduplicates",globalExceptionHandler.exceptionHandler(function(n,t){var r=!0,u=RichAttributeHelper.GetTemplateJSControllerClassName(t),i=window[u];return i!==undefined&&i.IsAlreadyAdded!==undefined&&typeof i.IsAlreadyAdded=="function"&&(r=!i.IsAlreadyAdded(RichAttributeHelper.GetTemplateParentElement(t),n)),r}));jQuery.validator.unobtrusive.adapters.add("categorysegmentcheck",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.categorySegmentValidation=!0;n.messages.categorySegmentValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("futuredate",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.greaterThan=!0;n.messages.greaterThan=n.message}));jQuery.validator.unobtrusive.adapters.add("positivenumber",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.positiveNumberString=!0;n.messages.positiveNumberString=n.message}));jQuery.validator.unobtrusive.adapters.add("minpermissiblenumber",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.minPermissibleNumberString=!0;n.messages.minPermissibleNumberString=n.message}));jQuery.validator.unobtrusive.adapters.add("blacklistedemaildomains",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.blacklistedemaildomains=!0;n.messages.blacklistedemaildomains=n.message}));jQuery.validator.unobtrusive.adapters.add("autocompleteselect",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.autoCompleteValidation=!0;n.messages.autoCompleteValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("combinedmaxlength",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.combinedMaxLengthValidation=!0;n.messages.combinedMaxLengthValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("timeconflict",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.checkTimeConflict=!0;n.messages.checkTimeConflict=n.message}));jQuery.validator.unobtrusive.adapters.add("dateconflict",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.checkDateConflict=!0;n.messages.checkDateConflict=n.message}));jQuery.validator.unobtrusive.adapters.add("datelessthanmonths",["months"],globalExceptionHandler.exceptionHandler(function(n){n.rules.checkDateLessThanMonths=n.params;n.messages.checkDateLessThanMonths=n.message}));jQuery.validator.unobtrusive.adapters.add("notdefaultdate",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.checkDefaultDate=!0;n.messages.checkDefaultDate=n.message}));jQuery.validator.unobtrusive.adapters.add("dontallowsocialsites",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.dontAllowSocialSitesValidation=!0;n.messages.dontAllowSocialSitesValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("phonenumbervalidator",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.phoneNumberAPIValidation=!0;n.messages.phoneNumberAPIValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("businessnamespamdetection",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.businessnamespamdetectionValidation=!0;n.messages.businessnamespamdetectionValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("businessaddressspamdetection",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.businessaddressspamdetectionValidation=!0;n.messages.businessaddressspamdetectionValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("websitetypedetection",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.websitetypeDetectionValidation=!0;n.messages.websitetypeDetectionValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("fieldempty",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.FieldEmptyValidation=!0;n.messages.FieldEmptyValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("operationhours",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.operationHoursValidation=!0;n.messages.operationHoursValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("clientsiderequiredfield",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.emailNonEmptyIfEmailModeSelected=!0;n.messages.emailNonEmptyIfEmailModeSelected=n.message}));jQuery.validator.unobtrusive.adapters.add("bingadsxidrequired",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.bingAdsXIDRequiredValidation=!0;n.messages.bingAdsXIDRequiredValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("npimatch",{},globalExceptionHandler.exceptionHandler(function(n){n.rules.npimatchValidation=!0;n.messages.npimatchValidation=n.message}));jQuery.validator.unobtrusive.adapters.add("richattribute",["rulename","regexparam","constantparam","otherparams"],globalExceptionHandler.exceptionHandler(function(n){n.rules.richattribute={param:function(){return $(n.element).attr("bprichvalidation")}};n.messages.richattribute=globalExceptionHandler.exceptionHandler(function(){return $(n.element).attr("currenterrormsg")})}));jQuery.validator.addMethod("richattribute",globalExceptionHandler.exceptionHandler(function(n,t,i){var r,u;return(i=$(t).attr("bprichvalidation"),i===undefined||i===null)?!0:(i=JSON.parse(i),r=!1,RichAttributeHelper.IsMarkedForNA(t))?(r=!0,!0):(u=this,$.each(i,function(f){var e=i[f],o,s,h;if(e.RuleName===undefined||e.RuleName===null)return!0;if(o=e.RuleName.trim(),o!==undefined&&o!==""){if(s=$.validator.methods[o],s===undefined)return!0;h=!1;switch(o){case"regex":h=s.call(u,n,t,e.RuleParam.RegexParam);break;default:h=s.call(u,n,t,e)}if(h?r=!0:($(t).attr("currenterrormsg",e.RuleErrorMsgResx),r=!1),!r)return!1}}),r)}));jQuery.validator.addMethod("emailNonEmptyIfEmailModeSelected",globalExceptionHandler.exceptionHandler(function(n){var t=$(".verificationGroup input:radio:checked").val();return t=="Email"&&(!n||n.length===0)?!1:!0}));globalExceptionHandler.exceptionHandler(function(n){n.validator.unobtrusive.parseDynamicContent=globalExceptionHandler.exceptionHandler(function(t){var i;n(t).removeData("validator");n.validator.unobtrusive.parse(t);var r=n(t).first().closest(t),u=r.data("unobtrusiveValidation"),i=r.validate();n.each(u.options.rules,globalExceptionHandler.exceptionHandler(function(t,r){if(i.settings.rules[t]==undefined){var f={};n.extend(f,r);n("[name='"+t+"']").rules("add",f);AddMessages(n("[name='"+t+"']")[0],u.options.messages[t])}else n.each(r,globalExceptionHandler.exceptionHandler(function(r,f){if(i.settings.rules[t][r]==undefined){var e={};e[r]=f;n("[name='"+t+"']").rules("add",e);AddMessages(n("[name='"+t+"']")[0],u.options.messages[t])}}))}));i=n(r).data("validator");i.settings.ignore=':hidden:not(".includeHiddenValidations")'})})($);AddMessages=globalExceptionHandler.exceptionHandler(function(n,t){var i=$.data(n.form,"validator").settings;i.messages[n.name]=$.extend(i.messages[n.name],t)});AddAntiForgeryToken=globalExceptionHandler.exceptionHandler(function(){return"__RequestVerificationToken="+$("#__AjaxAntiForgeryForm input[name=__RequestVerificationToken]").val()});GetAntiForgeryTokenMiddlePane=globalExceptionHandler.exceptionHandler(function(n){return!n||n.find("input[name=__RequestVerificationToken]").length===0?"&__RequestVerificationToken="+$(".middlePane input[name=__RequestVerificationToken]").val():""});GetAntiForgeryToken=globalExceptionHandler.exceptionHandler(function(n){return!n||n.find("input[name=__RequestVerificationToken]").length===0?"&__RequestVerificationToken="+$("input[name=__RequestVerificationToken]").val():""});itemSelected=globalExceptionHandler.exceptionHandler(function(n,t,i){dirtyBit=!0;var r=t.item.id;$(i).val(r);$(i).trigger("propertychange")});performAjaxJsonCall=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u){var e=JSON.stringify({searchString:n.term,traceId:i,countryId:r}),f={};f.__RequestVerificationToken=$("input[name=__RequestVerificationToken]").val();ajax.ajaxJsonForAutoComplete(t,e,f,u)});performAjaxJsonCallWithProfessionalFlag=globalExceptionHandler.exceptionHandler(function(n,t,i,r,u,f,e,o){var h=JSON.stringify({searchString:n.term,traceId:i,countryId:r,professionalFlag:u,segmentId:f,mergeFlag:e}),s={};s.__RequestVerificationToken=$("input[name=__RequestVerificationToken]").val();ajax.ajaxJsonForAutoComplete(t,h,s,o)});checkIfPopUp=globalExceptionHandler.exceptionHandler(function(n){return n.indexOf("CC98DEEE-0638-4620-88AE-167E70FC8D53")!=-1||n.indexOf("6fb448a6-27ab-427a-a8ae-d4dc2d3487d1")!=-1?!0:!1});checkIfRedirect=globalExceptionHandler.exceptionHandler(function(n){var t=n.indexOf("7B27C7E7-1111-46D1-BBBE-289CDC136990");return t==-1?!1:!0});getFullPageGuidIndex=globalExceptionHandler.exceptionHandler(function(n){return n.indexOf("BCFC8E70-2670-4B61-958C-451945CC172A")});checkIfError=globalExceptionHandler.exceptionHandler(function(n){var t=n.indexOf("9d2d90d0-34c2-4ef2-acfe-8d81de4d5c8a");return t==-1?!1:!0});mouseOverFile=globalExceptionHandler.exceptionHandler(function(n){$(n).parent().find('input[type="button"]').addClass("hover")});mouseOutFile=globalExceptionHandler.exceptionHandler(function(n){$(n).parent().find('input[type="button"]').removeClass("hover")});dropDown=globalExceptionHandler.exceptionHandler(function(n){if(!n.hasClass("done")){var t=n.find("input:eq(1)");t.val(DecodeText(t.val()));selected=0;n.children("input[type=text]").on("click, focus",function(){showDropDown(this)});n.children("input[type=text]").blur(function(){changeDropDownValue(n.find("ul a.selected"),n.find("ul"))});n.children("input[type=text]").keydown(function(t){return setDropDownEvent(n,t)});n.find("a").hover(function(){n.find("a.selected").removeClass("selected");$(this).addClass("selected")},function(){$(this).removeClass("selected")});n.find("a").click(function(){changeDropDownValue(this,$(this).parent())});showDropDown=globalExceptionHandler.exceptionHandler(function(n){$(n).siblings("ul").slideDown(200)});setDropDownEvent=globalExceptionHandler.exceptionHandler(function(n,t){var t=t||window.event,i=n.find("ul").find("a");return $.ui.keyCode.ENTER===t.which||$.ui.keyCode.TAB==t.which?i.filter(".selected").click():(i.filter(".selected").removeClass("selected"),$.ui.keyCode.DOWN===t.which?(selected=selected>=i.length-1?0:selected+1,$(i.get(selected)).addClass("selected")):$.ui.keyCode.UP===t.which&&(selected=selected<=0?i.length-1:selected-1,$(i.get(selected)).addClass("selected"))),!1});n.addClass("done")}});changeDropDownValue=globalExceptionHandler.exceptionHandler(function(n,t){var i=$(n),r,f,u,e;i.length!==0&&(r=i.attr("value"),f=$.trim(i.text()),i=i.parent(),u=i.siblings("input:eq(0)"),e=i.siblings("input:eq(1)"),r!==u.val()&&(e.val(f),u.val(r),i.siblings("input").trigger("change")));$(t).slideUp(200)});showDescriptionDiv=globalExceptionHandler.exceptionHandler(function(){clearTimeout(timeOut);var n=$(this).offset(),t=$(".descriptionDiv"),i=$("#"+$(this).attr("for")).html();t.html(i);t.css({bottom:$(window).height()-n.top+5+"px",left:n.left-10+"px"}).fadeIn(500)});hideDescriptionDiv=globalExceptionHandler.exceptionHandler(function(){timeOut=setTimeout(globalExceptionHandler.exceptionHandler(function(){hideFlag&&$(".descriptionDiv").fadeOut(100)}),100)});continueDescriptionDiv=globalExceptionHandler.exceptionHandler(function(){hideFlag=!1});stopDescriptionDiv=globalExceptionHandler.exceptionHandler(function(){$(".descriptionDiv").fadeOut(100);hideFlag=!0});LogError=globalExceptionHandler.exceptionHandler(function(n){ajax.ajaxCall({url:"/Home/LogJavaScriptError",type:"POST",cache:!1,data:"browser="+encodeURIComponent(JSON.stringify($.browser))+"&"+n})});LogJavaScriptMessage=globalExceptionHandler.exceptionHandler(function(n,t){ajax.ajaxCall({url:"/Home/LogJavaScriptMessage",type:"POST",cache:!1,data:"browser="+encodeURIComponent(JSON.stringify($.browser))+"&message="+encodeURIComponent(n)},null,null,t)});LogJavaScriptMessageWithSrcTracker=globalExceptionHandler.exceptionHandler(function(n,t,i){t=i!=null&&i!=""?i+"_"+t:t;LogJavaScriptMessageWithTracker(n,t)});LogJavaScriptMessageWithTracker=globalExceptionHandler.exceptionHandler(function(n,t,i,r){ajax.ajaxCall({url:"/Home/LogJavaScriptMessageWithTracker",type:"POST",cache:!1,data:"browser="+encodeURIComponent(JSON.stringify($.browser))+"&featureName="+encodeURIComponent(n)+"&featureStat="+encodeURIComponent(t)+"&message="+encodeURIComponent(i)},null,null,r)});TrackClientSideEventMetric=globalExceptionHandler.exceptionHandler(function(n,t,i,r){ajax.ajaxCall({url:"/Home/TrackClientSideEventMetric",type:"POST",cache:!1,data:"workflowName="+encodeURIComponent(n)+"&eventName="+encodeURIComponent(t)+"&message="+encodeURIComponent(i)},null,null,r)});LogTrackingInfo=globalExceptionHandler.exceptionHandler(function(n,t,i){var u=JSON.stringify({tableName:encodeURIComponent(n),features:t}),r={};r.__RequestVerificationToken=$("input[name=__RequestVerificationToken]").val();ajax.ajaxJsonForAutoComplete("/Home/TrackInApplicationInsight",u,r,i)});redirectToUrl=globalExceptionHandler.exceptionHandler(function(n){window.location.href=n;$("body").addClass("loading")});baseOnLoad=globalExceptionHandler.exceptionHandler(function(n,t){$(".bottomRightMenu a[for]").hover(showDescriptionDiv,hideDescriptionDiv);$(".descriptionDiv").hover(continueDescriptionDiv,stopDescriptionDiv);t&&performAjaxCallCustomValues("GetAllUserNotifications","traceId="+n,"#notificationBox",null,null,"yes")});feedbackOnLoad=globalExceptionHandler.exceptionHandler(function(n){$(".emptyStar").click(globalExceptionHandler.exceptionHandler(function(){var n=$(".emptyStar").index($(this))+1;$(".emptyStar").slice(0,n+1).addClass("fullStar");$(".emptyStar").slice(n).removeClass("fullStar");$("#Rating").val($(this).attr("value"))}));var t=$(".emptyStar").index($('.emptyStar[value="'+n+'"]'));$(".emptyStar").slice(0,t+1).addClass("fullStar")});changeContactPrefernces=globalExceptionHandler.exceptionHandler(function(n,t,i){t.attr({checked:!0,disabled:!1});i.attr({checked:!0,disabled:!1});switch(n){case"US":case"CA":i.attr("checked",!1);break;case"GB":case"DE":t.attr("checked",!1);i.attr("checked",!1);break;case"ES":t.attr("checked",!1);break;case"":t.attr("disabled",!0);i.attr("disabled",!0)}});stopWatchDateTime=globalExceptionHandler.exceptionHandler(function(){this.elapsedTime=0;this.startTime=0});stopWatchDateTime.prototype.Start=globalExceptionHandler.exceptionHandler(function(){this.startTime=(new Date).getTime()});stopWatchDateTime.prototype.Stop=globalExceptionHandler.exceptionHandler(function(){this.elapsedTime=(new Date).getTime()-this.startTime});stopWatchNew=globalExceptionHandler.exceptionHandler(function(){this.startTime=0;this.elapsedTime=0});stopWatchNew.prototype.Start=globalExceptionHandler.exceptionHandler(function(){this.startTime=window.performance.now()});stopWatchNew.prototype.Stop=globalExceptionHandler.exceptionHandler(function(){this.elapsedTime=window.performance.now()-this.startTime});bpStopWatch=globalExceptionHandler.exceptionHandler(function(){this.elapsedTime=0;window.performance!=null&&window.performance!=undefined&&window.performance.now!=null&&window.performance.now!=undefined?(this.timer=new stopWatchNew,this.usingOldTimer=!1):(this.timer=new stopWatchDateTime,this.usingOldTimer=!0)});bpStopWatch.prototype.Start=globalExceptionHandler.exceptionHandler(function(){this.timer.Start()});bpStopWatch.prototype.Stop=globalExceptionHandler.exceptionHandler(function(){this.timer.Stop();this.elapsedTime=this.timer.elapsedTime});updateNotificationCount=globalExceptionHandler.exceptionHandler(function(){var n=$("#notificationBox .notificationContent .notificationCount").attr("value");n>0?$("#viewNotificationCount").html(n).show():$("#viewNotificationCount").html("")});changeOmniturePDL=globalExceptionHandler.exceptionHandler(function(n,t,i,r){window._PDL.pageType=i;window._PDL.prop1=n;window._PDL.prop2=t;window._PDL.prop7=r});getCurrentUILanguage=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){var n=$("#languageText").attr("languageValue");return n==""?"en-US":n});supportLinkClickedLogging=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n){LogJavaScriptMessageWithTracker("Troubleshooting link",n)});changeCustomDropdownValue=globalExceptionHandler.exceptionHandler(function(n,t){$(t).val($(n).attr("value"));$(n).closest(".dropdown").find(".dropdown-toggle div span").text($(n).text());$(t).change();$(t).valid()});getFullUrlFromRelativeUrl=globalExceptionHandler.exceptionHandler(function(n){return"https://"+window.location.host+n});supportStartWithForStrings=function(){String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return t=t||0,this.substr(t,n.length)===n})}();supportFindForArrays=function(){Array.prototype.find||(Array.prototype.find=function(n,t){var r,f,u,i;if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof n!="function")throw new TypeError("predicate must be a function");for(r=Object(this),f=r.length,i=0;i<f;i++)if(u=r[i],n.call(t,u,i,r))return u;return undefined})}();SetForES5=globalExceptionHandler.exceptionHandler(function(){var n=[];return{has:globalExceptionHandler.exceptionHandler(function(t){var i=n.indexOf(t);return i>-1}),add:globalExceptionHandler.exceptionHandler(function(t){this.has(t)||n.push(t)}),clear:globalExceptionHandler.exceptionHandler(function(){n=[]}),length:globalExceptionHandler.exceptionHandler(function(){return n.length}),isEmpty:globalExceptionHandler.exceptionHandler(function(){return n.length==0}),"delete":globalExceptionHandler.exceptionHandler(function(t){var i=n.indexOf(t);i>-1&&n.splice(i,1)}),entriesForES5:globalExceptionHandler.exceptionHandler(function(){return n})}});openShowAllManageUsersInvitations=globalExceptionHandler.exceptionHandler(function(){performAjaxCallCustomValues("ShowAllManageUsersInvitations",null,".left-pane")});setUniformMarginAtTop=function(n,t,i,r){var f=$(n).height(),e=$(t).height(),o=$(i).height(),s=$(r).height(),u=defMargin,h=$(window).width();h<=970?$(".why-bp p").each(function(){var n=$(this).parent(),i=n.width()-n.find("img").width()-70,t;console.log(i);$(this).width(i);t=(n.find("img").height()-$(this).height())/2;t>0&&$(this).css("margin-top",t)}):$(".why-bp p").each(function(){$(this).width("")});s>f+e+o+defMargin*4&&h>1e3&&(u=(s-(f+e+o))/4-3);$(n).css("padding-top",u);$(t).css("padding-top",u);$(i).css("padding-top",u)};showMobileAppNotification=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){var n=$(window).width();n>=1e3&&performAjaxCallCustomValues("ShowMobileAppBanner",null,null)});closeMobileAppNotification=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(){$(".mobile-app-notification").dialog("close")});UpdateDownloadAppSessionStorage=globalExceptionHandler.exceptionHandler(function(){ajax.ajaxCall({url:"/Base/SetSessionForMobileAppDownloadPopup",type:"GET",cache:!1,data:{value:!1}},function(){},function(n,t,i){showClientPopUp(i)})});TrackMobileAppMetrics=globalExceptionHandler.exceptionHandler(function(){for(var t=["HomeHeaderBanner","HomeFooterBanner","HomeFooterControl","ITYBusinessFooterBanner","GetMobileAppButton","DownloadMobileAppCard","DownloadAppLinkOnTop","DownloadAppInlinePopup","PostalVerificationCommenced","BusinessVerifiedSuccessfully","MicrotransactionReviewBusiness","StartingPostalVerification"],n=0;n<t.length;n+=1)TrackMobileAppInstallPointView(t[n])});TrackMobileAppInstallPointClick=globalExceptionHandler.exceptionHandler(function(n){performAjaxCallCustomValues("TrackWithEmptyResponse",null,null,null,null,ClientSideMetricUtil.mobileAppTrackingEventMetrics(n,"Clicked","MobileAppPortalNotifications"))});TrackMobileAppInstallPointView=globalExceptionHandler.exceptionHandler(function(n){var t=$("#"+n),i;t&&t.length!=0&&t.is(":visible")&&t.css("display")!="none"&&(i=t[0].id.replace("#",""),performAjaxCallCustomValues("TrackWithEmptyResponse",null,null,null,null,ClientSideMetricUtil.mobileAppTrackingEventMetrics(i,"Shown","MobileAppPortalNotifications")),t.attr("element-isShown","true"))});HandleDownloadAppBannerOnMobile=globalExceptionHandler.exceptionHandler(function(n){var t=$("#"+n);setTimeout(function(){var n=$(window).width();n<770?clientDetails.isClientOnAndroid()?(t.show(),$("#desktop-image-iOS").hide(),$("#mobile-image-iOS").hide()):clientDetails.isClientOniOS()?(t.show(),$("#desktop-image-android").hide(),$("#mobile-image-android").hide()):t.hide():t.show()},0)});downloadApp=globalExceptionHandler.exceptionHandlerWithoutPopUp(function(n,t,i){clientDetails.isClientOniOS()?(window.open(n,"_blank"),TrackMobileAppInstallPointClick(i)):clientDetails.isClientOnAndroid()&&(window.open(t,"_blank"),TrackMobileAppInstallPointClick(i))});blockGMBContainer=globalExceptionHandler.exceptionHandler(function(n,t,i){var r=$('<span class="loadingDiv"><span class="loadingBlock row"><span class="col-xs-12" style="text-align:center;"><img src="/Images/loading.gif" alt="Loading..." height="32" width="32"><\/span><span class="col-xs-12" style="text-align:center;">'+t+'<\/span><span class="col-xs-12" style="text-align:center;"><b>'+i+"<\/b><\/span><\/span><\/span>");r.css("text-align","center");n.append(r)});unblockGMBContainer=globalExceptionHandler.exceptionHandler(function(n){n.find(".loadingDiv").remove()})