/g,'>');if (tp.indexOf('"') > -1) str = str.replace(/"/g,'"');if (tp.indexOf('\'') > -1) str = str.replace(/'/g,''');return str;};ZN.attr = function(cf,prev){var obj = [];for (var k in cf) {var ck = cf[k].toString().replace(/"/g,'"');obj.push((prev?(prev+'-'):'')+k+'="'+ck+'"');}return obj.join(' ');};ZN.m = function(mdu){var args = [];for (var i=1; i -1 ? '&' : '?') + param;param = '';} else if (V.type === 'POST' && V.contentType == "application/json") {param = JSON.stringify(V.data);}xhr.open(V.type, url, V.async);xhr.onreadystatechange = function() {if (xhr.readyState == 4) {if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) {var res = xhr.responseText;if (V.dataType == 'json') {res = JSON.parse(res);}if (typeof V.success === 'function') {V.success(res,xhr.status,xhr);}} else {if (typeof V.fail === 'function') {V.fail('failed',xhr.status,xhr);}}}};xhr.setRequestHeader('content-type',V.contentType);xhr.send(param);if (xhr.timeout) {xhr.timeout = V.timeout;} else {setTimeout(function() {xhr.abort();}, V.timeout*1000);}};ZN.mcb = function(o){if (o.css) {ZN.css(o.css);}if (o.tmpl) {for (var k in o.tmpl) {ZN.el($('body')[0],'script',{"id":k,"type":"text/x-zv-tmpl","innerHTML":o.tmpl[k]});}}if (typeof ZN["m_"+o.mdu] === 'function') {ZN["m_"+o.mdu].apply(ZN,ZN.c('module',o.mdu));}};ZN.tmpl = function(id,d){var fn,fs,fv = $(id).v();fs = fv ? "var __='';with(obj){__+='"+fv.replace(/[\r\t\n]/g,"").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"'+$1+'").split("\t").join("';").split("%>").join("__+='").split("\r").join("\\'")+"';}return __;" : '';fn = new Function("obj", fs);return fn(d);};ZN.ping = {init: function(opt){if (!opt) {opt = {};}opt.tp = 'pv';opt.pbver = opt.pbver || '1.0.0';opt.url = window.location.href;opt.sr = window.screen.width+'x'+window.screen.height;opt.sp = document.body.clientWidth+'x'+document.body.clientHeight;if (!ZN._c['ping']) {ZN._c['ping'] = opt;} else {for (var ok in opt) {ZN._c['ping'][ok] = opt[ok];}}},set: function(k,v){if (!ZN._c['ping']) {ZN._c['ping'] = {};}ZN._c['ping']['i_'+k] = v;},at: function(f){if (!f || !ZN._c['ping']['_at']) {ZN._c['ping']['_at'] = {"i":ZN.t(),"p":"i"};return;}var ti = ZN.t(), at = ZN._c['ping']['_at'];at['_'+f] = ti;if (!at['s']) {at['s'] = {};}at['s'][f] = at[at['p']] ? (ti - at[at['p']]) : 0;at['p'] = '_'+f;ZN._c['ping']['_at'] = at;},send: function(opt){var _P = ZN._c['ping'], varr = {"prd":1,"tp":1,"act":1,"p":1,"ti":1,"e":1,"url":1,"ver":1,"cnl":1,"ru":1,"lng":1,"lat":1,"uid":1,"mid":1,"url":1,"ip":1,"env":1,"ph":1,"err":1,"cost":1,"href":1,"sr":1,"sp":1}, ckarr = {"_cnl":"cnl"};if (!_P.dm || !_P.prd || !opt || !opt.e) {return;}var url = 'https://'+_P.dm+'/pb.gif?log='+_P.pbver;opt.ti = ZN.t();for (var k in _P) {if (varr[k] || k.indexOf("i_") === 0) {opt[k] = opt[k] || _P[k];}}for (var k in ckarr) {var ck = ZN.gck(k);if (ck) {opt[ckarr[k]||k] = ck;}}if (opt.tp == 'pv' && _P._at) {opt.cost = opt.ti - _P._at.i;opt.t = {};for (var k in _P._at.s||{}) {opt.t[k] = _P._at.s[k];}}ZN._c['ping']['_at'] = {};for (var k in opt) {if (!varr[k] && /^[a-z]{1,2}$/.test(k) && typeof opt[k] === 'object') {for (var gk in opt[k]) {url += '&'+k+'_'+gk+'='+ZN.eu(opt[k][gk]);}continue;}var sk = varr[k] || k.indexOf('_') > -1 ? k : ('v_'+k);url += '&'+sk+'='+ZN.eu(opt[k]);}(new Image()).src = url;}};})();