var $R={mouseOffset:{},mouseDownTime:"",mouseUpTime:"",init:function(){this.createDom(),this.hoverEvent(),this.bindEvent(),this.pvSend()},createDom:function(){var e=[];window.adsData&&($.each(window.adsData.ads,function(t,n){var a="";n.clktk&&(a=n.clktk.join(",")),e.push('
'),e.push('
'),e.push('
'+n.desc+"
"),e.push("
")}),$(".imgContent").html(e.join("")))},hoverEvent:function(){$(".content").on("mouseenter",function(){$(this).find(".main_img").removeClass("scaleImg").addClass("scaleImg"),$(this).find(".descTitle").addClass("red")}).on("mouseleave",function(){$(this).find(".main_img").removeClass("scaleImg"),$(this).find(".descTitle").removeClass("red")})},pvSend:function(){var e=this;window.adsData&&window.adsData.adstk&&$.each(window.adsData.adstk,function(t,n){e.sendLog(n)})},sendLog:function(e){var t=new Image;t.onload=t.onerror=function(){t=null},t.src=e},bindEvent:function(){var e=this;$(".trackTarget").on("mousedown",function(t){e.getOffset(t.clientX,t.clientY),e.mouseDownTime=(new Date).getTime()}),$(".trackTarget").on("click",function(){var t=$(this).attr("data-clk"),n=$(this).attr("data-curl");e.mouseUpTime=(new Date).getTime(),t&&(t=t.replace("__EVENT_TIME_START__",e.mouseDownTime).replace("__EVENT_TIME_END__",e.mouseUpTime).replace("__OFFSET_X__",parseInt(e.mouseOffset.x)).replace("__OFFSET_Y__",parseInt(e.mouseOffset.y)).replace("__ADSPACE_W__",w).replace("__ADSPACE_H__",h),$.each(t.split(","),function(t,n){e.sendLog(n)})),n=n.replace("__EVENT_TIME_START__",e.mouseDownTime).replace("__EVENT_TIME_END__",e.mouseUpTime).replace("__OFFSET_X__",parseInt(e.mouseOffset.x)).replace("__OFFSET_Y__",parseInt(e.mouseOffset.y)).replace("__ADSPACE_W__",w).replace("__ADSPACE_H__",h),window.open(n,"mediav"+e.mouseUpTime)})},getOffset:function(e,t){var n=$(".content")[0].getBoundingClientRect(),a=e-n.left,s=t-n.top;this.mouseOffset={x:a,y:s}}};$R.init();