').css({left:t.left+400,top:t.top-230}).on("click.close",".j_close",function(){try{$(this).parent().remove(),$.cookie("star_time_axis_guide","1")}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/commerce_top/commerce_top.js",method:"",ln:601}),t}}).appendTo("body")}if("main"==this.tabKey)if(this.data.fans.is_get||"1"==$.cookie("star_fan_number_guide"))"1"!=$.cookie("star_time_axis_guide")&&this.data.timeline_pass.length>=4&&t();else{var e=$("#star_nums").offset(),i='
';this.data.timeline_pass.length<4&&(i='
'),$(i).css({left:e.left+100,top:e.top-192}).on("click.close",".j_close",function(){try{$(this).parent().remove(),$.cookie("star_fan_number_guide","1")}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/commerce_top/commerce_top.js",method:"",ln:584}),t}}).on("click.next",".star_fn_guide_next_step",function(){try{$.cookie("star_fan_number_guide","1"),$(this).parent().remove(),t()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/commerce_top/commerce_top.js",method:"",ln:588}),e}}).appendTo("body")}},_initTimeAxis:function(){var t=this;t.timeAxisIndex=0,t.timeAxisMode="view";var e=t.data.timeline_pass;if(!(e.length<4)||t.isPm||t.isManager){var i,a,s,r,o;"main"==this.tabKey?(i=$("#star_collect_time_axis_body"),a=4,s=!1,r=2e3,o=null):(i=$("#star_time_axis_body_small"),a=1,s=!0,r=!1,o=5e3),t.timeAxisParams={$timeAxisContainer:i,showNumber:a,circular:s,hoverScroll:r,auto:o},t._rebuildTimeAxis(e)}},_rebuildTimeAxis:function(t,e){e=e||0,e+4>t.length&&(e=t.length-4,e=e>0?e:0);var i=this,a=i.timeAxisParams.$timeAxisContainer.html('
').find(".star_time_axis_carousel"),s=a.find(".star_time_axis");if(e>0&&a.prev().removeClass("prev_disabled"),t.length-e<=4&&a.next().addClass("next_disabled"),0!=t.length){i.timeAxisParams.$timeAxisContainer.find(".star_time_axis_prev").hover(function(){$(this).addClass("star_time_axis_prev_hover")},function(){$(this).removeClass("star_time_axis_prev_hover")}),i.timeAxisParams.$timeAxisContainer.find(".star_time_axis_next").hover(function(){$(this).addClass("star_time_axis_next_hover")},function(){$(this).removeClass("star_time_axis_next_hover")});for(var r=0,o=t.length;o>r;r++){var n=this._buildTimeAxisItem(t[r]);s.append(n)}a.jCarouselLite({btnNext:a.next(),btnPrev:a.prev(),visible:i.timeAxisParams.showNumber,circular:i.timeAxisParams.circular,auto:i.timeAxisParams.auto,hoverScroll:i.timeAxisParams.hoverScroll,start:e,afterEnd:function(t){i.timeAxisIndex=t.first().index(),"edit"==i.timeAxisMode&&(0==i.timeAxisIndex?$("#star_collect_time_axis_add").show():$("#star_collect_time_axis_add").hide())}}),a.on({mouseenter:function(){$(this).addClass("time_axis_item_hover")},mouseleave:function(){$(this).removeClass("time_axis_item_hover")}},"li").on("click",".j_link",function(t){try{t.preventDefault(),t.stopPropagation();var e=$(this).closest("li"),a=e.data("itemData");if(0==a.is_audit)i._showTimeAxisApproveDialog(a);else{var s=e.data("threadId"),r=e.data("resourceType"),o=e.data("source");$.stats.sendRequest("fr=tb0_forum&st_mod=star_top&st_type=time_axis_click&st_value=resource_type_"+r+"&st_value2=source_"+o),window.open("/p/"+s)}}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/commerce_top/commerce_top.js",method:"",ln:746}),t}})}},_buildTimeAxisItem:function(t){var e={1:"music",2:"mv",4:"video",5:"video",6:"video",7:"video",11:"video"};t.type=e[t.resource_type]||"";var i=new Date;t.time_show=t.is_top?"置顶":this._formatTimeAxisTime(t.sort_time,i),0==t.source&&(t.source_show="吧主编辑"),t.title_show="main"==this.tabKey?12!=t.resource_type||null!=t.show_pic_url&&0!=t.show_pic_url.length?$.tb.getByteLength(t.title)>40?$.tb.subByte(t.title,40):t.title:$.tb.getByteLength(t.title)>56?$.tb.subByte(t.title,56):t.title:$.tb.getByteLength(t.title)>60?$.tb.subByte(t.title,60):t.title;var a=$($.tb.format($("#timeAxisItemTpl").html(),t));return(null==t.source_show||0==t.source_show.length)&&a.find(".time_axis_source").remove(),12!=t.resource_type||null!=t.show_pic_url&&0!=t.show_pic_url.length||(a.find("h6").prepend("
新闻 "),a.addClass("time_axis_icon_item")),a.data("itemData",t),a},_formatTimeAxisTime:function(t,e){var i=parseInt(e.getTime()/1e3),a=parseInt(i-t);if(60>a)return 1>a&&(a=1),a+"秒前";if(a=parseInt(a/60),60>a)return a+"分钟前";if(a=parseInt(a/60),24>a)return a+"小时前";var s=new Date(1e3*t);return s.getFullYear()+"-"+(s.getMonth()+1)+"-"+s.getDate()},_addInviteUser:function(){var t="/f/i/step3";$.tb.post(t,null,function(){})},_showErrorTip:function(t){var e="";switch(t){case 8:case 9:e="你在本吧被封禁,暂时不能进行操作";break;case 220:e="你被吧主加入黑名单,暂时不能进行操作";break;case 120002:e="已领取成功,刷新页面看看呗";break;default:e="额,抱歉服务器好像抽风了,请你再点一下下"}var i=new Array;i.push('
'+e+"
"),i.push('
刷新本页 ');new $.dialog({html:i.join(""),showTitle:!1,draggable:!1,width:244,height:113});$("a.error_tip_btn").bind("click",function(){try{return window.location.reload(),!1}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/commerce_top/commerce_top.js",method:"",ln:894}),t}})},_timelineArray:[{fid:this.fid,source:"0",resource_id:"2101780108",resource_type:"10",title:"视频《红豆阿翁的神奇漂流》带你了解贴吧",intro:"",content:"",pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_1.jpg",pic_id:"4127247796",source_url:"http://tieba.baidu.com/p/2101780108",thread_id:"2101780108",pub_time:"1357747200",shelves_time:"1357747200",sort_time:1357747200,is_top:0,is_del:"0",is_audit:1,nopass_msg:"0",source_show:"贴吧",original_title:"视频《红豆阿翁的神奇漂流》带你了解贴吧频",show_pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_1.jpg"},{fid:this.fid,source:"0",resource_id:"2101809389",resource_type:"10",title:"贴吧推广发布多种高级样式",intro:"",content:"",pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_2.jpg",pic_id:"4127247796",source_url:"http://tieba.baidu.com/p/2101809389",thread_id:"2101809389",pub_time:"1351699200",shelves_time:"1351699200",sort_time:1351699200,is_top:0,is_del:"0",is_audit:1,nopass_msg:"0",source_show:"贴吧",original_title:"贴吧推广发布多种高级样式",show_pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_2.jpg"},{fid:this.fid,source:"0",resource_id:"2101825124",resource_type:"10",title:"贴吧推出贴吧商业产品,欲撬动百亿社交市场",intro:"",content:"",pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_3.jpg",pic_id:"4127247796",source_url:"http://tieba.baidu.com/p/2101825124",thread_id:"2101825124",pub_time:"1346947200",shelves_time:"1346947200",sort_time:1346947200,is_top:0,is_del:"0",is_audit:1,nopass_msg:"0",source_show:"贴吧",original_title:"贴吧推出贴吧商业产品,欲撬动百亿社交市场",show_pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_3.jpg"},{fid:this.fid,source:"0",resource_id:"2101837802",resource_type:"10",title:"可口可乐通过贴吧平台进行奥运营销",intro:"",content:"",pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_4.jpg",pic_id:"4127247796",source_url:"http://tieba.baidu.com/p/2101837802",thread_id:"2101837802",pub_time:"1346256000",shelves_time:"1346256000",sort_time:1346256e3,is_top:0,is_del:"0",is_audit:1,nopass_msg:"0",source_show:"贴吧",original_title:"可口可乐通过贴吧平台进行奥运营销",show_pic_url:"/tb/static-frs/img/commerce_top/commerce_tl_4.jpg"}]}});_.Module.define({path:"common/widget/Upload",sub:{flashPath:"/tb/static-common/swf/upload.swf",config:{width:70,height:22,id:"upload",uploadUrl:"http://upload.tieba.baidu.com/upload/pic",filter:"图片(jpg,png,gif)|*.png;*.gif;*.jpg;*.jpeg;*.jpe;",maxLength:1,limiteUploadSize:3,limiteAcceptSize:2e3,limiteCompressSize:80,compressedWidth:1200,compressQuality:90,isSingleton:!1,isDebug:!1,isPreview:!1,blackTypes:"",btnRect:"0,0,70,22",prevRect:"0,30,100,100",size:"120000,120000"},initial:function(e){var i=this,e=$.extend(this.config,e);this.flash=new $.swf(i.flashPath,{width:e.width,height:e.height,container:e.container,id:e.id,callBacks:{onFlashInitComplete:function(e){i.trigger("flashInitComplete",{id:e})},onFlashUploadStart:function(e){i.trigger("uploadStart",{id:e})},onFlashUploadComplete:function(e,t,o){i.trigger("uploadComplete",{id:e,no:t,data:o})},onFlashUploadError:function(e,t,o,r){i.trigger("uploadError",{id:e,no:t,data:o,size:r})},onFlashProgressListener:function(e,t){i.trigger("progressListener",{id:e,status:t})},onFlashUploadButtonClick:function(e){i.trigger("clicked",{id:e})},onFlashError:function(e,t){i.trigger("error",{id:e,msg:t})},onFlashDebug:function(e,t){i.trigger("debug",{id:e,isDebug:t})},onFlashPreviewComplete:function(e){i.trigger("previewComplete",{id:e}),i.flash.object.uploadStart()},onFlashPreviewError:function(e){i.trigger("previewError",{id:e})},onFlashPreviewStart:function(e){i.trigger("previewStare",{id:e})}},vars:{id:e.id,uploadUrl:e.uploadUrl,tbs:e.tbs,maxLength:e.maxLength,filter:e.filter,limiteUploadSize:e.limiteUploadSize,limiteCompressSize:e.limiteCompressSize,limiteAcceptSize:e.limiteAcceptSize,compressedWidth:e.compressedWidth,compressQuality:e.compressQuality,isDebug:e.isDebug,isPreview:e.isPreview,btnRect:e.btnRect,prevRect:e.prevRect,blackTypes:e.blackTypes,size:e.size,isSingleton:e.isSingleton}})},setParameter:function(e,i){e&&(i=void 0==i?"":i,this.flash.object.setParameter(e,i))},removeFile:function(e){void 0!=e&&this.flash.object.removeFile(e)}}});_.Module.define({path:"frs/widget/FormEditor/Upload",requires:["common/widget/Upload"],sub:{initial:function(i){try{this.config=i=$.extend({$cnt:null,name:"",url:"/tb/editor/v2/tedupload.swf",width:90,height:25,imgWidth:53,imgHeight:53,byteSize:100,vars:{upload_url:"http://upload.tieba.baidu.com/upload/pic"},desc:""},i);var t=this;this.$content=i.$content.html('
'+i.imgSize+"
"),this.fid=i.fid,this.imgSize=i.imgSize,this.name=i.name,this.flashCnt=i.$content.find(".ui_img_upload"),this.imgCnt=i.$content.find(".ui_img_cnt"),this.desc=i.desc,this.acceptWidth=i.imgWidth,this.acceptHeight=i.imgHeight,this.upload=t.use("common/widget/Upload",{width:i.width,height:i.height,btnRect:"0,0,"+i.width+","+i.height,tbs:i.tbs,uploadUrl:"http://upload.tieba.baidu.com/upload/pic",filter:"图片(jpg,png)|*.png;*.jpg;*.jpeg;*.jpe;",container:this.flashCnt,id:i.name,blackTypes:".gif",limiteAcceptSize:i.byteSize,limiteCompressSize:100,isSingleton:!0}),this.bindEvents()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/form_editor/upload.js",method:"",ln:48}),e}},inited:!1,bindEvents:function(){var i=this;i.waitToFlashInit=setTimeout(function(){i.error({no:900002})},4e3),i.upload.bind("flashInitComplete",function(){clearTimeout(i.waitToFlashInit),i.inited||(i.inited=!0,i.flashCnt.append("
"+i.desc+" "))}),i.upload.bind("uploadComplete",function(t,e){var n=$.parseJSON(e.data);0==n.error_code&&0==n.info.err_no?(n=n.info,n.fullpic_width!=i.acceptWidth||n.fullpic_height!=i.acceptHeight?(i.error({no:900004}),i.imgCnt.html(i.imgSize).css("color","red")):(i.error({no:1}),i.__val__="http://imgsrc.baidu.com/forum/pic/item/"+n.pic_id_encode+".jpg",i.imgCnt.html('
'))):(alert("图片上传失败,请重试。"),i.error({no:900003}))}),i.upload.bind("uploadError",function(t,e){"fileType"==e.no?i.error({no:900005}):"fileSize"==e.no?e.size>=500?i.error({no:900006}):i.error({no:900007}):i.error({no:900003})}),i.upload.bind("uploadStart",function(){i.imgCnt.html('
')})},fix:function(i){i?(this.__val__=i,this.$content.children(".ui_img_cnt").html('
')):(this.__val__=null,this.$content.children(".ui_img_cnt").html(this.imgSize||""))},val:function(){return this.__val__},error:function(i){this.trigger("error",i.no||900001)}}});
;_.Module.define({path:"frs/widget/FormEditor/Radios",sub:{initial:function(i){try{this.$content=i.$content,i.list&&(i.reserve?this.reList(i.list):this.list(i.list)),i.value?this.fix(i.value):i.index?this.val(index):this.val(0),this.__bindEvt__()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/form_editor/radios.js",method:"",ln:21}),t}},index:0,list:function(i){this.cache=i;for(var t,e=0,s=[];e
'+i[e].desc+""),++e;return this.$content.html(s.join("")),this},reList:function(i){this.cache=i;for(var t,e=i.length,s=[];e;)--e,t=this.index===e?"ui_selected":"",s.push(''+i[e].desc+" ");return this.$content.html(s.join("")),this},val:function(i){return this.cache?void 0!==i?(this.index=0>i?this.cache.length+i:i,this.$content.find(".ui_radios").eq(this.index).click(),this):this.cache[this.index]:null},fix:function(i){for(var t=0,e=this.cache.length;e>t;){if(this.cache[t].desc.match(new RegExp(i)))return this.val(t);++t}this.val(--e)},__bindEvt__:function(){var i=this;i.$content.delegate(".ui_radios","click",function(t){try{$(this).addClass("ui_radios_selected").siblings().removeClass("ui_radios_selected"),i.index=$(this).index()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/form_editor/radios.js",method:"",ln:74}),t}})}}});
;_.Module.define({path:"frs/widget/FormEditor/Selector",sub:{initial:function(e){try{this.$content=e.$content.html([' ',''].join("")),this.$handle=this.$content.find(".ui_selector_handle"),this.$group=this.$content.find(".ui_selector_group"),e.list&&(e.reserve?this.reList(e.list):this.list(e.list)),e.value?this.fix(e.value):e.index?this.val(e.index):this.val(0),this.__bindEvt__()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/form_editor/selector.js",method:"",ln:27}),t}},index:0,on:function(e,t){return this.$handle.bind(e,t),this},follow:function(e,t,i){e.on(t,i)},list:function(e){this.cache=e;for(var t,i=e.length,s=[];i;)--i,t=this.index===i?"ui_selected":"",s.push(''+e[i].desc+" ");return this.$group.html(s.join("")),this},reList:function(e){this.cache=e;for(var t,i=0,s=[];i'+e[i].desc+""),++i;return this.$group.html(s.join("")),this},val:function(e){return this.cache&&this.cache.length?void 0!==e?(this.index=0>e?this.cache.length+e:e,this.$handle.val(this.val().desc),this):this.cache[this.index]:{desc:"",value:""}},fix:function(e){for(var t=0,i=this.cache.length;i>t;){if(this.cache[t].desc.match(new RegExp(e)))return this.val(t);++t}this.val(--i)},__bindEvt__:function(){var e=this;e.$handle.bind({click:function(t){try{return e.$group.toggleClass("hide"),!1}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/form_editor/selector.js",method:"",ln:88}),t}},keyup:function(){e.$group.removeClass("hide")},blur:function(){return e.$group.addClass("hide"),e.fix($(this).val()),!1}}),e.$group.bind({mousedown:function(e){return e.target.setCapture&&e.target.setCapture(),!1},mouseup:function(e){return e.target.releaseCapture&&e.target.releaseCapture(),!1}}).delegate(".ui_selector_item","click",function(t){try{e.$handle.val($(this).html()).trigger("change"),e.index=$(this).data("index"),e.$group.addClass("hide")}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/form_editor/selector.js",method:"",ln:115}),t}}).delegate(".ui_selector_item","hover",function(){$(this).toggleClass("ui_selector_item_hover")})}}});
;_.Module.define({path:"frs/widget/FormEditor/FormEditor",requires:["Selector","Radios","Upload"],sub:{initial:function(e){try{this.dialog=new $.dialog({html:['','"].join(""),holderClassName:" starReg ",title:e.title,draggable:!0,width:450,minHeight:125,hideOnclose:!0,show:!1}),this.$content=this.dialog.element,this.$names=this.$content.find("#names"),this.action="/frsstar/cm/apply/open",this.prevAction="/frsstar/cm/apply/preview",e.edit&&(this.action="/frsstar/cm/apply/edit"),this.__initBirth__(e),this.__initSex__(e),this.__initUpload__(e),this.postData={fid:e.fid,tbs:e.tbs},this.__bindEvt__()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/form_editor/form_editor_main.js",method:"",ln:61}),i}},errs:{0:"操作成功",1:"",100001:"非法访问",100002:"未登录,请先登录",100003:"抱歉,你没有权限",100004:"系统错误",100005:"抱歉,你们吧在定制版暂未开启",14e4:"编辑时未开通这个模块",140001:"请确定已上传所有图片",140002:"图片url太长",140003:"你忘记填写明星姓名啦",140004:"明星名字太长",140005:"你忘记填写明星昵称啦",140006:"明星呢称太长",140007:"性别提交格式有误",140008:"生日时间有误",140009:"您已经开启,不可再次申请",900001:"系统出错了,刷新看看吧",900002:"",900003:"不给力啊,上传失败了,请再试一下",900004:"请严格按照规定的图片大小尺寸",900005:"抱歉,不支持gif格式",900006:"抱歉,头部背景大图不能超过500kb,照顾一下网速不给力的吧友~",900007:"抱歉,头部背景大图不能超过100kb,照顾一下网速不给力的吧友~"},error:function(e){e||this.dialog.element.find(".error").empty(),140003==e||140004==e?this.dialog.element.find("#starName").next().tbattr("class","status errorInput"):(140005==e||140006==e)&&this.dialog.element.find("#nickName").next().tbattr("class","status errorInput"),this.dialog.element.find(".error").html(this.errs[e])},__initBirth__:function(e){var i=this,t=i.use("Selector",{$content:i.$content.find("#year"),list:i.list(1893,(new Date).getFullYear(),"年"),value:e.year||!1}),a=i.use("Selector",{$content:i.$content.find("#month"),list:i.list(1,12,"月"),value:e.month||!1}),s=i.use("Selector",{$content:i.$content.find("#day"),list:i.list(1,new Date(e.year||t.val().value,e.month||a.val().value,0).getDate(),"日"),value:e.day||!1}),r=function(){i.error();var e=s.val().value,r=new Date(t.val().value,a.val().value,0).getDate();s.reList(i.list(1,r,"日")),e>=r&&s.val(-1)};s.follow(a,"blur.change",r),s.follow(a,"change",r),s.follow(t,"blur.change",r),s.follow(t,"change",r),this.year=t,this.month=a,this.day=s},__initSex__:function(e){this.sex=this.use("Radios",{$content:this.$content.find("#sex"),list:[{value:"male",desc:"男"},{value:"female",desc:"女"},{value:"group",desc:"组合"}],group:"sex",index:e.sexIndex||0})},__initUpload__:function(e){var i=this,t=function(e,t){i.error(t)};$.ajax({url:"http://tieba.baidu.com/dc/common/imgtbs",dataType:"json"}).done(function(a){0===Number(a.no)?(i.bgImg=i.use("frs/widget/FormEditor/Upload",{$content:i.$content.find("#upload_bg"),fid:e.fid,tbs:a.data.tbs,width:200,height:25,imgSize:"图片尺寸: 980X260",byteSize:500,imgWidth:980,imgHeight:260,name:"bgImg",desc:"上传头部背景大图"}),i.bgImg.bind("error",t),i.icon=i.use("Upload",{$content:i.$content.find("#upload_icon"),fid:e.fid,tbs:a.data.tbs,width:120,height:25,imgSize:"图片尺寸: 156X156",imgWidth:156,imgHeight:156,name:"icon",desc:"上传明星头像"}),i.icon.bind("error",t),i.music=i.use("frs/widget/FormEditor/Upload",{$content:i.$content.find("#upload_music"),fid:e.fid,tbs:a.data.tbs,imgSize:"图片尺寸: 95X70",imgWidth:95,imgHeight:70,name:"music",desc:"音乐代表图"}),i.music.bind("error",t),i.video=i.use("frs/widget/FormEditor/Upload",{$content:i.$content.find("#upload_video"),fid:e.fid,tbs:a.data.tbs,imgSize:"图片尺寸: 95X70",imgWidth:95,imgHeight:70,name:"video",desc:"视频代表图"}),i.video.bind("error",t),i.image=i.use("frs/widget/FormEditor/Upload",{$content:i.$content.find("#upload_image"),fid:e.fid,tbs:a.data.tbs,imgSize:"图片尺寸: 95X70",imgWidth:95,imgHeight:70,name:"photo",desc:"图片代表图"}),i.image.bind("error",t),i.mv=i.use("frs/widget/FormEditor/Upload",{$content:i.$content.find("#upload_mv"),fid:e.fid,tbs:a.data.tbs,imgSize:"图片尺寸: 95X70",imgWidth:95,imgHeight:70,name:"mv",desc:"MV代表图"}),i.mv.bind("error",t)):i.error({no:900001})}).fail(function(){i.error({no:900001})})},list:function(e,i,t){var a=[];for(t=t||"";i>=e;)a.push({desc:e+t,value:e}),++e;return a},tpl:['明星姓名: ',' ',' '," ",'昵称: ',' ',' '," "].join(""),__render__:function(e){e=$.extend({starName:"",nickName:"",year:2012,month:11,day:1,sex:0,bgImg:"",icon:"",edit:!1,music:"",video:"",image:"",mv:""},e),e.edit&&this.$content.find(".star_super_birth").hide(),this.cache=e,this.$names.html($.tb.format(this.tpl,{starName:e.starName,nickName:e.nickName,readyonly:e.edit?'readonly="readonly"':""})),this.year.fix(e.year),this.month.fix(e.month),this.day.fix(e.day),this.sex.val(e.sex),this.bgImg.fix(e.bgImg),this.icon.fix(e.icon),this.music.fix(e.music),this.video.fix(e.video),this.image.fix(e.image),this.mv.fix(e.mv)},show:function(e){this.__render__(e||{}),this.dialog.show()},hide:function(){this.dialog.hide()},__ajax__:function(e,i,t,a){var s=this;$.tb[e](i,t,function(e){return 0==e.no?a(e.data):(140009==e.no?s.trigger("hasReg"):s.error(e.no),void 0)})},__check__:function(){var e=this,i=e.$names.find("#starName").val(),t=e.$names.find("#nickName").val(),a=e.year.val().value,s=e.month.val().value,r=e.day.val().value,n=+new Date(a,s-1,r)/1e3,o=e.sex.index,c=e.bgImg.val(),d=e.icon.val(),l=e.music.val(),m=e.video.val(),h=e.image.val(),u=e.mv.val();return i?t?a&&s&&r&&n?c&&d&&l&&m&&h&&u?(this.cache=$.extend(this.cache,{starName:i,nickName:t,year:a,month:s,day:r,sex:o,bgImg:c,icon:d,music:l,video:m,image:h,mv:u}),!0):(e.error(140001),!1):(e.error(140008),!1):(e.error(140005),!1):(e.error(140003),!1)},__bindEvt__:function(){var e=this;e.dialog.element.delegate("#starName","blur.starName",function(){$(this).val($.tb.subByte($.trim($(this).val()),40,"")),$(this).val()?$(this).next().tbattr("class","status rightInput"):($(this).next().tbattr("class","status errorInput"),e.error(140003)),e.error()}).delegate("#nickName","blur.nickName",function(){$(this).val($.tb.subByte($.trim($(this).val()),40,"")),$(this).val()?$(this).next().tbattr("class","status rightInput"):($(this).next().tbattr("class","status errorInput"),e.error(140005)),e.error()}).delegate(".ui_preview","click.preview",function(i){try{if(!e.__check__())return;e.__ajax__("post",e.prevAction,$.extend(e.postData,{name:e.cache.starName,nick:e.cache.nickName,birthday:+new Date(e.cache.year,e.cache.month-1,e.cache.day)/1e3,gender:e.cache.sex,pic_top:e.cache.bgImg,pic_head:e.cache.icon,pic_music:e.cache.music,pic_video:e.cache.video,pic_album:e.cache.image,pic_mv:e.cache.mv}),function(e){var i=$.tb.location,t=/Chrome\/(\d+)/.exec(window.navigator.userAgent);t=t?t[1]:null;var a="//"+i.getHost()+i.getPathname()+i.getSearch()+"&p=1&id="+e.id;setTimeout(function(){null===t?$(' ').appendTo("body")[0].click():t>20?i.setHref(a):window.open(a,"preview")},10)})}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/form_editor/form_editor_main.js",method:"",ln:419}),i}}).delegate(".ui_submit","click.submit",function(i){try{if(!e.__check__())return;e.__ajax__("post",e.action,$.extend(e.postData,{name:e.cache.starName,nick:e.cache.nickName,birthday:+new Date(e.cache.year,e.cache.month-1,e.cache.day)/1e3,gender:e.cache.sex,pic_top:e.cache.bgImg,pic_head:e.cache.icon,pic_music:e.cache.music,pic_video:e.cache.video,pic_album:e.cache.image,pic_mv:e.cache.mv}),function(){e.trigger("successd")})}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/form_editor/form_editor_main.js",method:"",ln:435}),i}})}}});_.Module.define({path:"frs/widget/StarHead",requires:["common/widget/Card"],sub:{initial:function(t,a){try{this.data=a,this.paramsObj=t,this.tabKey=t.tabKey,this.fid=t.fid,this.fname=t.fname,this.tbs=t.tbs,this.isOfficial=t.isOfficial,this.background_pic=t.background_pic,this.background_color=t.background_color,this.deadline_pic=t.deadline_pic,this.deadline_color=t.deadline_color,this.summary=t.summary,this.preview=t.preview,this._initData(),this._toStarOfficial(),this._initIconTip(),this._getHeadPicClickStatus()}catch(s){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:s.message||s.description,path:"frs:widget/star_head/star_head.js",method:"",ln:38}),s}},_initData:function(){var t=this;t.preview?$.tb.get("/frsstar/api/preview",{fid:t.fid,id:t.preview},function(a){a&&0==a.no?(t.data=a.data,t._render()):$("#container .star_banner,#container .star_collect").hide()}):t.data?t._render():$("#container .star_banner,#container .star_collect").hide()},_render:function(){var t="",a="0",s="#container";this.paramsObj.showFansNo,this._initRemindBubble(),this.preview&&this._showBanner(),this.isOfficial&&("pb"==PageData.product?(a="98px",s=".wrap2"):(a="0",s="#container"),$(".platform_countdown_head_wrap").length>0?(t=this.deadline_color+" url("+this.deadline_pic+") no-repeat 50% "+a,$(".star_head_official").css({border:"none","padding-top":0}),$(".content").css({border:"none",background:"none"}),$(s).css("background",t)):(t=this.background_color+" url("+this.background_pic+") no-repeat 50% "+a,$(".star_head_official").css("border","none"),$(".content").css({border:"none",background:"none"}),$(s).css("background",t))),this._bindEvents()},_showBanner:function(){var t=$("#container .star_banner img"),a=$("#container .j_star_picbox"),s=new Image,e=new Image;$(s).bind("load",function(){t.tbattr("src",s.src).css({margin:"0",width:980,height:260})});var i="main"==this.tabKey?156:32;this.isOfficial&&(i=45),$(e).bind("load",function(){a.find("img").tbattr("src",e.src).css({margin:"0",width:i,height:i})}),s.src=this.data.top,e.src=this.data.head},_initFansno:function(){var t=this,a=this.data.fans,s=$("#star_nums .j_fans_wrapper");if(a.open)a.is_get?t._showFansNum(a):t._getFansNum();else{var e=a.open_time-this.data.cur_time;if(e>0&&36e4>e){t._initCountdown(),t._showCountdown(e);var i=setInterval(function(){e--,e>0?t._showCountdown(e):(clearInterval(i),t._getFansNum())},1e3)}else{var n=new Date(1e3*a.open_time),r={content:"周"+["日","一","二","三","四","五","六"][n.getDay()]+"("+$.dateFormat(n,"MM月dd日")+") "+$.dateFormat(n,"HH:mm")+"准点开抢,一定记得来抢个好号哦~",arrow_dir:"up",bubble_css:{top:30,right:-51,width:223,"text-align":"left"},arrow_pos:{left:30},attr:" id='tb_message_tip_n' ",wrap:$("#star_nums"),closeBtn:!1},o=new UiBubbleTipBase(r),c=s.find(".j_fans_content");c.css({display:"block"}),c.bind("mouseover",function(){o.showBubble(),$.stats.sendRequest("fr=tb0_forum&st_type=star_fans")}).bind("mouseout",function(){o.hideBubble()})}}},_getFansNum:function(){var t=this,a=$("#star_nums .j_fans_content"),s=$("#star_nums .j_fans_countdown");s.hide(),a.removeClass("fans_countdown_title").addClass("fans_content fans_num_get").html("点击领取全球唯一粉丝编号").css({display:"block"}).on("click",function(){try{return PageData.user.is_login?PageData.user.no_un?(TbCom.process("User","buildUnameFrame"),!1):(t._getDataOfFansNum(),!1):(TbCom.process("User","buildLoginFrame",null,null,null,"star_fans"),!1)}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/star_head/star_head.js",method:"",ln:227}),a}})},_getDataOfFansNum:function(){var t=this,a=PageData.user.balv||{};a.is_block||PageData.user.forbidden&&PageData.user.forbidden.isForbid?t._showErrorTip(8):a.is_black||PageData.user.is_black?t._showErrorTip(220):a.has_liked||PageData.user.is_like?t._postFansData():t._postLikeData()},_showFansNum:function(t){var a=$("#star_nums"),s=new Array,e=$.dateFormat(new Date(1e3*t.get_time),"yyyy年MM月dd日HH时mm分"),i=a.find(".j_fans_content");i.removeClass("fans_num_get").css({display:"block"}).html("我的粉丝编号:"+this._getNo(t.num)),"main"==this.tabKey?s.push(''):s.push('
'),s.push('
'+$.tb.subByte(this.fname,12,"..")+"全球唯一粉丝编号
"),s.push('
'),s.push('
'),s.push('
'+$.tb.subByte(PageData.user.user_name,16,"..")+"
"),s.push('
');for(var n=this._getNo(t.num),r=0;r"+n.charAt(r)+"");s.push("
"),s.push('
于'+e+"获得
"),s.push("
"),s.push("
");var o=$(s.join(""));a.append(o),i.unbind().bind("mouseover",function(){o.show()}).bind("mouseout",function(){o.hide()})},_getNo:function(t){var a="0000000";return t+="",a.substr(0,a.length-t.length)+t},_initCountdown:function(){var t=$("#star_nums .j_fans_wrapper"),a=t.find(".j_fans_content"),s=t.find(".j_fans_countdown");a.removeClass("fans_content").addClass("fans_countdown_title").html("粉丝编号开抢倒计时:");var e={0:"他",1:"她",2:"TA"},i=e[this.data.gender]||"TA",n="每一个"+this.fname+"的粉丝编号,都代表着对"+i+"独一份的爱";s.tbattr("title",n).show()},_showCountdown:function(t){var a=Math.floor(t/3600),s=Math.floor(t%3600/60),e=t%60,i=$("#star_nums .j_fans_wrapper"),n=i.find(".j_countdown_h"),r=i.find(".j_countdown_m"),o=i.find(".j_countdown_s");a=10>a?"0"+a:a,s=10>s?"0"+s:s,e=10>e?"0"+e:e,n.html(a),r.html(s),o.html(e)},_postLikeData:function(){var t=this,a={fid:PageData.forum.forum_id,fname:PageData.forum.forum_name,uid:PageData.user.name_url,ie:"gbk",tbs:PageData.tbs};$.tb.post("/f/like/commit/add",a,function(a){if(a)switch(a.no){case 0:t._postFansData();break;case 8:case 9:case 220:t._showErrorTip(a.no);break;default:t._showErrorTip()}else t._showErrorTip()})},_postFansData:function(){var t=this,a="/frsstar/cm/fans/get",s={fid:t.fid,tbs:t.tbs};$.tb.post(a,s,function(a){a?0==a.no?t.isInvite?(t.starInvite._showInviteSuccessTip(a.data),t.starInvite._addInviteUser()):t._showSuccessTip(a.data):t._showErrorTip(a.no):t._showErrorTip()})},_initRemindBubble:function(){var t,a,s,e,i=this;e="main"==i.tabKey?$("#star_class_nav .star_class_tip"):$("#star_class .star_class_tip");for(var n=0;n
0&&r.indexOf(o)<0?s.show():s.remove(),a>0&&"video"==i.tabKey&&i.tabKey==t.tab&&i._showVideoBubble(r,a)}},_showVideoBubble:function(t,a){if(t.indexOf("video_tip")<0){var s=$("#content_tip_wrapper"),e=s.find(".content_tip_txt");e.html(a),s.show(),t+="video_tip,",$.cookie("STAR_TAB_TIP",t,{expires:1/3})}},_bindEvents:function(){var t=this;$("#star_class").on("mouseenter",".j_star_tab",function(){$(this).removeClass("star_class_normal").addClass("star_class_hover")}).on("mouseleave",".j_star_tab",function(){$(this).removeClass("star_class_hover").addClass("star_class_normal")}).on("click",".j_star_tab",function(){try{if($(this).hasClass("star_class_active"))return;return $("#star_class").find(".star_class_active").removeClass("star_class_active").addClass("star_class_normal"),$(this).removeClass("star_class_hover").addClass("star_class_active"),t._doClickEvent($(this)),!1}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/star_head/star_head.js",method:"",ln:445}),a}})},_doClickEvent:function(t){var a=t.find(".star_class_tip"),s=t.getData();if("main"!=this.tabKey&&setTimeout(function(){$.tb.location.setHref(s.url)},200),a[0]){a.remove();var e=$.cookie("STAR_TAB_TIP")||"";e=e+s.tab+",",$.cookie("STAR_TAB_TIP",e,{expires:1/3})}},_showSuccessTip:function(t){var a=this,s=new Array;s.push('
'),s.push('恭喜你获得'+$.tb.subByte(this.fname,14,"..")+"全球唯一
"),s.push('');for(var e=this._getNo(t.num),i=0;i');s.push("
"),s.push('同时欢迎你成为'+$.tb.subByte(this.fname,14,"..")+"吧的会员
"),s.push(' ');var n=new $.dialog({html:s.join(""),showTitle:!1,draggable:!1,width:350,height:265,holderClassName:"fansnum_bigtip"}),r=setTimeout(function(){a._showFansNum(t),n.close(),$.tb.location.reload()},8e3);$("a.success_tip_close").bind("click",function(){try{return clearTimeout(r),a._showFansNum(t),n.close(),$.tb.location.reload(),!1}catch(s){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:s.message||s.description,path:"frs:widget/star_head/star_head.js",method:"",ln:503}),s}})},_showErrorTip:function(t){var a="";switch(t){case 8:case 9:a="你在本吧被封禁,暂时不能进行操作";break;case 220:a="你被吧主加入黑名单,暂时不能进行操作";break;case 120002:a="已领取成功,刷新页面看看呗";break;default:a="额,抱歉服务器好像抽风了,请你再点一下下"}var s=new Array;s.push(''+a+"
"),s.push('刷新本页 ');new $.dialog({html:s.join(""),showTitle:!1,draggable:!1,width:244,height:113});$("a.error_tip_btn").bind("click",function(){try{return $.tb.location.reload(),!1}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/star_head/star_head.js",method:"",ln:537}),t}})},_toStarOfficial:function(){$(".j_join_fans_memeber").bind("click",function(){try{$.stats.track("头图加入粉丝团","明星官网","frs","点击")}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/star_head/star_head.js",method:"",ln:545}),t}})},_initIconTip:function(){var t=this,a=(PageData.forum.name,t.summary);$(".j_star_info_icon").hover(function(){t._tip_card=t.use("common/widget/Card",{content:a,card_css:{width:150},arrow_pos:{left:61},auto_positon:!0,event_target:$(this),attr:" id='star_official_icon_tip' "}),t._tip_card.showCard()},function(){t._tip_card.closeCard()})},_getHeadPicClickStatus:function(){var t=$(".star_banner"),a={obj_type:"平台化"};t.on("click",".j_click_status",function(){try{$.stats.track("吧头图","吧头图统计",void 0,"click",a)}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/star_head/star_head.js",method:"",ln:580}),t}})}}});_.Module.define({path:"common/component/SlideShow",sub:{defaultOptions:{delayLoadPic:!1,effect:"slide",activeClass:"tbui_slideshow_active",baseZIndex:0,interval:5e3,slide:{speed:500},fade:{speed:500},triggerHandler:"click"},initial:function(t){t=$.extend({},this.defaultOptions,t);var i=this;this.options=t,this.animating=!1,this.current=0,this.vendorPrefix=!1,this.$nav=$(t.nav),this.$navItem=this.$nav.children(),this.total=this.$navItem.size()||t.total,this.$container=$(t.target),this.$list=this.$container.children(".tbui_slideshow_list"),this.$tokens=this.$list.children(),t.width||(t.width=this.$container.width()),t.height||(t.height=this.$container.height()),this.$container.add(this.$list).css({width:t.width,height:t.height}),this.interval=t.interval||5e3,this.picLoadedIndex={},this.$navItem.first().addClass(t.activeClass),this.$tokens.first().show(),this.showOriPic(0),"click"==t.triggerHandler?this.$navItem.click(function(){var e=this;t.auto&&i.stop(),this.delayHandler=setTimeout(function(){i.delayHandler=null,i.setActive($(e).index())},10)}).bind("mouseout",function(){t.auto&&i.play(),this.delayHandler&&clearTimeout(this.delayHandler)}):"hover"==t.triggerHandler&&this.$navItem.hover(function(){var e=this;t.auto&&i.stop(),this.delayHandler=setTimeout(function(){i.delayHandler=null,i.setActive($(e).index())},200)},function(){t.auto&&i.play(),this.delayHandler&&clearTimeout(this.delayHandler)}),this.effectHandler=this["_"+t.effect],t.auto&&(this.play(),this.$list.hover(function(){i.stop()},function(){i.play()})),t.next&&$(t.next).click(function(t){t.preventDefault(),t.stopPropagation(),i.next()}),t.prev&&$(t.prev).click(function(t){t.preventDefault(),t.stopPropagation(),i.prev()})},setActive:function(t){return this.animating||t===this.current?!1:(this.$navItem.removeClass(this.options.activeClass).eq(t).addClass(this.options.activeClass),this.effectHandler(t),this.showOriPic(t),!0)},next:function(){var t=this.current+1;t==this.total&&(t=0),this.setActive(t)},prev:function(){var t=this.current-1;-1==t&&(t=this.total-1),this.setActive(t)},play:function(){var t=this;null==this.autoHandler&&(this.autoHandler=setInterval(function(){t.next()},this.options.interval))},showOriPic:function(t){if(this.options.delayLoadPic&&!this.picLoadedIndex["_"+t]){for(var i,e=this.$tokens.eq(t).find("img"),n=e.length,s=0;n>s;s++){i=$(e[s]);var o=i.tbattr("orisrc");o&&i.tbattr("src",o)}this.picLoadedIndex["_"+t]=1}},stop:function(){clearInterval(this.autoHandler),this.autoHandler=null},_slide:function(t){var i,e,n,s,o,a,r,h=this;this.animating=!0,i=this.current,r=t>i?1:-1,e=t>i?-this.options.width:this.options.width,s=t,this.$tokens.eq(i).siblings().css({display:"none",left:0,zIndex:0+this.options.baseZIndex}),this.$tokens.eq(s).css({display:"block",left:r*this.options.width,zIndex:10+this.options.baseZIndex}),this.vendorPrefix?(o=this.vendorPrefix,a=o+"Transform",n=o+"TransitionDuration",this.$list[0].style[a]="translateX("+e+"px)",this.$list[0].style[n]=this.options.slide.speed+"ms",this.$list.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){h.$list[0].style[a]="",h.$list[0].style[n]="",h.$tokens.eq(s).css({left:0}),h.$tokens.eq(i).css({display:"none",left:0,zIndex:0}),h.animating=!1,h.current=s,h.$list.unbind("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd"),h.trigger("animateEnd")})):h.$list.stop().animate({left:e},this.options.slide.speed,function(){h.$list.css({left:0}),h.$tokens.eq(s).css({left:0}),h.$tokens.eq(i).css({display:"none",left:0,zIndex:0}),h.current=s,h.animating=!1,h.trigger("animateEnd")})},_fade:function(t){var i,e,n=this;this.animating=!0,i=this.current,e=t,this.$tokens.eq(e).css({display:"none",left:0,zIndex:10+this.options.baseZIndex}),this.$tokens.eq(i).stop().fadeOut(this.options.fade.speed),this.$tokens.eq(e).stop().fadeIn(this.options.fade.speed,function(){n.$tokens.eq(e).css({zIndex:0+n.options.baseZIndex}),n.animating=!1,n.current=e})},_getVendorPrefix:function(){var t,i,e,n,s;for(t=document.body||document.documentElement,e=t.style,n="Transition",s=["Moz","Webkit","Khtml","O","ms"],i=0;i封禁理由:"+n+"":"",c="bawu"===t?";如果吧务不处理,就可以自动解封哦~":"";u.renderInfo={product:e,ban:i,fid:a,day:r,by:t,op:"bawu"!==t?"系统":"本吧吧务",page:"bawu"!==t?"system":"bawu",br:n,notice:c},$("body").off("click.ueg.pmclink").on("click.ueg.pmclink",".ueg_pmc-link",function(){var e=$(this),a=e.data("fr"),r=e.data("site");$.stats.track(r,"UEG-track",a,"click")})},ensure:function(e,a,r){for(var t,a=a.split(".");a.length>1;)t=a.shift(),e=e[t]=e[t]||{};if(t=a.shift(),void 0===t)throw"Please make sure you has one namespace like `scope.name.value` !";return void 0!==r&&(e[t]=r),e[t]},_tplRenders:{richPoster:function(e){if("system"==e.page)var a=e.ban?["您可能存在违规操作,已被#{op}封禁,去",'申请恢复 ',"#{notice}#{br}"].join(""):"";else var a=e.ban?["您已被#{op}封禁,#{br}",'您可以去申请恢复 '].join(""):"";return $.tb.format(a,e)},simplePoster:function(e){if("system"==e.page)var a=e.ban?["您可能存在违规操作,已被#{op}封禁,去",'申请恢复 '].join(""):"";else var a=e.ban?["您已被#{op}封禁,#{br}",'您可以去申请恢复 '].join(""):"";return $.tb.format(a,e)},balvAside:function(e){var a=['',"
你已被系统永久封禁, 封禁期间不加经验,头衔和权限收回。
",'
","
"].join(""),r=['','
',"你已被#{op}封禁,#{br} ","封禁期间不加经验,头衔和权限收回。 ","
",'
","
"].join(""),t=e.ban?e.day>0&&e.day<360?r:a:"";return $.tb.format(t,e)},oldPosterDialog:function(e){var a=e.ban?["操作失败,您的账号因违规操作而被封禁 ",'查看封禁信息 ']:"";return $.tb.format(a,e)},balvLike:function(e){return $.tb.format("你已被#{op}封禁,暂时不能进行操作",e)},voteDialog:function(e){var a=e.ban?["操作失败,您的账号因违规操作而被封禁 ",'查看封禁信息 ']:"";return $.tb.format(a,e)},delPost:function(e){var a=e.ban?"抱歉,您已被本吧封禁或者加入黑名单,暂不能删贴":"";return a},forumInfoManager:function(e){var a=e.ban?"您的账户被封禁,暂不能修改":"";return a},forumManagerApply:function(){var e="抱歉,您的帐号被封禁,暂时无法申请吧主。";return e}},_supports:{frs:{richPoster:"richPoster",simplePoster:"simplePoster",balvAside:"balvAside",balvLike:"balvLike",oldPosterDialog:"oldPosterDialog",voteDialog:"voteDialog",forumManagerApply:"forumManagerApply"},pb:{richPoster:"richPoster",simplePoster:"simplePoster",balvAside:"balvAside",oldPosterDialog:"oldPosterDialog",voteDialog:"voteDialog",forumManagerApply:"forumManagerApply",delPost:"delPost"},"forum-info":{forumManagerApply:"forumManagerApply"},tbmall_theme2:{richPoster:"richPoster"}},assign:function(e,a,r,t){var i=this,n=(i._supports,i._tplRenders);if(!t&&"function"==typeof r){if(t=r,r=t.name,!r)return i.$error("Unknown render handler with an anonymous function"),!1;if(n[r])return i.$error("There exsits one render, place choice one another name"),!1;n[r]=t}e=support[e]=support[e]||{},e[a]=r},$error:function(){"tieba.baidu.com"!==$.tb.location.getHost()&&(arguments[0]="Console$>Error: "+(arguments[0]||""),(console&&console.error||function(){}).apply(console,arguments))},render:function(e){var a,r=this,t=r.renderInfo.product,i=r._supports,n=r._tplRenders,o=(i[t]||{})[e],s=$.tb.location.getSearchValue().fr||"";return o&&"function"==typeof n[o]?(r.renderInfo.site=e,r.renderInfo.fr=t+(s?"-"+s:""),a=n[o](r.renderInfo),r.renderInfo.site="",a):(r.$error("Don't support for this page named %s with the site named %s ,please hi li304207639",t,e),"")}}});_.Module.define({path:"comforum/widget/WorldCupFrsFirst",requires:[],sub:{initial:function(){this._container=$("#world_cup_frs_first"),this._bindEvent()},_config:{mapCountry:{1:"巴西",2:"克罗地亚",3:"墨西哥",4:"喀麦隆",5:"西班牙",6:"荷兰",7:"智利",8:"澳大利亚",9:"哥伦比亚",10:"希腊",11:"科特迪瓦",12:"日本",13:"乌拉圭",14:"哥斯达黎加",15:"英格兰",16:"意大利",17:"瑞士",18:"厄瓜多尔",19:"法国",20:"洪都拉斯",21:"阿根廷",22:"波黑",23:"伊朗",24:"尼日利亚",25:"德国",26:"葡萄牙",27:"加纳",28:"美国",29:"比利时",30:"阿尔及利亚",31:"俄罗斯",32:"韩国"}},_bindEvent:function(){var e=this;e._initPage()},_initPage:function(){var e=this,t="/game/worldcup/getAllMatchs";$.get(t).done(function(t){var a=$.json.parseJSON(t);0==a.errno?(a.matchList.length<2&&(0==a.matchList.length&&e._container.hide(),e._container.find(".prev, .next").hide()),e._container.find(".world_cup_slider .loading-effect").fadeOut(),e._container.find(".world_cup_slider ul").append(e._renderTeamList(a.matchList)),e._initSlider(),e._doVote()):(e._container.find(".world_cup_slider").append($("获取数据失败,囧!
")),setTimeout(function(){e._container.slideUp(600),e._container.find(".world_cup_slider .err-text").remove()},2e3))}).fail(function(){e._container.find(".world_cup_slider").append($("获取数据失败,囧!
")),setTimeout(function(){e._container.slideUp(600),e._container.find(".world_cup_slider .err-text").remove()},2e3)})},_initSlider:function(){var e=this;e._container.find(".world_cup_slider").jCarouselLite({visible:1,speed:350,btnNext:".j_world_cup_next",btnPrev:".j_world_cup_prev"})},_parseTime:function(e){e=parseInt(1e3*e);var t=new Date(e),a=t.getMonth()+1,i=t.getDate(),n=t.getHours(),r=t.getMinutes(),s=[t.getFullYear()+"-",10>a?"0"+a:a,"-",10>i?"0"+i:i," ",(10>n?"0"+n:n)+":",10>r?"0"+r:r].join("");return s},_doVote:function(){var e=this,t="/game/worldcup/likeMatchTeam",a=null,i=null;e._container.find(".j_vote").on("click",function(e){if(e.preventDefault(),i=$(e.target),!PageData.user.is_login)return _.Module.use("common/widget/LoginDialog",[],function(){}),!1;if("yes"!==$.tb.Storage.get("frs_world_cup_is_voted"+$(this).data("team-id")+$(this).data("match-id"))){var n={match_id:$(this).data("match-id"),team_id:$(this).data("team-id")};$.post(t,n).done(function(e){var t=JSON.parse(e);0==t.errno?($.tb.Storage.set("frs_world_cup_is_voted"+n.team_id+n.match_id,"yes",(new Date).getTime()+432e5),parseInt(i.text())<99999&&i.text(parseInt(i.text())+1),i.append($("+1 ")).delay(2e3).queue(function(e){$(this).find(".plus-animate").remove(),e()})):a=$.dialog.assert("服务器错误:"+t.errmsg,{time:2e3,title:"贴吧提示"})}).fail(function(){a=$.dialog.assert("亲出错了",{time:2e3,title:"贴吧提示"})})}else a=$.dialog.assert("您已赞过此球队,去投注彩票发大财吧^ ^",{time:2e3,title:"贴吧提示"})})},_renderTeamList:function(e){var t=this,a="http://tieba.lecai.com/lottery/jczq/",i=[];return $.each(e,function(e,n){i.push("
"+t._config.mapCountry[n.team.A.id]+"
投注支持
"+(parseInt(n.team.A.likers)>99999?parseInt(n.team.A.likers)/1e4+"万":parseInt(n.team.A.likers))+"
势均力敌
"+(parseInt(n.team.B.likers)>99999?parseInt(n.team.B.likers)/1e4+"万":parseInt(n.team.B.likers))+"
投注支持
"+t._config.mapCountry[n.team.B.id]+"
"+(""!=n.area?"球场:":"")+" "+n.area+" 开赛时间: "+t._parseTime(n.time)+"
")}),i.join("")}}});_.Module.define({path:"frs/widget/GroupSuggGrid",sub:{_ids:[],_ajaxUrl:"",_$container:null,_viewData:[],_template:{basic:{group:['','
#{title} ','
',"#{t_items}"," ","
"].join(""),frs:['"].join("")},item:['',' ','',' '," ",'",'','
#{memberAmount} / #{memberAmountTotal}',"#{t_starContainer}",'
#{groupIntro}
',"
"," "].join(""),starContainer:['',"#{t_stars}","
"].join(""),star:[' '].join("")},_fetchData:function(b){var a=this;$.ajax({url:a._ajaxUrl,type:"GET",dataType:"json",data:{ids:a._ids},success:b})},_formateData:function(f){if(!f||!f.groups){return[]}var b=this;var c=[];var a=f.groups;for(var d=0;d=1){var b=[];for(var f=j.level;f>0;--f){b.push(g.star)}c=$.tb.format(g.starContainer,{level:j.level,t_stars:b.join("")})}else{c=""}e[h]=$.tb.format(g.item,{serialNum:h+1,groupId:j.id,imgSrc:j.portrait||"http://tb1.bdstatic.com/tb/static-groups/img/portrait.png",groupName:j.name,memberAmount:j.memberAmount,memberAmountTotal:j.memberAmountTotal,groupIntro:$.tb.subByte(j.intro,20,"..."),t_starContainer:c,lastClassName:((h+1)%3===0?"col_last ":" ")+(h>5?"row_last ":" ")})}var d=$($.tb.format(g.basic[i.page],{t_items:e.join(""),title:i.title,className:i.page+"_group_sugg_grid"}));d.find(".j_gsg_groups_item:last").addClass("gsg_groups_item_last");d.find(".j_group_order:lt(3)").addClass("group_order_top");i._$container.append(d)},initial:function(b){var a=this;a.page=b.page;a.count=b.count;a.title=b.title||"\u70ed\u95e8\u7fa4\u7ec4\u63a8\u8350";a._ids=b.ids;a._ajaxUrl=b.ajaxUrl;a._$container=b.$container;a._fetchData(function(c){a._viewData=a._formateData(c);a._renderView()})}}});_.Module.define({path:"frs/widget/OfficialGroups",sub:{jqwrap:$(".official_groups_container"),lists:$(".official_groups_list"),initial_height:215,duration:200,initial:function(){this.max_height=Math.ceil(this.lists.children().length/2)*85+38+7;this.btn=this.jqwrap.find(".j_unfold_all");this.bindEvents()},bindEvents:function(){var a=this;this.btn.on("click",function(b){b.preventDefault();if($(this).hasClass("j_unfold_all")){a.unfold()}else{if($(this).hasClass("j_fold_all")){a.fold()}}})},unfold:function(){var a=this;this.btn.removeClass("j_unfold_all");this.lists.children("li.item_hide").removeClass("item_hide");this.jqwrap.height(this.jqwrap.height()).css("max-height","none").animate({height:a.max_height+8},a.duration,function(){a.btn.addClass("j_fold_all fold_all").removeClass("unfold_all").text("\u6536\u8d77\u5168\u90e8")})},fold:function(){var a=this;this.btn.removeClass("j_fold_all");this.jqwrap.animate({height:a.initial_height+8},a.duration,function(){a.lists.children("li").each(function(b){if(b>=4){$(this).addClass("item_hide")}});a.btn.addClass("unfold_all j_unfold_all").removeClass("fold_all").text("\u5c55\u5f00\u5168\u90e8")})}}});_.Module.define({path:"liveshow/widget/PlayerList",requires:[],sub:{initial:function(t){var i=this;t&&i.updateTiebaPlayerList(),i._bindEvents()},updateTiebaPlayerList:function(){var t=this,i={ie:"utf-8",tbs:PageData.tbs,room_ids:t._getRooms()};t._ajax&&t._ajax.abort(),t._ajax=$.ajax({type:"get",url:"/show/getrooms",data:i,dataType:"json"}).success(function(i){if(i&&0===i.no){var e=i.data;t._updateRoomInfo(e)}})},_getRooms:function(){var t=[];return $(".j_per_list .j_per_item").each(function(){var i=$(this).tbattr("data-room");t.push(i)}),t},_updateRoomInfo:function(t){var i=this;t=t||[];for(var e in t){var a=$("#asyn_per_item_"+e),o=+t[e].chat_weight,n=+t[e].onlive_time,_="";o>1e4&&(o=(o/1e4).toFixed(1)+"万"),_="0"!=t[e].is_live?i._formatTime(n):"0分钟",a.find(".j_play_info_min").html(_),a.find(".j_play_info_total").html(o)}},_formatTime:function(t){var i="",e=Env.server_time/1e3-t,a=e/86400,o="",n="";return a>1?(o=Math.floor((e-24*Math.floor(a)*60*60)/3600),i=Math.floor(a)+"天"):(o=Math.floor(e/3600),o>1?(n=Math.floor((e-60*Math.floor(o)*60)/60),i=Math.floor(o)+"小时"):(n=Math.floor(e/60),i=n+"分钟")),i},_tpl:['','
','
',"
","#{is_live}",'
#{user_name}
','
','#{time} ','#{chat_weight} ',"
",'
',"
"].join(""),_buildPerTpl:function(t){for(var i=this,e="",a=0,o=t.length;o>a;a++){var n=t[a].is_live?'直播 ':"";e+=["",$.tb.format(this._tpl,$.extend({},t[a],{time:i._formatTime(t[a].onlive_time),is_live:n,url:"/show/v/"+t[a].room_id+"?fr="+encodeURIComponent(t[a].forum_name)+"&fr_fid="+encodeURIComponent(t[a].forum_id)}))," "].join("")}return e},_bindEvents:function(){var t=this;$(".per_list_body").delegate(".j_per_item","hover",function(){$(this).find(".j_play_btn").toggle()}),$(".per_list_body").delegate(".j_per_item .photo","click",function(){var t=$(this).children(".j_play_btn");window.open(t.tbattr("href").unescapeHTML())}),$(".per_list_body").delegate(".j_per_item .j_play_btn","click",function(){$.stats.track("frs-top-xiu8","秀吧top","frs","click")}),$(".j_change_data").on("click",function(i){i.preventDefault(),$.ajax({type:"get",url:"/tbliveact/data/getLiveList",dataType:"json"}).success(function(i){if(i&&0===i.no){var e=i.data.xiu8_live_list;$(".per_list_body").html(t._buildPerTpl(e))}}).error(function(){})})}}});_.Module.define({path:"comforum/widget/localLife",sub:{urlTmp:{local58:"http://tieba.api.58.com/baidu_tieba/listPage.html?kw=#{forumName}&cate=#{cate}&city=#{city}",localnuomi:"http://tsm.nuomi.com/deallist/?hd=1&pagesize=48&first_class=#{cate}&city=#{city}"},initial:function(t){this.opt=t,this.wrapper=$(".local_guide"),this.merchantWrapper=this.wrapper.find("ul.merchant"),this.cateWrapper=this.wrapper.find("ul:not(.merchant)"),this.iframe=$("#localLifeIframe"),this.bindEvents()},bindEvents:function(){var t=this;t.wrapper.on("click","a:not(.title)",function(){var a=$(this).data("merchant"),e={forumName:PageData.forum.forum_name,cate:$(this).data("cate"),city:$(this).data("city")},i=$.tb.format(t.urlTmp[a],e);t.changeStatus($(this),!0),t.iframe.tbattr("src",i)}),"localLife"!=this.opt.type?t.cateWrapper.find("a:not(.title)").each(function(){var a=$(this).data("merchant"),e=$(this).data("cate");a==t.opt.type&&e==t.opt.cate&&$(this).trigger("click")}):t.cateWrapper.find("a:not(.title):first").trigger("click"),$.stats.track("本地生活页面展现","本地生活","","展现",{obj_type:t.opt.type,obj_sub_type:t.opt.cate})},changeStatus:function(t,a){var e=this,i=t.data("merchant"),c=t.data("cate");t.closest("ul").find("a").removeClass("sel"),t.addClass("sel"),a&&(t.closest("ul").hasClass("merchant")?this.cateWrapper.find("a").each(function(){return $(this).data("cate")==c?(e.changeStatus($(this),!1),void 0):void 0}):this.merchantWrapper.find("a").each(function(){return $(this).data("merchant")==i?(e.changeStatus($(this),!1),void 0):void 0}))}}});_.Module.define({path:"staroffical/widget/schedule",sub:{official_name:"",total_page:0,limit:10,is_member:0,is_frs:1,initial:function(t,e,i,a,n){this.official_name=t,this.total_page=i,this.limit=e,this.is_member=a,this.is_frs=n,this.initPage(e),this.initHeight()},initHeight:function(){if($wrap=$(".frs_schedule_wrapper"),$wrap.length){var t=$wrap.height(),e=$("#aside").height()+100;e>t&&$wrap.css({"min-height":e}),$(".th_footer_bright").css({"text-indent":"-9999px"})}$(".schedule_wrapper .left").height($(".schedule_wrapper .right").height()+30)},alertJoin:function(){var t=this;$("#dialog-join button").click(function(){var e=t.is_frs?"f?tab=starverify&kw="+PageData.forum.name_url:"/star/"+t.official_name+"/member";$.tb.location.setHref(e)}),new $.dialog({title:"提示",html:$("#dialog-join"),draggable:!1,width:400,height:300})},checkLogin:function(){return PageData.user.is_login?void 0:(_.Module.use("common/widget/LoginDialog",[],function(){}),void 0)},initPage:function(t){var e=0,i=2;t>0&&$(window).bind("scroll",{context:this,flag:e,page:i,total:this.total_page},this.checkScroll)},checkScroll:function(t){function e(){return $(document).scrollTop()>=$content.offset().top+$content.outerHeight()-300}$content=$(".j_schedule_content"),e()&&!t.data.flag&&(t.data.flag=1,$(".schedule_wrapper .loading img").show(),t.data.context.getScheduleItems(t.data))},getScheduleItems:function(t){var e,i=t.context,a="",n="",o=function(){setTimeout(function(){$(".schedule_wrapper .loading img").hide(),t.flag=0},500)},r=function(e){if(0==e.no){if(e.data.schedule_list.length>0){var i,r,s=e.data.schedule_list.length,l="";for(i=0;s>i;i++)r=e.data.schedule_list[i],l=t.context.timeStamp2String(1e3*parseInt(r.start_time)),n="",a+=n;return $(".schedule_wrapper .right").append(a),$(".schedule_wrapper .left").height($(".schedule_wrapper .right").height()+30),$(".schedule_wrapper .loading img").hide(),t.page++,t.flag=0,void 0}return o(),void 0}return o(),void 0},s=function(){o()};if(1==t.total||(t.page-1)*i.limit>t.total)return $(".schedule_wrapper .loading img").hide(),void 0;var l=i.is_frs?"/star/page/getschedule?official_id="+PageData.forum.id:"/star/"+i.official_name+"/member";e=$.ajax({url:l,type:"GET",cache:!1,data:{pn:t.page,format:"json"},dataType:"json"}),e.done(r),e.fail(s)},timeStamp2String:function(t){var e=new Date;e.setTime(t);{var i=e.getFullYear(),a=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,n=e.getDate()<10?"0"+e.getDate():e.getDate();e.getHours()<10?"0"+e.getHours():e.getHours(),e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds()}return i+"-"+a+"-"+n}}});_.Module.define({path:"staroffical/widget/memberChangeInfo",sub:{official_name:"",is_frs:1,userInfoPath:"/star/user/getUserInfo",validation:{address:function(e){var a=/^[\u4e00-\u9fa5][0-9a-zA-Z-\u4e00-\u9fa5]{2,50}$/.test(e.val());return a},email:function(e){var a=/^[A-Za-z0-9+]+[A-Za-z0-9\.\_\-+]*@([A-Za-z0-9\-]+\.)+[A-Za-z0-9]+$/.test(e.val());return a},default_vali:function(e){var a=$.trim(e.val()).length>0;return a}},initial:function(e,a){this.official_name=e,this.is_frs=a,a&&(this.initHeight(),this.getUserInfo())},initHeight:function(){if($wrap=$(".frs_verify_wrapper"),$wrap.length){var e=$wrap.height(),a=$("#aside").height()+100;a>e&&$wrap.css({"min-height":a}),$(".th_footer_bright").css({"text-indent":"-9999px"})}},getUserInfo:function(){var e=this;e.$form=$("#j_form"),e.$address=$("#address"),e.$IDCard=$("#IDCard"),e.$realName=$("#real_name"),e.$mobile=$("#mobile"),e.$email=$("#email"),$.ajax({url:e.userInfoPath,data:"",dataType:"json",method:"post",success:function(a){var t,i,r,n,l,o,s=a.data,d=a.no;d||(t=s.real_name,i=s.identify,r=s.mobile,n=s.birthday,l=s.address,o=s.email,e.province=s.province,e.region=s.region,e.year=n.slice(0,4),e.month=n.slice(4,6),e.month=Number(e.month[0])?e.month:e.month.slice(1),e.month=Number(e.month),e.day=Number(n.slice(6)),e.$realName.html(t),e.$mobile.html(r),e.$address.val(l),e.$IDCard.html(i),e.$email.html(o),e.genericAreaSelect())}})},initPage:function(){var e=this;new YMDselect("year","month","day",e.year,e.month,e.day),PageData.user.is_login&&$("form").bind("submit",{context:this},this.checkInputs)},genericAreaSelect:function(){var e=this;_.Module.use("common/component/AreaSelect",[{parent_id:"j_area_select",data_arr:[["安徽省","北京市","重庆市","福建省","甘肃省","港澳台","广东省","广西壮族自治区","贵州省","海南省","河北省","河南省","黑龙江省","湖北省","湖南省","吉林省","江苏省","江西省","辽宁省","内蒙古自治区","宁夏回族自治区","青海省","山东省","山西省","陕西省","上海市","四川省","天津市","西藏自治区","新疆维吾尔自治区","云南省","浙江省","重庆市","海外"],["安庆市","蚌埠市","亳州市","巢湖市","池州市","滁州市","阜阳市","合肥市","淮北市","淮南市","黄山市","六安市","马鞍山市","宿州市","铜陵市","芜湖市","宣城市"],["昌平区","朝阳区","大兴区","东城区","房山区","丰台区","海淀区","怀柔区","门头沟区","密云县","平谷区","石景山区","顺义区","通州区","西城区","延庆县"],["巴南区","北碚区","璧山县","长寿区","城口县","大渡口区","大足县","垫江县","丰都县","奉节县","涪陵区","合川区","江北区","江津区","九龙坡区","开县","梁平县","南岸区","南川区","彭水苗族土家族自治县","綦江县","黔江区","荣昌县","沙坪坝区","石柱土家族自治县","双桥区","铜梁县","潼南县","万盛区","万州区","巫山县","巫溪县","武隆县","秀山土家族苗族自治县","永川区","酉阳土家族苗族自治县","渝北区","渝中区","云阳县","忠县"],["福州市","龙岩市","南平市","宁德市","莆田市","泉州市","三明市","厦门市","漳州市"],["白银市","定西市","甘南藏族自治州","嘉峪关市","金昌市","酒泉市","兰州市","临夏回族自治州","陇南市","平凉市","庆阳市","天水市","武威市","张掖市"],["澳门特别行政区","香港特别行政区","台湾"],["潮州市","东沙群岛","东莞市","佛山市","广州市","河源市","惠州市","江门市","揭阳市","茂名市","梅州市","清远市","汕头市","汕尾市","韶关市","深圳市","阳江市","云浮市","湛江市","肇庆市","中山市","珠海市"],["百色市","北海市","崇左市","防城港市","贵港市","桂林市","河池市","贺州市","来宾市","柳州市","南宁市","钦州市","梧州市","玉林市"],["安顺市","毕节地区","贵阳市","六盘水市","黔东南苗族侗族自治州","黔南布依族苗族自治州","黔西南布依族苗族自治州","铜仁地区","遵义市"],["海口市","海南省直辖县级行政单位","三亚市"],["保定市","沧州市","承德市","邯郸市","衡水市","廊坊市","秦皇岛市","石家庄市","唐山市","邢台市","张家口市"],["安阳市","鹤壁市","济源市","焦作市","开封市","洛阳市","漯河市","南阳市","平顶山市","濮阳市","三门峡市","商丘市","新乡市","信阳市","许昌市","郑州市","周口市","驻马店市"],["大庆市","大兴安岭地区","哈尔滨市","鹤岗市","黑河市","鸡西市","佳木斯市","牡丹江市","七台河市","齐齐哈尔市","双鸭山市","绥化市","伊春市"],["鄂州市","恩施土家族苗族自治州","湖北省直辖县级行政单位","黄冈市","黄石市","荆门市","荆州市","十堰市","随州市","武汉市","咸宁市","襄樊市","孝感市","宜昌市"],["长沙市","常德市","郴州市","衡阳市","怀化市","娄底市","邵阳市","湘潭市","湘西土家族苗族自治州","益阳市","永州市","岳阳市","张家界市","株洲市"],["白城市","白山市","长春市","吉林市","辽源市","四平市","松原市","通化市","延边朝鲜族自治州"],["常州市","淮安市","连云港市","南京市","南通市","苏州市","宿迁市","泰州市","无锡市","徐州市","盐城市","扬州市","镇江市"],["抚州市","赣州市","吉安市","景德镇市","九江市","南昌市","萍乡市","上饶市","新余市","宜春市","鹰潭市"],["鞍山市","本溪市","朝阳市","大连市","丹东市","抚顺市","阜新市","葫芦岛市","锦州市","辽阳市","盘锦市","沈阳市","铁岭市","营口市"],["阿拉善盟","巴彦淖尔市","包头市","赤峰市","鄂尔多斯市","呼和浩特市","呼伦贝尔市","通辽市","乌海市","乌兰察布市","锡林郭勒盟","兴安盟"],["固原市","石嘴山市","吴忠市","银川市","中卫市"],["果洛藏族自治州","海北藏族自治州","海东地区","海南藏族自治州","海西蒙古族藏族自治州","黄南藏族自治州","西宁市","玉树藏族自治州"],["滨州市","德州市","东营市","菏泽市","济南市","济宁市","莱芜市","聊城市","临沂市","青岛市","日照市","泰安市","威海市","潍坊市","烟台市","枣庄市","淄博市"],["长治市","大同市","晋城市","晋中市","临汾市","吕梁市","朔州市","太原市","忻州市","阳泉市","运城市"],["安康市","宝鸡市","汉中市","商洛市","铜川市","渭南市","西安市","咸阳市","延安市","榆林市"],["宝山区","长宁区","崇明县","奉贤区","虹口区","黄浦区","嘉定区","金山区","静安区","卢湾区","闵行区","浦东新区","普陀区","青浦区","松江区","徐汇区","杨浦区","闸北区"],["阿坝藏族羌族自治州","巴中市","成都市","达州市","德阳市","甘孜藏族自治州","广安市","广元市","乐山市","凉山彝族自治州","泸州市","眉山市","绵阳市","内江市","南充市","攀枝花市","遂宁市","雅安市","宜宾市","资阳市","自贡市"],["宝坻区","北辰区","滨海新区","东丽区","和平区","河北区","河东区","河西区","红桥区","蓟县","津南区","静海县","南开区","宁河县","武清区","西青区"],["阿里地区","昌都地区","拉萨市","林芝地区","那曲地区","日喀则地区","山南地区"],["阿克苏地区","阿勒泰地区","巴音郭楞蒙古自治州","博尔塔拉蒙古自治州","昌吉回族自治州","哈密地区","和田地区","喀什地区","克拉玛依市","克孜勒苏柯尔克孜自治州","塔城地区","吐鲁番地区","乌鲁木齐市","新疆直辖县级行政单位","伊犁哈萨克自治州"],["保山市","楚雄彝族自治州","大理白族自治州","德宏傣族景颇族自治州","迪庆藏族自治州","红河哈尼族彝族自治州","昆明市","丽江市","临沧市","怒江傈僳族自治州","普洱市","曲靖市","文山壮族苗族自治州","西双版纳傣族自治州","玉溪市","昭通市"],["杭州市","湖州市","嘉兴市","金华市","丽水市","宁波市","衢州市","绍兴市","台州市","温州市","舟山市"],["巴南区","北碚区","璧山县","长寿区","城口县","大渡口区","大足县","垫江县","丰都县","奉节县","涪陵区","合川区","江北区","江津区","九龙坡区","开县","梁平县","南岸区","南川区","彭水苗族土家族自治县","綦江县","黔江区","荣昌县","沙坪坝区","石柱土家族自治县","双桥区","铜梁县","潼南县","万盛区","万州区","巫山县","巫溪县","武隆县","秀山土家族苗族自治县","永川区","酉阳土家族苗族自治县","渝北区","渝中区","云阳县","忠县"],["海外"]],s_label:" ",directCity:!0,firText:e.province,secText:e.region,select_call_fun:function(){}}],function(a){var t=a.db_select_array[0];$(t).on("click",function(){a._option.secText=""}),e.initPage()})},alertInputs:function(e){var a=["#year","#month","#day","#address","#j_area_select select:first","#j_area_select select:last","#rights"],t=["请填写完整出生日期","请填写完整出生日期","请填写完整出生日期","请正确填写详细地址","请填写完整所在地区","请填写完整所在地区"],i=0;for(i=0;i"+e+"
确定 ":"",$(t)},postData:function(){var e=this,a=($("#real_name").html(),$("#address").val()),t=$("#j_area_select select:last").val(),i=$("#j_area_select select:first").val(),r=$("#year").val()+$("#month").val()+$("#day").val(),n=$.ajax({url:"/star/user/setUserInfo",type:"POST",cache:!1,data:{user_id:PageData.user.user_id,province:i,region:t,birthday:r,address:a,ie:"utf-8"},dataType:"json"}),l=function(a){if(0==a.no){new $.dialog({title:"成功",html:e.makeDialog("提交成功,1秒后自动跳转。",!1),draggable:!1,width:200,height:100});var t="/f?kw="+PageData.forum.name_url+"&tab=starmember";setTimeout(function(){$.tb.location.setHref(t)},1e3)}else new $.dialog({title:"失败",html:e.makeDialog("提交失败",!1),draggable:!1,width:200,height:100});return!1},o=function(){return new $.dialog({title:"失败",html:e.makeDialog("提交失败,网络原因",!1),draggable:!1,width:200,height:100}),!1};n.done(l),n.fail(o)}}});_.Module.define({path:"staroffical/widget/memberInfo",sub:{userInfoPath:"/star/user/getUserInfo",initial:function(){this.$form=$("#j_form"),this.$spans=this.$form.find("span"),this.getUserInfo()},getUserInfo:function(){var e=this,t=e.$spans;$.ajax({url:e.userInfoPath,data:"",dataType:"json",type:"post",success:function(e){var s,i,a,n,r,o,l,f,h,m,c=e.data,d=e.no;d||(s=c.real_name,a=c.identify,n=c.mobile,r=c.birthday,o=c.province+c.region,l=c.address,i=c.email,f=r.slice(0,4),h=r.slice(4,6),h=Number(h[0])?h:h.slice(1),m=r.slice(6),r=f+"年"+h+"月"+m+"日",t.eq(0).html(s),t.eq(2).html(i),t.eq(3).html(n),t.eq(4).html(r),t.eq(5).html(o),t.eq(6).html(l),t.eq(7).html(a))}})}}});_.Module.define({path:"staroffical/widget/verify_member",sub:{official_name:"",is_frs:1,validation:{name:function(t){var a=/^[\u4e00-\u9fa5]{2,10}$/.test(t.val());return a},IDCard:function(t){function a(t){for(var a=0,e=0;17>e;e++)a+=(t[e]-0)*i[e];var o=a%11,l=n[o];return l==t[17].toUpperCase()}var e=t.val(),i=[7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2],n=["1","0","X","9","8","7","6","5","4","3","2"],o=18==e.length?!0:15==e.length?!1:void 0;if(void 0===o)return!1;var l=e.split("");return o?a(l):!0},address:function(t){var a=/^[\u4e00-\u9fa5][0-9a-zA-Z-\u4e00-\u9fa5]{2,50}$/.test(t.val());return a},email:function(t){var a=/^[A-Za-z0-9+]+[A-Za-z0-9\.\_\-+]*@([A-Za-z0-9\-]+\.)+[A-Za-z0-9]+$/.test(t.val());return a},default_vali:function(t){var a=$.trim(t.val()).length>0;return a}},initial:function(t,a){this.official_name=t,this.is_frs=a,this.checkLogin(),this.showManagerDialog(),this.genericAreaSelect(),a&&this.initHeight()},initHeight:function(){if($wrap=$(".frs_verify_wrapper"),$wrap.length){var t=$wrap.height(),a=$("#aside").height()+100;a>t&&$wrap.css({"min-height":a}),$(".th_footer_bright").css({"text-indent":"-9999px"})}},checkLogin:function(){return PageData.user.is_login?void 0:(_.Module.use("common/widget/LoginDialog",[],function(){}),void 0)},initPage:function(){new YMDselect("year","month","day"),PageData.user.is_login?$("form").bind("submit",{context:this},this.checkInputs):$("form").submit("submit",function(){return!1})},alertJoin:function(){var t=this;$("#dialog-join button").click(function(){$.dialog.close(),$("#name").focus(),t.checkMobile()}),new $.dialog({title:"提示",html:$("#dialog-join"),draggable:!1,width:400,height:300})},genericAreaSelect:function(){var t=this;_.Module.use("common/component/AreaSelect",[{parent_id:"j_area_select",data_arr:[["安徽省","北京市","重庆市","福建省","甘肃省","港澳台","广东省","广西壮族自治区","贵州省","海南省","河北省","河南省","黑龙江省","湖北省","湖南省","吉林省","江苏省","江西省","辽宁省","内蒙古自治区","宁夏回族自治区","青海省","山东省","山西省","陕西省","上海市","四川省","天津市","西藏自治区","新疆维吾尔自治区","云南省","浙江省","重庆市","海外"],["安庆市","蚌埠市","亳州市","巢湖市","池州市","滁州市","阜阳市","合肥市","淮北市","淮南市","黄山市","六安市","马鞍山市","宿州市","铜陵市","芜湖市","宣城市"],["昌平区","朝阳区","大兴区","东城区","房山区","丰台区","海淀区","怀柔区","门头沟区","密云县","平谷区","石景山区","顺义区","通州区","西城区","延庆县"],["巴南区","北碚区","璧山县","长寿区","城口县","大渡口区","大足县","垫江县","丰都县","奉节县","涪陵区","合川区","江北区","江津区","九龙坡区","开县","梁平县","南岸区","南川区","彭水苗族土家族自治县","綦江县","黔江区","荣昌县","沙坪坝区","石柱土家族自治县","双桥区","铜梁县","潼南县","万盛区","万州区","巫山县","巫溪县","武隆县","秀山土家族苗族自治县","永川区","酉阳土家族苗族自治县","渝北区","渝中区","云阳县","忠县"],["福州市","龙岩市","南平市","宁德市","莆田市","泉州市","三明市","厦门市","漳州市"],["白银市","定西市","甘南藏族自治州","嘉峪关市","金昌市","酒泉市","兰州市","临夏回族自治州","陇南市","平凉市","庆阳市","天水市","武威市","张掖市"],["澳门特别行政区","香港特别行政区","台湾"],["潮州市","东沙群岛","东莞市","佛山市","广州市","河源市","惠州市","江门市","揭阳市","茂名市","梅州市","清远市","汕头市","汕尾市","韶关市","深圳市","阳江市","云浮市","湛江市","肇庆市","中山市","珠海市"],["百色市","北海市","崇左市","防城港市","贵港市","桂林市","河池市","贺州市","来宾市","柳州市","南宁市","钦州市","梧州市","玉林市"],["安顺市","毕节地区","贵阳市","六盘水市","黔东南苗族侗族自治州","黔南布依族苗族自治州","黔西南布依族苗族自治州","铜仁地区","遵义市"],["海口市","海南省直辖县级行政单位","三亚市"],["保定市","沧州市","承德市","邯郸市","衡水市","廊坊市","秦皇岛市","石家庄市","唐山市","邢台市","张家口市"],["安阳市","鹤壁市","济源市","焦作市","开封市","洛阳市","漯河市","南阳市","平顶山市","濮阳市","三门峡市","商丘市","新乡市","信阳市","许昌市","郑州市","周口市","驻马店市"],["大庆市","大兴安岭地区","哈尔滨市","鹤岗市","黑河市","鸡西市","佳木斯市","牡丹江市","七台河市","齐齐哈尔市","双鸭山市","绥化市","伊春市"],["鄂州市","恩施土家族苗族自治州","湖北省直辖县级行政单位","黄冈市","黄石市","荆门市","荆州市","十堰市","随州市","武汉市","咸宁市","襄樊市","孝感市","宜昌市"],["长沙市","常德市","郴州市","衡阳市","怀化市","娄底市","邵阳市","湘潭市","湘西土家族苗族自治州","益阳市","永州市","岳阳市","张家界市","株洲市"],["白城市","白山市","长春市","吉林市","辽源市","四平市","松原市","通化市","延边朝鲜族自治州"],["常州市","淮安市","连云港市","南京市","南通市","苏州市","宿迁市","泰州市","无锡市","徐州市","盐城市","扬州市","镇江市"],["抚州市","赣州市","吉安市","景德镇市","九江市","南昌市","萍乡市","上饶市","新余市","宜春市","鹰潭市"],["鞍山市","本溪市","朝阳市","大连市","丹东市","抚顺市","阜新市","葫芦岛市","锦州市","辽阳市","盘锦市","沈阳市","铁岭市","营口市"],["阿拉善盟","巴彦淖尔市","包头市","赤峰市","鄂尔多斯市","呼和浩特市","呼伦贝尔市","通辽市","乌海市","乌兰察布市","锡林郭勒盟","兴安盟"],["固原市","石嘴山市","吴忠市","银川市","中卫市"],["果洛藏族自治州","海北藏族自治州","海东地区","海南藏族自治州","海西蒙古族藏族自治州","黄南藏族自治州","西宁市","玉树藏族自治州"],["滨州市","德州市","东营市","菏泽市","济南市","济宁市","莱芜市","聊城市","临沂市","青岛市","日照市","泰安市","威海市","潍坊市","烟台市","枣庄市","淄博市"],["长治市","大同市","晋城市","晋中市","临汾市","吕梁市","朔州市","太原市","忻州市","阳泉市","运城市"],["安康市","宝鸡市","汉中市","商洛市","铜川市","渭南市","西安市","咸阳市","延安市","榆林市"],["宝山区","长宁区","崇明县","奉贤区","虹口区","黄浦区","嘉定区","金山区","静安区","卢湾区","闵行区","浦东新区","普陀区","青浦区","松江区","徐汇区","杨浦区","闸北区"],["阿坝藏族羌族自治州","巴中市","成都市","达州市","德阳市","甘孜藏族自治州","广安市","广元市","乐山市","凉山彝族自治州","泸州市","眉山市","绵阳市","内江市","南充市","攀枝花市","遂宁市","雅安市","宜宾市","资阳市","自贡市"],["宝坻区","北辰区","滨海新区","东丽区","和平区","河北区","河东区","河西区","红桥区","蓟县","津南区","静海县","南开区","宁河县","武清区","西青区"],["阿里地区","昌都地区","拉萨市","林芝地区","那曲地区","日喀则地区","山南地区"],["阿克苏地区","阿勒泰地区","巴音郭楞蒙古自治州","博尔塔拉蒙古自治州","昌吉回族自治州","哈密地区","和田地区","喀什地区","克拉玛依市","克孜勒苏柯尔克孜自治州","塔城地区","吐鲁番地区","乌鲁木齐市","新疆直辖县级行政单位","伊犁哈萨克自治州"],["保山市","楚雄彝族自治州","大理白族自治州","德宏傣族景颇族自治州","迪庆藏族自治州","红河哈尼族彝族自治州","昆明市","丽江市","临沧市","怒江傈僳族自治州","普洱市","曲靖市","文山壮族苗族自治州","西双版纳傣族自治州","玉溪市","昭通市"],["杭州市","湖州市","嘉兴市","金华市","丽水市","宁波市","衢州市","绍兴市","台州市","温州市","舟山市"],["巴南区","北碚区","璧山县","长寿区","城口县","大渡口区","大足县","垫江县","丰都县","奉节县","涪陵区","合川区","江北区","江津区","九龙坡区","开县","梁平县","南岸区","南川区","彭水苗族土家族自治县","綦江县","黔江区","荣昌县","沙坪坝区","石柱土家族自治县","双桥区","铜梁县","潼南县","万盛区","万州区","巫山县","巫溪县","武隆县","秀山土家族苗族自治县","永川区","酉阳土家族苗族自治县","渝北区","渝中区","云阳县","忠县"],["海外"]],s_label:" ",directCity:!0,firText:"请选择省份",secText:"请选择城市",select_call_fun:function(){}}],function(){t.initPage(),PageData.user.is_login&&t.alertJoin()})},checkMobile:function(){{var t=$("#mobile").val();"http://passport.qatest.baidu.com/v2/?accountbindphone&tpl=tb&u="+encodeURIComponent($.tb.location.getHref())}$("#dialog-message #done").click(function(){$.tb.location.reload()}),""==t&&new $.dialog({title:"提示",html:$("#dialog-message"),draggable:!1,width:300,height:100})},alertInputs:function(t){var a=["请正确填写中文姓名","请正确填写身份证号","请先验证手机","请填写完整出生日期","请填写完整出生日期","请填写完整出生日期","请正确填写详细地址","请填写正确邮箱地址","请填写完整所在地区","请填写完整所在地区"],e=0;if(t&Math.pow(2,10))return new $.dialog({title:"提示",html:this.makeDialog("必须同意用户条例才可以加入会员",!0),draggable:!1,width:200,height:100}),!1;for(e=0;9>e;e++)t&Math.pow(2,e)?$(".alert"+e).text(a[e]):$(".alert"+e).text("")},checkInputs:function(t){var a=t.data.context,e=["name","IDCard","mobile","year","month","day","address","email"],i=0;t.preventDefault(),this.validation;for(var n in e){var o=a.validation[e[n]]||a.validation.default_vali;o($("#"+e[n]))||(i|=Math.pow(2,+n))}return"请选择省份"==$("#j_area_select").find("select:first").val()&&(i|=Math.pow(2,8)),"请选择城市"==$("#j_area_select").find("select:last").val()&&(i|=Math.pow(2,9)),void 0==$("#rights").tbattr("checked")&&(i|=Math.pow(2,10)),i?(a.alertInputs(i),!1):(a.postData(),void 0)},makeDialog:function(t,a){var e="";return e=a?"":"",$(e)},postData:function(){var t=this,a=$("#name").val(),e=$("#IDCard").val(),i=$("#address").val(),n=$("#email").val(),o=$("#j_area_select select:last").val(),l=$("#j_area_select select:first").val(),r=$("#year").val()+$("#month").val()+$("#day").val(),c=$("#official_id").val()||PageData.forum.id,s=$("#tbs").val()||PageData.tbs,d=$.ajax({url:"/star/commit/addMember",type:"POST",cache:!1,data:{official_id:c,real_name:a,IDCard:e,email:n,province:l,region:o,birthday:r,address:i,tbs:s,ie:"utf-8"},dataType:"json"}),u=function(a){if(0==a.no){new $.dialog({title:"成功",html:t.makeDialog("提交成功,1秒后自动跳转。",!1),draggable:!1,width:200,height:100});var e=t.is_frs?"/f?kw="+PageData.forum.name_url:"/star/"+t.official_name;setTimeout(function(){$.tb.location.setHref(e)},1e3)}else new $.dialog({title:"失败",html:t.makeDialog("提交失败",!1),draggable:!1,width:200,height:100});return!1},g=function(){return new $.dialog({title:"失败",html:t.makeDialog("提交失败,网络原因",!1),draggable:!1,width:200,height:100}),!1};d.done(u),d.fail(g)},showManagerDialog:function(){var t=['','
'," 如果您没有中国大陆地区身份证和手机,请您按照以下格式发送邮件至startieba@baidu.com进行人工审核。邮件标题格式:【XXX吧会员人工审核】-审核原因:(可填港澳台或外籍等原因)-百度账号请在附件中附上护照个人信息页照片,我们将在5个工作日内进行人工审核,审核完毕会通过私信方式通知您,请您查收。","
","
","
例:
","
百度账号:(请填写完成注册的百度账号)
","
真实姓名:(请填写中英文名字)
","
护照号码:(请填写护照号码)
","
电子邮箱:(请填写常用邮箱)
","
联系电话:(请填写常用电话)
","
出生年月:(请按照19900101的格式发送)
","
所在地区:(请用中文或者英文填写)
","
详细地址:(请用中文或者英文填写)
","
知道了 ","
"].join("");$("#manager_check_dialog").on("click",function(){new $.dialog({title:"人工审核",html:t,draggable:!1,width:400,height:350}),$("#manager_check button").click(function(){$.dialog.close()})})}}});
;function YMDselect(){this.SelY=document.getElementsByName(arguments[0])[0],this.SelM=document.getElementsByName(arguments[1])[0],this.SelD=document.getElementsByName(arguments[2])[0],this.DefY=this.SelD?arguments[3]:arguments[2],this.DefM=this.SelD?arguments[4]:arguments[3],this.DefD=this.SelD?arguments[5]:arguments[4],this.SelY.YMD=this,this.SelM.YMD=this,this.SelY.onchange=function(){YMDselect.SetM(this.YMD)},this.SelD&&(this.SelM.onchange=function(){YMDselect.SetD(this.YMD)}),YMDselect.SetY(this)}SYT="选择年份",SMT="选择月份",SDT="选择日期",BYN=114,AYN=0,YMDselect.SetY=function(e){for(dDate=new Date,dCurYear=dDate.getFullYear(),e.SelY.options.add(new Option(SYT,"")),i=dCurYear+AYN;i>dCurYear-BYN;i--)YMDYT=i+"年",YMDYV=i,OptY=new Option(YMDYT,YMDYV),e.SelY.options.add(OptY),e.DefY==YMDYV&&(OptY.selected=!0);YMDselect.SetM(e)},YMDselect.SetM=function(e){if(e.SelM.length=0,e.SelM.options.add(new Option(SMT,"")),e.SelY.value>0)for(var t=1;12>=t;t++)YMDMT=t+"月",YMDMV=10>t?"0"+t:t,OptM=new Option(YMDMT,YMDMV),e.SelM.options.add(OptM),e.DefM==YMDMV&&(OptM.selected=!0);e.SelD&&YMDselect.SetD(e)},YMDselect.SetD=function(e){if(YI=e.SelY.value,MI=e.SelM.value,e.SelD.length=0,e.SelD.options.add(new Option(SDT,"")),YI>0&&MI>0)for(dPrevDate=new Date(YI,MI,0),daysInMonth=dPrevDate.getDate(),d=1;d<=parseInt(daysInMonth);d++)YMDDT=d+"日",YMDDV=10>d?"0"+d:d,OptD=new Option(YMDDT,YMDDV),e.SelD.options.add(OptD),e.DefD==YMDDV&&(OptD.selected=!0)};_.Module.define({path:"frs/widget/starReg",requires:["frs/widget/FormEditor"],sub:{initial:function(){try{$("#content_leftList").before('
'),$(".frs_content","#container").before('
'),$("#content_leftList").before('
'),conf={$max:$("#starReg_max"),$min:$("#starReg_min"),status:PageData.forum.starRegStatus,regInfo:PageData.forum.starRegInfo,bgImg:"/tb/static-frs/img/star_reg/stars.png",btns:[{left:576,top:47,right:98,display:"张杰吧>",type:"link",href:"http://tieba.baidu.com/f?kw=张杰"},{left:502,top:110,right:172,display:"杨幂吧>",type:"link",href:"http://tieba.baidu.com/f?kw=杨幂"},{left:430,top:234,right:232,display:"吴奇隆吧>",type:"link",href:"http://tieba.baidu.com/f?kw=吴奇隆"},{left:540,top:234,right:134,display:"刘诗诗>",type:"link",href:"http://tieba.baidu.com/f?kw=刘诗诗"},{left:655,top:232,right:18,display:"胡歌吧>",type:"link",href:"http://tieba.baidu.com/f?kw=胡歌"},{left:40,top:204,className:"create",display:" "}],title:"想要自定义皮肤吗,想要更具明星范儿的贴吧吗,赶紧开通加强版明星贴吧!",active:"您的贴吧定制版申请正在审核中...",unpass:"抱歉,贴吧定制版申请木有通过,请选择更好看的明星本人图片或核实资料信息",fid:PageData.forum.id,tbs:PageData.tbs};var t=["","successdReg","regFailed","hasReg"];this.$max=conf.$max.tbattr("class",t[conf.status]||""),this.$min=conf.$min.tbattr("class",t[conf.status]||""),this.active=conf.active,this.unpass=conf.unpass,this.bgImg=conf.bgImg,this.btns=conf.btns,this.dialog=this.use("frs/widget/FormEditor/FormEditor",{title:"申请明星贴吧加强版",fid:conf.fid,tbs:conf.tbs});var e=this,i=(1==conf.status||2==conf.status)&&conf.regInfo,s=3==conf.status;(i||s)&&(this.dialog.cache=this.cache={starName:conf.regInfo.name,nickName:conf.regInfo.nick,sex:conf.regInfo.gender,bgImg:conf.regInfo.bgImg,icon:conf.regInfo.head,music:conf.regInfo.music,video:conf.regInfo.video,mv:conf.regInfo.mv,image:conf.regInfo.image,edit:!0}),this.dialog.bind("successd",function(){setTimeout(function(){$.tb.location.reload()},1e3)}),this.dialog.bind("hasReg",function(){conf.$min.tbattr("class","hasReg"),e.dialog.hide(),e.up()}),this.title=conf.title,this.__render__(),this.__bindEvt__(),0==conf.status?this.down():this.$max.hide()}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:130}),a}},maxTpl:['"].join(""),minTpl:['"].join(""),__render__:function(){this.$max.html($.tb.format(this.maxTpl,{bgImg:this.bgImg,btns:this.__btns__()})),this.$min.html($.tb.format(this.minTpl,{title:this.title,active:this.active,unpass:this.unpass}))},__btns__:function(){for(var t,e=[];this.btns.length;)t=this.btns.shift(),e.push(''),"link"===t.type?e.push(''+t.display+" "):e.push(''+t.display+" ");return this.btns=null,e.join("")},__bindEvt__:function(){var t=this;t.$max.delegate(".ui_button","click",function(t){try{}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:178}),t}}).delegate(".create a","click.show",function(){try{t.dialog.show({edit:!1})}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:180}),e}}).delegate(".ui_btn_close","click",function(e){try{t.up()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:182}),e}}),t.$min.delegate(".ui_slider_upsize","click",function(e){try{t.down()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:185}),e}}).delegate(".ui_slider_failed","click",function(e){try{t.dialog.show(t.cache)}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:187}),e}}).delegate(".ui_slider_success","click",function(e){try{t.dialog.show(t.cache)}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/star_reg/star_reg.js",method:"",ln:189}),e}})},up:function(){var t=this;this.$max.slideUp(function(){t.$min.show()})},down:function(){this.$min.hide(),this.$max.slideDown()}}});_.Module.define({path:"frs/widget/VideoOnDemand",requires:[],sub:{_isMovie:!1,_isVariety:!1,_maxEp:0,_updateEp:0,initial:function(e){try{this._isVariety="variety"==e.videoType?!0:!1,this._isMovie="movie"==e.videoType?!0:!1,this._maxEp=e.maxEp,this._updateEp=e.updateEp,this._initEpisode(),this._bindEvent(),$.stats.track("模块展现","长视频点播","frs","view"),$(".video_poster_a,.movie_play_btn").on("click",function(){try{$.stats.track("模块点击","长视频点播","frs","click")}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/video_on_demand/video_on_demand.js",method:"",ln:30}),e}})}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/video_on_demand/video_on_demand.js",method:"",ln:31}),i}},_initEpisode:function(){var e=this,i=e._updateEp,t=($("#video_meta"),$("#episode_links"));if(e._isMovie&&$(".update_time_wrap").hide(),e._isVariety?t.find("li").css("width","160"):t.find("li").css("width","44"),$("#episode_pages").hide(),t.find("li").hide(),!e._isVariety&&!e._isMovie){if(0==t.has("#ep_collect").length&&i>6){var s=$('... ');t.find("li:first").after(s)}6==i&&i--,t.find("li:gt("+(i-4)+")").show()}t.find("li:lt(2)").show()},_bindEvent:function(){var e=this,i=$("#episode_pages");$("#ep_collect").bind("click",function(e){try{e.preventDefault(),i.show(),$(".ep_page:eq(0)").trigger("click"),$(".show_ep_all").addClass("show_ep_part")}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/video_on_demand/video_on_demand.js",method:"",ln:79}),t}}),$(".show_ep_all").bind("click",function(t){try{var s=$(this);t.preventDefault(),s.hasClass("show_ep_part")?($("#episode_links li:eq(0)").show(),$(".ep_collect").show(),e._initEpisode(),s.removeClass("show_ep_part"),s.tbattr("title","显示所有集数")):(i.show(),$(".ep_page:eq(0)").trigger("click"),s.addClass("show_ep_part"),s.tbattr("title","收起所有集数"))}catch(d){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:d.message||d.description,path:"frs:widget/video_on_demand/video_on_demand.js",method:"",ln:99}),d}}),$(".ep_page").bind("click",function(i){try{var t=$(this);i.preventDefault(),t.parent().siblings().children().removeClass("cur_ep_page"),t.addClass("cur_ep_page"),e.showEp(t)}catch(s){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:s.message||s.description,path:"frs:widget/video_on_demand/video_on_demand.js",method:"",ln:109}),s}}),$(".dis_episode").bind("click",function(e){try{e.preventDefault()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/video_on_demand/video_on_demand.js",method:"",ln:114}),i}})},showEp:function(e){var i=e.text(),t=$("#episode_links"),s=parseInt(i),d=parseInt(i.slice(i.lastIndexOf("-")+1,-1));this._isVariety&&(s--,d--),t.find("li:lt("+s+")").hide(),1==s&&t.find("li:first").show(),t.find("li:eq("+s+")").show(),t.find("li:gt("+s+")").show(),t.find("li:gt("+d+")").hide(),$(".ep_collect").hide()}}});_.Module.define({path:"frs/widget/MusicKing",requires:[],sub:{index:1,iframeFullH:224,iframeMiniH:79,offsetH:32,initial:function(i){try{this.miniSrc=i.miniSrc,this.fullSrc=i.fullSrc,this.$wrap=$("#j_music_king_wrap"),this.$iframeFull=$("#j_iframe_full"),this.$iframeMini=$("#j_iframe_mini"),this.$selectTab=$("#j_select_tab"),this.$selectIcon=this.$selectTab.find("span"),this.$loadingImg=$("#j_MK_loading"),this.$iframeWrap=this.$wrap.find(".MK_iframe_wrap"),this._showFull(!0),this._bindSpanEvent()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/music_king/music_king.js",method:"",ln:22}),t}},_bindSpanEvent:function(){var i=this,t=i.$selectTab,e=i.$loadingImg,n=!1;t.on("click",function(){try{return++i.index%2?(i._showFull(!1),$.stats.track("king榜展现","king榜",null,"click",{obj_type:"平台化"})):(2==i.index?(n=!0,e.show()):n=!1,i._showMini(n),$.stats.track("king榜收起","king榜",null,"click",{obj_type:"平台化"})),!1}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/music_king/music_king.js",method:"",ln:49}),t}})},_showFull:function(i){function t(){l.hide(),c.css({opacity:0}).hide(),a.stop().animate({height:f+h},400),s.stop().show().animate({height:f,opacity:1},400,function(){o.addClass("MK_up_select")})}function e(){n._showFull(!0)}var n=this,a=n.$wrap,s=n.$iframeFull,c=n.$iframeMini,o=n.$selectIcon,l=n.$loadingImg,r=n.fullSrc,f=n.iframeFullH,h=n.offsetH;i?n._bindIframeEvent(s,r,t,e):t()},_showMini:function(i){function t(){c.hide(),l.hide(),c.css({opacity:0}).hide(),a.stop().animate({height:f+h},400),s.stop().show().animate({height:f,opacity:1},400,function(){o.removeClass("MK_up_select")})}function e(){n._showMini(!0)}var n=this,a=n.$wrap,s=n.$iframeMini,c=n.$iframeFull,o=n.$selectIcon,l=n.$loadingImg,r=(n.$iframeWrap,n.miniSrc),f=n.iframeMiniH,h=n.offsetH;i?(c.css({opacity:0}),n._bindIframeEvent(s,r,t,e)):t()},_bindIframeEvent:function(i,t,e,n){var a,s=this;i.on("load",function(){clearTimeout(a),e.call(s)}),i.tbattr("src",t),a=setTimeout(function(){i.off("load"),n.call(s)},3e3)}}});