var EurekaKingPiwikScripts=function(){typeof JSON2!="object"&&(JSON2=window.JSON||{}),function(){function d(e){return e<10?"0"+e:e}function l(e,t){var n=Object.prototype.toString.apply(e);return n==="[object Date]"?isFinite(e.valueOf())?e.getUTCFullYear()+"-"+d(e.getUTCMonth()+1)+"-"+d(e.getUTCDate())+"T"+d(e.getUTCHours())+":"+d(e.getUTCMinutes())+":"+d(e.getUTCSeconds())+"Z":null:n==="[object String]"||n==="[object Number]"||n==="[object Boolean]"?e.valueOf():n!=="[object Array]"&&typeof e.toJSON=="function"?e.toJSON(t):e}function a(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,function(e){var t=k[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function g(e,t){var n,r,i,s,o=j,u,f=t[e];f&&typeof f=="object"&&(f=l(f,e)),typeof h=="function"&&(f=h.call(t,e,f));switch(typeof f){case"string":return a(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";j+=b,u=[];if(Object.prototype.toString.apply(f)==="[object Array]"){s=f.length;for(n=0;n<s;n+=1)u[n]=g(n,f)||"null";return i=u.length===0?"[]":j?"[\n"+j+u.join(",\n"+j)+"\n"+o+"]":"["+u.join(",")+"]",j=o,i}if(h&&typeof h=="object"){s=h.length;for(n=0;n<s;n+=1)typeof h[n]=="string"&&(r=h[n],i=g(r,f),i&&u.push(a(r)+(j?": ":":")+i))}else for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(i=g(r,f),i&&u.push(a(r)+(j?": ":":")+i));return i=u.length===0?"{}":j?"{\n"+j+u.join(",\n"+j)+"\n"+o+"}":"{"+u.join(",")+"}",j=o,i}}var c=new RegExp("[\0\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),e='\\\\\\"\0--\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',i=new RegExp("["+e,"g"),j,b,k={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;typeof JSON2.stringify!="function"&&(JSON2.stringify=function(e,t,n){var r;j="",b="";if(typeof n=="number")for(r=0;r<n;r+=1)b+=" ";else typeof n=="string"&&(b=n);h=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return g("",{"":e});throw new Error("JSON2.stringify")}),typeof JSON2.parse!="function"&&(JSON2.parse=function(o,f){function m(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=m(i,n),r!==undefined?i[n]=r:delete i[n]);return f.call(e,t,i)}var n;o=String(o),c.lastIndex=0,c.test(o)&&(o=o.replace(c,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if((new RegExp("^[\\],:{}\\s]*$")).test(o.replace(new RegExp('\\\\(?:["\\\\/bfnrt]|u[0-9a-fA-F]{4})',"g"),"@").replace(new RegExp('"[^"\\\\\n\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?',"g"),"]").replace(new RegExp("(?:^|:|,)(?:\\s*\\[)+","g"),"")))return n=eval("("+o+")"),typeof f=="function"?m({"":n},""):n;throw new SyntaxError("JSON2.parse")})}(),typeof _paq!="object"&&(_paq=[]),typeof Piwik!="object"&&(Piwik=function(){function v(e){var t=typeof e;return t!=="undefined"}function m(e){return typeof e=="function"}function g(e){return typeof e=="object"}function y(e){return typeof e=="string"||e instanceof String}function b(){var e,t,n;for(e=0;e<arguments.length;e+=1)n=arguments[e],t=n.shift(),y(t)?h[t].apply(h,n):t.apply(h,n)}function w(e,t,n,r){if(e.addEventListener)return e.addEventListener(t,n,r),!0;if(e.attachEvent)return e.attachEvent("on"+t,n);e["on"+t]=n}function E(e,n){var r="",i,s;for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(s=t[i][e],m(s)&&(r+=s(n)));return r}function S(){var t;E("unload");if(e)do t=new Date;while(t.getTimeAlias()<e)}function x(){var e;if(!u){u=!0,E("load");for(e=0;e<a.length;e++)a[e]()}return!0}function T(){var e;n.addEventListener?w(n,"DOMContentLoaded",function t(){n.removeEventListener("DOMContentLoaded",t,!1),x()}):n.attachEvent&&(n.attachEvent("onreadystatechange",function i(){n.readyState==="complete"&&(n.detachEvent("onreadystatechange",i),x())}),n.documentElement.doScroll&&s===s.top&&function o(){if(!u){try{n.documentElement.doScroll("left")}catch(e){setTimeout(o,0);return}x()}}()),(new RegExp("WebKit")).test(r.userAgent)&&(e=setInterval(function(){if(u||/loaded|complete/.test(n.readyState))clearInterval(e),x()},10)),w(s,"load",x,!1)}function N(e,t){var r=n.createElement("script");r.type="text/javascript",r.src=e,r.readyState?r.onreadystatechange=function(){var e=this.readyState;if(e==="loaded"||e==="complete")r.onreadystatechange=null,t()}:r.onload=t,n.getElementsByTagName("head")[0].appendChild(r)}function C(){var e="";try{e=s.top.document.referrer}catch(t){if(s.parent)try{e=s.parent.document.referrer}catch(r){e=""}}return e===""&&(e=n.referrer),e}function k(e){var t=new RegExp("^([a-z]+):"),n=t.exec(e);return n?n[1]:null}function L(e){var t=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),n=t.exec(e);return n?n[1]:e}function A(e,t){var n="[\\?&#]"+t+"=([^&#]*)",r=new RegExp(n),i=r.exec(e);return i?l(i[1]):""}function O(e){return unescape(f(e))}function M(e){var t=function(e,t){return e<<t|e>>>32-t},n=function(e){var t="",n,r;for(n=7;n>=0;n--)r=e>>>n*4&15,t+=r.toString(16);return t},r,i,s,o=[],u=1732584193,a=4023233417,f=2562383102,l=271733878,c=3285377520,h,p,d,v,m,g,y,b=[];e=O(e),y=e.length;for(i=0;i<y-3;i+=4)s=e.charCodeAt(i)<<24|e.charCodeAt(i+1)<<16|e.charCodeAt(i+2)<<8|e.charCodeAt(i+3),b.push(s);switch(y&3){case 0:i=2147483648;break;case 1:i=e.charCodeAt(y-1)<<24|8388608;break;case 2:i=e.charCodeAt(y-2)<<24|e.charCodeAt(y-1)<<16|32768;break;case 3:i=e.charCodeAt(y-3)<<24|e.charCodeAt(y-2)<<16|e.charCodeAt(y-1)<<8|128}b.push(i);while((b.length&15)!==14)b.push(0);b.push(y>>>29),b.push(y<<3&4294967295);for(r=0;r<b.length;r+=16){for(i=0;i<16;i++)o[i]=b[r+i];for(i=16;i<=79;i++)o[i]=t(o[i-3]^o[i-8]^o[i-14]^o[i-16],1);h=u,p=a,d=f,v=l,m=c;for(i=0;i<=19;i++)g=t(h,5)+(p&d|~p&v)+m+o[i]+1518500249&4294967295,m=v,v=d,d=t(p,30),p=h,h=g;for(i=20;i<=39;i++)g=t(h,5)+(p^d^v)+m+o[i]+1859775393&4294967295,m=v,v=d,d=t(p,30),p=h,h=g;for(i=40;i<=59;i++)g=t(h,5)+(p&d|p&v|d&v)+m+o[i]+2400959708&4294967295,m=v,v=d,d=t(p,30),p=h,h=g;for(i=60;i<=79;i++)g=t(h,5)+(p^d^v)+m+o[i]+3395469782&4294967295,m=v,v=d,d=t(p,30),p=h,h=g;u=u+h&4294967295,a=a+p&4294967295,f=f+d&4294967295,l=l+v&4294967295,c=c+m&4294967295}return g=n(u)+n(a)+n(f)+n(l)+n(c),g.toLowerCase()}function _(e,t,r){if(e==="translate.googleusercontent.com")r===""&&(r=t),t=A(t,"u"),e=L(t);else if(e==="cc.bingj.com"||e==="webcache.googleusercontent.com"||e.slice(0,5)==="74.6.")t=n.links[0].href,e=L(t);return[e,t,r]}function D(e){var t=e.length;return e.charAt(--t)==="."&&(e=e.slice(0,t)),e.slice(0,2)==="*."&&(e=e.slice(1)),e}function P(e){e=e&&e.text?e.text:e;if(!y(e)){var t=n.getElementsByTagName("title");t&&v(t[0])&&(e=t[0].text)}return e}function H(e){return e?!v(e.children)&&v(e.childNodes)?e.children:v(e.children)?e.children:[]:[]}function B(e,t){return!e||!t?!1:e.contains?e.contains(t):e===t?!0:e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1}function j(e,t){if(e&&e.indexOf)return e.indexOf(t);if(!v(e)||e===null)return-1;if(!e.length)return-1;var n=e.length;if(n===0)return-1;var r=0;while(r<n){if(e[r]===t)return r;r++}return-1}function F(e){function t(e,t){if(s.getComputedStyle)return n.defaultView.getComputedStyle(e,null)[t];if(e.currentStyle)return e.currentStyle[t]}function r(e){e=e.parentNode;while(e){if(e===n)return!0;e=e.parentNode}return!1}function i(n,s,o,u,a,f,l){var c=n.parentNode,h=1;if(!r(n))return!1;if(9===c.nodeType)return!0;if("0"===t(n,"opacity")||"none"===t(n,"display")||"hidden"===t(n,"visibility"))return!1;if(!v(s)||!v(o)||!v(u)||!v(a)||!v(f)||!v(l))s=n.offsetTop,a=n.offsetLeft,u=s+n.offsetHeight,o=a+n.offsetWidth,f=n.offsetWidth,l=n.offsetHeight;if(e!==n||0!==l&&0!==f||"hidden"!==t(n,"overflow")){if(c){if("hidden"===t(c,"overflow")||"scroll"===t(c,"overflow"))if(a+h>c.offsetWidth+c.scrollLeft||a+f-h<c.scrollLeft||s+h>c.offsetHeight+c.scrollTop||s+l-h<c.scrollTop)return!1;return n.offsetParent===c&&(a+=c.offsetLeft,s+=c.offsetTop),i(c,s,o,u,a,f,l)}return!0}return!1}return e?i(e):!1}function R(e,t){return t?t:(e.slice(-9)==="piwik.php"&&(e=e.slice(0,e.length-9)),e)}function U(e){var t="Piwik_Overlay",r=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)$"),i=r.exec(n.referrer);if(i){var o=i[1];if(o!==String(e))return!1;var u=i[2],a=i[3];s.name=t+"###"+u+"###"+a}var f=s.name.split("###");return f.length===3&&f[0]===t}function z(e,t,n){var r=s.name.split("###"),i=r[1],o=r[2],u=R(e,t);N(u+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(u,n,i,o)})}function W(c,h){function Vt(e,t,r,i,s,o){if(gt)return;var u;r&&(u=new Date,u.setTime(u.getTime()+r)),n.cookie=e+"="+f(t)+(r?";expires="+u.toGMTString():"")+";path="+(i||"/")+(s?";domain="+s:"")+(o?";secure":"")}function $t(e){if(gt)return 0;var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)"),r=t.exec(n.cookie);return r?l(r[2]):0}function Jt(e){var t;return lt?(t=new RegExp("#.*"),e.replace(t,"")):e}function Kt(e,t){var n=k(t),r;return n?t:t.slice(0,1)==="/"?k(e)+"://"+L(e)+t:(e=Jt(e),r=e.indexOf("?"),r>=0&&(e=e.slice(0,r)),r=e.lastIndexOf("/"),r!==e.length-1&&(e=e.slice(0,r+1)),e+t)}function Qt(e){var t,n,r;for(t=0;t<nt.length;t++){n=D(nt[t].toLowerCase());if(e===n)return!0;if(n.slice(0,1)==="."){if(e===n.slice(1))return!0;r=e.length-n.length;if(r>0&&e.slice(r)===n)return!0}}return!1}function Gt(e,t){var n=new Image(1,1);n.onload=function(){p=0,typeof t=="function"&&t()},n.src=R+(R.indexOf("?")<0?"?":"&")+e}function Yt(e,t,n){if(!v(n)||null===n)n=!0;try{var r=s.XMLHttpRequest?new s.XMLHttpRequest:s.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;r.open("POST",R,!0),r.onreadystatechange=function(){this.readyState!==4||this.status>=200&&this.status<300||!n?typeof t=="function"&&t():Gt(e,t)},r.setRequestHeader("Content-Type",F),r.send(e)}catch(i){n&&Gt(e,t)}}function Zt(t){var n=new Date,r=n.getTime()+t;if(!e||r>e)e=r}function en(e){if(Rt||!at)return;Rt=setTimeout(function(){Rt=null;if(ft())return;var t=new Date,n=at-(t.getTime()-qt);n=Math.min(at,n),en(n)},e||at)}function tn(){if(!Rt)return;clearTimeout(Rt),Rt=null}function nn(){if(ft())return;en()}function rn(){tn()}function sn(){if(It||!at)return;It=!0,w(s,"focus",nn),w(s,"blur",rn),en()}function on(e){var t=new Date,n=t.getTime();qt=n;if(Bt&&n<Bt){var r=Bt-n;setTimeout(e,r),Zt(r+50),Bt+=50;return}if(Bt===!1){var i=800;Bt=n+i}e()}function un(e,t,n){!yt&&e&&on(function(){O==="POST"?Yt(e,n):Gt(e,n),Zt(t)}),It?en():sn()}function an(e){return yt?!1:e&&e.length}function fn(e,t){if(!an(e))return;var n='{"requests":["?'+e.join('","?')+'"]}';on(function(){Yt(n,null,!1),Zt(t)})}function ln(e){return dt+e+"."+V+"."+Xt}function cn(){if(gt)return"0";if(!v(r.cookieEnabled)){var e=ln("testcookie");return Vt(e,"1"),$t(e)==="1"?"1":"0"}return r.cookieEnabled?"1":"0"}function hn(){Xt=Wt((vt||b)+(mt||"/")).slice(0,4)}function pn(){var e=ln("cvar"),t=$t(e);if(t.length){t=JSON2.parse(t);if(g(t))return t}return{}}function dn(){kt===!1&&(kt=pn())}function vn(){return Wt((r.userAgent||"")+(r.platform||"")+JSON2.stringify(Dt)+(new Date).getTime()+Math.random()).slice(0,16)}function mn(){var e=new Date,t=Math.round(e.getTime()/1e3),n=ln("id"),r=$t(n),i,s;return r?(i=r.split("."),i.unshift("0"),Y.length&&(i[1]=Y),i):(Y.length?s=Y:"0"===cn()?s="":s=vn(),i=["1",s,t,0,t,"",""],i)}function gn(){var e=mn(),t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],o=e[5];v(e[6])||(e[6]="");var u=e[6];return{newVisitor:t,uuid:n,createTs:r,visitCount:i,currentVisitTs:s,lastVisitTs:o,lastEcommerceOrderTs:u}}function yn(){var e=new Date,t=e.getTime(),n=gn().createTs,r=parseInt(n,10),i=r*1e3+Et-t;return i}function bn(e){if(!V)return;var t=new Date,n=Math.round(t.getTime()/1e3);v(e)||(e=gn());var r=e.uuid+"."+e.createTs+"."+e.visitCount+"."+n+"."+e.lastVisitTs+"."+e.lastEcommerceOrderTs;Vt(ln("id"),r,yn(),mt,vt)}function wn(){var e=$t(ln("ref"));if(e.length)try{e=JSON2.parse(e);if(g(e))return e}catch(t){}return["","",0,""]}function En(e,t,n){Vt(e,"",-86400,t,n)}function Sn(e){var t="testvalue";return Vt("test",t,1e4,null,e),$t("test")===t?(En("test",null,e),!0):!1}function xn(){var e=gt;gt=!1;var t=["id","ses","cvar","ref"],n,r;for(n=0;n<t.length;n++)r=ln(t[n]),0!==$t(r)&&En(r,mt,vt);gt=e}function Tn(e){V=e,bn()}function Nn(e){if(!e||!g(e))return;var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);var r={};t.sort();var i=t.length,s;for(s=0;s<i;s++)r[t[s]]=e[t[s]];return r}function Cn(){Vt(ln("ses"),"*",St,mt,vt)}function kn(e,t,r,i){function P(e,t){var n=JSON2.stringify(e);return n.length>2?"&"+t+"="+f(n):""}var s,u=new Date,a=Math.round(u.getTime()/1e3),l,c,h=1024,p,d,g=kt,y=ln("ses"),b=ln("ref"),w=ln("cvar"),T=$t(y),N=wn(),C=Z||S,k,O;gt&&xn();if(yt)return"";var M=gn();v(i)||(i="");var _=n.characterSet||n.charset;if(!_||_.toLowerCase()==="utf-8")_=null;k=N[0],O=N[1],l=N[2],c=N[3];if(!T){var D=St/1e3;if(!M.lastVisitTs||a-M.lastVisitTs>D)M.visitCount++,M.lastVisitTs=M.currentVisitTs;if(!wt||!k.length){for(s in ht)if(Object.prototype.hasOwnProperty.call(ht,s)){k=A(C,ht[s]);if(k.length)break}for(s in pt)if(Object.prototype.hasOwnProperty.call(pt,s)){O=A(C,pt[s]);if(O.length)break}}p=L(x),d=c.length?L(c):"",p.length&&!Qt(p)&&(!wt||!d.length||Qt(d))&&(c=x);if(c.length||k.length)l=a,N=[k,O,l,Jt(c.slice(0,h))],Vt(b,JSON2.stringify(N),xt,mt,vt)}e+="&idsite="+V+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+u.getHours()+"&m="+u.getMinutes()+"&s="+u.getSeconds()+"&url="+f(Jt(C))+(x.length?"&urlref="+f(Jt(x)):"")+($&&$.length?"&uid="+f($):"")+"&_id="+M.uuid+"&_idts="+M.createTs+"&_idvc="+M.visitCount+"&_idn="+M.newVisitor+(k.length?"&_rcn="+f(k):"")+(O.length?"&_rck="+f(O):"")+"&_refts="+l+"&_viewts="+M.lastVisitTs+(String(M.lastEcommerceOrderTs).length?"&_ects="+M.lastEcommerceOrderTs:"")+(String(c).length?"&_ref="+f(Jt(c.slice(0,h))):"")+(_?"&cs="+f(_):"")+"&send_image=0";for(s in Dt)Object.prototype.hasOwnProperty.call(Dt,s)&&(e+="&"+s+"="+Dt[s]);t?e+="&data="+f(JSON2.stringify(t)):ct&&(e+="&data="+f(JSON2.stringify(ct)));var H=Nn(At),B=Nn(Ot);e+=P(H,"cvar"),e+=P(B,"e_cvar");if(kt){e+=P(kt,"_cvar");for(s in g)Object.prototype.hasOwnProperty.call(g,s)&&(kt[s][0]===""||kt[s][1]==="")&&delete kt[s];Ct&&Vt(w,JSON2.stringify(kt),St,mt,vt)}return Tt&&(Nt?e+="&gt_ms="+Nt:o&&o.timing&&o.timing.requestStart&&o.timing.responseEnd&&(e+="&gt_ms="+(o.timing.responseEnd-o.timing.requestStart))),M.lastEcommerceOrderTs=v(i)&&String(i).length?i:M.lastEcommerceOrderTs,bn(M),Cn(),e+=E(r),X.length&&(e+="&"+X),m(Lt)&&(e=Lt(e)),e}function Ln(e,t,n,r,i,s){var o="idgoal=0",u,a=new Date,l=[],c;String(e).length&&(o+="&ec_id="+f(e),u=Math.round(a.getTime()/1e3)),o+="&revenue="+t,String(n).length&&(o+="&ec_st="+n),String(r).length&&(o+="&ec_tx="+r),String(i).length&&(o+="&ec_sh="+i),String(s).length&&(o+="&ec_dt="+s);if(_t){for(c in _t)if(Object.prototype.hasOwnProperty.call(_t,c)){v(_t[c][1])||(_t[c][1]=""),v(_t[c][2])||(_t[c][2]="");if(!v(_t[c][3])||String(_t[c][3]).length===0)_t[c][3]=0;if(!v(_t[c][4])||String(_t[c][4]).length===0)_t[c][4]=1;l.push(_t[c])}o+="&ec_items="+f(JSON2.stringify(l))}o=kn(o,ct,"ecommerce",u),un(o,ot)}function An(e,t,n,r,i,s){String(e).length&&v(t)&&Ln(e,t,n,r,i,s)}function On(e){v(e)&&Ln("",e,"","","","")}function Mn(e,t){var n=new Date,r=kn("action_name="+f(P(e||et)),t,"log");un(r,ot)}function _n(e,t){var n,r="(^| )(piwik[_-]"+t;if(e)for(n=0;n<e.length;n++)r+="|"+e[n];return r+=")( |$)",new RegExp(r)}function Dn(e){return R&&e&&0===String(e).indexOf(R)}function Pn(e,t,n,r){if(Dn(t))return 0;var i=_n(it,"download"),s=_n(st,"link"),o=new RegExp("\\.("+tt.join("|")+")([?&#]|$)","i");return s.test(e)?"link":r||i.test(e)||o.test(t)?"download":n?0:"link"}function Hn(e){var t;t=e.parentNode;while(t!==null&&v(t)){if(I.isLinkElement(e))break;e=t,t=e.parentNode}return e}function Bn(e){e=Hn(e);if(!I.hasNodeAttribute(e,"href"))return;if(!v(e.href))return;var t=I.getAttributeValueFromNode(e,"href");if(Dn(t))return;var n=e.hostname||L(e.href),r=n.toLowerCase(),i=e.href.replace(n,r),s=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):","i");if(!s.test(i)){var o=Pn(e.className,i,Qt(r),I.hasNodeAttribute(e,"download"));if(o)return{type:o,href:i}}}function jn(e,t,n,r){var i=q.buildInteractionRequestParams(e,t,n,r);if(!i)return;return kn(i,null,"contentInteraction")}function Fn(e,t,n,r,i){if(!v(e))return;if(Dn(e))return e;var s=q.toAbsoluteUrl(e),o="redirecturl="+f(s)+"&";o+=jn(t,n,r,i||e);var u="&";return R.indexOf("?")<0&&(u="?"),R+u+o}function In(e,t){if(!e||!t)return!1;var n=q.findTargetNode(e);return q.shouldIgnoreInteraction(n)?!1:(n=q.findTargetNodeNoDefault(e),n&&!B(n,t)?!1:!0)}function qn(e,t,n){if(!e)return;var r=q.findParentContentNode(e);if(!r)return;if(!In(r,e))return;var i=q.buildContentBlock(r);if(!i)return;return!i.target&&n&&(i.target=n),q.buildInteractionRequestParams(t,i.name,i.piece,i.target)}function Rn(e){if(!Pt||!Pt.length)return!1;var t,n;for(t=0;t<Pt.length;t++){n=Pt[t];if(n&&n.name===e.name&&n.piece===e.piece&&n.target===e.target)return!0}return!1}function Un(e){if(!e)return!1;var t=q.findTargetNode(e);if(!t||q.shouldIgnoreInteraction(t))return!1;var n=Bn(t);if(Ft&&n&&n.type)return!1;if(I.isLinkElement(t)&&I.hasNodeAttributeWithValue(t,"href")){var r=String(I.getAttributeValueFromNode(t,"href"));if(0===r.indexOf("#"))return!1;if(Dn(r))return!0;if(!q.isUrlToCurrentDomain(r))return!1;var i=q.buildContentBlock(e);if(!i)return;var s=i.name,o=i.piece,u=i.target;if(!I.hasNodeAttributeWithValue(t,q.CONTENT_TARGET_ATTR)||t.wasContentTargetAttrReplaced)t.wasContentTargetAttrReplaced=!0,u=q.toAbsoluteUrl(r),I.setAnyAttribute(t,q.CONTENT_TARGET_ATTR,u);var a=Fn(r,"click",s,o,u);return q.setHrefAttribute(t,a),!0}return!1}function zn(e){if(!e||!e.length)return;var t;for(t=0;t<e.length;t++)Un(e[t])}function Wn(e){return function(t){if(!e)return;var n=q.findParentContentNode(e),r;t&&(r=t.target||t.srcElement),r||(r=e);if(!In(n,r))return;Zt(ot);if(I.isLinkElement(e)&&I.hasNodeAttributeWithValue(e,"href")&&I.hasNodeAttributeWithValue(e,q.CONTENT_TARGET_ATTR)){var i=I.getAttributeValueFromNode(e,"href");!Dn(i)&&e.wasContentTargetAttrReplaced&&I.setAnyAttribute(e,q.CONTENT_TARGET_ATTR,"")}var s=Bn(e);if(jt&&s&&s.type)return s.type;if(Un(n))return"href";var o=q.buildContentBlock(n);if(!o)return;var u=o.name,a=o.piece,f=o.target,l=jn("click",u,a,f);return un(l,ot),l}}function Xn(e){if(!e||!e.length)return;var t,n;for(t=0;t<e.length;t++)n=q.findTargetNode(e[t]),n&&!n.contentInteractionTrackingSetupDone&&(n.contentInteractionTrackingSetupDone=!0,w(n,"click",Wn(n)))}function Vn(e,t){if(!e||!e.length)return[];var n,r;for(n=0;n<e.length;n++)Rn(e[n])?(e.splice(n,1),n--):Pt.push(e[n]);if(!e||!e.length)return[];zn(t),Xn(t);var i=[];for(n=0;n<e.length;n++)r=kn(q.buildImpressionRequestParams(e[n].name,e[n].piece,e[n].target),undefined,"contentImpressions"),i.push(r);return i}function $n(e){var t=q.collectContent(e);return Vn(t,e)}function Jn(e){if(!e||!e.length)return[];var t;for(t=0;t<e.length;t++)q.isNodeVisible(e[t])||(e.splice(t,1),t--);return!e||!e.length?[]:$n(e)}function Kn(e,t,n){var r=q.buildImpressionRequestParams(e,t,n);return kn(r,null,"contentImpression")}function Qn(e,t){if(!e)return;var n=q.findParentContentNode(e),r=q.buildContentBlock(n);if(!r)return;return t||(t="Unknown"),jn(t,r.name,r.piece,r.target)}function Gn(e,t,n,r){return"e_c="+f(e)+"&e_a="+f(t)+(v(n)?"&e_n="+f(n):"")+(v(r)?"&e_v="+f(r):"")}function Yn(e,t,n,r,i){if(String(e).length===0||String(t).length===0)return!1;var s=kn(Gn(e,t,n,r),i,"event");un(s,ot)}function Zn(e,t,n,r){var i=kn("search="+f(e)+(t?"&search_cat="+f(t):"")+(v(n)?"&search_count="+n:""),r,"sitesearch");un(i,ot)}function er(e,t,n){var r=kn("idgoal="+e+(t?"&revenue="+t:""),n,"goal");un(r,ot)}function tr(e,t,n,r,i){var s=t+"="+f(Jt(e)),o=qn(i,"click",e);o&&(s+="&"+o);var u=kn(s,n,"link");un(u,r?0:ot,r)}function nr(e,t){return e!==""?e+t.charAt(0).toUpperCase()+t.slice(1):t}function rr(e){var t,r,i=["","webkit","ms","moz"],s;if(!bt)for(r=0;r<i.length;r++){s=i[r];if(Object.prototype.hasOwnProperty.call(n,nr(s,"hidden"))){n[nr(s,"visibilityState")]==="prerender"&&(t=!0);break}}if(t){w(n,s+"visibilitychange",function o(){n.removeEventListener(s+"visibilitychange",o,!1),e()});return}e()}function ir(e){n.readyState==="complete"?e():s.addEventListener?s.addEventListener("load",e):s.attachEvent&&s.attachEvent("onLoad",e)}function sr(e){var t=!1;n.attachEvent?t=n.readyState==="complete":t=n.readyState!=="loading",t?e():n.addEventListener?n.addEventListener("DOMContentLoaded",e):n.attachEvent&&n.attachEvent("onreadystatechange",e)}function or(e){var t=Bn(e);t&&t.type&&(t.href=l(t.href),tr(t.href,t.type,undefined,null,e))}function ur(){return n.all&&!n.addEventListener}function ar(e){var t=e.which,n=typeof e.button;return!t&&n!=="undefined"&&(ur()?e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2):e.button===0||e.button==="0"?t=1:e.button&1?t=2:e.button&2&&(t=3)),t}function fr(e){switch(ar(e)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function lr(e){return e.target||e.srcElement}function cr(e){return function(t){t=t||s.event;var n=fr(t),r=lr(t);if(t.type==="click"){var i=!1;e&&n==="middle"&&(i=!0),r&&!i&&or(r)}else t.type==="mousedown"?n==="middle"&&r?(Ut=n,zt=r):Ut=zt=null:t.type==="mouseup"?(n===Ut&&r===zt&&or(r),Ut=zt=null):t.type==="contextmenu"&&or(r)}}function hr(e,t){w(e,"click",cr(t),!1),t&&(w(e,"mouseup",cr(t),!1),w(e,"mousedown",cr(t),!1),w(e,"contextmenu",cr(t),!1))}function pr(e){if(!jt){jt=!0;var t,r=_n(rt,"ignore"),i=n.links;if(i)for(t=0;t<i.length;t++)r.test(i[t].className)||hr(i[t],e)}}function dr(e,t,r){function a(){i=!0}if(Ht)return!0;Ht=!0;var i=!1,o,u;ir(function(){function f(e){setTimeout(function(){if(!Ht)return;i=!1,r.trackVisibleContentImpressions(),f(e)},e)}function l(e){setTimeout(function(){if(!Ht)return;i&&(i=!1,r.trackVisibleContentImpressions()),l(e)},e)}if(e){o=["scroll","resize"];for(u=0;u<o.length;u++)n.addEventListener?n.addEventListener(o[u],a):s.attachEvent("on"+o[u],a);l(100)}t&&t>0&&(t=parseInt(t,10),f(t))})}function vr(){var e,t,n={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"},o=s.devicePixelRatio||1;if(!(new RegExp("MSIE")).test(r.userAgent)){if(r.mimeTypes&&r.mimeTypes.length)for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t=r.mimeTypes[n[e]],Dt[e]=t&&t.enabledPlugin?"1":"0");typeof navigator.javaEnabled!="unknown"&&v(r.javaEnabled)&&r.javaEnabled()&&(Dt.java="1"),m(s.GearsFactory)&&(Dt.gears="1"),Dt.cookie=cn()}Dt.res=i.width*o+"x"+i.height*o}var d=_(n.domain,s.location.href,C()),b=D(d[0]),S=l(d[1]),x=l(d[2]),T=!1,N="GET",O=N,H="application/x-www-form-urlencoded; charset=UTF-8",F=H,R=c||"",W="",X="",V=h||"",$="",Y="",Z,et=n.title,tt=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],nt=[b],rt=[],it=[],st=[],ot=500,ut,at,ft,lt,ct,ht=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],pt=["pk_kwd","piwik_kwd","utm_term"],dt="_pk_",vt,mt,gt=!1,yt,bt,wt,Et=339552e5,St=18e5,xt=15768e6,Tt=!0,Nt=0,Ct=!1,kt=!1,Lt,At={},Ot={},Mt=200,_t={},Dt={},Pt=[],Ht=!1,Bt=!1,jt=!1,Ft=!1,It=!1,qt=null,Rt,Ut,zt,Wt=M,Xt;return ft=function(){var t=new Date;if(qt+at<=t.getTime()){var n=kn("ping=1",null,"ping");return un(n,ot),!0}return!1},vr(),hn(),bn(),{getVisitorId:function(){return gn().uuid},getVisitorInfo:function(){return mn()},getAttributionInfo:function(){return wn()},getAttributionCampaignName:function(){return wn()[0]},getAttributionCampaignKeyword:function(){return wn()[1]},getAttributionReferrerTimestamp:function(){return wn()[2]},getAttributionReferrerUrl:function(){return wn()[3]},setTrackerUrl:function(e){R=e},getTrackerUrl:function(){return R},getSiteId:function(){return V},setSiteId:function(e){Tn(e)},setUserId:function(e){if(!v(e)||!e.length)return;$=e,Y=Wt($).substr(0,16)},getUserId:function(){return $},setCustomData:function(e,t){g(e)?ct=e:(ct||(ct={}),ct[e]=t)},getCustomData:function(){return ct},setCustomRequestProcessing:function(e){Lt=e},appendToTrackingUrl:function(e){X=e},getRequest:function(e){return kn(e)},addPlugin:function(e,n){t[e]=n},setCustomVariable:function(e,t,n,r){var i;v(r)||(r="visit");if(!v(t))return;v(n)||(n=""),e>0&&(t=y(t)?t:String(t),n=y(n)?n:String(n),i=[t.slice(0,Mt),n.slice(0,Mt)],r==="visit"||r===2?(dn(),kt[e]=i):r==="page"||r===3?At[e]=i:r==="event"&&(Ot[e]=i))},getCustomVariable:function(e,t){var n;v(t)||(t="visit");if(t==="page"||t===3)n=At[e];else if(t==="event")n=Ot[e];else if(t==="visit"||t===2)dn(),n=kt[e];return!v(n)||n&&n[0]===""?!1:n},deleteCustomVariable:function(e,t){this.getCustomVariable(e,t)&&this.setCustomVariable(e,"","",t)},storeCustomVariablesInCookie:function(){Ct=!0},setLinkTrackingTimer:function(e){ot=e},setDownloadExtensions:function(e){y(e)&&(e=e.split("|")),tt=e},addDownloadExtensions:function(e){var t;y(e)&&(e=e.split("|"));for(t=0;t<e.length;t++)tt.push(e[t])},removeDownloadExtensions:function(e){var t,n=[];y(e)&&(e=e.split("|"));for(t=0;t<tt.length;t++)j(e,tt[t])===-1&&n.push(tt[t]);tt=n},setDomains:function(e){nt=y(e)?[e]:e,nt.push(b)},setIgnoreClasses:function(e){rt=y(e)?[e]:e},setRequestMethod:function(e){O=e||N},setRequestContentType:function(e){F=e||H},setReferrerUrl:function(e){x=e},setCustomUrl:function(e){Z=Kt(S,e)},setDocumentTitle:function(e){et=e},setAPIUrl:function(e){W=e},setDownloadClasses:function(e){it=y(e)?[e]:e},setLinkClasses:function(e){st=y(e)?[e]:e},setCampaignNameKey:function(e){ht=y(e)?[e]:e},setCampaignKeywordKey:function(e){pt=y(e)?[e]:e},discardHashTag:function(e){lt=e},setCookieNamePrefix:function(e){dt=e,kt=pn()},setCookieDomain:function(e){var t=D(e);Sn(t)&&(vt=t,hn())},setCookiePath:function(e){mt=e,hn()},setVisitorCookieTimeout:function(e){Et=e*1e3},setSessionCookieTimeout:function(e){St=e*1e3},setReferralCookieTimeout:function(e){xt=e*1e3},setConversionAttributionFirstReferrer:function(e){wt=e},disableCookies:function(){gt=!0,Dt.cookie="0",V&&xn()},deleteCookies:function(){xn()},setDoNotTrack:function(e){var t=r.doNotTrack||r.msDoNotTrack;yt=e&&(t==="yes"||t==="1"),yt&&this.disableCookies()},addListener:function(e,t){hr(e,t)},enableLinkTracking:function(e){Ft=!0,u?pr(e):a.push(function(){pr(e)})},enableJSErrorTracking:function(){if(T)return;T=!0;var e=s.onerror;s.onerror=function(t,n,r,i,s){return rr(function(){var e="JavaScript Errors",s=n+":"+r;i&&(s+=":"+i),Yn(e,s,t)}),e?e(t,n,r,i,s):!1}},disablePerformanceTracking:function(){Tt=!1},setGenerationTimeMs:function(e){Nt=parseInt(e,10)},enableHeartBeatTimer:function(e){e=Math.max(e,1),at=(e||15)*1e3,qt!==null&&sn()},killFrame:function(){s.location!==s.top.location&&(s.top.location=s.location)},redirectFile:function(e){s.location.protocol==="file:"&&(s.location=e)},setCountPreRendered:function(e){bt=e},trackGoal:function(e,t,n){rr(function(){er(e,t,n)})},trackLink:function(e,t,n,r){rr(function(){tr(e,t,n,r)})},trackPageView:function(e,t){Pt=[],U(V)?rr(function(){z(R,W,V)}):rr(function(){Mn(e,t)})},trackAllContentImpressions:function(){if(U(V))return;rr(function(){sr(function(){var e=q.findContentNodes(),t=$n(e);fn(t,ot)})})},trackVisibleContentImpressions:function(e,t){if(U(V))return;v(e)||(e=!0),v(t)||(t=750),dr(e,t,this),rr(function(){ir(function(){var e=q.findContentNodes(),t=Jn(e);fn(t,ot)})})},trackContentImpression:function(e,t,n){if(U(V))return;if(!e)return;t=t||"Unknown",rr(function(){var r=Kn(e,t,n);un(r,ot)})},trackContentImpressionsWithinNode:function(e){if(U(V)||!e)return;rr(function(){Ht?ir(function(){var t=q.findContentNodesWithinNode(e),n=Jn(t);fn(n,ot)}):sr(function(){var t=q.findContentNodesWithinNode(e),n=$n(t);fn(n,ot)})})},trackContentInteraction:function(e,t,n,r){if(U(V))return;if(!e||!t)return;n=n||"Unknown",rr(function(){var i=jn(e,t,n,r);un(i,ot)})},trackContentInteractionNode:function(e,t){if(U(V)||!e)return;rr(function(){var n=Qn(e,t);un(n,ot)})},trackEvent:function(e,t,n,r){rr(function(){Yn(e,t,n,r)})},trackSiteSearch:function(e,t,n){rr(function(){Zn(e,t,n)})},setEcommerceView:function(e,t,n,r){!v(n)||!n.length?n="":n instanceof Array&&(n=JSON2.stringify(n)),At[5]=["_pkc",n],v(r)&&String(r).length&&(At[2]=["_pkp",r]);if((!v(e)||!e.length)&&(!v(t)||!t.length))return;v(e)&&e.length&&(At[3]=["_pks",e]);if(!v(t)||!t.length)t="";At[4]=["_pkn",t]},addEcommerceItem:function(e,t,n,r,i){e.length&&(_t[e]=[e,t,n,r,i])},trackEcommerceOrder:function(e,t,n,r,i,s){An(e,t,n,r,i,s)},trackEcommerceCartUpdate:function(e){On(e)}}}function X(){return{push:b}}function V(e,t){var n={},r,i;for(r=0;r<t.length;r++){var s=t[r];n[s]=1;for(i=0;i<e.length;i++)if(e[i]&&e[i][0]){var o=e[i][0];s===o&&(b(e[i]),delete e[i],n[o]>1&&console!==undefined&&console&&console.error&&console.error("The method "+o+' is registered more than once in "paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: http://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers'),n[o]++)}}return e}var e,t={},n=document,r=navigator,i=screen,s=window,o=s.performance||s.mozPerformance||s.msPerformance||s.webkitPerformance,u=!1,a=[],f=s.encodeURIComponent,l=s.decodeURIComponent,c=unescape,h,p,d,I={htmlCollectionToArray:function(e){var t=[],n;if(!e||!e.length)return t;for(n=0;n<e.length;n++)t.push(e[n]);return t},find:function(e){if(!document.querySelectorAll||!e)return[];var t=document.querySelectorAll(e);return this.htmlCollectionToArray(t)},findMultiple:function(e){if(!e||!e.length)return[];var t,n,r=[];for(t=0;t<e.length;t++)n=this.find(e[t]),r=r.concat(n);return r=this.makeNodesUnique(r),r},findNodesByTagName:function(e,t){if(!e||!t||!e.getElementsByTagName)return[];var n=e.getElementsByTagName(t);return this.htmlCollectionToArray(n)},makeNodesUnique:function(e){var t=[].concat(e);e.sort(function(e,n){if(e===n)return 0;var r=j(t,e),i=j(t,n);return r===i?0:r>i?-1:1});if(e.length<=1)return e;var n=0,r=0,i=[],s;s=e[n++];while(s)s===e[n]&&(r=i.push(n)),s=e[n++]||null;while(r--)e.splice(i[r],1);return e},getAttributeValueFromNode:function(e,t){if(!this.hasNodeAttribute(e,t))return;if(e&&e.getAttribute)return e.getAttribute(t);if(!e||!e.attributes)return;var n=typeof e.attributes[t];if("undefined"===n)return;if(e.attributes[t].value)return e.attributes[t].value;if(e.attributes[t].nodeValue)return e.attributes[t].nodeValue;var r,i=e.attributes;if(!i)return;for(r=0;r<i.length;r++)if(i[r].nodeName===t)return i[r].nodeValue;return null},hasNodeAttributeWithValue:function(e,t){var n=this.getAttributeValueFromNode(e,t);return!!n},hasNodeAttribute:function(e,t){if(e&&e.hasAttribute)return e.hasAttribute(t);if(e&&e.attributes){var n=typeof e.attributes[t];return"undefined"!==n}return!1},hasNodeCssClass:function(e,t){if(e&&t&&e.className){var n=typeof e.className=="string"?e.className.split(" "):[];if(-1!==j(n,t))return!0}return!1},findNodesHavingAttribute:function(e,t,n){n||(n=[]);if(!e||!t)return n;var r=H(e);if(!r||!r.length)return n;var i,s;for(i=0;i<r.length;i++)s=r[i],this.hasNodeAttribute(s,t)&&n.push(s),n=this.findNodesHavingAttribute(s,t,n);return n},findFirstNodeHavingAttribute:function(e,t){if(!e||!t)return;if(this.hasNodeAttribute(e,t))return e;var n=this.findNodesHavingAttribute(e,t);if(n&&n.length)return n[0]},findFirstNodeHavingAttributeWithValue:function(e,t){if(!e||!t)return;if(this.hasNodeAttributeWithValue(e,t))return e;var n=this.findNodesHavingAttribute(e,t);if(!n||!n.length)return;var r;for(r=0;r<n.length;r++)if(this.getAttributeValueFromNode(n[r],t))return n[r]},findNodesHavingCssClass:function(e,t,n){n||(n=[]);if(!e||!t)return n;if(e.getElementsByClassName){var r=e.getElementsByClassName(t);return this.htmlCollectionToArray(r)}var i=H(e);if(!i||!i.length)return[];var s,o;for(s=0;s<i.length;s++)o=i[s],this.hasNodeCssClass(o,t)&&n.push(o),n=this.findNodesHavingCssClass(o,t,n);return n},findFirstNodeHavingClass:function(e,t){if(!e||!t)return;if(this.hasNodeCssClass(e,t))return e;var n=this.findNodesHavingCssClass(e,t);if(n&&n.length)return n[0]},isLinkElement:function(e){if(!e)return!1;var t=String(e.nodeName).toLowerCase(),n=["a","area"],r=j(n,t);return r!==-1},setAnyAttribute:function(e,t,n){if(!e||!t)return;e.setAttribute?e.setAttribute
(t,n):e[t]=n}},q={CONTENT_ATTR:"data-track-content",CONTENT_CLASS:"piwikTrackContent",CONTENT_NAME_ATTR:"data-content-name",CONTENT_PIECE_ATTR:"data-content-piece",CONTENT_PIECE_CLASS:"piwikContentPiece",CONTENT_TARGET_ATTR:"data-content-target",CONTENT_TARGET_CLASS:"piwikContentTarget",CONTENT_IGNOREINTERACTION_ATTR:"data-content-ignoreinteraction",CONTENT_IGNOREINTERACTION_CLASS:"piwikContentIgnoreInteraction",location:undefined,findContentNodes:function(){var e="."+this.CONTENT_CLASS,t="["+this.CONTENT_ATTR+"]",n=I.findMultiple([e,t]);return n},findContentNodesWithinNode:function(e){if(!e)return[];var t=I.findNodesHavingCssClass(e,this.CONTENT_CLASS),n=I.findNodesHavingAttribute(e,this.CONTENT_ATTR);if(n&&n.length){var r;for(r=0;r<n.length;r++)t.push(n[r])}return I.hasNodeAttribute(e,this.CONTENT_ATTR)?t.push(e):I.hasNodeCssClass(e,this.CONTENT_CLASS)&&t.push(e),t=I.makeNodesUnique(t),t},findParentContentNode:function(e){if(!e)return;var t=e,r=0;while(t&&t!==n&&t.parentNode){if(I.hasNodeAttribute(t,this.CONTENT_ATTR))return t;if(I.hasNodeCssClass(t,this.CONTENT_CLASS))return t;t=t.parentNode;if(r>1e3)break;r++}},findPieceNode:function(e){var t;return t=I.findFirstNodeHavingAttribute(e,this.CONTENT_PIECE_ATTR),t||(t=I.findFirstNodeHavingClass(e,this.CONTENT_PIECE_CLASS)),t?t:e},findTargetNodeNoDefault:function(e){if(!e)return;var t=I.findFirstNodeHavingAttributeWithValue(e,this.CONTENT_TARGET_ATTR);if(t)return t;t=I.findFirstNodeHavingAttribute(e,this.CONTENT_TARGET_ATTR);if(t)return t;t=I.findFirstNodeHavingClass(e,this.CONTENT_TARGET_CLASS);if(t)return t},findTargetNode:function(e){var t=this.findTargetNodeNoDefault(e);return t?t:e},findContentName:function(e){if(!e)return;var t=I.findFirstNodeHavingAttributeWithValue(e,this.CONTENT_NAME_ATTR);if(t)return I.getAttributeValueFromNode(t,this.CONTENT_NAME_ATTR);var n=this.findContentPiece(e);if(n)return this.removeDomainIfIsInLink(n);if(I.hasNodeAttributeWithValue(e,"title"))return I.getAttributeValueFromNode(e,"title");var r=this.findPieceNode(e);if(I.hasNodeAttributeWithValue(r,"title"))return I.getAttributeValueFromNode(r,"title");var i=this.findTargetNode(e);if(I.hasNodeAttributeWithValue(i,"title"))return I.getAttributeValueFromNode(i,"title")},findContentPiece:function(e){if(!e)return;var t=I.findFirstNodeHavingAttributeWithValue(e,this.CONTENT_PIECE_ATTR);if(t)return I.getAttributeValueFromNode(t,this.CONTENT_PIECE_ATTR);var n=this.findPieceNode(e),r=this.findMediaUrlInNode(n);if(r)return this.toAbsoluteUrl(r)},findContentTarget:function(e){if(!e)return;var t=this.findTargetNode(e);if(I.hasNodeAttributeWithValue(t,this.CONTENT_TARGET_ATTR))return I.getAttributeValueFromNode(t,this.CONTENT_TARGET_ATTR);var n;if(I.hasNodeAttributeWithValue(t,"href"))return n=I.getAttributeValueFromNode(t,"href"),this.toAbsoluteUrl(n);var r=this.findPieceNode(e);if(I.hasNodeAttributeWithValue(r,"href"))return n=I.getAttributeValueFromNode(r,"href"),this.toAbsoluteUrl(n)},isSameDomain:function(e){if(!e||!e.indexOf)return!1;if(0===e.indexOf(this.getLocation().origin))return!0;var t=e.indexOf(this.getLocation().host);return 8>=t&&0<=t?!0:!1},removeDomainIfIsInLink:function(e){var t="^https?://[^/]+",n="^.*//[^/]+";return e&&e.search&&-1!==e.search(new RegExp(t))&&this.isSameDomain(e)&&(e=e.replace(new RegExp(n),""),e||(e="/")),e},findMediaUrlInNode:function(e){if(!e)return;var t=["img","embed","video","audio"],n=e.nodeName.toLowerCase();if(-1!==j(t,n)&&I.findFirstNodeHavingAttributeWithValue(e,"src")){var r=I.findFirstNodeHavingAttributeWithValue(e,"src");return I.getAttributeValueFromNode(r,"src")}if(n==="object"&&I.hasNodeAttributeWithValue(e,"data"))return I.getAttributeValueFromNode(e,"data");if(n==="object"){var i=I.findNodesByTagName(e,"param");if(i&&i.length){var s;for(s=0;s<i.length;s++)if("movie"===I.getAttributeValueFromNode(i[s],"name")&&I.hasNodeAttributeWithValue(i[s],"value"))return I.getAttributeValueFromNode(i[s],"value")}var o=I.findNodesByTagName(e,"embed");if(o&&o.length)return this.findMediaUrlInNode(o[0])}},trim:function(e){return e&&String(e)===e?e.replace(/^\s+|\s+$/g,""):e},isOrWasNodeInViewport:function(e){if(!e||!e.getBoundingClientRect||e.nodeType!==1)return!0;var t=e.getBoundingClientRect(),r=n.documentElement||{},i=t.top<0;i&&e.offsetTop&&(i=e.offsetTop+t.height>0);var o=r.clientWidth;s.innerWidth&&o>s.innerWidth&&(o=s.innerWidth);var u=r.clientHeight;return s.innerHeight&&u>s.innerHeight&&(u=s.innerHeight),(t.bottom>0||i)&&t.right>0&&t.left<o&&(t.top<u||i)},isNodeVisible:function(e){var t=F(e),n=this.isOrWasNodeInViewport(e);return t&&n},buildInteractionRequestParams:function(e,t,n,r){var i="";return e&&(i+="c_i="+f(e)),t&&(i&&(i+="&"),i+="c_n="+f(t)),n&&(i&&(i+="&"),i+="c_p="+f(n)),r&&(i&&(i+="&"),i+="c_t="+f(r)),i},buildImpressionRequestParams:function(e,t,n){var r="c_n="+f(e)+"&c_p="+f(t);return n&&(r+="&c_t="+f(n)),r},buildContentBlock:function(e){if(!e)return;var t=this.findContentName(e),n=this.findContentPiece(e),r=this.findContentTarget(e);return t=this.trim(t),n=this.trim(n),r=this.trim(r),{name:t||"Unknown",piece:n||"Unknown",target:r||""}},collectContent:function(e){if(!e||!e.length)return[];var t=[],n,r;for(n=0;n<e.length;n++)r=this.buildContentBlock(e[n]),v(r)&&t.push(r);return t},setLocation:function(e){this.location=e},getLocation:function(){var e=this.location||s.location;return e.origin||(e.origin=e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")),e},toAbsoluteUrl:function(e){if(!!e&&String(e)===e||e===""){if(""===e)return this.getLocation().href;if(e.search(/^\/\//)!==-1)return this.getLocation().protocol+e;if(e.search(/:\/\//)!==-1)return e;if(0===e.indexOf("#"))return this.getLocation().origin+this.getLocation().pathname+e;if(0===e.indexOf("?"))return this.getLocation().origin+this.getLocation().pathname+e;if(0===e.search("^[a-zA-Z]{2,11}:"))return e;if(e.search(/^\//)!==-1)return this.getLocation().origin+e;var t="(.*/)",n=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(t))[0];return n+e}return e},isUrlToCurrentDomain:function(e){var t=this.toAbsoluteUrl(e);if(!t)return!1;var n=this.getLocation().origin;return n===t?!0:0===String(t).indexOf(n)?":"===String(t).substr(n.length,1)?!1:!0:!1},setHrefAttribute:function(e,t){if(!e||!t)return;I.setAnyAttribute(e,"href",t)},shouldIgnoreInteraction:function(e){var t=I.hasNodeAttribute(e,this.CONTENT_IGNOREINTERACTION_ATTR),n=I.hasNodeCssClass(e,this.CONTENT_IGNOREINTERACTION_CLASS);return t||n}};w(s,"beforeunload",S,!1),T(),Date.prototype.getTimeAlias=Date.prototype.getTime,h=new W;var $=["disableCookies","setTrackerUrl","setAPIUrl","setCookiePath","setCookieDomain","setUserId","setSiteId","enableLinkTracking"];_paq=V(_paq,$);for(p=0;p<_paq.length;p++)_paq[p]&&b(_paq[p]);return _paq=new X,d={addPlugin:function(e,n){t[e]=n},getTracker:function(e,t){return v(t)||(t=this.getAsyncTracker().getSiteId()),v(e)||(e=this.getAsyncTracker().getTrackerUrl()),new W(e,t)},getAsyncTracker:function(){return h}},typeof define=="function"&&define.amd&&define("piwik",[],function(){return d}),d}()),window&&window.piwikAsyncInit&&window.piwikAsyncInit(),function(){var e=typeof AnalyticsTracker;e==="undefined"&&(AnalyticsTracker=Piwik)}(),typeof piwik_log!="function"&&(piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b),e.setCustomData(g),c=a("tracker_pause"),c&&e.setLinkTrackingTimer(c),c=a("download_extensions"),c&&e.setDownloadExtensions(c),c=a("hosts_alias"),c&&e.setDomains(c),c=a("ignore_classes"),c&&e.setIgnoreClasses(c),e.trackPageView(),a("install_tracker")&&(piwik_track=function(t,n,r,i){e.setSiteId(n),e.setTrackerUrl(r),e.trackLink(t,i)},e.enableLinkTracking())})};EurekaKingPiwikScripts();var EurekaKingMootoolsExtend=function(){MooTools!==undefined&&(MooTools.More={version:"1.5.2",build:"facdf0458d10fd214aa9f5fa71935a23a772cc48"},function(){function e(e){return/^(?:body|html)$/i.test(e.tagName)}Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:!0},initialize:function(e,t){if(this.element=this.subject=document.id(e),this.parent(t),"element"!=typeOf(this.element)&&(this.element=document.id(this.element.getDocument().body)),this.options.wheelStops){var n=this.element,r=this.cancel.pass(!1,this);this.addEvent("start",function(){n.addEvent("mousewheel",r)},!0),this.addEvent("complete",function(){n.removeEvent("mousewheel",r)},!0)}},set:function(){var e=Array.flatten(arguments);return this.element.scrollTo(e[0],e[1]),this},compute:function(e,t,n){return[0,1].map(function(r){return Fx.compute(e[r],t[r],n)})},start:function(e,t){if(!this.check(e,t))return this;var n=this.element.getScroll();return this.parent([n.x,n.y],[e,t])},calculateScroll:function(e,t){var n=this.element,r=n.getScrollSize(),i=n.getScroll(),s=n.getSize(),o=this.options.offset,u={x:e,y:t};for(var a in u)u[a]||0===u[a]||(u[a]=i[a]),"number"!=typeOf(u[a])&&(u[a]=r[a]-s[a]),u[a]+=o[a];return[u.x,u.y]},toTop:function(){return this.start.apply(this,this.calculateScroll(!1,0))},toLeft:function(){return this.start.apply(this,this.calculateScroll(0,!1))},toRight:function(){return this.start.apply(this,this.calculateScroll("right",!1))},toBottom:function(){return this.start.apply(this,this.calculateScroll(!1,"bottom"))},toElement:function(n,r){r=r?Array.from(r):["x","y"];var i=e(this.element)?{x:0,y:0}:this.element.getScroll(),s=Object.map(document.id(n).getPosition(this.element),function(e,t){return r.contains(t)?e+i[t]:!1});return this.start.apply(this,this.calculateScroll(s.x,s.y))},toElementEdge:function(e,t,n){t=t?Array.from(t):["x","y"],e=document.id(e);var r={},i=e.getPosition(this.element),s=e.getSize(),o=this.element.getScroll(),u=this.element.getSize(),a={x:i.x+s.x,y:i.y+s.y};return["x","y"].each(function(e){t.contains(e)&&(a[e]>o[e]+u[e]&&(r[e]=a[e]-u[e]),i[e]<o[e]&&(r[e]=i[e])),null==r[e]&&(r[e]=o[e]),n&&n[e]&&(r[e]=r[e]+n[e])},this),(r.x!=o.x||r.y!=o.y)&&this.start(r.x,r.y),this},toElementCenter:function(e,t,n){t=t?Array.from(t):["x","y"],e=document.id(e);var r={},i=e.getPosition(this.element),s=e.getSize(),o=this.element.getScroll(),u=this.element.getSize();return["x","y"].each(function(e){t.contains(e)&&(r[e]=i[e]-(u[e]-s[e])/2),null==r[e]&&(r[e]=o[e]),n&&n[e]&&(r[e]=r[e]+n[e])},this),(r.x!=o.x||r.y!=o.y)&&this.start(r.x,r.y),this}})}(),Request.JSONP=new Class({Implements:[Chain,Events,Options],options:{onRequest:function(e){this.options.log&&window.console&&console.log&&console.log("JSONP retrieving script with url:"+e)},onError:function(e){this.options.log&&window.console&&console.warn&&console.warn("JSONP "+e+" will fail in Internet Explorer, which enforces a 2083 bytes length limit on URIs")},url:"",callbackKey:"callback",injectScript:document.head,data:"",link:"ignore",timeout:0,log:!1},initialize:function(e){this.setOptions(e)},send:function(e){if(!Request.prototype.check.call(this,e))return this;this.running=!0;var t=typeOf(e);("string"==t||"element"==t)&&(e={data:e}),e=Object.merge(this.options,e||{});var n=e.data;switch(typeOf(n)){case"element":n=document.id(n).toQueryString();break;case"object":case"hash":n=Object.toQueryString(n)}var r=this.index=Request.JSONP.counter++,i="request_"+r,s=e.url+(e.url.test("\\?")?"&":"?")+e.callbackKey+"=Request.JSONP.request_map.request_"+r+(n?"&"+n:"");s.length>2083&&this.fireEvent("error",s),Request.JSONP.request_map[i]=function(){delete Request.JSONP.request_map[i],this.success(arguments,r)}.bind(this);var o=this.getScript(s).inject(e.injectScript);return this.fireEvent("request",[s,o]),e.timeout&&this.timeout.delay(e.timeout,this),this},getScript:function(e){return this.script||(this.script=new Element("script",{type:"text/javascript",async:!0,src:e})),this.script},success:function(e){this.running&&this.clear().fireEvent("complete",e).fireEvent("success",e).callChain()},cancel:function(){return this.running&&this.clear().fireEvent("cancel"),this},isRunning:function(){return!!this.running},clear:function(){return this.running=!1,this.script&&(this.script.destroy(),this.script=null),this},timeout:function(){return this.running&&(this.running=!1,this.fireEvent("timeout",[this.script.get("src"),this.script]).fireEvent("failure").cancel()),this}}),Request.JSONP.counter=0,Request.JSONP.request_map={},function(){var e=this.Asset={javascript:function(e,t){t||(t={});var n=new Element("script",{src:e,type:"text/javascript"}),r=t.document||document,i=t.onload||t.onLoad;return delete t.onload,delete t.onLoad,delete t.document,i&&(n.addEventListener?n.addEvent("load",i):n.addEvent("readystatechange",function(){["loaded","complete"].contains(this.readyState)&&i.call(this)})),n.set(t).inject(r.head)},css:function(e,t){t||(t={});var n=t.onload||t.onLoad,r=t.document||document,i=t.timeout||3e3;["onload","onLoad","document"].each(function(e){delete t[e]});var s=(new Element("link",{type:"text/css",rel:"stylesheet",media:"screen",href:e})).setProperties(t).inject(r.head);if(n){var o=!1,u=0,a=function(){for(var e=document.styleSheets,t=0;t<e.length;t++){var r=e[t],f=r.ownerNode?r.ownerNode:r.owningElement;if(f&&f==s)return o=!0,n.call(s)}return u++,!o&&i/50>u?setTimeout(a,50):void 0};setTimeout(a,0)}return s},image:function(e,t){t||(t={});var n=new Image,r=document.id(n)||new Element("img");return["load","abort","error"].each(function(e){var s="on"+e,o="on"+e.capitalize(),u=t[s]||t[o]||function(){};delete t[o],delete t[s],n[s]=function(){n&&(r.parentNode||(r.width=n.width,r.height=n.height),n=n.onload=n.onabort=n.onerror=null,u.delay(1,r,r),r.fireEvent(e,r,1))}}),n.src=r.src=e,n&&n.complete&&n.onload.delay(1),r.set(t)},images:function(n,r){n=Array.from(n);var i=function(){},s=0;return r=Object.merge({onComplete:i,onProgress:i,onError:i,properties:{}},r),new Elements(n.map(function(i,u){return e.image(i,Object.append(r.properties,{onload:function(){s++,r.onProgress.call(this,s,u,i),s==n.length&&r.onComplete()},onerror:function(){s++,r.onError.call(this,s,u,i),s==n.length&&r.onComplete()}}))}))}}}()),!function(e,t){this.LocalStorage=new Class({Implements:[Options],options:{path:"*",name:t.location.hostname,duration:2592e3,debug:!1},storage:null,initialize:function(n){var r=this;this.setOptions(n),t.localStorage?(this.options.debug&&console.log("using localStorage"),this.storage=t.localStorage):Browser.Engine.trident?(this.options.debug&&console.log("using behavior Storage"),this.storage=function(){var t=document.createElement("span");return t.style.behavior="url(#default#userData)",e(document.body).adopt(t),t.load(r.options.name),{setItem:function(e,n){t.setAttribute(e,n),t.save(r.options.name)},getItem:function(e){return t.getAttribute(e)},removeItem:function(e){t.removeAttribute(e),t.save(r.options.name)}}}()):t.globalStorage?(this.options.debug&&console.log("using globalStorage"),this.storage=function(){return storage=globalStorage[r.options.name],{setItem:function(e,t){storage[e]=t},getItem:function(e){return"value"in storage[e]?storage[e].value:null},removeItem:function(e){delete storage[e]}}}()):(this.options.debug&&console.log("using cookies"),this.storage=function(){var e={path:r.options.path,duration:r.options.duration};return{setItem:function(t,n){Cookie.write(t,n,e)},getItem:function(e){return Cookie.read(e)},removeItem:function(e){Cookie.dispose(e)}}}())},set:function(e,t){return this.storage.setItem(e,JSON.encode(t)),this},get:function(e){return JSON.decode(this.storage.getItem(e))},remove:function(e){return this.storage.removeItem(e),this}})}(document.id,this)},eurekaKingDynamoServers="https://read.eurekaking.com",eurekaKingStaticServers="https://s.eurekaking.com",eurekaKingTrackServers="https://write.eurekaking.com",eurekaKingId=eurekaKingId||eurekaKingID,EurekaKing={cssAr:["https://fonts.googleapis.com/css?family=Prata","https://fonts.googleapis.com/css?family=Lato:300,400,700&subset=latin,latin-ext"],library:"https://ajax.googleapis.com/ajax/libs/mootools/1.5.0/mootools-yui-compressed.js",moduleGenerator:eurekaKingDynamoServers+"/service/prompt-builder/module.php",promptGenerator:eurekaKingDynamoServers+"/service/prompt-builder/story.php",promptRecorder:eurekaKingDynamoServers+"/service/prompt-builder/recorder.php",appPackages:eurekaKingStaticServers+"/app/",piwikURL:eurekaKingTrackServers,readingTimeSensitivity:20,publisherNovel:{},currentStory:{},currentPrompt:{},loadedPrompt:"",loadedPromptHtml:{},promptClean:function(){},launched:!1,activeUserStoryKey:"",userJourney:{},userJourneyProgress:0,emailData:!1,textfieldData:!1,promptHeader:"",promptFigure:"",promptElement:"",promptFlagElement:"",scrollPosition:0,log:function(e,t){this.ls!==undefined&&this.ls.get!==undefined&&this.ls.get("ek_data_debug")!==undefined&&this.ls.get("ek_data_debug")!==null&&console.log(this.msToTime(Date.now()-this.logTime)+" | "+e)},logTime:Date.now(),msToTime:function(e){var t=parseInt(e%1e3/1),n=parseInt(e/1e3%60),r=parseInt(e/6e4%60),i=parseInt(e/36e5%24);return i=i<10?"0"+i:i,r=r<10?"0"+r:r,n=n<10?"0"+n:n,r+"m "+n+"."+t+"s"},jot:function(e){_paq.push(["trackEvent","s_"+EurekaKing.activeUserStoryKey,"p_"+EurekaKing.userJourneyProgress,e]),ga("EurekaKing.send",{hitType:"event",eventCategory:"s_"+EurekaKing.activeUserStoryKey,eventAction:"p_"+EurekaKing.userJourneyProgress,eventLabel:e}),this.log('EK Analytics Event: "'+e+'" for '+this.activeUserStoryKey+" (Prompt "+this.userJourneyProgress+")"),window.fireEvent("eurekakingjot_"+e)},tattoo:function(e,t,n){n&&e==="userEmail"&&(this.userEmail=t,t="");var r={app:e,details:t};this.log("ekTasksCompleted{app: "+r.app+", details: "+r.details+"}");if(this.ls.get("ek_data_tattoo")===undefined||this.ls.get("ek_data_tattoo")===null)this.ls.set("ek_data_tattoo",{tasksCompleted:JSON.stringify([r])});else{var i=JSON.parse(this.ls.get("ek_data_tattoo").tasksCompleted);i.push(r),this.ls.set("ek_data_tattoo",{tasksCompleted:JSON.stringify(i)})}this.sync()},goal:{set:function(e){EurekaKing.publisherNovel.goals!==undefined&&EurekaKing.publisherNovel.goals.each(function(t,n){t.goalId==e&&(goalStorage={clickElement:t.clickElement,valueElement:t.valueElement,piwik:t.piwik,goalId:t.goalId},EurekaKing.ls.set("ek_goal",JSON.stringify(goalStorage)),EurekaKing.log("EK goal set in localStorage with id "+t.goalId))})},track:function(){EurekaKing.ls.get("ek_goal")!==null&&JSON.parse(EurekaKing.ls.get("ek_goal")).goalId!==undefined&&(goalEl=JSON.parse(EurekaKing.ls.get("ek_goal")),goalEl.piwik!==undefined&&(piwik=goalEl.piwik,goalId=goalEl.goalId,goalValue=0,goalEl.clickElement!==undefined&&goalEl.valueElement!==undefined&&$$(goalEl.valueElement)[0]&&(goalValue=$$(goalEl.valueElement)[0].get("html")||$$(goalEl.valueElement)[0].get("value"),goalValue=goalValue.replace(",","").replace("$","").toFloat(),EurekaKing.log("Anticipated goal value: "+goalValue),$$(goalEl.clickElement).each(function(e){var t=e.clone();t.addEvents({click:function(n){n.stop(),EurekaKing.log("Now tracking EK goal with id "+goalEl.goalId+" (Piwik goal id: "+piwik+")"),this.setStyles({"-webkit-filter":"brightness(85%)","-webkit-filter":"brightness(85%)"}),_paq.push(["trackGoal",piwik,goalValue]),EurekaKing.log("EK goal with Piwik id "+piwik+" and value of "+goalValue+" (being) sent to Piwik"),ga("EurekaKing.send",{hitType:"event",eventCategory:"goal",eventAction:goalId,eventValue:goalValue,hitCallback:function(){EurekaKing.log("EK goalId "+goalId+" and value of "+goalValue+" sent to Google"),e.click(),t.setStyles({"-webkit-filter":null,"-webkit-filter":null})}})}}).set("data-ek-tracking-dummy",!0),t.inject(e,"after"),e.setStyle("display","none")}))))}},href:{get:function(){return this.storage},set:function(e){e!==undefined&&(this.storage=e,EurekaKing.log("Environment URL set to: "+e))},storage:"",requestSource:window.location.href},storePromptProgress:function(e){if(this.userJourney[this.activeUserStoryKey]===undefined)this.userJourney[this.activeUserStoryKey]={userPrompt:[{complete:0}],complete:0};else if(this.userJourney[this.activeUserStoryKey].userPrompt[this.userJourneyProgress]===undefined)this.userJourney[this.activeUserStoryKey].userPrompt[this.userJourneyProgress]=e;else{var t=Object.keys(e)[0];this.userJourney[this.activeUserStoryKey].userPrompt[this.userJourneyProgress][t]=e[t]}this.ls.set("ek_data",{userJourney:JSON.stringify(this.userJourney)}),this.sync()},sync:function(){EurekaKing.worker&&EurekaKing.worker!=""&&EurekaKing.worker.postMessage({cmd:"ek_sync",params:[this.promptRecorder,eurekaKingId,this.visitorId(),this.userEmail,this.ls.get("ek_data"),this.ls.get("ek_data_tattoo")]})},visitorId:function(){var e;return _paq.push([function(){e=this.getVisitorId()}]),e},ls:"",worker:"",userEmail:"",scriptsLoaded:"",loadScripts:function(e,t){var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.src=e,r.onreadystatechange=t,r.onload=t,n.appendChild(r)},ct:{},showPrompt:function(readingTimeSensitivity,promptTimer){function validateAutoPromptRequest(){EurekaKing.promptElement.hasClass("hide")&&EurekaKing.userJourney[EurekaKing.activeUserStoryKey]!==undefined&&(EurekaKing.userJourney[EurekaKing.activeUserStoryKey].userPrompt[EurekaKing.userJourneyProgress]!==undefined&&!EurekaKing.userJourney[EurekaKing.activeUserStoryKey].userPrompt[EurekaKing.userJourneyProgress].userClosed&&EurekaKing.userJourney[EurekaKing.activeUserStoryKey].userPrompt[EurekaKing.userJourneyProgress].complete!==1&&!EurekaKing.userJourney[EurekaKing.activeUserStoryKey].userPrompt[EurekaKing.userJourneyProgress].skipped||EurekaKing.userJourney[EurekaKing.activeUserStoryKey].userPrompt[EurekaKing.userJourneyProgress]===undefined)&&(EurekaKing.promptElement.removeClass("hide"),$$(".ekCancel").removeClass("ekOpen"),EurekaKing.jot("EKAR"),!EurekaKing.promptElement.hasClass("hide")&&EurekaKing.currentPrompt.settings!==undefined&&EurekaKing.currentPrompt.settings.skippable!==undefined&&EurekaKing.currentPrompt.settings.skippable==2&&(EurekaKing.log("Prompt skipped/completed (category 2: next page loaded or prompt ignored)"),EurekaKing.storePromptProgress({skipped:2})))}(function(){EurekaKing.hidePromptsOnStoryCompletion()?EurekaKing.log("User prompt is hidden by publisher's request (story is complete)"):(EurekaKing.promptElement.removeClass("destroy"),EurekaKing.log("User prompt is initiated"))}).delay(300);if(EurekaKing.currentPrompt.settings!=undefined&&EurekaKing.currentPrompt.settings.customTrigger!=undefined&&EurekaKing.currentPrompt.settings.customTrigger!="")this.log("Custom user prompt trigger detected"),window.addEvent("eurekakingct",function(){validateAutoPromptRequest()}),eval(EurekaKing.currentPrompt.settings.customTrigger);else{this.log("Initiating user prompt visuals for "+readingTimeSensitivity+"% page scroll and "+promptTimer+"s timer");var docBh=window.getScrollSize().y,scrlActivate=docBh*(readingTimeSensitivity/100);this.scrollPosition=window.getScroll().y,window.addEvent("scroll",function(e){window.getScroll().y>scrlActivate&&validateAutoPromptRequest(),EurekaKing.scrollPosition=window.getScroll().y}),promptTimer>0&&function(){validateAutoPromptRequest()}.delay(promptTimer*1e3)}this.promptElement.addEvent("click",function(){EurekaKing.promptElement.hasClass("hide")&&(EurekaKing.promptElement.removeClass("hide").removeClass("ekOpen"),EurekaKing.jot("EKCO")),EurekaKing.storePromptProgress({userClosed:0}),$$(".ekCancel").removeClass("ekOpen")}),$$(".ekCancel").addEvent("click",function(e){this.hasClass("ekOpen")||e.stop(),EurekaKing.hidePrompt(),EurekaKing.jot("EKCX"),EurekaKing.storePromptProgress({userClosed:1}),EurekaKing.currentPrompt.settings!==undefined&&EurekaKing.currentPrompt.settings.skippable!==undefined&&EurekaKing.currentPrompt.settings.skippable==1&&(EurekaKing.log('Prompt skipped (category 1: "cancel" button clicked)'),EurekaKing.storePromptProgress({skipped:1}))}),$("EurekaKing.flag")&&window.addEvent("scroll",function(e){window.getScroll().y<5?$("EurekaKing.flag").addClass("ekDocumentTop"):$("EurekaKing.flag").removeClass("ekDocumentTop")})},hidePromptsOnStoryCompletion:function(){return this.currentStory!==undefined&&this.currentStory.settings!==undefined&&this.currentStory.settings.whenComplete!==undefined&&this.currentStory.settings.whenComplete=="hidePrompt"&&this.userJourney[this.activeUserStoryKey]!==undefined&&this.userJourney[this.activeUserStoryKey].complete?!0:!1},hidePrompt:function(){$$(".ekCancel")[0].hasClass("ekOpen")||(this.hidePromptsOnStoryCompletion()?this.promptElement.addClass("destroy"):(this.promptElement.addClass("hide"),$$(".ekCancel").addClass("ekOpen")))},buildPrompt:function(e,t){if(e.settings!==undefined&&e.settings.fonts!==undefined)this.log("Cancelled loading default CSS fonts");else for(i=0;i<this.cssAr.length;i++)Asset.css(this.cssAr[i]),this.log("CSS font loaded: "+this.cssAr[i]);e.customModule!==undefined&&e.customModule!==""?(e.module=e.customModule,e.moduleType="custom"):e.moduleType="default",e.settings!==undefined&&e.settings.stylesheet!==undefined?(this.log("Cancelled loading default CSS stylesheet"),Asset.css(this.appPackages+"__LIB/css/custom/"+eurekaKingId+"/"+e.settings.stylesheet),this.log("Custom CSS stylesheet loaded: "+e.settings.stylesheet)):(Asset.css(this.appPackages+e.app.hyphenate()+"/app.css"),this.log("Default CSS stylesheet loaded: "+this.appPackages+e.app.hyphenate()+"/app.css"));if($$(".ekWrapper")[0]===undefined){var n=new Element("div.ekWrapper");n.inject(document.body),e.content.piwikId=this.publisherNovel.tools.piwik;var r=this.removeURLCampaigns(this.href.get());e.content.thisUrl=r.substr(r.indexOf("://")+3),this.loadedPrompt==e.content?s(this.loadedPromptHtml):(new Request.JSONP({url:this.moduleGenerator,data:{t:e.module.hyphenate(),k:e.moduleType,a:e.app.hyphenate(),c:e.content,s:eurekaKingDynamoServers,z:eurekaKingId},onComplete:function(t){EurekaKing.log('"'+e.module.hyphenate()+'"'+" module HTML loaded"),EurekaKing.loadedPromptHtml=t,EurekaKing.loadedPrompt=e.content,s(t)}})).send();function s(t){e.moduleType=="custom"&&EurekaKing.log("Custom module detected"),EurekaKing.log('"'+e.module.hyphenate()+'"'+" module HTML built"),n.set("html",t.htmlBase),EurekaKing.promptElement=document.id("EurekaKing");if(e.settings!==undefined){var r=new Element("style",{id:"eurekaKingCustomCSS",html:e.settings.css||""});r.inject($$("head")[0])}EurekaKing.loadScripts(EurekaKing.appPackages+e.app.hyphenate()+"/app.js",function(){EurekaKing.launchApp(),EurekaKing.showPrompt(EurekaKing.currentStory.settings.readingTimeSensitivity||20,EurekaKing.currentStory.settings.promptTimer||0)})}}e.settings!==undefined&&e.settings.goalId!==undefined&&window.addEvent("eurekakingjot_EKCC",function(t){EurekaKing.goal.set(e.settings.goalId)})},ignoreThisUrl:function(e){var t=!1;if(e!==undefined&&e[0]!="")for(i=0;i<e.length;i++)this.log("url to be ignored: "+e[i]+" this page url: "+this.href.get()),this.href.get().contains(e[i])&&(t=!0,this.log("url ignored"));return t},urlScope:function(e){var t=!1;if(e!==undefined&&e[0]!="")for(i=0;i<e.length;i++)this.log("url scope to be included: "+e[i]+" this page url: "+this.href.get()),this.href.get().contains(e[i])?(t=!0,this.log("^^ url included")):this.log("^^ url NOT included");else t=!0;return t},jss:{},userSegment:function(segment){includeThisSegment="pending";if(segment!==undefined){this.log("Starting checks for segmentation preferences against user data via Piwik");if(segment.referrer!==undefined&&this.piwikUserDataObject.referrer!="notAcquired")if(this.piwikUserDataObject.referrer!="")for(i=0;i<segment.referrer.length;i++)includeThisSegment=="pending"&&segment.referrer[i]==this.piwikUserDataObject.referrer?(includeThisSegment="include",this.log("Database referrer requirement: "+segment.referrer[i]+" = User referrer address: "+this.piwikUserDataObject.referrer)):includeThisSegment=="pending"&&(includeThisSegment="dontInclude");else this.log("Piwik reports user as a direct visitor (no referrer string passed)"),includeThisSegment="dontInclude";else includeThisSegment!="pending"?this.log("Piwik data or database entry for user referrer is ignored (segment already decided): "+this.piwikUserDataObject.referrer):this.log("Piwik data or database entry for user referrer is not defined: "+this.piwikUserDataObject.referrer);segment.browser!==undefined&&this.piwikUserDataObject.browser!="notAcquired"&&includeThisSegment=="pending"?this.piwikUserDataObject.browser==segment.browser?(includeThisSegment="include",this.log("Database browser requirement: "+segment.browser+" = User browser: "+this.piwikUserDataObject.browser)):includeThisSegment="dontInclude":includeThisSegment!="pending"?this.log("Piwik data or database entry for browser is ignored (segment already decided): "+this.piwikUserDataObject.browser):this.log("Piwik data or database entry for browser is not defined: "+this.piwikUserDataObject.browser),segment.deviceType!==undefined&&this.piwikUserDataObject.deviceType!="notAcquired"&&includeThisSegment=="pending"?this.piwikUserDataObject.deviceType==segment.deviceType?(includeThisSegment="include",this.log("Database device type requirement: "+segment.deviceType+" = User device type: "+this.piwikUserDataObject.deviceType)):includeThisSegment="dontInclude":includeThisSegment!="pending"?this.log("Piwik data or database entry for user device type is ignored (segment already decided): "+this.piwikUserDataObject.deviceType):this.log("Piwik data or database entry for user device type is not defined: "+this.piwikUserDataObject.deviceType),segment.javaScript!==undefined&&includeThisSegment=="pending"?eval(segment.javaScript)?(includeThisSegment="include",this.log("Custom JavaScript trigger segment return requirement: `true` = Returned: "+eval(segment.javaScript))):includeThisSegment="dontInclude":includeThisSegment!="pending"?this.log("Custom JavaScript trigger segment is ignored (segment already decided): "+eval(segment.javaScript)):this.log("Piwik data or database entry for user device type is not defined: "+eval(segment.javaScript))}else includeThisSegment="default",this.log("Database entry for segmentation is not defined. This user story is reserved to be default");return this.log("Segmentation result: includeThisSegment = "+includeThisSegment),includeThisSegment},launch:function(e){function t(){if(!EurekaKing.launched||e)!window.MooTools||parseFloat(MooTools.version)<1.3?EurekaKing.loadScripts(EurekaKing.library,n):n();EurekaKing.launched=!0,EurekaKing.log("loadEurekaKing()")}this.currentStory={},this.currentPrompt={},this.activeUserStoryKey="",this.promptClean(),this.log(".currentStory, .currentPrompt and .activeUserStoryKey variables have been reset, remaining prompt elements have been removed"),this.launched||(function(e){var t=e.pushState;e.pushState=function(n){return typeof e.onpushstate=="function"&&e.onpushstate({state:n}),t.apply(e,arguments)}}(window.history),function(e,t,n,r,i,s,o){e.GoogleAnalyticsObject=i,e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},e[i].l=1*new Date,s=t.createElement(n),o=t.getElementsByTagName(n)[0],s.async=1,s.src=r,o.parentNode.insertBefore(s,o)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"));var n=function(){EurekaKing.log("libraryLoaded()"),typeof LocalStorage!="function"&&window.EurekaKingMootoolsExtend(),EurekaKing.scriptsLoaded=function(){EurekaKing.log("EurekaKing.scriptsLoaded()"),EurekaKing.ie().isTheBrowser&&EurekaKing.ie().actualVersion<11?console.log("Browser not supported, scripts aborted"):function(){EurekaKing.ls=new LocalStorage,EurekaKing.log("************************************ GO.JS ********************************************"),EurekaKing.ls!==undefined&&EurekaKing.ls.get!==undefined&&EurekaKing.ls.get("ek_data_debug")!==undefined&&EurekaKing.ls.get("ek_data_debug")!==null&&EurekaKing.ls.get("ek_data_debug").url!==undefined&&$$(".ekWrapper")[0]===undefined?EurekaKing.ls.get("ek_data_debug").url!=""&&EurekaKing.ls.get("ek_data_debug").url!=undefined?EurekaKing.href.set(EurekaKing.ls.get("ek_data_debug").url):EurekaKing.href.set(window.location.href):EurekaKing.href.set(window.location.href);if(window.Worker&&!EurekaKing.worker){var e,t="onmessage = function(e) { 							var data = e.data; 							if (data && data.cmd && data.cmd == 'ek_sync' && data.params) { 							  var url = data.params[0]; 							  var eurekaKingId = data.params[1]; 							  var visitorUUID = data.params[2]; 							  var userEmail = data.params[3]; 							  var ek_data = JSON.stringify(data.params[4]); 							  var ek_data_tattoo = JSON.stringify(data.params[5]); 							  if (XMLHttpRequest) 							  { 								try { 								  var xmlHttp = new XMLHttpRequest(); 								  xmlHttp.open('POST', url + '?eurekaKingId=' + eurekaKingId, false); 								  xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 								  xmlHttp.send('u=' + visitorUUID + '&e=' + userEmail + '&d=' + ek_data + '&t=' + ek_data_tattoo); 								}catch(err){} 							  } 							}}"
;try{e=new Blob([t],{type:"application/javascript"})}catch(n){window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,e=new BlobBuilder,e.append(t),e=e.getBlob()}e&&(EurekaKing.worker=new Worker(URL.createObjectURL(e)),EurekaKing.log("Web Worker is supported"))}if(!EurekaKing.launched){var r=0;window.addEvent("scroll",function(){r=window.getScroll().y})}EurekaKing.launched&&$$(".ekWrapper").destroy();if($$(".ekWrapper")[0]===undefined){EurekaKing.publisherNovel.eurekaKingId!=undefined?i():(new Request.JSONP({url:EurekaKing.promptGenerator+"?eurekaKingId="+eurekaKingId,onComplete:function(e){EurekaKing.publisherNovel=e,EurekaKing.publisherNovel!==undefined?i():EurekaKing.log("No legible data received from story.php")}})).send();function i(){function t(){EurekaKing.log("Piwik data is ready (for segmentation)");for(var t=0;t<EurekaKing.publisherNovel.userStories.length;t++){var n=EurekaKing.publisherNovel.userStories[t];EurekaKing.log("Looping through user story ["+n.storyId+"]"),EurekaKing.log("User story segment parameters: "+n.settings.segment);var r=EurekaKing.userSegment(n.settings.segment);if(JSON.stringify(n.storyId)!=undefined){EurekaKing.log("User story URL scope: "+n.settings.urlScope);if(!EurekaKing.ignoreThisUrl(n.settings.urlIgnoreList)&&(n.settings.status=="active"||EurekaKing.ls.get("ek_data_debug")!==null&&EurekaKing.ls.get("ek_data_debug").forceActive)&&(r=="include"||r=="default")&&EurekaKing.urlScope(n.settings.urlScope)){EurekaKing.activeUserStoryKey=n.storyId,EurekaKing.currentStory=n,EurekaKing.log(EurekaKing.activeUserStoryKey),e={},e[n.storyId]={userPrompt:[{complete:0}],complete:0};if(EurekaKing.ls.get("ek_data")===undefined||EurekaKing.ls.get("ek_data")===null)EurekaKing.ls.set("ek_data",{userJourney:JSON.stringify(e)}),EurekaKing.userJourney=e;else{EurekaKing.userJourney=JSON.parse(EurekaKing.ls.get("ek_data").userJourney),EurekaKing.userJourney[EurekaKing.activeUserStoryKey]===undefined&&(EurekaKing.userJourney[EurekaKing.activeUserStoryKey]=e[n.storyId],EurekaKing.ls.set("ek_data",{userJourney:JSON.stringify(EurekaKing.userJourney)}),EurekaKing.log("New user story added to EurekaKing.userJourney: "+EurekaKing.activeUserStoryKey));var i=n.userPrompts.length;EurekaKing.log("Total prompts in this story: "+i);var s=!1;for(t=0;t<i;t++)!s&&(EurekaKing.userJourney[n.storyId]===undefined||EurekaKing.userJourney[n.storyId].userPrompt[t]===undefined||EurekaKing.userJourney[n.storyId].userPrompt[t]!==undefined&&!EurekaKing.userJourney[n.storyId].userPrompt[t].complete&&!EurekaKing.userJourney[n.storyId].userPrompt[t].skipped)&&(EurekaKing.userJourneyProgress=t,s=!0),EurekaKing.userJourney[n.storyId]!==undefined&&EurekaKing.userJourney[n.storyId].userPrompt[t]===undefined&&(EurekaKing.userJourney[n.storyId].userPrompt[t]={complete:0}),EurekaKing.log("Looping through current story's prompt "+t)}EurekaKing.currentPrompt=n.userPrompts[EurekaKing.userJourneyProgress],EurekaKing.userJourney[n.storyId]!==undefined&&(EurekaKing.userJourney[n.storyId].userPrompt.length>=1&&EurekaKing.userJourney[n.storyId].userPrompt[i-1]!==undefined&&(EurekaKing.userJourney[n.storyId].userPrompt[i-1].complete||EurekaKing.userJourney[n.storyId].userPrompt[i-1].skipped)||EurekaKing.userJourney[n.storyId].userPrompt.length==1&&EurekaKing.userJourney[n.storyId].userPrompt[0]!==undefined&&(EurekaKing.userJourney[n.storyId].userPrompt[0].complete||EurekaKing.userJourney[n.storyId].userPrompt[0].skipped))&&(EurekaKing.userJourneyProgress=i-1,EurekaKing.userJourney[EurekaKing.activeUserStoryKey].complete||EurekaKing.jot("EKFIN"),EurekaKing.userJourney[EurekaKing.activeUserStoryKey].complete=1);break}n.settings.status=="inactive"&&(EurekaKing.activeUserStoryKey=n.storyId,EurekaKing.jot("EKXXX"),EurekaKing.log("The user story/prompts are set to INACTIVE by publisher"))}}EurekaKing.currentStory.settings!=undefined&&(EurekaKing.currentStory.settings.status=="active"||EurekaKing.ls.get("ek_data_debug")!==null&&EurekaKing.ls.get("ek_data_debug").forceActive)&&!EurekaKing.hidePromptsOnStoryCompletion()?(EurekaKing.log('"'+EurekaKing.currentPrompt.app+'" prompt is being built for "'+EurekaKing.currentStory.settings.storyAlias+'" user story'),EurekaKing.buildPrompt(EurekaKing.currentPrompt,EurekaKing.currentStory)):EurekaKing.hidePromptsOnStoryCompletion()?EurekaKing.log("User story is complete and the last prompt is set to NOT be shown repeatedly"):EurekaKing.log("No user story available for this segment/URL"),EurekaKing.activeUserStoryKey&&EurekaKing.jot("EKINI")}EurekaKing.log(EurekaKing.promptGenerator+"?eurekaKingId="+eurekaKingId+" loaded"),ga("create",EurekaKing.publisherNovel.tools.googleAnalytics,"auto",{name:"EurekaKing"}),ga("EurekaKing.send","pageview"),EurekaKing.piwikCallback();var e={};EurekaKing.log('Total user stories (segments) available: "'+EurekaKing.publisherNovel.userStories.length+'"'),EurekaKing.urlParam().ek_goalid&&EurekaKing.goal.set(EurekaKing.urlParam().ek_goalid),EurekaKing.goal.track(),EurekaKing.piwikUserDataObject.novelty==""?window.addEvent("piwikUserData",t):t()}}window.addEvent("domready",function(){window.onpopstate=history.onpushstate=function(e){(function(){EurekaKing.log("HTML5 History API browser URL change detected: "+window.location.href);var e=!1;EurekaKing.ls!==undefined&&EurekaKing.ls.get!==undefined&&EurekaKing.ls.get("ek_data_debug")!==undefined&&EurekaKing.ls.get("ek_data_debug")!==null&&EurekaKing.ls.get("ek_data_debug").url!==undefined&&(EurekaKing.ls.get("ek_data_debug").url!=""&&EurekaKing.ls.get("ek_data_debug").url!=undefined?e=EurekaKing.ls.get("ek_data_debug").url:e=!1),EurekaKing.href.requestSource!=window.location.href&&e!=window.location.href?(EurekaKing.log("New URL satisfied the conditions required to reload the prompt scripts"),EurekaKing.href.set(window.location.href),EurekaKing.reload()):EurekaKing.log("Upon checking, URL has not changed, ignoring pushstate event")}).delay(100)}})}.delay(100)},EurekaKing.ie().isTheBrowser&&EurekaKing.ie().actualVersion<11?console.log("Browser not supported, extension scripts not loaded"):EurekaKing.scriptsLoaded()};document.readyState==="complete"?(t(),this.log("DOM is ready.")):document.addEventListener?document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,!1),t(),EurekaKing.log("DOM is ready.")},!1):document.attachEvent&&document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"||"interactive")document.detachEvent("onreadystatechange",arguments.callee),t(),EurekaKing.log("DOM is ready.")})},reload:function(){this.logTime>2e3?(this.log("Eureka King Reload function activated."),this.launch(!0)):this.log("Eureka King Reload function NOT activated (less than 2s passed).")},piwikCallback:function(){if(this.publisherNovel.tools!==undefined){var e=this.publisherNovel.tools.piwik||5;this.log("Piwik site id: "+e);var t;window.location.host=="localhost"?_paq.push=function(){EurekaKing.log("Operating on localhost"),EurekaKing.log("Piwik output: "+arguments[0])}:(_paq.push(["setTrackerUrl",this.piwikURL+"/piwik.php"]),_paq.push(["getVisitorInfo"]),_paq.push(["setSiteId",e]),_paq.push([function(){t=this.getVisitorId()}]),this.log("visitor id from this.getVisitorId(): "+t)),_paq.push(["setCustomVariable",1,"clean_url",this.removeURLCampaigns(this.href.get()),"visit"]),_paq.push(["trackPageView"]);var n=eurekaKingTrackServers+"/index.php?module=API&method=Live.getVisitorProfile&visitorId="+t+"&idSite="+this.publisherNovel.tools.piwik+"&format=json&token_auth=9b226396340d64d624ce148cda0f63f1";EurekaKing.piwikUserDataObject.novelty==""&&this.piwikUserData(n)}},piwikUserDataObject:{novelty:"",referrer:"",deviceType:"",continent:"",country:"",os:"",browser:""},piwikUserData:function(e){EurekaKing.piwikUserDataObject.novelty=EurekaKing.piwikUserDataObject.referrer=EurekaKing.piwikUserDataObject.deviceType=EurekaKing.piwikUserDataObject.continent=EurekaKing.piwikUserDataObject.country=EurekaKing.piwikUserDataObject.os=EurekaKing.piwikUserDataObject.browser="notAcquired"},removeURLCampaigns:function(e){return e&&e.indexOf("&")>-1&&(e=e.split("&").filter(function(e){return!/^utm_/.test(e)}).join("&")),e&&e.indexOf("?")>-1&&(e=e.split("?").filter(function(e){return!/^utm_/.test(e)}).join("?")),e},renderTags:function(e){EKUIApreloadThisImg="",EKUIApreloadThisImg=e.split("[img]")[1];if(EKUIApreloadThisImg!=undefined&&EKUIApreloadThisImg!=""){EKUIApreloadThisImg=EKUIApreloadThisImg.split("[/img]")[0];var t=Asset.image(EKUIApreloadThisImg)}return e.replace(/\[img\]/g,'<img src="').replace(/\[\/img\]/g,'" />').replace(/\[link\=\"/g,'<a href="').replace(/\"\]/g,'">').replace(/\[\/link\]/g,"</a>")},stringEndsWith:function(e,t){return e.indexOf(t,e.length-t.length)!==-1},urlParam:function(){var e={},t=window.location.search.substring(1),n=t.split("&");for(var r=0;r<n.length;r++){var i=n[r].split("=");if(typeof e[i[0]]=="undefined")e[i[0]]=decodeURIComponent(i[1]);else if(typeof e[i[0]]=="string"){var s=[e[i[0]],decodeURIComponent(i[1])];e[i[0]]=s}else e[i[0]].push(decodeURIComponent(i[1]))}return e},ie:function(){"use strict";var e,t,n,r,i;return t=!1,r={5.5:"5.5",5.6:"6",5.7:"7",5.8:"8",9:"9",10:"10"},i=(new Function("/*@cc_on return @_jscript_version; @*/"))(),i!==undefined&&(t=!0,n=r[i]),e={isTheBrowser:t,actualVersion:n},e}};EurekaKing.launch();