var $R={mouseOffset:{},mouseDownTime:"",mouseUpTime:"",init:function(){var e=this;this.createDom(),$(function(){$(".slider_wrap").responsiveSlides({pager:!0,manualControls:"#slider_pager",auto:!0}),e.bindEvent()}),this.pvSend()},createDom:function(){var e=[],n=[];window.adsData&&($.each(window.adsData.ads,function(a,i){var t="";i.clktk&&(t=i.clktk.join(",")),e.push('
'),e.push('
'),e.push('
'+i.desc+""),e.push("
"),n.push('')}),$(".slider_wrap").html(e.join("")),$("#slider_pager").html(n.join("")))},pvSend:function(){var e=this;window.adsData&&window.adsData.adstk&&$.each(window.adsData.adstk,function(n,a){e.sendLog(a)})},sendLog:function(e){var n=new Image;n.onload=n.onerror=function(){n=null},n.src=e},bindEvent:function(){var e=this;$(".clkSign").on("mousedown",function(n){e.getOffset(n.clientX,n.clientY),e.mouseDownTime=(new Date).getTime()}),$(".clkSign").on("click",function(){var n=$(this).parent().attr("data-clk"),a=$(this).parent().attr("data-curl");e.mouseUpTime=(new Date).getTime(),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),$.each(n.split(","),function(n,a){e.sendLog(a)})),a=a.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(a,"mediav"+e.mouseUpTime)}),$("#slider_pager li").on("mouseenter",function(){$(this).find("a").trigger("click")})},getOffset:function(e,n){var a=$(".slider_wrap")[0].getBoundingClientRect(),i=e-a.left,t=n-a.top;this.mouseOffset={x:i,y:t}}};$R.init();