(function(){function N(p,r){function q(a){if(q[a]!==w)return q[a];var c;if("bug-string-char-index"==a)c="a"!="a"[0];else if("json"==a)c=q("json-stringify")&&q("json-parse");else{var e;if("json-stringify"==a){c=r.stringify;var b="function"==typeof c&&s;if(b){(e=function(){return 1}).toJSON=e;try{b="0"===c(0)&&"0"===c(new t)&&'""'==c(new A)&&c(u)===w&&c(w)===w&&c()===w&&"1"===c(e)&&"[1]"==c([e])&&"[null]"==c([w])&&"null"==c(null)&&"[null,null,null]"==c([w,u,null])&&'{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'== c({a:[e,!0,!1,null,"\x00\b\n\f\r\t"]})&&"1"===c(null,e)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new C(-864E13))&&'"+275760-09-13T00:00:00.000Z"'==c(new C(864E13))&&'"-000001-01-01T00:00:00.000Z"'==c(new C(-621987552E5))&&'"1969-12-31T23:59:59.999Z"'==c(new C(-1))}catch(f){b=!1}}c=b}if("json-parse"==a){c=r.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){e=c('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}');var n=5==e.a.length&&1===e.a[0];if(n){try{n=!c('"\t"')}catch(d){}if(n)try{n= 1!==c("01")}catch(g){}if(n)try{n=1!==c("1.")}catch(m){}}}}catch(X){n=!1}c=n}}return q[a]=!!c}p||(p=k.Object());r||(r=k.Object());var t=p.Number||k.Number,A=p.String||k.String,H=p.Object||k.Object,C=p.Date||k.Date,G=p.SyntaxError||k.SyntaxError,K=p.TypeError||k.TypeError,L=p.Math||k.Math,I=p.JSON||k.JSON;"object"==typeof I&&I&&(r.stringify=I.stringify,r.parse=I.parse);var H=H.prototype,u=H.toString,v,B,w,s=new C(-0xc782b5b800cec);try{s=-109252==s.getUTCFullYear()&&0===s.getUTCMonth()&&1===s.getUTCDate()&& 10==s.getUTCHours()&&37==s.getUTCMinutes()&&6==s.getUTCSeconds()&&708==s.getUTCMilliseconds()}catch(Q){}if(!q("json")){var D=q("bug-string-char-index");if(!s)var x=L.floor,M=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(a,c){return M[c]+365*(a-1970)+x((a-1969+(c=+(1d){c+="\\u00"+y(2,d.toString(16));break}c+=f?n[b]:a.charAt(b)}}return c+'"'},O=function(a,c,b,h,f,n,d){var g,m,k,l,p,r,s,t,q;try{g=c[a]}catch(z){}if("object"==typeof g&&g)if(m=u.call(g),"[object Date]"!=m||v.call(g, "toJSON"))"function"==typeof g.toJSON&&("[object Number]"!=m&&"[object String]"!=m&&"[object Array]"!=m||v.call(g,"toJSON"))&&(g=g.toJSON(a));else if(g>-1/0&&g<1/0){if(E){l=x(g/864E5);for(m=x(l/365.2425)+1970-1;E(m+1,0)<=l;m++);for(k=x((l-E(m,0))/30.42);E(m,k+1)<=l;k++);l=1+l-E(m,k);p=(g%864E5+864E5)%864E5;r=x(p/36E5)%24;s=x(p/6E4)%60;t=x(p/1E3)%60;p%=1E3}else m=g.getUTCFullYear(),k=g.getUTCMonth(),l=g.getUTCDate(),r=g.getUTCHours(),s=g.getUTCMinutes(),t=g.getUTCSeconds(),p=g.getUTCMilliseconds(); g=(0>=m||1E4<=m?(0>m?"-":"+")+y(6,0>m?-m:m):y(4,m))+"-"+y(2,k+1)+"-"+y(2,l)+"T"+y(2,r)+":"+y(2,s)+":"+y(2,t)+"."+y(3,p)+"Z"}else g=null;b&&(g=b.call(c,a,g));if(null===g)return"null";m=u.call(g);if("[object Boolean]"==m)return""+g;if("[object Number]"==m)return g>-1/0&&g<1/0?""+g:"null";if("[object String]"==m)return R(""+g);if("object"==typeof g){for(a=d.length;a--;)if(d[a]===g)throw K();d.push(g);q=[];c=n;n+=f;if("[object Array]"==m){k=0;for(a=g.length;k=b.length?b:b.slice(0,10));return O("",(l={},l[""]=a,l),f,n,h,"",[])}}if(!q("json-parse")){var V=A.fromCharCode,W={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},b,J,l=function(){b=J=null;throw G();},z=function(){for(var a=J,c=a.length,e,h,f,k,d;bd)l();else if(92==d)switch(d=a.charCodeAt(++b),d){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=W[d];b++;break;case 117:h=++b;for(f=b+4;b=d||97<=d&&102>=d||65<=d&&70>=d||l();e+=V("0x"+a.slice(h,b));break;default:l()}else{if(34==d)break;d=a.charCodeAt(b);for(h=b;32<=d&&92!=d&&34!=d;)d=a.charCodeAt(++b);e+=a.slice(h,b)}if(34==a.charCodeAt(b))return b++,e;l();default:h= b;45==d&&(k=!0,d=a.charCodeAt(++b));if(48<=d&&57>=d){for(48==d&&(d=a.charCodeAt(b+1),48<=d&&57>=d)&&l();b=d);b++);if(46==a.charCodeAt(b)){for(f=++b;f=d);f++);f==b&&l();b=f}d=a.charCodeAt(b);if(101==d||69==d){d=a.charCodeAt(++b);43!=d&&45!=d||b++;for(f=b;f=d);f++);f==b&&l();b=f}return+a.slice(h,b)}k&&l();if("true"==a.slice(b,b+4))return b+=4,!0;if("false"==a.slice(b,b+5))return b+=5,!1;if("null"==a.slice(b, b+4))return b+=4,null;l()}return"$"},P=function(a){var c,b;"$"==a&&l();if("string"==typeof a){if("@"==(D?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(c=[];;b||(b=!0)){a=z();if("]"==a)break;b&&(","==a?(a=z(),"]"==a&&l()):l());","==a&&l();c.push(P(a))}return c}if("{"==a){for(c={};;b||(b=!0)){a=z();if("}"==a)break;b&&(","==a?(a=z(),"}"==a&&l()):l());","!=a&&"string"==typeof a&&"@"==(D?a.charAt(0):a[0])&&":"==z()||l();c[a.slice(1)]=P(z())}return c}l()}return a},T=function(a,b,e){e=S(a,b,e);e=== w?delete a[b]:a[b]=e},S=function(a,b,e){var h=a[b],f;if("object"==typeof h&&h)if("[object Array]"==u.call(h))for(f=h.length;f--;)T(h,f,e);else B(h,function(a){T(h,a,e)});return e.call(a,b,h)};r.parse=function(a,c){var e,h;b=0;J=""+a;e=P(z());"$"!=z()&&l();b=J=null;return c&&"[object Function]"==u.call(c)?S((h={},h[""]=e,h),"",c):e}}}r.runInContext=N;return r}var K=typeof define==="function"&&define.amd,F={"function":!0,object:!0},G=F[typeof exports]&&exports&&!exports.nodeType&&exports,k=F[typeof window]&& window||this,t=G&&F[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;!t||t.global!==t&&t.window!==t&&t.self!==t||(k=t);if(G&&!K)N(k,G);else{var L=k.JSON,Q=k.JSON3,M=!1,A=N(k,k.JSON3={noConflict:function(){M||(M=!0,k.JSON=L,k.JSON3=Q,L=Q=null);return A}});k.JSON={parse:A.parse,stringify:A.stringify}}K&&define(function(){return A})}).call(this); //title, url, width, height, ref, visitor, session_id var site; var visitor; var session_id; var _ptq = _ptq || []; var date = new Date(); var components = [ date.getYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds(), randomString(8) ]; var id = components.join(""); function randomString(length) { var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split(''); if (! length) { length = Math.floor(Math.random() * chars.length); } var str = ''; for (var i = 0; i < length; i++) { str += chars[Math.floor(Math.random() * chars.length)]; } return str; } function setCookieMinutes(cname,cvalue,exMinutes,domain) { var d = new Date(); d.setTime(d.getTime() + (exMinutes*60*1000)); var expires = "expires=" + d.toGMTString(); if(domain != '') { domain = "domain="+domain+";"; } document.cookie = cname+"="+cvalue+"; "+expires+"; "+domain+" path=/"; } function setCookie(cname,cvalue,exdays,domain) { var string = cname+"="+cvalue+";"; if(exdays != undefined){ var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var string = string + "expires=" + d.toGMTString()+";"; } if(domain != undefined) { var string = string + "domain="+domain+";"; } document.cookie = string + "path=/;"; } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) != -1) { return c.substring(name.length, c.length); } } return ""; } function getParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if (!results) return null; if (!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } var _tft_getTracker = function (site) { this.site = site; this.crossDomain = false; }; _tft_getTracker.prototype._trackPageview = function() { var title = document.getElementsByTagName("title")[0].innerHTML; var currentUrl = document.URL; var ref=document.referrer; visitor = ""; if(this.crossDomain){ if(typeof document.body == "undefined"){ _ptq.push([this.crossDomain, this.site]); return false; } } session_id=getCookie("_s"+this.site); if (session_id == "" || session_id==null) { session_id = id; } if (navigator.userAgent.match(/iPad/i)) { var userAgent = "tablet"; // do tablet stuff } else if(navigator.userAgent.match(/Android|webOS|iPhone|iPod|Blackberry/i) ) { var userAgent = "mobile"; // do mobile stuff } else { var userAgent = "desktop"; // do desktop stuff } if(this.crossDomain){ var contactId = (getParameterByName('tft-id'))? getParameterByName('tft-id') : ''; } else { var contactId = (getParameterByName('tft-id'))? getParameterByName('tft-id') : getCookie('tft_contact_id'); } var email = (getParameterByName('tft')) ? getParameterByName('tft') : ''; var data = { 'title': title, 'url': currentUrl, 'width': screen.width, 'height': screen.height, 'referrer': encodeURIComponent(ref), 'visitor': visitor, 'session_id': session_id, 'site': this.site, 'userAgent': userAgent, 'contactId': contactId, 'siteId': this.site, 'email': email }; var queryStr = []; for(var k in data){ if (data.hasOwnProperty(k)) { queryStr.push(encodeURIComponent(k) + "=" + encodeURIComponent(data[k])); } } if(this.crossDomain){ var iframePT = document.createElement('iframe'); iframePT.style.display = "none"; iframePT.src = "/site/tracking/iframe?"+queryStr.join("&"); document.body.appendChild(iframePT); setCookieMinutes("_s"+this.site, session_id, 30, document.domain.replace('www.','')); return false; } if (window.XDomainRequest) var http = new XDomainRequest(); else if (window.XMLHttpRequest) var http = new XMLHttpRequest(); else var http = new ActiveXObject("Microsoft.XMLHTTP"); var url = 'https://jig.team/tracking/site'; var params = queryStr.join("&"); if(window.XDomainRequest){ http.open("GET", url+"?"+params); http.onload = function(){ response = JSON.parse(http.responseText); if(response.success) { setCookieMinutes("_s"+response.siteId, session_id, 30, '.'+document.domain.replace('www.','')); if (response.cid!=null) { setCookie('tft_contact_id', response.cid, 30, '.'+document.domain.replace('www.','')); } if (response.siteId!=null) { setCookie("tft_site_path", response.siteId, 30, '.'+document.domain.replace('www.','')); } } else { console.log(response.message); } } http.send(); } else { http.open("POST", url, true); //Send the proper header information along with the request http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); //http.setRequestHeader("X-Requested-With", "XMLHttpRequest"); //http.setRequestHeader("Cache-Control", "no-cache"); //http.setRequestHeader("Expires", 0); http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 && http.status == 200) { response = JSON.parse(http.responseText); if(response.success) { setCookieMinutes("_s"+response.siteId, session_id, 30, '.'+document.domain.replace('www.','')); if (response.cid!=null) { setCookie('tft_contact_id', response.cid, 30, '.'+document.domain.replace('www.','')); } if (response.siteId!=null) { setCookie("tft_site_path", response.siteId, 30, '.'+document.domain.replace('www.','')); } } else { console.log(response.message); } } } http.send(params); } }; try{ if( typeof _ptq != "undefined" ){ var pageTracker=new _tft_getTracker(_ptq[0][1]); this.crossDomain = (_ptq[0][0] == true || _ptq[0][0] == 'true')? true : false; if(pageTracker.crossDomain){ window.onload = function(){ pageTracker._trackPageview(); } } else { pageTracker._trackPageview(); } } }catch(err){}