function GetQueryString(a){var b=new RegExp("(^|&)"+a+"=([^&]*)(&|$)","i");var c=window.location.search.substr(1).match(b);if(c!=null){return(c[2])}return null}function antcheat(){var o=window.location.host;if(o.indexOf("re.m.jd.com")>=0||o.indexOf("re.jd.com")>=0){window.stamp=13;$("a[href^='http://ccc.x.jd.com']").die().live("click",k);$("a[href^='https://ccc.x.jd.com']").die().live("click",k);$("a[href^='https://ccc-x.jd.com']").die().live("click",k)}else{var m=document.getElementsByTagName("a");for(i=0;i<m.length;i++){var d=m[i];if(d&&d.addEventListener){d.addEventListener("click",k,false)}else{d.attachEvent("onclick",k)}}}var g=document.body;var q=[];var c=new Date().getTime();var a=new Date().getTime();var n=null;var l=GetQueryString("clkmn");var p=GetQueryString("expose");if(p&&decodeURIComponent(p)!="''"){var j=document.createElement("script");j.src=decodeURIComponent(p);document.body.appendChild(j)}function k(B){if(l&&decodeURIComponent(l)!="''"){var w=document.createElement("script");w.src=decodeURIComponent(l);document.body.appendChild(w)}var u=q.length<12?1:parseInt(q.length/12);var r=[];for(var v=0;v<11;v++){var y=q[v*u];if(y==null){break}r.push([y.x,y.y])}y=b(B);if(y==null){return}r.push([y.x,y.y]);r.unshift([q.length,a-c,a-n]);n=null;window.move_info=r.join("|");try{var w=B||window.event;var y=b(w);var D=w.target||w.srcElement;while(D.tagName!="A"){D=D.parentNode}var s=D.getAttribute("href");var C=s;var t="";if(C.search(/^https?:\/\/ccc.x.jd.com/g)!=0){var z=s.match(/=http.*ccc.*x.*jd.*com.*($|&)/g);s=decodeURIComponent(z[0])}q=[];var A=s.indexOf("ac=")>0?s.replace(/&?ac=.*($|&)/g,"").replace(/https?:\/\//,""):s.replace(/https?:\/\//,"");var u=parseInt(A.length/12);for(var v=0;v<12;v++){t+=(A.charCodeAt(v*u)%stamp).toString(16)}t+="|"+window.move_info;if(s.indexOf("ac=")>0){s=s.replace(/ac=.*($|&)/g,"ac="+f(t))}else{s+=((s.indexOf("?")>0)?"&ac=":"?ac=")+f(t)}if(C.search(/^https?:\/\/ccc.x.jd.com/g)!=0){D.setAttribute("href",C.replace(/=http.*ccc.*x.*jd.*com.*($|&)/g,"="+encodeURIComponent(s.replace("=",""))))}else{D.setAttribute("href",s)}}catch(w){}}if(g.addEventListener){g.addEventListener("touchstart",function(e){if(!n){n=new Date().getTime()}var r=b(e)},false);g.addEventListener("touchmove",function(e){var r=b(e);q.push(r)},false);g.addEventListener("mousemove",function(e){if(!n){n=new Date().getTime()}var r=b(e);q.push(r)});g.addEventListener("mousedown",function(e){c=new Date().getTime()});g.addEventListener("mouseup",function(){a=new Date().getTime()})}if(g.attachEvent&&!g.addEventListener){g.attachEvent("onmousemove",function(){if(!n){n=new Date().getTime()}var e=b(window.event);q.push(e)});g.attachEvent("onmousedown",function(){c=new Date().getTime()});g.attachEvent("onmouseup",function(){a=new Date().getTime()})}function b(e){var s=e||window.event;try{return{x:parseInt(e.changedTouches[0].clientX),y:parseInt(e.changedTouches[0].clientY)}}catch(r){}if(s.pageX||s.pageY){return{x:parseInt(s.pageX),y:parseInt(s.pageY)}}return{x:parseInt(s.clientX+document.body.scrollLeft-document.body.clientLeft),y:parseInt(s.clientY+document.body.scrollTop-document.body.clientTop)}}var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function f(w){var s,u,e;var v,t,r;e=w.length;u=0;s="";while(u<e){v=w.charCodeAt(u++)&255;if(u==e){s+=h.charAt(v>>2);s+=h.charAt((v&3)<<4);s+="==";break}t=w.charCodeAt(u++);if(u==e){s+=h.charAt(v>>2);s+=h.charAt(((v&3)<<4)|((t&240)>>4));s+=h.charAt((t&15)<<2);s+="=";break}r=w.charCodeAt(u++);s+=h.charAt(v>>2);s+=h.charAt(((v&3)<<4)|((t&240)>>4));s+=h.charAt(((t&15)<<2)|((r&192)>>6));s+=h.charAt(r&63)}return s}}antcheat();