(function(window){window.ringba_known_numbers = [{"int":"+18886481252","loc":"(888) 648-1252","jstag":"JSf35cbc199bd743659f5d2cf46b49c0bb","replaceWithInt":null,"replaceWithLoc":null,"replaceLeftToRight":true}];!function(e){function t(){this.tagId="",this.id="",this.displayNumber="",this.phoneNumber="",this.impressionQueryPath="",this.maxEpoch=0,this.timeBetweenTicks=0,this.heartBeatMs=0,this.exp=0,this.displayFmt=0,this.heartBeatTimeout=null,this.ready=!0}var n=function(){function t(e){return JSON.stringify(e)}return{postRequest:function(n,r,a,i){if("XDomainRequest"in e&&null!==e.XDomainRequest){var o=new XDomainRequest;o.open("POST",n),o.onload=function(){result=o.responseText,a(result)},o.onerror=function(){i&&i()},o.send(t(r))}else{if(navigator.userAgent.indexOf("MSIE")!=-1&&parseInt(navigator.userAgent.match(/MSIE ([\d.]+)/)[1],10)<8)return!1;var u=new XMLHttpRequest;u.onreadystatechange=function(){4==u.readyState&&(200==u.status?a(u.responseText):i&&i())},u.open("POST",n,!0),u.setRequestHeader("Content-type","text/plain"),u.send(t(r))}}}};"undefined"!=typeof e.localStorage&&"undefined"!=typeof e.sessionStorage||function(){var t=function(t){function n(e,t,n){var r,a;n?(r=new Date,r.setTime(r.getTime()+24*n*60*60*1e3),a="; expires="+r.toGMTString()):a="",document.cookie=e+"="+t+a+"; path=/"}function r(e){var t,n,r=e+"=",a=document.cookie.split(";");for(t=0;t<a.length;t++){for(n=a[t];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(r))return n.substring(r.length,n.length)}return null}function a(r){r=JSON.stringify(r),"session"==t?e.name=r:n("localStorage",r,365)}function i(){"session"==t?e.name="":n("localStorage","",365)}function o(){var n="session"==t?e.name:r("localStorage");return n?JSON.parse(n):{}}var u=o();return{length:0,clear:function(){u={},this.length=0,i()},getItem:function(e){return void 0===u[e]?null:u[e]},key:function(e){var t=0;for(var n in u){if(t==e)return n;t++}return null},removeItem:function(e){delete u[e],this.length--,a(u)},setItem:function(e,t){u[e]=t+"",this.length++,a(u)}}};"undefined"==typeof e.localStorage&&(e.localStorage=new t("local"))}(),t.getNumberFromResult=function(e,n){var r=new t;return r.tagId=e,r.id=n.id,r.displayNumber=n.displayNumber,r.phoneNumber=n.phoneNumber,r.phoneNumberLocal=n.phoneNumberLocal,r.impressionQueryPath=n.impressionQueryPath,r.maxEpoch=n.maxEpoch||0,r.timeBetweenTicks=n.expireMs,r.heartBeatMs=n.heartBeatMs,r.exp=(new Date).getTime()+r.timeBetweenTicks,r.displayFmt=n.displayFmt,r.ready=!0,r},t.getFromStorage=function(e){var n=localStorage.getItem("ringbaNumber_"+e)||null;if(n){var r=JSON.parse(n),a=new t;return a.tagId=e,a.id=r.id,a.displayNumber=r.displayNumber,a.phoneNumber=r.phoneNumber,a.phoneNumberLocal=r.phoneNumberLocal,a.impressionQueryPath=r.impressionQueryPath,a.maxEpoch=r.maxEpoch,a.timeBetweenTicks=r.timeBetweenTicks,a.heartBeatMs=r.heartBeatMs,a.exp=r.exp,a.displayFmt=r.displayFmt,a.ready=!0,a}},t.prototype.getFmtNumber=function(e){if(e=e||this.displayFmt){var t=this.phoneNumber.length-1,n="";for(i=e.length-1;i>-1&&t>-1;i--){var r=e.charAt(i);n="n"==r||"N"==r?this.phoneNumber.charAt(t--)+n:r+n}return n}return this.displayNumber},t.prototype.save=function(){var e=JSON.parse(JSON.stringify(this));delete e.ready,delete e.heartBeatTimeout,localStorage.setItem("ringbaNumber_"+this.tagId,JSON.stringify(e))},t.prototype.isExpired=function(){var e=(new Date).getTime();return e>this.exp||this.maxEpoch>0&&e>this.maxEpoch},t.prototype.incrementExp=function(){this.exp=(new Date).getTime()+this.timeBetweenTicks,this.save()};var r=function(r){function a(e){if(""==e)return{};for(var t=[],n=0;n<e.length;++n){var r=e[n].split("=",2);1==r.length?t.push({key:r[0],value:""}):t.push({key:r[0],value:decodeURIComponent(r[1].replace(/\+/g," "))})}return t}function o(e){var n=e.tag;if(n){null==L[n]&&(L[n]=[]),L[n].push(e);var r=x[n];null==r&&(r=t.getFromStorage(n),!r||r.isExpired()?(r=new t,r.ready=!1,r.tagId=n,x[n]=r,y(n)):(x[n]=r,T(r),A.push(n))),h(r)}}function u(e){for(null!=e&&e.length>0&&!D&&p();null!=e&&e.length>0;){var t=e.pop();o(t)}k.length?N():l()}function s(e,t){if(e&&e.length){var n=JSON.parse(t);e.forEach(function(e){var t=n[e];t&&(c(e,t),A.push(e))})}l()}function l(){if(A&&A.length){var e=[];F&&A.forEach(function(t){var n=x[t];n&&e.push({tagId:t,number:n.phoneNumber,numberLocal:n.phoneNumberLocal,displayNumber:n.displayNumber})}),A=[],F&&setTimeout(function(){F(e)},0)}}function c(e,n){var r=t.getNumberFromResult(e,n);r.save(),x[e]=r,h(r),w(r)}function f(e,t){return e.getFmtNumber(t)}function h(e){var t=e.tagId,n=L[t];if(null!=n)for(var r=0;r<n.length;r++){var a=n[r],i=a.script,o=e.ready?f(e,a.format):null,u=o||a.placeholderText||"";if(a.render!==!1)if(null==a.numberDisplayTag){var s=document.createTextNode(u);i.parentElement.insertBefore(s,i.nextSibling||i),a.numberDisplayTag=s}else a.numberDisplayTag.nodeValue=u;if(null!=a.numberClass){var l;l=document.getElementsByClassName?document.getElementsByClassName(a.numberClass):document.querySelectorAll("."+a.numberClass);for(var c=0;c<l.length;c++)l[c].innerHTML=u}if(null!=o){var h=q[t];if(q[t]=o,h!=o&&null!=a.cb){var p=a,g=null==h;setTimeout(function(){p.cb(o,t,g,e.phoneNumber,e.phoneNumberLocal)},0)}}}}function p(){D=!0,g(),m(),d()}function g(){_.push({type:"Display",width:screen.width}),_.push({type:"Display",height:screen.height}),_.push({type:"Display",availWidth:screen.availWidth}),_.push({type:"Display",availHeight:screen.availHeight}),_.push({type:"Display",pixelDepth:screen.pixelDepth}),_.push({type:"Display",colorDepth:screen.colorDepth})}function m(){_.push({type:"Request",referrer:document.referrer})}function d(){e&&e.location&&(e.location.href&&(_.push({type:"Location",completeUrl:e.location.href}),_.push({type:"Location",cleanUrl:e.location.href.split("?")[0]})),_.push({type:"Location",hostName:e.location.hostname?e.location.hostname:""}),_.push({type:"Location",pathName:e.location.pathname?e.location.pathname:""}),_.push({type:"Location",hash:e.location.hash?e.location.hash:""}))}function b(){B&&(v("fbc"),v("fbp"))}function v(e){try{var t="_"+e;t=t.replace(/([.*+?\^${}()|\[\]\/\\])/g,"\\$1");var n=document.cookie.match(RegExp("(?:^|;\\s*)"+t+"=([^;]*)"));if(n=n?n[1]:null,null!=n&&""!=n){var r={type:"Integration"};r[e]=n,_.push(r),B=!1}}catch(a){return}}function y(e){k.push(e)}function N(){if(k&&k.length){var e=k.slice(),t={JsTagIds:k,currentEpoch:(new Date).getTime(),tags:_,queryPaths:O};M.postRequest(R+"/v2/nis/gnbulk",t,function(t){s(e,t)},function(e){}),k=[]}}function T(e){setTimeout(function(){I(e)},0)}function w(e){e.heartBeatTimeout=setTimeout(function(){I(e)},e.heartBeatMs)}function I(e){if(!e.isExpired()){b();var t={ImpressionId:e.impressionQueryPath,Tags:_};M.postRequest(R+"/v1/nis/hb",t,function(){e.incrementExp(),w(e)},null)}}function S(e){if(e)for(D||p(),i=0;i<e.length;i++)e[i].type="User",_.push(e[i])}function E(){for(var e in x){var t=x[e];null!=t&&null!=t.heartBeatTimeout&&clearTimeout(t.heartBeatTimeout)}}var L={},x={},_=[],D=!1,R=r.baseUrl,M=n(),O=a(e.location.search.substr(1).split("&")),q={},k=[],B=!0,A=[],F=null;return u(r.queue),{processOutstandingRequests:function(e){u(e)},addTags:function(e){S(e)},release:function(){E()},setBulkNumbersCallback:function(e){if(e&&"function"!=typeof e)throw"The callback has to be a function or null";F=e}}};"undefined"==typeof e.ringba&&(e._rgba=e._rgba||{},e._rgba.q=e._rgba.q||[],e.ringba=r({baseUrl:"//display.ringba.com",queue:e._rgba.q}),e._rgba.q.pushBase=e._rgba.q.push,e._rgba.q.push=function(t){e._rgba.q.pushBase(t),e.ringba.processOutstandingRequests(e._rgba.q)},e._rgba_tags=e._rgba_tags||[],e._rgba_tags.push=function(t){e.ringba.addTags([t])},e._rgba_tags.length&&e.ringba.addTags(e._rgba_tags))}(window),function(e,t){function n(e,t,n,r){if("string"!=typeof e)throw"Supplied jstag is not a string";if(!e||0==e.length)throw"jstag cannot be empty";if("string"!=typeof t)throw"Supplied numberInternational is not a string";if(!t||0==t.length)throw"numberInternational cannot be empty";if("+"!=t.charAt(0))throw"numberInternational must start from '+'";if("string"!=typeof n)throw"Supplied numberLocal is not a string";if(!n||0==n.length)throw"numberLocal cannot be empty";this.jstag=e,this.numberInternational=t,this.numberLocal=n,this.formatLeftToRight=void 0===r||!!r}function r(t){if(e.ringba&&e.ringba.replacer&&t&&t.length){var r=[];t.forEach(function(e){r.push(new n(e.tagId,e.number,e.numberLocal||e.number,(!!e.numberLocal)))}),e.ringba.replacer.SetNumberInfoAndFollowup(r)}}function a(t){if(t&&t.length){var n=[];t.forEach(function(e){n.push({tag:e,render:!1})}),e.ringba.processOutstandingRequests(n)}}function i(){if(e.ringba&&e.ringba_known_numbers&&e.ringba_known_numbers.length&&"undefined"==typeof e.ringba.replacer){var n=e.ringba.replacer=o(e.ringba_known_numbers);e.ringba.setBulkNumbersCallback(r),n.SetNewTagCallback(a),n.InitialPass(t.body),n.SetupObserver(t.body)}}var o=function(r){function a(e){for(var t,n=/(?:(?:[_\.\(\)\+\-~\*•–‑\t \v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]|(?: ))*\d+)+/g,r=[];null!=(t=n.exec(e));){var a=t[0],o=i(a,!1),u=a.replace(/\d/g,"n"),s=x[o];null!=s&&r.push({number:s.number,str:a,digits:o,format:u,isInternational:s.isInternational})}return r}function i(e,t){return e&&e.replace?t?e.replace(/[^\d+]/g,""):e.replace(/[^\d]/g,""):e}function o(e,t,n){for(var r=n?0:t.length-1,a=t.length,i=e.lastIndexOf("n"),o="",u=0;u<e.length;u++){var s=n?u:e.length-u-1,l=e.charAt(s);"n"==l&&(a>0?(l=t[r],r+=n?1:-1,a--,u==i&&n&&a>0&&(l+=t.slice(-a))):l=" "),o=n?o+l:l+o}return o}function u(e){var t={replacement:null,foundMatch:!1,missingReplacements:!1,missingNumbers:null};if(!e)return t;var n=a(e);return n.forEach(function(n){var r=s(t.replacement||e,n);r?t.replacement=r:(t.missingReplacements=!0,(t.missingNumbers=t.missingNumbers||[]).push(n))}),t.foundMatch=n.length>0,t}function s(e,t){var n=t.isInternational,r=n?t.number.replaceWithInt:t.number.replaceWithLoc,a=null;return r&&(r=r.replace("+",""),r=o(t.format,r,t.number.replaceLeftToRight),a=e.replace(t.str,r)),a}function l(){return{Text_Data:{get:function(e){return e&&e.data},set:function(e,t){e&&e.data!=t&&(e.data=t)}},IMG_Alt:{get:function(e){return e&&e.alt},set:function(e,t){e&&e.alt!=t&&(e.alt=t)}},Anchor_HRef:{get:function(e){return e&&e.href},set:function(e,t){e&&e.href!=t&&(e.href=t)}}}}function c(e,t){var n=t.get(e),r=u(n);return r.replacement&&t.set(e,r.replacement),r.missingNumbers}function f(e,t,n){this.node=e,this.actionsGetSet=t,this.missingNumbers=n}function h(e,t){var n=c(e,t);return n&&n.length>0?new f(e,t,n):null}function p(e){var t=[],n=null;if(e){var r=e.nodeType;if(8==r)return t;if(3==r)n=h(e,O.Text_Data);else if(1==r&&!(e.className&&e.className.toString().indexOf("rb-ignore-number")>=0)){"IMG"==e.tagName?n=h(e,O.IMG_Alt):"A"==e.tagName&&(n=h(e,O.Anchor_HRef));var a=e.childNodes;if(a)for(var i=a.length;i--;i>=0){var o=a[i],u=p(o);u.forEach(function(e){t.push(e)})}}return n&&t.push(n),t}}function g(e){var t=[];return e?(e.forEach(function(e){var n=h(e.node,e.actionsGetSet);n&&t.push(n)}),t):t}function m(e){var t={},n=[];return e.forEach(function(e){e.missingNumbers.forEach(function(e){var r=e.number.jstag;t[r]||(t[r]=!0,n.push(e.number.jstag))})}),n}function d(e){return D=p(e||t.body),T(D)}function b(){return D=g(D),T(D)}function v(e){y(e),b()}function y(e){e.forEach(function(e){N(e)})}function N(e){if(!(e instanceof n))throw"'numberInfo' should be an instance of 'JSTagNumberInfo'";var t=_[e.jstag];if(!t)throw"Unknown jstag";t.replaceWithInt=i(e.numberInternational,!0),t.replaceWithLoc=i(e.numberLocal),t.replaceLeftToRight=e.formatLeftToRight}function T(e){if(!e)return null;var t=m(e);return w(t),t}function w(e){e&&e.forEach(function(e){I(e)}),S()}function I(e){var t=_[e];t&&(t.infoRequested||(t.infoRequested=!0,M.push(e)))}function S(){M.length>0&&R&&(R(M),M=[])}function E(e){if(null!=e&&"function"!=typeof e)throw"'cbFunction' should be a function";R=e,S()}var L=[];r&&r.length&&r.forEach(function(e){L.push({"int":i(e["int"],!0),loc:i(e.loc),jstag:e.jstag,replaceWithInt:i(e.replaceWithInt,!0),replaceWithLoc:i(e.replaceWithLoc),replaceLeftToRight:e.replaceLeftToRight})});var x={},_={},D=null,R=null,M=[];L.forEach(function(e){x[e["int"].replace("+","")]={number:e,isInternational:!0},x[e.loc]={number:e,isInternational:!1},_[e.jstag]=e});var O=l(),q=function(){var t=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver,n=e.addEventListener;return function(e,r){var a=!1,i=function(){a||(a=!0,setTimeout(function(){a=!1,r()},0))};if(t){var o=new t(function(e,t){(e[0].addedNodes.length||e[0].removedNodes.length||e[0].target)&&i()});o.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}else n&&(e.addEventListener("DOMNodeInserted",i,!1),e.addEventListener("DOMNodeRemoved",i,!1),e.addEventListener("DOMCharacterDataModified",i,!1),e.addEventListener("DOMAttrModified",i,!1))}}();return{InitialPass:d,FollowUp:b,SetNumberInfoAndFollowup:v,SetNewTagCallback:E,SetupObserver:function(e){q(e||t.body,function(){d()})}}};e.ringba&&(e.ringba.SetupNumberReplacement=i),t&&t.body?i():t.addEventListener("DOMContentLoaded",i)}(window,document);})(window);