!function(o){if(o.SnapAppInstance&&o[o.SnapAppInstance]){var t=o[o.SnapAppInstance],r={},n=!1,s=[];if(t.rm&&"function"==typeof t.rm){var u={version:"1.0.0",events:{ON_DOM_LOAD:"onDomLoad",ON_MODULE_INIT:"onModuleInit",SET_AS_FAVOURITE:"setAsFavourite",REMOVE_AS_FAVOURITE:"removeAsFavourite"},rm:function(t,e){if("function"==typeof t)try{t.apply(null,[this])}catch(t){}},setCookie:function(t,e,i){var n=t+"="+escape(e);if(void 0!==i){var r=new Date;r.setTime(r.getTime()+1e3*i),n+=";expires="+r.toGMTString()}n+=";path=/",o.document.cookie=n},getCookie:function(t){var e=o.document.cookie;"string"!=typeof e&&(e="");var i=t+"=",n=e.indexOf("; "+i);if(-1==n){if(0!=(n=e.indexOf(i)))return null}else{n+=2;var r=o.document.cookie.indexOf(";",n);-1==r&&(r=e.length)}return decodeURI(e.substring(n+i.length,r))},hasModuleLoaded:function(t){this.utils.isString(t)&&(t=[t]);for(var e=0,i=0;i").attr("id","#"+this._elementId+"-forcecentre").addClass("centre-name").html(this.forceCentreName),a=s('
').append(t),s("#"+this._elementId,this._formHashId).val(this.forceCentreName)):(s("#"+this._elementId,this._formHashId).attr("data-bind","companyName").addClass("sca-dynamic-centre-info"),e=s("").attr("href","javascript:openFindCentrePopup()").attr("title","Find your nearest Centre").attr("rel","nofollow").addClass("find-a-centre-link").html("Find Nearest Centre"),n=s(e).clone(!0).attr("title","Change your nearest Centre").addClass("change-centre").html("Change Centre"),t=s("").attr("id","#"+this._elementId+"-span").attr("data-bind","companyName").addClass("sca-dynamic-centre-info").addClass("centre-name"),e=s('
').append(e),t=s('
').append(t).append(n),n=s('').html("Loading Nearest Centre..."),a=s('
').append(e).append(t).append(n)),s("#"+this._elementId,this._formHashId).parent().prepend(a),r.isDomLoaded()&&s("#"+this._elementId,this._formHashId).parent().find(".form-centre-element-container").removeClass("loading"),!0},setCentreName:function(e){this.forceCentreName||(this.showSubmit(!0),e?(s("#"+this._elementId,this._formHashId).parent().find(".sca-on-centre-notsel").addClass("hide"),s("#"+this._elementId,this._formHashId).parent().find("sca-on-centre-sel").addClass("show"),s("#"+this._elementId+"-span",this._formHashId).val(e),s("#"+this._elementId,this._formHashId).val(e),this.enableSubmit()):(s("#"+this._elementId,this._formHashId).parent().find(".sca-on-centre-notsel").removeClass("hide"),s("#"+this._elementId,this._formHashId).parent().find("sca-on-centre-sel").removeClass("show"),s("#"+this._elementId+"-span",this._formHashId).val(""),this.disableSubmit()))},disableSubmit:function(){this.forceCentreName},enableSubmit:function(){var e=this.getSubmitBtn();e&&(e.prevValue&&s(e).val(e.prevValue),s(e).removeAttr("disabled"))},showSubmit:function(e){this.forceCentreName},getSubmitBtn:function(){var e=s("#"+this._elementId,this._formHashId).parents("form").find('input[type="submit"]');return!!e.length&&(e[0].prevValue||(e[0].prevValue=e[0].value),e[0])}},r.subscribeEvent("onFavouriteModuleInit",function(){e()}),r.subscribeEvent(r.events.SET_AS_FAVOURITE,function(){t()}),r.subscribeEvent(r.events.REMOVE_AS_FAVOURITE,function(){t()}),r.subscribeEvent(r.events.ON_DOM_LOAD,function(){e(),t()}),r.moduleInit("centreFormElement"))})}(window); !function(p){p.SnapAppInstance&&p[p.SnapAppInstance]&&p[p.SnapAppInstance].rm&&p[p.SnapAppInstance].rm(function(t){var i=t.jQuery;function n(){t.utils.isFunction(p.openFindCentrePopup)||(p.openFindCentrePopup=function(){var e,o=i("#findCentreModal");o&&((e=o.find("div.modal-body").find("div.loaded-popup").length)||o.on("shown.bs.modal",function(n){e||(t.utils.xhrRequest("/snap/centre-locator/index?listTemplate=popup.html&ppw=1",{},function(n,e){e=i("
").html(e);e=i('
').html(i(e).find("#findCentrePopupContainer").html());o.removeClass("loading-popup"),o.find("div.modal-body").html(e),"function"==typeof p.ga&&p.ga("send","pageview","/find-a-centre.html")},"html"),o.off("shown.bs.modal"))}),o.modal("show"))})}t.subscribeEvent("onFavouriteModuleInit",function(){n()}),t.subscribeEvent(t.events.SET_AS_FAVOURITE,function(){var n=i("#findCentreModal");n&&n.modal("hide")}),t.subscribeEvent(t.events.ON_DOM_LOAD,function(){n()})})}(window); !function(t){t.SnapAppInstance&&t[t.SnapAppInstance]&&t[t.SnapAppInstance].rm&&t[t.SnapAppInstance].rm(function(n){n.getFavouriteCenterId()||function(){var n=document.createElement("script");n.src="https://adriano-au.avanser.com/tagmanager/6497-1.js",n.id="SnapAvansarScript",n.type="text/javascript";var a=t.document.getElementsByTagName("script")[0];a&&a.parentNode.insertBefore(n,a)}()})}(window);