function HourGlass(c,b,a){this.hasEntered=false;this.beatId="";this.rate=c?c:20,this.paras=b;this.isActive=a||PageData.user.is_login}HourGlass.prototype={constructor:HourGlass,init:function(){if(this.isActive){$("body").bind("mouseover",{obj:this},function(a){a.data.obj.enter()});$("body").bind("mouseleave",{obj:this},function(a){a.data.obj.leave()})}},parasToQuery:function(){var b="";for(var a in this.paras){b+=a+"="+this.paras[a]+"&"}return b.substr(0,b.length-1)},enter:function(){if(!this.hasEntered){this.hasEntered=true;this.startBeat()}},leave:function(){if(this.hasEntered){this.hasEntered=false;this.stopBeat()}},startBeat:function(){var a=this;this.beatId=setInterval(function(){a.beat()},a.rate*1000)},stopBeat:function(){clearInterval(this.beatId)},beat:function(){var a=new Image();window["bd_hg2_"+(new Date().getTime())]=a;a.src="http://static.tieba.baidu.com/tb/img/hg/hg.gif?"+this.parasToQuery()+"&t="+new Date().getTime();a=null}};var PopWidowHandle=function(b){var a={url:{P_GET:"/app/pop/bws/popup",P_POST:"/app/pop/commit/click"},delay:15,from_forum:"",page:""};this._option=$.extend(true,a,b);this._init()};PopWidowHandle.prototype={constructor:PopWidowHandle,_init:function(){var a=this;$(document).ready(function(){setTimeout(function(){a._getPopWindow()},a._option.delay*1000)})},_getPopWindow:function(){var b=this._option,a=this;$.tb.get(b.url.P_GET,{from_forum:b.from_forum,position:b.page},function(c){if(c.no==0){if(c.data.task_id){a._showPopWindow(c.data)}}})},_showPopWindow:function(d){this.data=d;var a=this._option;var c={styleId:d.style_id,templateObj:{title:d.title,content:d.content,button:d.button,note:d.note,link:d.link}};this.popWindow=new PopWindow(c);var b=this.popWindow;b.bind("closeSuccess",function(){$.tb.post(a.url.P_POST,{task_id:d.task_id,type:1,count:d.count},function(){})},true);b.bind("clickBtn",function(){$.tb.post(a.url.P_POST,{task_id:d.task_id,type:2,count:d.count},function(){})},true);b.showPop()}};_.Module.define({path:"common/component/dimension_code_yl",sub:{_srcs:{common:PageUnit.load("dimension_code_yl_img_src")},_urls:{common:PageUnit.load("dimension_code_yl_img_url")},_isclosed:false,_first_class:"",_product:"",initial:function(b,c){var a=$.cookie("dimension_code_yl");this._first_class=b;this._product=c;if(a){return}else{this._buildDialogHTML()}if(document.body.clientWidth>1024){$("#j_dimension_yl").show()}else{$("#j_dimension_yl").hide()}},_initEvents:function(b){var a=this;var c=b;$(window).resize(function(){if(document.body.clientWidth>1024){$("#j_dimension_yl").show()}else{$("#j_dimension_yl").hide()}});$("#j_dimension_yl").on("mouseover",function(){}).on("mouseout",function(){}).on("click",function(){if(a._first_class==0){$.stats.sendRequest("fr=tb0_forum&st_mod=youliao&st_type=erweima_location")}else{if(a._first_class==1){$.stats.sendRequest("fr=tb0_forum&st_mod=youliao&st_type=erweima_university")}}}).delegate(".dimension_code_yl_out_close","click",function(d){if(d&&d.preventDefault){d.preventDefault()}else{window.event.returnValue=false}$.cookie("dimension_code_yl","true",{expires:3,path:"/"});$("#j_dimension_yl").hide();return false})},_buildDialogHTML:function(){var c=this._srcs.common;var b=this._urls.common;var a=[];a.push('<a id="j_dimension_yl" class="dimension_code_yl dimension_code_yl_old" href="'+b+'" target="_blank" style="display: inline;">');a.push('<div class="dimension_code_yl_span_mid">');a.push('<div class="dimension_code_yl_span_mid_title">\u6709\u804a\u5ba2\u6237\u7aef</div>');a.push('<img src="'+c+'">');a.push('<div class="dimension_code_yl_span_mid_text">\u6700\u8fd1\u8d34\u5427\u8d85\u6d41\u884c</div>');a.push("</div>");a.push('<div class="dimension_code_yl_out_close" >&nbsp;</div>');a.push("</a>");$("body").append(a.join(""));this._initEvents(b)}}});$(function(){if(!this.imgLikeAction){var b="fr=tb_pb_fav";var a={sourceURL:"http://tieba.baidu.com/p/"+PageData.thread.id,tags:"\u767e\u5ea6\u8d34\u5427,"+PageData.forum.name+"\u5427",descript:$.tb.subByte(PageData.thread.title,40,""),no_pic_pb:PageData.isPicBa?false:true,area:[{container:"#j_p_postlist",tag:".BDE_Image",offset:{x:-4,y:5},minSize:{width:170,height:80}},{container:"#j_p_postlist",tag:".j_user_sign",offset:{x:-4,y:5},minSize:{width:170,height:80}}]};this.imgLikeAction=new ImgLikeAction(a,PageData.user.is_login,PageData.user.no_un)}});