var _paq=_paq||[];var u="http://lytix.forni.ca/";_paq.push(['setSiteId',location.href]);_paq.push(['setTrackerUrl',u+'trckr.php']);_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['setDocumentTitle',document.title])
if(!this.JSON2){this.JSON2={}}(function(){function d(f){return f<10?"0"+f:f}function l(n,m){var f=Object.prototype.toString.apply(n);if(f==="[object Date]"){return isFinite(n.valueOf())?n.getUTCFullYear()+"-"+d(n.getUTCMonth()+1)+"-"+d(n.getUTCDate())+"T"+d(n.getUTCHours())+":"+d(n.getUTCMinutes())+":"+d(n.getUTCSeconds())+"Z":null}if(f==="[object String]"||f==="[object Number]"||f==="[object Boolean]"){return n.valueOf()}if(f!=="[object Array]"&&typeof n.toJSON==="function"){return n.toJSON(m)}return n}var c=new RegExp("[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),e='\\\\\\"\x00-\x1f\x7f-\x9f\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":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;function a(f){i.lastIndex=0;return i.test(f)?'"'+f.replace(i,function(m){var n=k[m];return typeof n==="string"?n:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function g(s,p){var n,m,t,f,q=j,o,r=p[s];if(r&&typeof r==="object"){r=l(r,s)}if(typeof h==="function"){r=h.call(p,s,r)}switch(typeof r){case"string":return a(r);case"number":return isFinite(r)?String(r):"null";case"boolean":case"null":return String(r);case"object":if(!r){return"null"}j+=b;o=[];if(Object.prototype.toString.apply(r)==="[object Array]"){f=r.length;for(n=0;n<f;n+=1){o[n]=g(n,r)||"null"}t=o.length===0?"[]":j?"[\n"+j+o.join(",\n"+j)+"\n"+q+"]":"["+o.join(",")+"]";j=q;return t}if(h&&typeof h==="object"){f=h.length;for(n=0;n<f;n+=1){if(typeof h[n]==="string"){m=h[n];t=g(m,r);if(t){o.push(a(m)+(j?": ":":")+t)}}}}else{for(m in r){if(Object.prototype.hasOwnProperty.call(r,m)){t=g(m,r);if(t){o.push(a(m)+(j?": ":":")+t)}}}}t=o.length===0?"{}":j?"{\n"+j+o.join(",\n"+j)+"\n"+q+"}":"{"+o.join(",")+"}";j=q;return t}}if(typeof JSON2.stringify!=="function"){JSON2.stringify=function(o,m,n){var f;j="";b="";if(typeof n==="number"){for(f=0;f<n;f+=1){b+=" "}}else{if(typeof n==="string"){b=n}}h=m;if(m&&typeof m!=="function"&&(typeof m!=="object"||typeof m.length!=="number")){throw new Error("JSON.stringify")}return g("",{"":o})}}if(typeof JSON2.parse!=="function"){JSON2.parse=function(o,f){var n;function m(s,r){var q,p,t=s[r];if(t&&typeof t==="object"){for(q in t){if(Object.prototype.hasOwnProperty.call(t,q)){p=m(t,q);if(p!==undefined){t[q]=p}else{delete t[q]}}}}return f.call(s,r,t)}o=String(o);c.lastIndex=0;if(c.test(o)){o=o.replace(c,function(p){return"\\u"+("0000"+p.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"),""))){n=eval("("+o+")");return typeof f==="function"?m({"":n},""):n}throw new SyntaxError("JSON.parse")}}}());var _paq=_paq||[],Piwik=Piwik||(function(){var m,w={},d=document,j=navigator,v=screen,H=window,h=false,C=[],e=H.encodeURIComponent,I=H.decodeURIComponent,G,D;function b(i){return typeof i!=="undefined"}function a(i){return typeof i==="function"}function n(i){return typeof i==="object"}function q(i){return typeof i==="string"||i instanceof String}function z(J){var i=J.shift();if(q(i)){G[i].apply(G,J)}else{i.apply(G,J)}}function t(L,K,J,i){if(L.addEventListener){L.addEventListener(K,J,i);return true}if(L.attachEvent){return L.attachEvent("on"+K,J)}L["on"+K]=J}function g(K,N){var J="",M,L;for(M in w){if(Object.prototype.hasOwnProperty.call(w,M)){L=w[M][K];if(a(L)){J+=L(N)}}}return J}function B(){var i;g("unload");if(m){do{i=new Date()}while(i.getTime()<m)}}function k(){var J;if(!h){h=true;g("load");for(J=0;J<C.length;J++){C[J]()}}return true}function x(){var J;if(d.addEventListener){t(d,"DOMContentLoaded",function i(){d.removeEventListener("DOMContentLoaded",i,false);k()})}else{if(d.attachEvent){d.attachEvent("onreadystatechange",function i(){if(d.readyState==="complete"){d.detachEvent("onreadystatechange",i);k()}});if(d.documentElement.doScroll&&H===H.top){(function i(){if(!h){try{d.documentElement.doScroll("left")}catch(K){setTimeout(i,0);return}k()}}())}}}if((new RegExp("WebKit")).test(j.userAgent)){J=setInterval(function(){if(h||/loaded|complete/.test(d.readyState)){clearInterval(J);k()}},10)}t(H,"load",k,false)}function f(){var i="";try{i=H.top.document.referrer}catch(K){if(H.parent){try{i=H.parent.document.referrer}catch(J){i=""}}}if(i===""){i=d.referrer}return i}function A(i){var K=new RegExp("^([a-z]+):"),J=K.exec(i);return J?J[1]:null}function y(i){var K=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),J=K.exec(i);return J?J[1]:i}function p(K,J){var N=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+)[?])([^#]+)"),M=N.exec(K),L=new RegExp("(?:^|&)"+J+"=([^&]*)"),i=M?L.exec(M[1]):0;return i?I(i[1]):""}function s(O,L,K,N,J,M){var i;if(K){i=new Date();i.setTime(i.getTime()+K)}d.cookie=O+"="+e(L)+(K?";expires="+i.toGMTString():"")+";path="+(N||"/")+(J?";domain="+J:"")+(M?";secure":"")}function F(K){var i=new RegExp("(^|;)[ ]*"+K+"=([^;]*)"),J=i.exec(d.cookie);return J?I(J[2]):0}function r(i){return unescape(e(i))}function u(Z){var L=function(W,i){return(W<<i)|(W>>>(32-i))},aa=function(ag){var af="",ae,W;for(ae=7;ae>=0;ae--){W=(ag>>>(ae*4))&15;af+=W.toString(16)}return af},O,ac,ab,K=[],S=1732584193,Q=4023233417,P=2562383102,N=271733878,M=3285377520,Y,X,V,U,T,ad,J,R=[];Z=r(Z);J=Z.length;for(ac=0;ac<J-3;ac+=4){ab=Z.charCodeAt(ac)<<24|Z.charCodeAt(ac+1)<<16|Z.charCodeAt(ac+2)<<8|Z.charCodeAt(ac+3);R.push(ab)}switch(J&3){case 0:ac=2147483648;break;case 1:ac=Z.charCodeAt(J-1)<<24|8388608;break;case 2:ac=Z.charCodeAt(J-2)<<24|Z.charCodeAt(J-1)<<16|32768;break;case 3:ac=Z.charCodeAt(J-3)<<24|Z.charCodeAt(J-2)<<16|Z.charCodeAt(J-1)<<8|128;break}R.push(ac);while((R.length&15)!==14){R.push(0)}R.push(J>>>29);R.push((J<<3)&4294967295);for(O=0;O<R.length;O+=16){for(ac=0;ac<16;ac++){K[ac]=R[O+ac]}for(ac=16;ac<=79;ac++){K[ac]=L(K[ac-3]^K[ac-8]^K[ac-14]^K[ac-16],1)}Y=S;X=Q;V=P;U=N;T=M;for(ac=0;ac<=19;ac++){ad=(L(Y,5)+((X&V)|(~X&U))+T+K[ac]+1518500249)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}for(ac=20;ac<=39;ac++){ad=(L(Y,5)+(X^V^U)+T+K[ac]+1859775393)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}for(ac=40;ac<=59;ac++){ad=(L(Y,5)+((X&V)|(X&U)|(V&U))+T+K[ac]+2400959708)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}for(ac=60;ac<=79;ac++){ad=(L(Y,5)+(X^V^U)+T+K[ac]+3395469782)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}S=(S+Y)&4294967295;Q=(Q+X)&4294967295;P=(P+V)&4294967295;N=(N+U)&4294967295;M=(M+T)&4294967295}ad=aa(S)+aa(Q)+aa(P)+aa(N)+aa(M);return ad.toLowerCase()}function o(K,i,J){if(K==="translate.googleusercontent.com"){if(J===""){J=i}i=p(i,"u");K=y(i)}else{if(K==="cc.bingj.com"||K==="webcache.googleusercontent.com"||K.slice(0,5)==="74.6."){i=d.links[0].href;K=y(i)}}return[K,i,J]}function l(J){var i=J.length;if(J.charAt(--i)==="."){J=J.slice(0,i)}if(J.slice(0,2)==="*."){J=J.slice(1)}return J}function E(ab,ax){var M=o(d.domain,H.location.href,f()),aP=l(M[0]),a2=M[1],aD=M[2],aB="GET",L=ab||"",aT=ax||"",an,af=d.title,ah="7z|aac|ar[cj]|as[fx]|avi|bin|csv|deb|dmg|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|ms[ip]|od[bfgpst]|og[gv]|pdf|phps|png|ppt|qtm?|ra[mr]?|rpm|sea|sit|tar|t?bz2?|tgz|torrent|txt|wav|wm[av]|wpd||xls|xml|z|zip",az=[aP],P=[],ar=[],aa=[],ay=500,Q,ac,R,S,aj=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],ae=["pk_kwd","piwik_kwd","utm_term"],a0="_pk_",U,a1,aV,am,Y=63072000000,Z=1800000,ao=15768000000,X=d.location.protocol==="https",O=false,at={},aW=100,aJ={},aU={},aG=false,aE=false,aC,au,V,ai=u,aF,al;function aX(a5){var a6;if(R){a6=new RegExp("#.*");return a5.replace(a6,"")}return a5}function aO(a7,a5){var a8=A(a5),a6;if(a8){return a5}if(a5.slice(0,1)==="/"){return A(a7)+"://"+y(a7)+a5}a7=aX(a7);if((a6=a7.indexOf("?"))>=0){a7=a7.slice(0,a6)}if((a6=a7.lastIndexOf("/"))!==a7.length-1){a7=a7.slice(0,a6+1)}return a7+a5}function aA(a8){var a6,a5,a7;for(a6=0;a6<az.length;a6++){a5=l(az[a6].toLowerCase());if(a8===a5){return true}if(a5.slice(0,1)==="."){if(a8===a5.slice(1)){return true}a7=a8.length-a5.length;if((a7>0)&&(a8.slice(a7)===a5)){return true}}}return false}function a4(a5){var a6=new Image(1,1);a6.onLoad=function(){};a6.src=L+(L.indexOf("?")<0?"?":"&")+a5}function aL(a5){try{var a7=H.XDomainRequest?new H.XDomainRequest():H.XMLHttpRequest?new H.XMLHttpRequest():H.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;a7.open("POST",L,true);a7.onreadystatechange=function(){if(this.readyState===4&&this.status!==200){a4(a5)}};a7.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");a7.send(a5)}catch(a6){a4(a5)}}function ak(a7,a6){var a5=new Date();if(!aV){if(aB==="POST"){aL(a7)}else{a4(a7)}m=a5.getTime()+a6}}function aK(a5){return a0+a5+"."+aT+"."+aF}function N(){var a5=aK("testcookie");if(!b(j.cookieEnabled)){s(a5,"1");return F(a5)==="1"?"1":"0"}return j.cookieEnabled?"1":"0"}function av(){aF=ai((U||aP)+(a1||"/")).slice(0,4)}function W(){var a6=aK("cvar"),a5=F(a6);if(a5.length){a5=JSON2.parse(a5);if(n(a5)){return a5}}return{}}function K(){if(O===false){O=W()}}function aS(){var a5=new Date();aC=a5.getTime()}function T(a9,a6,a5,a8,a7,ba){s(aK("id"),a9+"."+a6+"."+a5+"."+a8+"."+a7+"."+ba,Y,a1,U,X)}function J(){var a6=new Date(),a5=Math.round(a6.getTime()/1000),a8=F(aK("id")),a7;if(a8){a7=a8.split(".");a7.unshift("0")}else{if(!al){al=ai((j.userAgent||"")+(j.platform||"")+JSON2.stringify(aU)+a5).slice(0,16)}a7=["1",al,a5,0,a5,"",""]}return a7}function i(){var a5=F(aK("ref"));if(a5.length){try{a5=JSON2.parse(a5);if(n(a5)){return a5}}catch(a6){}}return["","",0,""]}function ag(a7,bv,bw,a9){var bt,a6=new Date(),bf=Math.round(a6.getTime()/1000),by,bu,bb,bm,bq,be,bo,bc,bs,ba=1024,bz,bi,bp=O,bk=aK("id"),bg=aK("ses"),bh=aK("ref"),bA=aK("cvar"),bn=J(),bj=F(bg),br=i(),bx=an||a2,bd,a5;if(aV){s(bk,"",-1,a1,U);s(bg,"",-1,a1,U);s(bA,"",-1,a1,U);s(bh,"",-1,a1,U);return""}by=bn[0];bu=bn[1];bm=bn[2];bb=bn[3];bq=bn[4];be=bn[5];if(!b(bn[6])){bn[6]=""}bo=bn[6];if(!b(a9)){a9=""}bd=br[0];a5=br[1];bc=br[2];bs=br[3];if(!bj){bb++;be=bq;if(!am||!bd.length){for(bt in aj){if(Object.prototype.hasOwnProperty.call(aj,bt)){bd=p(bx,aj[bt]);if(bd.length){break}}}for(bt in ae){if(Object.prototype.hasOwnProperty.call(ae,bt)){a5=p(bx,ae[bt]);if(a5.length){break}}}}bz=y(aD);bi=bs.length?y(bs):"";if(bz.length&&!aA(bz)&&(!am||!bi.length||aA(bi))){bs=aD}if(bs.length||bd.length){bc=bf;br=[bd,a5,bc,aX(bs.slice(0,ba))];s(bh,JSON2.stringify(br),ao,a1,U,X)}}a7+="&idsite="+aT+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+a6.getHours()+"&m="+a6.getMinutes()+"&s="+a6.getSeconds()+"&url="+e(aX(bx))+(aD.length?"&urlref="+e(aX(aD)):"")+"&_id="+bu+"&_idts="+bm+"&_idvc="+bb+"&_idn="+by+(bd.length?"&_rcn="+e(bd):"")+(a5.length?"&_rck="+e(a5):"")+"&_refts="+bc+"&_viewts="+be+(String(bo).length?"&_ects="+bo:"")+(String(bs).length?"&_ref="+e(aX(bs.slice(0,ba))):"");var a8=JSON2.stringify(at);if(a8.length>2){a7+="&cvar="+e(a8)}for(bt in aU){if(Object.prototype.hasOwnProperty.call(aU,bt)){a7+="&"+bt+"="+aU[bt]}}if(bv){a7+="&data="+e(JSON2.stringify(bv))}else{if(S){a7+="&data="+e(JSON2.stringify(S))}}if(O){var bl=JSON2.stringify(O);if(bl.length>2){a7+="&_cvar="+e(bl)}for(bt in bp){if(Object.prototype.hasOwnProperty.call(bp,bt)){if(O[bt][0]===""||O[bt][1]===""){delete O[bt]}}}s(bA,JSON2.stringify(O),Z,a1,U,X)}T(bu,bm,bb,bf,be,b(a9)&&String(a9).length?a9:bo);s(bg,"*",Z,a1,U,X);a7+=g(bw);return a7}function aN(a8,a7,bc,a9,a5,bf){var ba="idgoal=0",bb,a6=new Date(),bd=[],be;if(String(a8).length){ba+="&ec_id="+e(a8);bb=Math.round(a6.getTime()/1000)}ba+="&revenue="+a7;if(String(bc).length){ba+="&ec_st="+bc}if(String(a9).length){ba+="&ec_tx="+a9}if(String(a5).length){ba+="&ec_sh="+a5}if(String(bf).length){ba+="&ec_dt="+bf}if(aJ){for(be in aJ){if(Object.prototype.hasOwnProperty.call(aJ,be)){if(!b(aJ[be][1])){aJ[be][1]=""}if(!b(aJ[be][2])){aJ[be][2]=""}if(!b(aJ[be][3])||String(aJ[be][3]).length===0){aJ[be][3]=0}if(!b(aJ[be][4])||String(aJ[be][4]).length===0){aJ[be][4]=1}bd.push(aJ[be])}}ba+="&ec_items="+e(JSON2.stringify(bd))}ba=ag(ba,S,"ecommerce",bb);ak(ba,ay)}function aM(a5,a9,a8,a7,a6,ba){if(String(a5).length&&b(a9)){aN(a5,a9,a8,a7,a6,ba)}}function aZ(a5){if(b(a5)){aN("",a5,"","","","")}}function aq(a8,a9){var a5=new Date(),a7=ag("action_name="+e(a8||af),a9,"log");ak(a7,ay);if(Q&&ac&&!aE){aE=true;t(d,"click",aS);t(d,"mouseup",aS);t(d,"mousedown",aS);t(d,"mousemove",aS);t(d,"mousewheel",aS);t(H,"DOMMouseScroll",aS);t(H,"scroll",aS);t(d,"keypress",aS);t(d,"keydown",aS);t(d,"keyup",aS);t(H,"resize",aS);t(H,"focus",aS);t(H,"blur",aS);aC=a5.getTime();setTimeout(function a6(){var ba=new Date(),bb;if((aC+ac)>ba.getTime()){if(Q<ba.getTime()){bb=ag("ping=1",a9,"ping");ak(bb,ay)}setTimeout(a6,ac)}},ac)}}function aw(a5,a8,a7){var a6=ag("idgoal="+a5+(a8?"&revenue="+a8:""),a7,"goal");ak(a6,ay)}function aR(a6,a5,a8){var a7=ag(a5+"="+e(aX(a6)),a8,"link");ak(a7,ay)}function ad(a7,a6){var a8,a5="(^| )(piwik[_-]"+a6;if(a7){for(a8=0;a8<a7.length;a8++){a5+="|"+a7[a8]}}a5+=")( |$)";return new RegExp(a5)}function aQ(a8,a5,a9){if(!a9){return"link"}var a7=ad(ar,"download"),a6=ad(aa,"link"),ba=new RegExp("\\.("+ah+")([?&#]|$)","i");return a6.test(a8)?"link":(a7.test(a8)||ba.test(a5)?"download":0)}function aI(ba){var a8,a6,a5;while(!!(a8=ba.parentNode)&&((a6=ba.tagName)!=="A"&&a6!=="AREA")){ba=a8}if(b(ba.href)){var bb=ba.hostname||y(ba.href),bc=bb.toLowerCase(),a7=ba.href.replace(bb,bc),a9=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript):","i");if(!a9.test(a7)){a5=aQ(ba.className,a7,aA(bc));if(a5){aR(a7,a5)}}}}function a3(a5){var a6,a7;a5=a5||H.event;a6=a5.which||a5.button;a7=a5.target||a5.srcElement;if(a5.type==="click"){if(a7){aI(a7)}}else{if(a5.type==="mousedown"){if((a6===1||a6===2)&&a7){au=a6;V=a7}else{au=V=null}}else{if(a5.type==="mouseup"){if(a6===au&&a7===V){aI(a7)}au=V=null}}}}function aH(a6,a5){if(a5){t(a6,"mouseup",a3,false);t(a6,"mousedown",a3,false)}else{t(a6,"click",a3,false)}}function ap(a6){if(!aG){aG=true;var a7,a5=ad(P,"ignore"),a8=d.links;if(a8){for(a7=0;a7<a8.length;a7++){if(!a5.test(a8[a7].className)){aH(a8[a7],a6)}}}}}function aY(){var a5,a6,a7={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"};if(j.mimeTypes&&j.mimeTypes.length){for(a5 in a7){if(Object.prototype.hasOwnProperty.call(a7,a5)){a6=j.mimeTypes[a7[a5]];aU[a5]=(a6&&a6.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&b(j.javaEnabled)&&j.javaEnabled()){aU.java="1"}if(a(H.GearsFactory)){aU.gears="1"}aU.res=v.width+"x"+v.height;aU.cookie=N()}aY();av();return{getVisitorId:function(){return(J())[1]},getVisitorInfo:function(){return J()},getAttributionInfo:function(){return i()},getAttributionCampaignName:function(){return i()[0]},getAttributionCampaignKeyword:function(){return i()[1]},getAttributionReferrerTimestamp:function(){return i()[2]},getAttributionReferrerUrl:function(){return i()[3]},setTrackerUrl:function(a5){L=a5},setSiteId:function(a5){aT=a5},setCustomData:function(a5,a6){if(n(a5)){S=a5}else{if(!S){S=[]}S[a5]=a6}},getCustomData:function(){return S},setCustomVariable:function(a6,a5,a9,a7){var a8;if(!b(a7)){a7="visit"}if(a6>0){a8=[a5.slice(0,aW),a9.slice(0,aW)];if(a7==="visit"||a7===2){K();O[a6]=a8}else{if(a7==="page"||a7===3){at[a6]=a8}}}},getCustomVariable:function(a6,a7){var a5;if(!b(a7)){a7="visit"}if(a7==="page"||a7===3){a5=at[a6]}else{if(a7==="visit"||a7===2){K();a5=O[a6]}}if(!b(a5)||(a5&&a5[0]==="")){return false}return a5},deleteCustomVariable:function(a5,a6){if(this.getCustomVariable(a5,a6)){this.setCustomVariable(a5,"","",a6)}},setLinkTrackingTimer:function(a5){ay=a5},setDownloadExtensions:function(a5){ah=a5},addDownloadExtensions:function(a5){ah+="|"+a5},setDomains:function(a5){az=q(a5)?[a5]:a5;az.push(aP)},setIgnoreClasses:function(a5){P=q(a5)?[a5]:a5},setRequestMethod:function(a5){aB=a5||"GET"},setReferrerUrl:function(a5){aD=a5},setCustomUrl:function(a5){an=aO(a2,a5)},setDocumentTitle:function(a5){af=a5},setDownloadClasses:function(a5){ar=q(a5)?[a5]:a5},setLinkClasses:function(a5){aa=q(a5)?[a5]:a5},setCampaignNameKey:function(a5){aj=q(a5)?[a5]:a5},setCampaignKeywordKey:function(a5){ae=q(a5)?[a5]:a5},discardHashTag:function(a5){R=a5},setCookieNamePrefix:function(a5){a0=a5;O=W()},setCookieDomain:function(a5){U=l(a5);av()},setCookiePath:function(a5){a1=a5;av()},setVisitorCookieTimeout:function(a5){Y=a5*1000},setSessionCookieTimeout:function(a5){Z=a5*1000},setReferralCookieTimeout:function(a5){ao=a5*1000},setConversionAttributionFirstReferrer:function(a5){am=a5},setDoNotTrack:function(a5){aV=a5&&j.doNotTrack},addListener:function(a6,a5){aH(a6,a5)},enableLinkTracking:function(a5){if(h){ap(a5)}else{C.push(function(){ap(a5)})}},setHeartBeatTimer:function(a7,a6){var a5=new Date();Q=a5.getTime()+a7*1000;ac=a6*1000},killFrame:function(){if(H.location!==H.top.location){H.top.location=H.location}},redirectFile:function(a5){if(H.location.protocol==="file:"){H.location=a5}},trackGoal:function(a5,a7,a6){aw(a5,a7,a6)},trackLink:function(a6,a5,a7){aR(a6,a5,a7)},trackPageView:function(a5,a6){aq(a5,a6)},setEcommerceView:function(a7,a5,a6){if(b(a7)&&a7.length){at[3]=["_pks",a7]}if(b(a5)&&a5.length){at[4]=["_pkn",a5]}if(b(a6)&&a6.length){at[5]=["_pkc",a6]}},addEcommerceItem:function(a9,a5,a7,a6,a8){if(a9.length){aJ[a9]=[a9,a5,a7,a6,a8]}},trackEcommerceOrder:function(a5,a9,a8,a7,a6,ba){aM(a5,a9,a8,a7,a6,ba)},trackEcommerceCartUpdate:function(a5){aZ(a5)}}}function c(){return{push:z}}t(H,"beforeunload",B,false);x();G=new E();for(D=0;D<_paq.length;D++){z(_paq[D])}_paq=new c();return{addPlugin:function(i,J){w[i]=J},getTracker:function(i,J){return new E(i,J)},getAsyncTracker:function(){return G}}}()),piwik_track,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);if(!!(c=a("tracker_pause"))){e.setLinkTrackingTimer(c)}if(!!(c=a("download_extensions"))){e.setDownloadExtensions(c)}if(!!(c=a("hosts_alias"))){e.setDomains(c)}if(!!(c=a("ignore_classes"))){e.setIgnoreClasses(c)}e.trackPageView();if((a("install_tracker"))){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}};(function(){var root=this;var previousUnderscore=root._;var breaker={};var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var slice=ArrayProto.slice,unshift=ArrayProto.unshift,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var
nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind;var _=function(obj){return new wrapper(obj);};if(typeof module!=='undefined'&&module.exports){module.exports=_;_._=_;}else{root['_']=_;}
_.VERSION='1.1.7';var each=_.each=_.forEach=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach){obj.forEach(iterator,context);}else if(obj.length===+obj.length){for(var i=0,l=obj.length;i<l;i++){if(i in obj&&iterator.call(context,obj[i],i,obj)===breaker)return;}}else{for(var key in obj){if(hasOwnProperty.call(obj,key)){if(iterator.call(context,obj[key],key,obj)===breaker)return;}}}};_.map=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list);});return results;};_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=memo!==void 0;if(obj==null)obj=[];if(nativeReduce&&obj.reduce===nativeReduce){if(context)iterator=_.bind(iterator,context);return initial?obj.reduce(iterator,memo):obj.reduce(iterator);}
each(obj,function(value,index,list){if(!initial){memo=value;initial=true;}else{memo=iterator.call(context,memo,value,index,list);}});if(!initial)throw new TypeError("Reduce of empty array with no initial value");return memo;};_.reduceRight=_.foldr=function(obj,iterator,memo,context){if(obj==null)obj=[];if(nativeReduceRight&&obj.reduceRight===nativeReduceRight){if(context)iterator=_.bind(iterator,context);return memo!==void 0?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);}
var reversed=(_.isArray(obj)?obj.slice():_.toArray(obj)).reverse();return _.reduce(reversed,iterator,memo,context);};_.find=_.detect=function(obj,iterator,context){var result;any(obj,function(value,index,list){if(iterator.call(context,value,index,list)){result=value;return true;}});return result;};_.filter=_.select=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeFilter&&obj.filter===nativeFilter)return obj.filter(iterator,context);each(obj,function(value,index,list){if(iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.reject=function(obj,iterator,context){var results=[];if(obj==null)return results;each(obj,function(value,index,list){if(!iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.every=_.all=function(obj,iterator,context){var result=true;if(obj==null)return result;if(nativeEvery&&obj.every===nativeEvery)return obj.every(iterator,context);each(obj,function(value,index,list){if(!(result=result&&iterator.call(context,value,index,list)))return breaker;});return result;};var any=_.some=_.any=function(obj,iterator,context){iterator=iterator||_.identity;var result=false;if(obj==null)return result;if(nativeSome&&obj.some===nativeSome)return obj.some(iterator,context);each(obj,function(value,index,list){if(result|=iterator.call(context,value,index,list))return breaker;});return!!result;};_.include=_.contains=function(obj,target){var found=false;if(obj==null)return found;if(nativeIndexOf&&obj.indexOf===nativeIndexOf)return obj.indexOf(target)!=-1;any(obj,function(value){if(found=value===target)return true;});return found;};_.invoke=function(obj,method){var args=slice.call(arguments,2);return _.map(obj,function(value){return(method.call?method||value:value[method]).apply(value,args);});};_.pluck=function(obj,key){return _.map(obj,function(value){return value[key];});};_.max=function(obj,iterator,context){if(!iterator&&_.isArray(obj))return Math.max.apply(Math,obj);var result={computed:-Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed>=result.computed&&(result={value:value,computed:computed});});return result.value;};_.min=function(obj,iterator,context){if(!iterator&&_.isArray(obj))return Math.min.apply(Math,obj);var result={computed:Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed<result.computed&&(result={value:value,computed:computed});});return result.value;};_.sortBy=function(obj,iterator,context){return _.pluck(_.map(obj,function(value,index,list){return{value:value,criteria:iterator.call(context,value,index,list)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}),'value');};_.groupBy=function(obj,iterator){var result={};each(obj,function(value,index){var key=iterator(value,index);(result[key]||(result[key]=[])).push(value);});return result;};_.sortedIndex=function(array,obj,iterator){iterator||(iterator=_.identity);var low=0,high=array.length;while(low<high){var mid=(low+high)>>1;iterator(array[mid])<iterator(obj)?low=mid+1:high=mid;}
return low;};_.toArray=function(iterable){if(!iterable)return[];if(iterable.toArray)return iterable.toArray();if(_.isArray(iterable))return slice.call(iterable);if(_.isArguments(iterable))return slice.call(iterable);return _.values(iterable);};_.size=function(obj){return _.toArray(obj).length;};_.first=_.head=function(array,n,guard){return(n!=null)&&!guard?slice.call(array,0,n):array[0];};_.rest=_.tail=function(array,index,guard){return slice.call(array,(index==null)||guard?1:index);};_.last=function(array){return array[array.length-1];};_.compact=function(array){return _.filter(array,function(value){return!!value;});};_.flatten=function(array){return _.reduce(array,function(memo,value){if(_.isArray(value))return memo.concat(_.flatten(value));memo[memo.length]=value;return memo;},[]);};_.without=function(array){return _.difference(array,slice.call(arguments,1));};_.uniq=_.unique=function(array,isSorted,iterator){var initial=iterator?_.map(array,iterator):array;var result=[];_.reduce(initial,function(memo,el,i){if(0==i||(isSorted===true?_.last(memo)!=el:!_.include(memo,el))){memo[memo.length]=el;result[result.length]=array[i];}
return memo;},[]);return result;};_.union=function(){return _.uniq(_.flatten(arguments));};_.intersection=_.intersect=function(array){var rest=slice.call(arguments,1);return _.filter(_.uniq(array),function(item){return _.every(rest,function(other){return _.indexOf(other,item)>=0;});});};_.difference=function(array,other){return _.filter(array,function(value){return!_.include(other,value);});};_.zip=function(){var args=slice.call(arguments);var length=_.max(_.pluck(args,'length'));var results=new Array(length);for(var i=0;i<length;i++)results[i]=_.pluck(args,""+i);return results;};_.indexOf=function(array,item,isSorted){if(array==null)return-1;var i,l;if(isSorted){i=_.sortedIndex(array,item);return array[i]===item?i:-1;}
if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item);for(i=0,l=array.length;i<l;i++)if(array[i]===item)return i;return-1;};_.lastIndexOf=function(array,item){if(array==null)return-1;if(nativeLastIndexOf&&array.lastIndexOf===nativeLastIndexOf)return array.lastIndexOf(item);var i=array.length;while(i--)if(array[i]===item)return i;return-1;};_.range=function(start,stop,step){if(arguments.length<=1){stop=start||0;start=0;}
step=arguments[2]||1;var len=Math.max(Math.ceil((stop-start)/step),0);var idx=0;var range=new Array(len);while(idx<len){range[idx++]=start;start+=step;}
return range;};_.bind=function(func,obj){if(func.bind===nativeBind&&nativeBind)return nativeBind.apply(func,slice.call(arguments,1));var args=slice.call(arguments,2);return function(){return func.apply(obj,args.concat(slice.call(arguments)));};};_.bindAll=function(obj){var funcs=slice.call(arguments,1);if(funcs.length==0)funcs=_.functions(obj);each(funcs,function(f){obj[f]=_.bind(obj[f],obj);});return obj;};_.memoize=function(func,hasher){var memo={};hasher||(hasher=_.identity);return function(){var key=hasher.apply(this,arguments);return hasOwnProperty.call(memo,key)?memo[key]:(memo[key]=func.apply(this,arguments));};};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(func,args);},wait);};_.defer=function(func){return _.delay.apply(_,[func,1].concat(slice.call(arguments,1)));};var limit=function(func,wait,debounce){var timeout;return function(){var context=this,args=arguments;var throttler=function(){timeout=null;func.apply(context,args);};if(debounce)clearTimeout(timeout);if(debounce||!timeout)timeout=setTimeout(throttler,wait);};};_.throttle=function(func,wait){return limit(func,wait,false);};_.debounce=function(func,wait){return limit(func,wait,true);};_.once=function(func){var ran=false,memo;return function(){if(ran)return memo;ran=true;return memo=func.apply(this,arguments);};};_.wrap=function(func,wrapper){return function(){var args=[func].concat(slice.call(arguments));return wrapper.apply(this,args);};};_.compose=function(){var funcs=slice.call(arguments);return function(){var args=slice.call(arguments);for(var i=funcs.length-1;i>=0;i--){args=[funcs[i].apply(this,args)];}
return args[0];};};_.after=function(times,func){return function(){if(--times<1){return func.apply(this,arguments);}};};_.keys=nativeKeys||function(obj){if(obj!==Object(obj))throw new TypeError('Invalid object');var keys=[];for(var key in obj)if(hasOwnProperty.call(obj,key))keys[keys.length]=key;return keys;};_.values=function(obj){return _.map(obj,_.identity);};_.functions=_.methods=function(obj){var names=[];for(var key in obj){if(_.isFunction(obj[key]))names.push(key);}
return names.sort();};_.extend=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){if(source[prop]!==void 0)obj[prop]=source[prop];}});return obj;};_.defaults=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){if(obj[prop]==null)obj[prop]=source[prop];}});return obj;};_.clone=function(obj){return _.isArray(obj)?obj.slice():_.extend({},obj);};_.tap=function(obj,interceptor){interceptor(obj);return obj;};_.isEqual=function(a,b){if(a===b)return true;var atype=typeof(a),btype=typeof(b);if(atype!=btype)return false;if(a==b)return true;if((!a&&b)||(a&&!b))return false;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual)return a.isEqual(b);if(b.isEqual)return b.isEqual(a);if(_.isDate(a)&&_.isDate(b))return a.getTime()===b.getTime();if(_.isNaN(a)&&_.isNaN(b))return false;if(_.isRegExp(a)&&_.isRegExp(b))
return a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if(atype!=='object')return false;if(a.length&&(a.length!==b.length))return false;var aKeys=_.keys(a),bKeys=_.keys(b);if(aKeys.length!=bKeys.length)return false;for(var key in a)if(!(key in b)||!_.isEqual(a[key],b[key]))return false;return true;};_.isEmpty=function(obj){if(_.isArray(obj)||_.isString(obj))return obj.length===0;for(var key in obj)if(hasOwnProperty.call(obj,key))return false;return true;};_.isElement=function(obj){return!!(obj&&obj.nodeType==1);};_.isArray=nativeIsArray||function(obj){return toString.call(obj)==='[object Array]';};_.isObject=function(obj){return obj===Object(obj);};_.isArguments=function(obj){return!!(obj&&hasOwnProperty.call(obj,'callee'));};_.isFunction=function(obj){return!!(obj&&obj.constructor&&obj.call&&obj.apply);};_.isString=function(obj){return!!(obj===''||(obj&&obj.charCodeAt&&obj.substr));};_.isNumber=function(obj){return!!(obj===0||(obj&&obj.toExponential&&obj.toFixed));};_.isNaN=function(obj){return obj!==obj;};_.isBoolean=function(obj){return obj===true||obj===false;};_.isDate=function(obj){return!!(obj&&obj.getTimezoneOffset&&obj.setUTCFullYear);};_.isRegExp=function(obj){return!!(obj&&obj.test&&obj.exec&&(obj.ignoreCase||obj.ignoreCase===false));};_.isNull=function(obj){return obj===null;};_.isUndefined=function(obj){return obj===void 0;};_.noConflict=function(){root._=previousUnderscore;return this;};_.identity=function(value){return value;};_.times=function(n,iterator,context){for(var i=0;i<n;i++)iterator.call(context,i);};_.mixin=function(obj){each(_.functions(obj),function(name){addToWrapper(name,_[name]=obj[name]);});};var idCounter=0;_.uniqueId=function(prefix){var id=idCounter++;return prefix?prefix+id:id;};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};_.template=function(str,data){var c=_.templateSettings;var tmpl='var __p=[],print=function(){__p.push.apply(__p,arguments);};'+'with(obj||{}){__p.push(\''+
str.replace(/\\/g,'\\\\').replace(/'/g,"\\'").replace(c.interpolate,function(match,code){return"',"+code.replace(/\\'/g,"'")+",'";}).replace(c.evaluate||null,function(match,code){return"');"+code.replace(/\\'/g,"'").replace(/[\r\n\t]/g,' ')+"__p.push('";}).replace(/\r/g,'\\r').replace(/\n/g,'\\n').replace(/\t/g,'\\t')
+"');}return __p.join('');";var func=new Function('obj',tmpl);return data?func(data):func;};var wrapper=function(obj){this._wrapped=obj;};_.prototype=wrapper.prototype;var result=function(obj,chain){return chain?_(obj).chain():obj;};var addToWrapper=function(name,func){wrapper.prototype[name]=function(){var args=slice.call(arguments);unshift.call(args,this._wrapped);return result(func.apply(_,args),this._chain);};};_.mixin(_);each(['pop','push','reverse','shift','sort','splice','unshift'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){method.apply(this._wrapped,arguments);return result(this._wrapped,this._chain);};});each(['concat','join','slice'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){return result(method.apply(this._wrapped,arguments),this._chain);};});wrapper.prototype.chain=function(){this._chain=true;return this;};wrapper.prototype.value=function(){return this._wrapped;};})();'use strict';(function(root){var nativeTrim=String.prototype.trim;var emailRegex=/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;var parseNumber=function(source){return source*1||0;};var strRepeat=function(i,m){for(var o=[];m>0;o[--m]=i);return o.join('');};var sprintf=(function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase();}
var str_repeat=strRepeat;var str_format=function(){if(!str_format.cache.hasOwnProperty(arguments[0])){str_format.cache[arguments[0]]=str_format.parse(arguments[0]);}
return str_format.format.call(null,str_format.cache[arguments[0]],arguments);};str_format.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type='',arg,output=[],i,k,match,pad,pad_character,pad_length;for(i=0;i<tree_length;i++){node_type=get_type(parse_tree[i]);if(node_type==='string'){output.push(parse_tree[i]);}
else if(node_type==='array'){match=parse_tree[i];if(match[2]){arg=argv[cursor];for(k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k])){throw(sprintf('[_.sprintf] property "%s" does not exist',match[2][k]));}
arg=arg[match[2][k]];}}else if(match[1]){arg=argv[match[1]];}
else{arg=argv[cursor++];}
if(/[^s]/.test(match[8])&&(get_type(arg)!='number')){throw(sprintf('[_.sprintf] expecting number but found %s',get_type(arg)));}
switch(match[8]){case'b':arg=arg.toString(2);break;case'c':arg=String.fromCharCode(arg);break;case'd':arg=parseInt(arg,10);break;case'e':arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case'f':arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case'o':arg=arg.toString(8);break;case's':arg=((arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg);break;case'u':arg=Math.abs(arg);break;case'x':arg=arg.toString(16);break;case'X':arg=arg.toString(16).toUpperCase();break;}
arg=(/[def]/.test(match[8])&&match[3]&&arg>=0?'+'+arg:arg);pad_character=match[4]?match[4]=='0'?'0':match[4].charAt(1):' ';pad_length=match[6]-String(arg).length;pad=match[6]?str_repeat(pad_character,pad_length):'';output.push(match[5]?arg+pad:pad+arg);}}
return output.join('');};str_format.cache={};str_format.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=/^[^\x25]+/.exec(_fmt))!==null){parse_tree.push(match[0]);}
else if((match=/^\x25{2}/.exec(_fmt))!==null){parse_tree.push('%');}
else if((match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);while((replacement_field=replacement_field.substring(field_match[0].length))!==''){if((field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);}
else if((field_match=/^\[(\d+)\]/.exec(replacement_field))!==null){field_list.push(field_match[1]);}
else{throw('[_.sprintf] huh?');}}}
else{throw('[_.sprintf] huh?');}
match[2]=field_list;}
else{arg_names|=2;}
if(arg_names===3){throw('[_.sprintf] mixing positional and named placeholders is not (yet) supported');}
parse_tree.push(match);}
else{throw('[_.sprintf] huh?');}
_fmt=_fmt.substring(match[0].length);}
return parse_tree;};return str_format;})();var slice=function(a){return Array.prototype.slice.call(a);};var defaultToWhiteSpace=function(characters){if(characters){return _s.escapeRegExp(characters);}
return'\\s';};var urlRegex=(function(){var alpha='a-z',alnum=alpha+'\\d',hex='a-f\\d',unreserved='-_.!~*\'()'+alnum,reserved=';/?:@&=+$,\\[\\]',escaped='%['+hex+']{2}',uric='(?:['+unreserved+reserved+']|'+escaped+')',userinfo='(?:['+unreserved+';:&=+$,]|'+escaped+')*',domlabel='(?:['+alnum+'](?:[-'+alnum+']*['+alnum+'])?)',toplabel='(?:['+alpha+'](?:[-'+alnum+']*['+alnum+'])?)',ipv4addr='\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}',hex4='['+hex+']{1,4}',lastpart='(?:'+hex4+'|'+ipv4addr+')',hexseq1='(?:'+hex4+':)*'+hex4,hexseq2='(?:'+hex4+':)*'+lastpart,ipv6addr='(?:'+hexseq2+'|(?:'+hexseq1+')?::(?:'+hexseq2+')?)',ipv6ref='\\['+ipv6addr+'\\]',hostname='(?:'+domlabel+'\\.)*'+toplabel+'\\.?',host='(?:'+hostname+'|'+ipv4addr+'|'+ipv6ref+')',pchar='(?:['+unreserved+':@&=+$,]|'+escaped+')',param=pchar+'*',segment=pchar+'*(?:;'+param+')*',path_segments=segment+'(?:/'+segment+')*',path='/'+path_segments,query=uric+'*',fragment=query,port='\\:\\d+',authority='(?:'+userinfo+'@)?'+host+'(?:'+port+')?';function makeSchemes(schemes){return'(?:'+schemes.join('|')+')://';}
var defaultSchemes='(?:'+makeSchemes(['http','https'])+'|//)';return function(schemes){var scheme=schemes&&schemes.length?makeSchemes(schemes):defaultSchemes,regexStr='^'+scheme+authority+'(?:'+path+')?'+'(?:\\?'+query+')?'+'(?:#'+fragment+')?$';return new RegExp(regexStr,'i');};})();var defaultUrlRegex=urlRegex();var _s={isURL:function(){var schemes=slice(arguments),str=schemes.shift(),regex=schemes.length?urlRegex(schemes):defaultUrlRegex;return regex.test(str);},isBlank:function(str){return str==false;},isEmail:function(str){return emailRegex.test(str);},stripTags:function(str){return str.replace(/<\/?[^>]+>/ig,'');},capitalize:function(str){return str.charAt(0).toUpperCase()+str.substring(1).toLowerCase();},chop:function(str,step){step=step||str.length;var arr=[];for(var i=0;i<str.length;){arr.push(str.slice(i,i+step));i=i+step;}
return arr;},clean:function(str){return _s.strip(str.replace(/\s+/g,' '));},count:function(str,substr){var count=0,index;for(var i=0;i<str.length;){index=str.indexOf(substr,i);index>=0&&count++;i=i+(index>=0?index:0)+substr.length;}
return count;},chars:function(str){return str.split('');},escapeHTML:function(str){return String(str||'').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,"&apos;");},unescapeHTML:function(str){return String(str||'').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,'&');},escapeRegExp:function(str){return String(str||'').replace(/([-.*+?^${}()|[\]\/\\])/g,'\\$1');},insert:function(str,i,substr){var arr=str.split('');arr.splice(i,0,substr);return arr.join('');},includes:function(str,needle){return str.indexOf(needle)!==-1;},join:function(sep){var args=slice(arguments);return args.join(args.shift());},lines:function(str){return str.split("\n");},reverse:function(str){return Array.prototype.reverse.apply(str.split('')).join('');},splice:function(str,i,howmany,substr){var arr=str.split('');arr.splice(i,howmany,substr);return arr.join('');},startsWith:function(str,starts){return str.length>=starts.length&&str.substring(0,starts.length)===starts;},endsWith:function(str,ends){return str.length>=ends.length&&str.substring(str.length-ends.length)===ends;},succ:function(str){var arr=str.split('');arr.splice(str.length-1,1,String.fromCharCode(str.charCodeAt(str.length-1)+1));return arr.join('');},titleize:function(str){var arr=str.split(' '),word;for(var i=0;i<arr.length;i++){word=arr[i].split('');if(typeof word[0]!=='undefined')word[0]=word[0].toUpperCase();i+1===arr.length?arr[i]=word.join(''):arr[i]=word.join('')+' ';}
return arr.join('');},camelize:function(str){return _s.trim(str).replace(/(\-|_|\s)+(.)?/g,function(match,separator,chr){return chr?chr.toUpperCase():'';});},underscored:function(str){return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g,'$1_$2').replace(/\-|\s+/g,'_').toLowerCase();},dasherize:function(str){return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g,'$1-$2').replace(/^([A-Z]+)/,'-$1').replace(/\_|\s+/g,'-').toLowerCase();},trim:function(str,characters){if(!characters&&nativeTrim){return nativeTrim.call(str);}
characters=defaultToWhiteSpace(characters);return str.replace(new RegExp('\^['+characters+']+|['+characters+']+$','g'),'');},ltrim:function(str,characters){characters=defaultToWhiteSpace(characters);return str.replace(new RegExp('\^['+characters+']+','g'),'');},rtrim:function(str,characters){characters=defaultToWhiteSpace(characters);return str.replace(new RegExp('['+characters+']+$','g'),'');},truncate:function(str,length,truncateStr){truncateStr=truncateStr||'...';return str.length>length?str.slice(0,length)+truncateStr:str;},words:function(str,delimiter){delimiter=delimiter||" ";return str.split(delimiter);},pad:function(str,length,padStr,type){var padding='',padlen=0;if(!padStr){padStr=' ';}
else if(padStr.length>1){padStr=padStr[0];}
switch(type){case'right':padlen=(length-str.length);padding=strRepeat(padStr,padlen);str=str+padding;break;case'both':padlen=(length-str.length);padding={'left':strRepeat(padStr,Math.ceil(padlen/2)),'right':strRepeat(padStr,Math.floor(padlen/2))};str=padding.left+str+padding.right;break;default:padlen=(length-str.length);padding=strRepeat(padStr,padlen);;str=padding+str;}
return str;},lpad:function(str,length,padStr){return _s.pad(str,length,padStr);},rpad:function(str,length,padStr){return _s.pad(str,length,padStr,'right');},lrpad:function(str,length,padStr){return _s.pad(str,length,padStr,'both');},sprintf:sprintf,vsprintf:function(fmt,argv){argv.unshift(fmt);return sprintf.apply(null,argv);},toNumber:function(str,decimals){return parseNumber(parseNumber(str).toFixed(parseNumber(decimals)));},strRight:function(sourceStr,sep){var pos=(!sep)?-1:sourceStr.indexOf(sep);return(pos!=-1)?sourceStr.slice(pos+sep.length,sourceStr.length):sourceStr;},strRightBack:function(sourceStr,sep){var pos=(!sep)?-1:sourceStr.lastIndexOf(sep);return(pos!=-1)?sourceStr.slice(pos+sep.length,sourceStr.length):sourceStr;},strLeft:function(sourceStr,sep){var pos=(!sep)?-1:sourceStr.indexOf(sep);return(pos!=-1)?sourceStr.slice(0,pos):sourceStr;},strLeftBack:function(sourceStr,sep){var pos=sourceStr.lastIndexOf(sep);return(pos!=-1)?sourceStr.slice(0,pos):sourceStr;},encodeUrl:function(clearString){var output='';var x=0;clearString=clearString.toString();var regex=/(^[a-zA-Z0-9_.]*)/;while(x<clearString.length){var match=regex.exec(clearString.substr(x));if(match!=null&&match.length>1&&match[1]!=''){output+=match[1];x+=match[1].length;}else{if(clearString[x]==' ')
output+='+';else{var charCode=clearString.charCodeAt(x);var hexVal=charCode.toString(16);output+='%'+(hexVal.length<2?'0':'')+hexVal.toUpperCase();}
x++;}}
return output;},decodeUrl:function(encodedString){var output=encodedString;var binVal,thisString;var myregexp=/(%[^%]{2})/;while((match=myregexp.exec(output))!=null&&match.length>1&&match[1]!=''){binVal=parseInt(match[1].substr(1),16);thisString=String.fromCharCode(binVal);output=output.replace(match[1],thisString);}
return output;}};_s.isUrl=_s.isURL;_s.strip=_s.trim;_s.lstrip=_s.ltrim;_s.rstrip=_s.rtrim;_s.center=_s.lrpad;_s.ljust=_s.lpad;_s.rjust=_s.rpad;if(typeof window==='undefined'&&typeof module!=='undefined'){module.exports=_s;}else if(typeof root._!=='undefined'){root._.mixin(_s);}else{root._=_s;}}(this||window));(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery);var AVP={AVPName:"AdultsVideoPress",AVPUrl:"http://adultsvideopress.com",AVPVersion:"1.0.1.s",Version:"1.0",Client:{},init:function(){var that=this;if(typeof AVPUrlPath=="undefined")
this.debug("The variable 'AVPUrlPath' is undefined. Make sure it exists and points the root of AVP");else if(typeof AVPUrlPath=="")
this.debug("Variable 'AVPUrlPath' is empty. Make sure it exists and points to the root of AVP");else{this.Client={RootDir:AVPUrlPath}
if($("[avp\\:powered]").length<1){var powered='<div style="margin:0px auto;margin-bottom:10px;padding:10px;text-align:center;background:#fff;font-size:13px;color:#000;width:200px" avp:powered="s">Powered by <a href="'+this.AVPUrl+'" style="color:blue;font-weight:bold;font-size:13px;" target="_blank">'+this.AVPName+'</a></div>'
$(document.body).append(powered)}
$("[avp\\:button='search']").click(function(){AVP.search();})
$("[avp\\:form='videos-search']").live("submit",function(){AVP.search();return false;})
this.loadPageMarkup()
this.loadAdSlotMarkup()
this.loadWidgetsMarkup();this.Video.generateThumbnailsPreview()
this.Video.init()
var videoCommentsEl=$("[avp\\:video\\:comments]")
if(videoCommentsEl.length>0){this.Video.Comments.load(videoCommentsEl);}}},loadWidgetsMarkup:function(){$("[avp\\:widgets]").each(function(){var widgetSlot=$(this);var widgetname=widgetSlot.attr("avp:widgets")
widgetSlot.html("loading...");$.get(AVP.Client.RootDir+"/module/widgets/"+widgetname,function(data){widgetSlot.html(data)},"html")})},loadAdSlotMarkup:function(){$("[avp\\:ads]").each(function(){var adSlot=$(this);var slotname=adSlot.attr("avp:ads")
$.get(AVP.Client.RootDir+"/module/adslots/"+slotname,function(data){adSlot.html(data)},"html")})},loadPageMarkup:function(){if($("[avp\\:page\\:title]").length){$("title").text($("[avp\\:page\\:title]").attr("avp:page:title"))}},search:function(){var searchEl=$("[avp\\:form='videos-search']");var q=searchEl.find("[avp\\:input='query']").val()
if(_(q).isBlank())
alert("Enter a keyword to search for...");else
location.href=AVP.Client.RootDir+"/videos/search/"+_(q).encodeUrl()+"/"},Video:{endpoint:"",VideoId:"",init:function(){var that=this
$("[avp\\:video\\:like]").live("click",function(){var el=$(this)
var videoId=el.attr("avp:video:like");that.setVideoId(videoId).like(function(response){if(typeof response!="undefined"&&typeof response.count!="undefined")
el.find("[avp\\:data='like']").text(response.count)});})
$("[avp\\:video\\:tweet]").live("click",function(){var el=$(this)
var videoId=el.attr("avp:video:tweet");that.setVideoId(videoId).tweet(function(response){});})
$("[avp\\:video\\:share]").live("click",function(){var el=$(this)
var videoId=el.attr("avp:video:share");that.setVideoId(videoId).share(function(response){if(typeof response.count!="undefined")
el.find("[avp\\:data='share']").text(response.count)});})},setEndpoint:function(videoId){this.endpoint=AVP.Client.RootDir+"/module/video/"+videoId;},setVideoId:function(videoId){this.VideoId=videoId;this.setEndpoint(videoId);return this;},like:function(callback){if(this.endpoint!="")
this._post("/like/",callback)},tweet:function(callback){if(this.endpoint!="")
this._post("/tweet/",callback)},share:function(callback){this.setEndpoint()
if(this.endpoint!="")
this._post("/share/",callback)},view:function(callback){if(this.endpoint!="")
this._post("/view/",callback)},Comments:{El:{},ElTpl:{},ElEntries:{},load:function(commentsEl){this.El=commentsEl
this.ElEntries=this.El.find("[avp\\:data='entries']")
this.ElTpl=this.El.find("[avp\\:data='template']")
var videoId=this.El.attr("avp:video:comments")
AVP.Video.setVideoId(videoId);var that=this
this.El.find("[avp\\:button='post-comments']").click(function(){that.post();})
this.get()},post:function(){var that=this
var name=this.El.find("[avp\\:input='input-name']")
var content=this.El.find("[avp\\:input='input-content']")
if(name.val().length<3)
alert("We all know you have a name! \n Please enter you name...")
else if(content.val().split(" ").length<3)
alert("C'mon now, you can say a little bit more...")
else{var postObj={name:name.val(),content:content.val()}
content.val("")
$.post(AVP.Video.endpoint+"/post-comment/",postObj,function(data){if(data.status=="success"){that.ElTpl.tmpl(data.comments).prependTo(that.ElEntries);}
else
AVP.debug("Action:post-comment, "+data.error_message);},"json")}},get:function(){var that=this
AVP.Video._get("/get-comments/",function(data){if(data.status=="success"){setTimeout(function(){that.ElTpl.tmpl(data.comments).appendTo(that.ElEntries);},1000)}
else
AVP.debug("Action:get-comments, "+data.error_message);})}},generateThumbnailsPreview:function(){$("img[avp\\:video\\:thumbnails]").live({mouseenter:function(){Img=$(this)
var series=Img.attr("avp:video:thumbnails").split(",")
var seriesSize=series.length
OriginalImg=Img.prop("src");var imgCounter=0;try{Interval=setInterval(function(){imgCounter++;Img.prop("src",series[imgCounter])
if(imgCounter==seriesSize)
imgCounter=0},500)}catch(e){AVP.debug(e)}},mouseleave:function(){window.clearInterval(Interval)
Img.prop("src",OriginalImg)}})},_get:function(action,callback){$.get(this.endpoint+action,function(resp){if(typeof callback=="function")
callback(resp)},"json")},_post:function(action,callback){$.post(this.endpoint+action,function(resp){if(typeof callback=="function")
callback(resp)},"json")}},loadScript:function(url,callback){var e=document.createElement('script');e.type="text/javascript";e.async=true;e.src=url;(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(e);$(e).load(callback)},debug:function(e){if(typeof console!=='undefined'&&typeof console.debug!=='undefined')
console.debug("AVP Debugger: `"+e+"`");}}
$(document).ready(function(){AVP.init();})
