var SN=SN||{};SN.loaded=SN.loaded||0;SN.init||function(n){function h(){for(var n=!1,t=f.length;t--;){try{n=f[t]()}catch(i){continue}break}return n}function c(t,i,r){if(!n.apiKey)throw"No apiKey!";var u=h();u.open("POST",t,!0);u.setRequestHeader("Content-Type","application/json; charset=utf-8");u.onreadystatechange=function(){u.readyState>3&&r&&r(u.responseText)};u.send(JSON.stringify(i))}function e(t,i){return function(r){for(var u=r.target,e,f;u&&(typeof u.tagName=="undefined"||u.tagName.toLowerCase()!="a");)u=u.parentNode;u?(e=u.href,f=function(){u.href=e;window.removeEventListener("focus",f)},u.href=n.track+"/"+n.apiKey+"?redirectUrl="+t+"&pageUrl="+window.location.href+"&linkText="+encodeURI(r.target.innerText).replace("#","%23")+"&type="+i,window.addEventListener("focus",f)):console.log("CNT: Could not find a modifiable target for link click!")}}function o(n){return n.toLowerCase().replace(/^(http|https):\/\//,"")}function a(){for(var u=i.length,n,t;u--;)for(n=i[u],t=(r[n.name]=n).keywords.length,n.canonicalUrl=o(n.url);t--;)r[n.keywords[t]]=n}function s(n){for(var r=(n||document.body).childNodes,f=r.length,i;f--;)i=r[f],i.nodeType!==1||l[i.nodeName]?i.nodeType===3&&t.replace(i.data,u,i):s(i)}function v(){for(var n=document.links,t=n.length,r;t--;)for(r=i.length;r--;)o(n[t].href).indexOf(i[r].canonicalUrl)===0&&(n[t].addEventListener("mouseup",e(n[t].href,1)),n[t].addEventListener("touchend",e(n[t].href,1)))}function y(){for(var t=document.links,i=t.length,r={},n=document.createElement("a");i--;)n.href=t[i].href,r[n.protocol+"//"+n.hostname]=1;return Object.keys(r)}var t,f;n.init=function(){var t=document.createElement("a"),u=document.querySelectorAll("[id=sbnts]"),i=u[u.length-1],f=i.getAttribute("data-v"),r;return n.apiKey=f==="2"&&i.getAttribute("data-api-key")||n.apiKey,t.href=f==="2"?i.src:n.ping,r=t.protocol+"//"+t.hostname+":"+t.port,n.track=r+"/t-click",n.ping=r+"/script/ping",!0};Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){var i=this.length>>>0;if(t|=0,t<0)t=Math.max(i-t,0);else if(t>=i)return-1;if(n===undefined){do if(t in this&&this[t]===undefined)return t;while(++t!==i)}else do if(this[t]===n)return t;while(++t!==i);return-1});Object.keys||(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,i=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(u){if(typeof u!="object"&&typeof u!="function")throw new TypeError("Object.keys called on non-object");var e=[],o,f;for(o in u)t.call(u,o)&&e.push(o);if(i)for(f=0;f<r;f++)t.call(u,n[f])&&e.push(n[f]);return e}}());t={},function(t){function i(n,t,i){this.suffixes={};this.fall=null;this.char=n||null;this.value=i||"";this.parent=t||null;this.data=null}function r(n,t){this.value=n;this.next=t}i.prototype.add=function(n,t){var r=this,f="",u,e,o;if(n&&t){for(u=n.charAt(0),f+=u,r=r.suffixes[u]||(r.suffixes[u]=new i(u,r,f)),e=1,o=n.length;e<o;e++)u=n.charAt(e),f+=u,r=r.suffixes[u]||(r.suffixes[u]=new i(u,r,f));(r.data||(r.data=[])).push(t)}};i.prototype.find=function(n){for(var t=this,i=0,r=n&&n.length||0;i<r&&t;)t=t.suffixes[n.charAt(i++)];return t&&t.data&&i===r?t:null};t.Trie=i;t.isKeywordSeparator=function(){var n={" ":1,"'":1,'"':1,",":1,".":1,";":1,":":1,"?":1,"!":1,"/":1,"\\":1,"|":1,"<":1,">":1,"[":1,"]":1,"{":1,"}":1,"(":1,")":1,"+":1,"-":1,_:1,"*":1,$:1,"@":1,"#":1,"%":1};return n[String.fromCharCode(9)]=1,n[String.fromCharCode(10)]=1,function(t){return n[t]||!t}}();t.generateFalls=function(n,t){var f=new r(n,null),o=f,i,e,u;for(n.fall=n;f;){i=f.value;for(e in i.suffixes)i.suffixes.hasOwnProperty(e)&&(o=o.next=new r(i.suffixes[e],null));if(f=f.next,i.char){for(u=i.parent.fall;!u.suffixes[i.char]&&u.char;)u=u.fall;u=u.suffixes[i.char];i.fall=u&&u!==i?u:n;t(i)}}};t.replace=function(i,r,u){for(var p,w,s=r,h="",f="",k=!1,o,c,a,v,y,l=0,nt=i.length;l<nt;l++){for(c=i.charAt(l),a=s,a.data&&(s=r);!s.suffixes[c]&&s.char;)s=s.fall;for(o=s=s.suffixes[c]||r,o===r?(h+=f,f=""):(v="",y="",a.data||(v=f.slice(0,f.length-o.parent.value.length),y=o.parent.value),h+=v,f=y),o.parent===r||f.length!==0?f+=c:h+=c;o.char;)o.data&&(t.isKeywordSeparator(i[l-o.value.length])&&t.isKeywordSeparator(i[l+1])&&(p=o.data[0],w="SN.linkCache.executeLink(event,"+n.linkCache.addLink(e(p.url,2))+")",h+='<a href="'+p.url+'" onmouseup="'+w+'" ontouchend="'+w+'">'+f+"<\/a>",f="",k=!0),h+=f,f=""),o=o.fall}if(k){h+=f;var d=u.parentNode,b=document.createElement("div"),g=document.createDocumentFragment();for(b.innerHTML=h;b.firstChild;)g.appendChild(b.firstChild);d.insertBefore(g,u);d.removeChild(u)}}}(t);f=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.6.0")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];var i=[],r={},l={HTML:1,HEAD:1,STYLE:1,TITLE:1,LINK:1,META:1,SCRIPT:1,NOSCRIPT:1,OBJECT:1,IFRAME:1,BUTTON:1,SELECT:1},u=null;n.linkCache=function(){var n=0,t={};return{addLink:function(i){return t[n]=i,n++},executeLink:function(n,i){return t[i](n)}}}();n.run=function(){c(n.ping,{sid:n.apiKey,domains:y(),pageUrl:window.location.href},function(n){var e=JSON.parse(n),f,o;if(i=e.merchants||[],a(),e.transcriptLink&&v(),e.transcriptReference){u=new t.Trie;f=Object.keys(r);for(o in f)u.add(f[o],r[f[o]]);t.generateFalls(u,function(n){n.fall.data&&(n.fall.data=null);n.data&&Object.keys(n.suffixes).length!==0&&(n.data=null)});s()}})}}(SN);!SN.loaded++&&SN.init()&&(document.readyState==="complete"||document.readyState==="loaded"||document.readyState==="interactive"?SN.run():window.addEventListener("DOMContentLoaded",SN.run));