var FORUM_POST_PREFIX="/f/commit/";var FORUM_POST_URL={threadAdd:FORUM_POST_PREFIX+"thread/add",postAdd:FORUM_POST_PREFIX+"post/add",threadVoteAdd:FORUM_POST_PREFIX+"vote/add ",forumCreate:FORUM_POST_PREFIX+"forum/create",threadDelete:FORUM_POST_PREFIX+"thread/delete",postDelete:FORUM_POST_PREFIX+"post/delete",goodAdd:FORUM_POST_PREFIX+"thread/good/add",goodCancel:FORUM_POST_PREFIX+"thread/good/cancel",threadTopAdd:FORUM_POST_PREFIX+"thread/top/add",threadTopCancel:FORUM_POST_PREFIX+"thread/top/cancel",threadTopicAdd:"/zhibo/commit/add",threadTopicCancel:"/zhibo/commit/set",get_tbs:"/dc/common/tbs"};var FORUM_ERROR_INFO={24:"\u767b\u5f55\u9519\u8bef\uff0c\u53ef\u80fd\u8f93\u5165\u7684\u7528\u6237\u540d\u548c\u53e3\u4ee4\u4e0d\u6b63\u786e\uff0c\u8bf7\u5355\u51fb\u786e\u5b9a\u91cd\u8bd5",102:"\u6ce8\u518c\u7528\u6237email\u975e\u6cd5",103:"\u6ce8\u518c\u7528\u6237\u4e2a\u4eba\u4fe1\u606f\u975e\u6cd5",107:"\u7528\u6237\u540d\u6216\u81ea\u6211\u4ecb\u7ecd\u7684\u6587\u5b57\u4e2d\u542b\u6709\u4e00\u4e9b\u4e0d\u6070\u5f53\u7684\u8bcd\u6c47\uff0c\u8bf7\u60a8\u91cd\u65b0\u63d0\u4ea4\u6ce8\u518c\u4fe1\u606f",108:"\u7528\u6237\u540d\u4e3a\u7a7a",266:"\u6dfb\u52a0\u597d\u53cb\u91cd\u590d",205:"\u5bf9\u4e0d\u8d77\uff0c\u60a8\u6ca1\u6709\u6b64\u4fee\u6539\u6743\u9650\uff0c\u8bf7\u5230\u60a8\u6ce8\u518c\u7684\u7cfb\u7edf\u4e2d\u4fee\u6539\u4fe1\u606f",305:"\u6dfb\u52a0\u8bcd\u8bed\u5230\u8fbe\u6700\u5927\u503c",306:"\u6dfb\u52a0\u8bcd\u8bed\u5230\u8fbe\u6700\u5927\u503c",309:"\u6dfb\u52a0\u8bcd\u8bed\u5230\u8fbe\u6700\u5927\u503c",260:"\u8ba8\u8bba\u533a\u5df2\u6ee1\u4e09\u4e2a\u5427\u4e3b",261:"\u8be5\u7528\u6237\u5df2\u7ecf\u662f\u8be5\u5427\u7684\u5427\u4e3b",262:"\u8be5\u7528\u6237\u5df2\u7ecf\u662f\u4e09\u4e2a\u8d34\u5427\u7684\u5427\u4e3b",263:"\u7528\u6237\u6307\u5b9a\u597d\u53cb\u540d\u4e0d\u5b58\u5728",264:"\u7528\u6237\u597d\u53cb\u6570\u5230\u8fbe\u6700\u5927",265:"\u7528\u6237\u672a\u767b\u9646",267:"\u6dfb\u52a0\u6536\u85cf\u5939\u5230\u6700\u5927\u503c",300:"\u8fbe\u5230\u7cfb\u7edf\u6700\u5927\u8fc7\u6ee4\u7528\u6237\u5bb9\u91cf",301:"\u8fbe\u5230\u7cfb\u7edf\u6700\u5927\u8fc7\u6ee4IP\u5bb9\u91cf",302:"\u7ba1\u7406\u5458\u6307\u5b9a\u7684\u5173\u952e\u5b57\u4e0d\u5b58\u5728\u8d34\u5427",303:"\u7ba1\u7406\u5458\u6307\u5b9a\u7684\u7528\u6237\u540d\u4e0d\u5b58\u5728",304:"\u7ba1\u7406\u5458\u6307\u5b9a\u7684IP\u6709\u8bef",316:"\u64cd\u4f5c\u5931\u8d25\uff01\u8be5IP\u5730\u5740\u4e3a\u624b\u673a\u4e0a\u7f51\u4f7f\u7528\uff0c\u65e0\u6cd5\u76f4\u63a5\u5c01\u7981\u3002",401:"\u6839\u636eforum_id \u4e0d\u80fd\u5f97\u5230\u8ba8\u8bba\u540d",402:"\u5f97\u5230\u7684\u8d34\u5427\u540d\u592a\u957f",870:"\u697c\u9ad8\u4eba\u591a\uff0c\u8bf7\u52ff\u63a8\u5012",871:"\u697c\u9ad8\u614e\u63a8\uff0c\u51b7\u9759\u4f1a\u513f\u5427",872:"\u7cbe\u54c1\u6765\u7684\u4e0d\u6613\uff0c\u8bf7\u52ff\u64c5\u81ea\u5220\u9664",874:"\u5427\u520a\u6765\u5f97\u4e0d\u6613\uff0c\u8bf7\u52ff\u64c5\u81ea\u5220\u9664"};;var Thread_add_result={resultNo:0,fid:"",tid:"",vid:"",sign:"",bdauditreason:0,bdQueryWordEnc:"",autoMsg:"",is_login:0,init:function(a){if(Thread_add_result&&a.data&&typeof(a.data)=="object"){for(var b in a.data){Thread_add_result[b]=a.data[b]}}_.Module.use("ueglibs/widget/Ban",[],function(c){Thread_add_result.BanLib=c});Thread_add_result.resultNo=a.no},isNeedWaitForCheck:function(){var a=false;switch(this.resultNo){case 9:case 20:case 23:a=true;break;default:break}return a},isNeedBindPhone:function(){return this.resultNo==4010},Action_FocusTitle:"focusTitle",Action_FocusContent:"focusContent",Action_ClearYZM:"clearYZM",Action_FocusUrl:"focusUrl",Action_GoToHead:"goToHead",Action_FlushAndGoToHead:"flushAndGoToHead",getActionType:function(){var a="";switch(this.resultNo){case 10:case 14:case 501:case 15:case 36:case 41:case 42:case 43:case 46:case 9001:case 10010:case 10011:case 10012:case 10013:case 220012:case 220015:case 220035:case 2130001:case 2130007:case 2130008:case 2130009:case 2130011:case 2130012:case 2130014:case 2130005:a=this.Action_FocusContent;break;case 11:case 20:a=this.Action_FocusTitle;break;case 17:case 0:a=this.Action_FlushAndGoToHead;break;case 22:case 9:case 23:case 119:case 44:case 100:case 703:case 704:case 705:a=this.Action_GoToHead;break;case 38:case 39:case 40:a=this.Action_ClearYZM;break;case 1120:case 1121:a=this.Action_FocusUrl;break;default:break}return a},getMessage:function(){var a="",b=null;if(this.resultNo>=901&&this.resultNo<=950){return Thread_add_result.autoMsg}if(b==null){b=(PageData.forum)?PageData.forum.id:null}if(b==null){b=PageData.forum_id}if(b==null){b=PageData.forumID}switch(this.resultNo){case 10:a="\u8d34\u5b50\u5185\u5bb9\u5305\u542b\u592a\u5c11\u7684\u6587\u5b57";break;case 11:a="\u8d34\u5b50\u6807\u9898\u548c\u5185\u5bb9\u592a\u957f";break;case 12:if(b!=null){a=this.BanLib.render("oldPosterDialog")}else{a="\u64cd\u4f5c\u5931\u8d25"}break;case 13:if(b!=null){a="\u64cd\u4f5c\u5931\u8d25\uff0c\u60a8\u7684\u7f51\u7edc\u5730\u5740\u7531\u4e8e\u975e\u6cd5\u64cd\u4f5c\u88ab\u5c01
\u67e5\u770b\u5c01\u7981\u4fe1\u606f'}else{a="\u60a8\u7684\u7f51\u7edc\u5730\u5740\u7531\u4e8e\u975e\u6cd5\u64cd\u4f5c\u88ab\u5c01 "}break;case 14:a="\u60a8\u53d1\u5e03\u7684\u8d34\u5b50\u5df2\u7ecf\u5b58\u5728";break;case 501:case 15:a="\u8bf7\u4e0d\u8981\u53d1\u8868\u542b\u6709\u4e0d\u9002\u5f53\u5185\u5bb9\u7684\u7559\u8a00
\u8bf7\u4e0d\u8981\u53d1\u8868\u5e7f\u544a\u8d34";break;case 16:a="\u5bf9\u4e0d\u8d77\uff0c\u60a8\u6240\u8f93\u5165\u7684\u8d34\u5427\u4e0d\u5b58\u5728\u3002\u7531\u4e8e\u7cfb\u7edf\u5347\u7ea7\u7ef4\u62a4\uff0c\u65b0\u5efa\u8d34\u5427\u529f\u80fd\u6682\u505c\uff0c\u5e0c\u671b\u5f97\u5230\u60a8\u7684\u8c05\u89e3\uff01";break;case 19:case 200:case 201:case 202:a="\u60a8\u7684\u7528\u6237\u540d\u6216\u8005\u5bc6\u7801\u586b\u5199\u6709\u8bef\uff0c\u8bf7\u786e\u8ba4\u540e\u518d\u53d1\u8868";break;case 20:a="\u60a8\u53d1\u8868\u7684\u8d34\u5b50\u7684\u6807\u9898\u6216\u6b63\u6587\u5305\u542b\u592a\u5c11\u7684\u6587\u5b57\uff0c\u8bf7\u4fee\u6539\u540e\u518d\u53d1\u8868";break;case 17:a="\u672c\u5427\u5f53\u524d\u53ea\u80fd\u6d4f\u89c8\uff0c\u4e0d\u80fd\u53d1\u8d34\uff01";break;case 18:case 21:a="\u5176\u4ed6\u672a\u77e5\u539f\u56e0";break;case 22:a="\u60a8\u53d1\u8868\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u7531\u4e8e\u7279\u6b8a\u539f\u56e0\u6211\u4eec\u9700\u8981\u6838\u5b9e\u8be5\u8d34\u5185\u5bb9\u662f\u5426\u542b\u6709\u4e0d\u826f\u4fe1\u606f\uff0c\u6211\u4eec\u4f1a\u572810\u5206\u949f\u5185\u786e\u8ba4\uff0c\u8bf7\u60a8\u8010\u5fc3\u7b49\u5f85\uff01";break;case 9:a=this.getCheckMessage(this.bdauditreason);break;case 33:if(Thread_add_result.is_login==1){a="\u60a8\u53d1\u8d34\u592a\u5feb\u4e86:) \u8bf7\u7a0d\u540e\u518d\u53d1"}else{a="\u60a8\u53d1\u8d34\u901f\u5ea6\u592a\u5feb\u4e86\u3002\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u8d34\uff0c\u7cfb\u7edf\u5bf9\u533f\u540d\u53d1\u8d34\u8fdb\u884c\u4e25\u683c\u7684\u63a7\u5236\uff0c\u767b\u5f55\u7528\u6237\u4e0d\u53d7\u5f71\u54cd"}break;case 34:if(Thread_add_result.is_login==1){a="\u60a8\u8bf4\u8bdd\u592a\u5feb\u4e86:) \u8bf7\u5148\u505c\u4e0b\u6765\u559d\u676f\u8336\u5427\uff0c\u6216\u8005\u53ef\u4ee5\u53bb\u522b\u7684\u5427\u770b\u770b\u54e6\uff0c\u4e00\u5b9a\u4f1a\u53d1\u73b0\u8fd8\u6709\u60a8\u611f\u5174\u8da3\u7684\u8bdd\u9898"}else{a="\u60a8\u53d1\u8d34\u901f\u5ea6\u592a\u5feb\u4e86\u3002\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u5e16\uff0c\u7cfb\u7edf\u5bf9\u533f\u540d\u53d1\u8d34\u8fdb\u884c\u4e25\u683c\u7684\u63a7\u5236\uff0c\u767b\u5f55\u7528\u6237\u4e0d\u53d7\u5f71\u54cd"}break;case 220034:a="\u60a8\u8bf4\u8bdd\u592a\u5feb\u4e86:) \u8bf7\u5148\u505c\u4e0b\u6765\u559d\u676f\u8336\u5427\uff0c\u6216\u8005\u53ef\u4ee5\u53bb\u522b\u7684\u5427\u770b\u770b\u54e6\uff0c\u4e00\u5b9a\u4f1a\u53d1\u73b0\u8fd8\u6709\u60a8\u611f\u5174\u8da3\u7684\u8bdd\u9898";break;case 220035:a="\u4eb2\uff0c\u5df2@\u4e0d\u5c11\u4eba\u4e86\uff0c\u4ee5\u514d\u6253\u6405\u66f4\u591a\u4eba\uff0c\u6b47\u4e00\u4f1a\u5427~";break;case 35:if(Thread_add_result.is_login==1){a="\u4eb2\uff0c\u5df2@\u4e0d\u5c11\u4eba\u4e86\uff0c\u4ee5\u514d\u6253\u6405\u66f4\u591a\u4eba\uff0c\u6b47\u4e00\u4f1a\u5427~"}else{a="\u60a8\u53d1\u8d34\u901f\u5ea6\u592a\u5feb\u4e86\u3002\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u8d34\uff0c\u7cfb\u7edf\u5bf9\u533f\u540d\u53d1\u8d34\u8fdb\u884c\u4e25\u683c\u7684\u63a7\u5236\uff0c\u767b\u5f55\u7528\u6237\u4e0d\u53d7\u5f71\u54cd"}break;case 36:a="\u8bf7\u4e0d\u8981\u53d1\u5e7f\u544a\u8d34\uff01";break;case 37:a="\u60a8\u5df2\u5c1d\u8bd5\u63d0\u4ea4\u591a\u6b21\u4e86\uff0c\u8bf7\u8fd4\u56de\u540e\u5237\u65b0\u9875\u9762\uff0c\u65b9\u53ef\u91cd\u65b0\u53d1\u8d34";break;case 38:a="\u9a8c\u8bc1\u7801\u8d85\u65f6\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165";break;case 39:a="\u7531\u4e8e\u60a8\u591a\u6b21\u8f93\u9519\u9a8c\u8bc1\u7801\uff0c\u8bf7\u60a8\u8fd4\u56de\u540e\u5237\u65b0\u9875\u9762\uff0c\u65b9\u53ef\u91cd\u65b0\u53d1\u8d34";break;case 40:a="\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef\uff0c\u8bf7\u60a8\u8fd4\u56de\u540e\u91cd\u65b0\u8f93\u5165";break;case 41:a="\u60a8\u7684\u8d34\u5b50\u53ef\u80fd\u5305\u542b\u4e0d\u5408\u9002\u7684\u5185\u5bb9\uff0c\u8bf7\u60a8\u786e\u5b9a\u540e\u518d\u63d0\u4ea4";break;case 42:a="\u60a8\u7684\u53d1\u8d34\u884c\u4e3a\u88ab\u7cfb\u7edf\u8ba4\u4e3a\u6709\u53d1\u5e7f\u544a\u5acc\u7591\uff0c\u8bf7\u60a8\u7a0d\u540e\u518d\u53d1";break;case 43:a="\u60a8\u7684\u53d1\u8d34\u884c\u4e3a\u6216\u8d34\u5b50\u5185\u5bb9\u6709\u5e7f\u544a\u6216\u4e0d\u5408\u9002\u7684\u7279\u5f81\uff0c\u8bf7\u60a8\u786e\u5b9a\u540e\u518d\u53d1\u9001";break;case 23:a="\u60a8\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u4f46\u9700\u8981\u7cfb\u7edf\u5ba1\u6838\u901a\u8fc7\u540e\u624d\u80fd\u5efa\u7acb\u8d34\u5427";break;case 119:a="\u5bf9\u4e0d\u8d77\uff0c\u672c\u4e3b\u9898\u7684\u56de\u590d\u6570\u5df2\u7ecf\u8fbe\u5230\u4e0a\u9650\uff0c\u611f\u8c22\u60a8\u7684\u53c2\u4e0e\uff0c\u6b22\u8fce\u60a8\u6d4f\u89c8\u672c\u5427\u7684\u5176\u5b83\u4e3b\u9898";break;case 1120:a="\u62b1\u6b49\uff0c\u60a8\u8f93\u5165\u7684\u56fe\u7247\u3001\u89c6\u9891\u94fe\u63a5\u5730\u5740\u9519\u8bef\uff0c\u60a8\u53ef\u4ee5\u70b9\u51fb\u67e5\u770b\u76f8\u5173\u5e2e\u52a9\u6216\u8fd4\u56de\u4fee\u6539";break;case 1121:a="\u62b1\u6b49\uff0c\u89c6\u9891\u670d\u52a1\u5347\u7ea7\u4e2d\uff0c\u60a8\u6682\u65f6\u65e0\u6cd5\u53d1\u8868\u5e26\u6709\u89c6\u9891\u7684\u8d34\u5b50\uff0c\u7ed9\u60a8\u5e26\u6765\u7684\u4e0d\u4fbf\u8bf7\u539f\u8c05";break;case 44:a="\u5bf9\u4e0d\u8d77\uff0c\u672c\u5427\u6682\u65f6\u9650\u5236\u90e8\u5206\u7528\u6237\u53d1\u8868\u4e3b\u9898\u8d34\u5b50\uff0c\u60a8\u53ef\u4ee5\u6d4f\u89c8\u6216\u56de\u590d\u672c\u5427\u5176\u5b83\u5185\u5bb9\uff0c\u7ed9\u60a8\u5e26\u6765\u4e0d\u4fbf\u5e0c\u671b\u5f97\u5230\u60a8\u7684\u8c05\u89e3\u3002";break;case 100:a="\u5bf9\u4e0d\u8d77\uff0c\u672c\u5427\u6682\u65f6\u9650\u5236\u90e8\u5206\u7528\u6237\u4f7f\u7528\u5b8c\u6574\u7684\u8d34\u5427\u529f\u80fd\uff0c\u60a8\u53ef\u4ee5\u6d4f\u89c8\u672c\u5427\u5176\u5b83\u5185\u5bb9\uff0c\u7ed9\u60a8\u5e26\u6765\u4e0d\u4fbf\u5e0c\u671b\u5f97\u5230\u60a8\u7684\u8c05\u89e3\u3002";break;case 701:a="\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u5e16\uff0c\u672c\u5427\u4e0d\u5141\u8bb8\u672a\u767b\u5f55\u7528\u6237\u53d1\u8d34\uff0c\u767b\u5f55\u7528\u6237\u4e0d\u53d7\u5f71\u54cd\uff0c\u7ed9\u60a8\u5e26\u6765\u7684\u4e0d\u4fbf\u6df1\u8868\u6b49\u610f";break;case 702:a="\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u5e16\uff0c\u672c\u5427\u9650\u5236\u90e8\u5206\u7528\u6237\u53d1\u8d34\uff0c\u7ed9\u60a8\u5e26\u6765\u7684\u4e0d\u4fbf\u6df1\u8868\u6b49\u610f";break;case 703:a="\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u5e16\uff0c\u672c\u5427\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u672c\u5427\u4f1a\u5458\u624d\u80fd\u53d1\u8d34\uff0c\u7ed9\u60a8\u5e26\u6765\u7684\u4e0d\u4fbf\u6df1\u8868\u6b49\u610f\u3002\u70b9\u6b64\u7533\u8bf7\u52a0\u5165\u672c\u5427\u4f1a\u5458";break;case 704:a="\u4e3a\u4e86\u51cf\u5c11\u6076\u610f\u704c\u6c34\u548c\u5e7f\u544a\u5e16\uff0c\u672c\u5427\u88ab\u8bbe\u7f6e\u4e3a\u4ec5\u672c\u5427\u7ba1\u7406\u56e2\u961f\u624d\u80fd\u53d1\u8d34\uff0c\u7ed9\u60a8\u5e26\u6765\u7684\u4e0d\u4fbf\u6df1\u8868\u6b49\u610f";break;case 705:a="\u672c\u5427\u5f53\u524d\u53ea\u80fd\u6d4f\u89c8\uff0c\u4e0d\u80fd\u53d1\u8d34\uff01";break;case 706:a="\u62b1\u6b49\uff0c\u672c\u8d34\u6682\u65f6\u65e0\u6cd5\u56de\u590d\u3002";break;case 45:a="\u62b1\u6b49\uff0c\u60a8\u63d0\u4ea4\u7684\u8d34\u5427\u540d\u79f0\u542b\u7279\u6b8a\u5b57\u7b26\uff0c\u76ee\u524d\u65e0\u6cd5\u521b\u5efa\uff0c\u63a8\u8350\u60a8\u4f7f\u7528\u6c49\u5b57\u3001\u5b57\u6bcd\u6216\u6570\u5b57\u4f5c\u4e3a\u8d34\u5427\u540d\u79f0";break;case 46:a="\u62b1\u6b49\uff0c\u60a8\u7684\u8d34\u5b50\u8fc7\u957f\uff0c\u65e0\u6cd5\u6b63\u5e38\u63d0\u4ea4\u3002\u5efa\u8bae\u60a8\u7cbe\u7b80\u6216\u5206\u6bb5\u540e\u91cd\u65b0\u63d0\u4ea4\uff0c\u8c22\u8c22!";break;case 800:break;case 801:break;case 802:break;case 803:break;case 804:break;case 805:break;case 806:break;case 807:break;case 808:break;case 809:break;case 814:break;case 815:a="\u62b1\u6b49\uff0c\u60a8\u5df2\u9000\u51fa\u767b\u5f55\u6216\u672a\u8d2d\u4e70\u97f3\u4e50\u9053\u5177\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u8bd5";break;case 900:a="\u4e3a\u62b5\u5fa1\u6316\u575f\u5371\u5bb3\uff0c\u672c\u5427\u5427\u4e3b\u5df2\u653e\u51fa\u8d34\u5427\u795e\u517d--\u8d85\u7ea7\u9759\u6b62\u86d9\uff0c\u672c\u8d34\u6682\u65f6\u65e0\u6cd5\u56de\u590d\u3002";break;case 961:a="\u53d1\u8d34\u5931\u8d25\uff0c\u60a8\u8f93\u5165\u7684\u56fe\u7247\u5730\u5740\u6709\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u66f4\u6b63\u540e\u518d\u6b21\u53d1\u5e03\uff1a\uff09";break;case 9001:a="\u7531\u4e8e\u533f\u540d\u72b6\u6001\u6216\u672c\u5427\u8bbe\u7f6e\uff0c\u65e0\u6cd5\u53d1\u8868\u5e26\u6709\u56fe\u7247\u7684\u4e3b\u9898\u3002";break;case 2100:a="\u5185\u5bb9\u542b\u6709\u9ad8\u7ea7\u5b57\u4f53\u6548\u679c\uff0c\u4fdd\u6301\u8fde\u7eed\u7b7e\u5230\u5c31\u80fd\u4f7f\u7528\u54e6~~";break;case 4010:a="\u60a8\u7684\u8d26\u53f7\u5b58\u5728\u5b89\u5168\u98ce\u9669\u6682\u4e0d\u80fd\u53d1\u8d34\uff0c\u8bf7\u5148\u8fdb\u884c\u624b\u673a\u7ed1\u5b9a\u540e\u518d\u53d1\u8d34\u5427\u3002";break;case 9000:a="\u60a8\u8fd8\u6ca1\u6709\u7528\u6237\u540d\uff0c\u4e0d\u80fd\u5728\u672c\u5427\u53d1\u8d34\u3002\u8bf7\u5148\u586b\u5199\u7528\u6237\u540d\u3002";break;case 10010:a="\u60a8\u7684\u6027\u522b\u65e0\u6cd5\u8fdb\u884c\u59b9\u7eb8\u8ba4\u8bc1
\u53bb\u4fee\u6539\u6211\u7684\u6027\u522b>>";break;case 10012:a="\u8bf7\u4e0a\u4f20\u81f3\u5c11\u4e00\u5f20\u56fe\u7247\u3002";break;case 10013:a="\u60a8\u53d1\u5f80\u7684\u5427\u672a\u5f00\u901a\u59b9\u7eb8\u8ba4\u8bc1\u529f\u80fd\u3002";break;case 2130001:a="\u8bf7\u4e0d\u8981\u7ed9\u975e\u59b9\u7eb8\u7528\u6237\u6295\u7968\u3002";break;case 2130007:a="\u60a8\u7684\u8d26\u53f7\u5df2\u88ab\u5c01\u7981\u3002";break;case 2130008:a="\u60a8\u5df2\u7ecf\u7ed9\u8be5\u7528\u6237\u6295\u8fc7\u7968\u3002";break;case 2130009:a="\u6295\u7968\u5931\u8d25\u3002";break;case 2130005:a="\u60a8\u5df2\u7ecf\u53d1\u8d77\u8fc7\u59b9\u7eb8\u8ba4\u8bc1\u8d34
http://tieba.baidu.com/p/"+Thread_add_result.thread_id+"";break;case 2130011:a="\u59b9\u7eb8\u8ba4\u8bc1\u7528\u6237\u4e4b\u95f4\u4e0d\u80fd\u76f8\u4e92\u6295\u7968\u3002";break;case 220012:a="\u60a8\u7684\u8d26\u53f7\u5df2\u88ab\u5c01\u7981\u3002";break;case 220013:a="\u60a8\u7684IP\u5df2\u88ab\u5c01\u7981\u3002";break;case 225001:a="\u60a8\u7684\u8d26\u53f7\u7981\u6b62\u8d34\u6761\u3002";break;case 220015:a="\u60a8\u8f93\u5165\u7684\u5185\u5bb9\u542b\u6709\u654f\u611f\u4fe1\u606f\u3002";break;case 2190000:a="

\u62b1\u6b49\u60a8\u6ca1\u6709\u8d34\u6761\u9053\u5177\u4e86\u4e0d\u80fd\u53d1\u5e03\u8d34\u6761\u4fe1\u606f\u3002

PS\uff1a\u53d1\u8d34,\u56de\u8d34,\u53c2\u52a0\u6d3b\u52a8\u90fd\u6709\u673a\u4f1a\u83b7\u5f97\u8d34\u6761\u9053\u5177\u3002

";break;case 2130012:a="\u4e0d\u80fd\u7ed9\u81ea\u5df1\u6295\u7968\u3002";break;case 2130014:a="\u4e0d\u80fd\u7ed9\u7537\u6027\u7528\u6237\u6295\u7968";break;case 2190001:a='

\u8d34\u6761\u6ca1\u6709\u53d1\u5e03\u6210\u529f\u8bf7\u7a0d\u540e\u5728\u8bd5\u3002

PS\uff1a\u53d1\u5e03\u8d34\u6761\u670910\u79d2\u7684CD\u65f6\u95f4\u3002

';break;case 2190002:a="\u62b1\u6b49\uff0c\u6bcf\u5c0f\u65f6\u53ea\u80fd\u62a2\u4e00\u6b21\u8d34\u6761\u3002";break;case 2190003:a="

\u771f\u9057\u61be~\u60a8\u6ca1\u6709\u62a2\u5230\u8d34\u6761\u9053\u5177\u3002

PS\uff1a\u7b49\u7ea7\u8d8a\u9ad8\u83b7\u5f97\u9053\u5177\u51e0\u7387\u8d8a\u9ad8\u54e6\uff01

";break;case 2190004:a="\u670d\u52a1\u5668\u5fd9\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5";break;case 2190005:a="\u60a8\u7684\u8d26\u53f7\u5df2\u88ab\u5c01\u7981\u3002";break;case 2190006:a="\u8d34\u6761\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\u3002";break;case 2190007:a="\u8d34\u6761\u5185\u5bb9\u8fc7\u957f\u3002";break;case 2190008:a="\u62b1\u6b49\uff0c\u4e00\u5929\u6700\u591a\u53ea\u80fd\u83b7\u5f9710\u4e2a\u9053\u5177";break;default:a="\u672a\u77e5\u9519\u8bef\u3002";break}return a},getCheckMessage:function(b){var a="";switch(b){case -61:a="\u60a8\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u4f46\u4e3a\u4e86\u4fdd\u8bc1\u8d34\u5b50\u8d28\u91cf\uff0c\u672c\u5427\u6240\u53d1\u7684\u8d34\u5b50\u5f85\u7cfb\u7edf\u5ba1\u6838\u901a\u8fc7\u540e\u624d\u80fd\u663e\u793a\uff0c\u8bf7\u60a8\u8010\u5fc3\u7b49\u5f85";break;case -62:a="\u60a8\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u4f46\u4e3a\u4e86\u4fdd\u8bc1\u8d34\u5b50\u8d28\u91cf\uff0c\u672c\u5427\u8d34\u56fe\u7684\u8d34\u5b50\u9700\u8981\u5ba1\u6838\u901a\u8fc7\u540e\u624d\u80fd\u663e\u793a\uff0c\u8bf7\u60a8\u8010\u5fc3\u7b49\u5f85";break;case -74:case -75:case -60:a="\u60a8\u53d1\u8868\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u4f46\u7cfb\u7edf\u9700\u8981\u6838\u5b9e\u8be5\u8d34\u5b50\u5185\u5bb9\u662f\u5426\u542b\u6709\u4e0d\u826f\u4fe1\u606f\uff0c\u8d34\u5b50\u5728\u5ba1\u6838\u901a\u8fc7\u540e\u624d\u80fd\u663e\u793a\uff0c\u8bf7\u60a8\u8010\u5fc3\u7b49\u5f85";break;case -70:a="\u60a8\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u4f46\u4e3a\u4e86\u63a7\u5236\u5e7f\u544a\u8d34\uff0c\u9700\u8981\u901a\u8fc7\u5ba1\u6838\u540e\u624d\u80fd\u53d1\u5e03\u3002\u767b\u9646\u7f72\u540d\u53d1\u8d34\u4e0d\u53d7\u6b64\u9650\u5236\u3002";break;case -71:a="\u60a8\u53d1\u8868\u7684\u5e16\u5b50\u592a\u957f\u4e86\u3002\u4e3a\u4e86\u9632\u6b62\u704c\u6c34\uff0c\u9700\u7cfb\u7edf\u5ba1\u6838\u540e\u624d\u80fd\u663e\u793a\uff0c\u8bf7\u7a0d\u540e\u67e5\u770b";break;default:a="\u60a8\u53d1\u8868\u7684\u8d34\u5b50\u5df2\u7ecf\u6210\u529f\u63d0\u4ea4\uff0c\u4f46\u7cfb\u7edf\u9700\u8981\u6838\u5b9e\u8be5\u8d34\u5b50\u5185\u5bb9\u662f\u5426\u542b\u6709\u4e0d\u826f\u4fe1\u606f\uff0c\u8d34\u5b50\u5728\u5ba1\u6838\u901a\u8fc7\u540e\u624d\u80fd\u663e\u793a\uff0c\u8bf7\u60a8\u8010\u5fc3\u7b49\u5f85";break}return a}};;var SignNameApply={fillPanelId:"signNamePanel",getUrl:"/f/user/sign_list?t="+new Date().getTime().toString(36),isFirst:true,isUsed:0,data:{},template:function(){var b='
';b+=' ';b+='";if(this.data.signs.length>0){b+='";b+=' \u67e5\u770b\u5168\u90e8'}else{b+='\uff08\u60a8\u76ee\u524d\u6ca1\u6709\u53ef\u4f7f\u7528\u7684\u7b7e\u540d\u6863\uff0c \u67e5\u770b\u5168\u90e8)'}b+="";b+="
";return b},active:function(){if(this.isFirst){this.isFirst=false;var a=this.getUrl;this.postProcess(a,null,this.build)}},postProcess:function(b,c,d){var a=this;if(c==null){$.get(b,function(f){var e=$.json.decode(f);if(e.no==0){if(typeof d=="function"){d(a,e)}}})}else{$.post(b,SignNameApply._convertToQueryString(c),function(f){var e=$.json.decode(f);if(e.no==0){if(typeof d=="function"){d(a,e)}}})}},_convertToQueryString:function(b){var c=[];for(var a in b){c.push(encodeURIComponent(a)+"="+encodeURIComponent(b[a]))}return c.join("&")},build:function(a,b){a.data=b.data;a.isUsed=b.data.need;a.fillToPage()},fillToPage:function(){$("#"+this.fillPanelId).html(this.template());this.initPage()},showList:function(){if(this.isUsed==1){$("#signNameShow").css("display","")}else{$("#signNameShow").css("display","none")}},initPage:function(){if(this.isUsed==1){$("#useSignName").tbattr("checked",true)}else{$("#useSignName").tbattr("checked",false)}this.showList();this.handlerEven()},setisUsed:function(a){if(a){this.isUsed=1}else{this.isUsed=0}this.showList();this.postProcess("/f/user/cm/sign_setneed",{need:this.isUsed,tbs:PageData.tbs},null)},handlerEven:function(){var a=this;$("#useSignName").click(function(){a.setisUsed(this.checked)})}};;var PostHandler={post:function(a,b,d,c){$.ajax({type:"post",async:false,dataType:"json",url:a,data:b,success:function(e){if(d){d(e)}}})},execute:function(b,c,d){var a=FORUM_POST_URL[b];PostHandler.post(a,c,d)}};;if(!UTSTART){var UTSTART=new Date().getTime()}if(!MOUSEPWD_CLICK){var MOUSEPWD_CLICK=0}var MousePwd=(function(){var n={ea:[],ma:[]};var h={};var c=false;var i=(new Date()).getTime();var o={};var j=[];var q=[];function k(u){if(!u){var u=window.event}var t=0;var v=0;if(u.pageX||u.pageY){t=u.pageX;v=u.pageY}else{if(u.clientX||u.clientY){t=u.clientX+document.body.scrollLeft;v=u.clientY+document.body.scrollTop}}return[t,v]}function b(t){return t.offsetParent?(t.offsetLeft+b(t.offsetParent)):t.offsetLeft}function a(t){return t.offsetParent?(t.offsetTop+a(t.offsetParent)):t.offsetTop}function p(t){if(t.preventDefault){t.preventDefault()}else{window.event.returnValue=false}}function s(A){A.stopPropagation();var v=k(A);var x=n[this.id];if(x){if(!x.hover){x.hover=true;x.count++}}else{var w=b(this);var y=a(this);var z=w+this.offsetWidth;var u=y+this.offsetHeight;x=n[this.id]={hover:true,count:1,left:w,top:y,right:z,buttom:u}}if(!x["mouse"+x.count]){x["mouse"+x.count]=[];x["time"+x.count]={start:(new Date()).getTime()};n.ma.push(x["mouse"+x.count])}x["mouse"+x.count].push(v);q.push("1")}function r(v){v.stopPropagation();var t=k(v);var u=n[this.className];if(u&&u.hover){if(t[0]&&t[0]>u.left&&t[0]u.top&&t[1]0){var u=n.ma[t-1];return u[u.length-1]}}function f(){var u="";var t=q.length;if(t>10){q=q.slice(t-10)}u=q.join(",");return u}function l(){if(c){return h}var t=[e(),f(),(new Date()).getTime()-UTSTART,[screen.width,screen.height].join(",")].join("\t");h.c=d(t)+","+i+""+MOUSEPWD_CLICK;c=true;return h}function d(y){var t=[];var w={};var x=i%100;for(var v=0,u=y.length;v'),this.dom.html(['
    ','
    ','
     
    ',"
    "].join("")),this.$content=this.dom.find(".j_panel_content:first"),this.$scrollBar=this.dom.find(".j_scroll_bar:first"),this.$scrollButton=this.dom.find(".j_scroll_button:first"),t.padding&&this.$content.css("padding",t.padding)},_bindEvents:function(){var t=this,o=t.$content.get(0);this.$scrollButton.on("drag",function(l,i){if(i){var n=i.position;o.scrollTop=n.top/t.$content.height()*o.scrollHeight}}),this.$content.mousewheel(function(o,l){o.preventDefault(),o.stopPropagation(),t._hasScroll&&t.scrollTopTo(t._scrollTop-l*t._scrollStep)})},scrollTopTo:function(t){var o=this,l=o.$content.get(0),t=Math.max(Math.min(t,l.scrollHeight-o.$content.height()),0);t!=o._scrollTop&&(o._scrollTop=t,o.$content.stop(),o.$content.scrollTop(o._scrollTop),o._resizeScroll())},setHeight:function(t){this._maxHeight=t,this._resizeHeight(),this._resizeScroll(),this.$scrollButton.draggable({containment:"parent"})},setContent:function(t){this.$content.html(t),this.$content.get(0).scrollTop=this._scrollTop=0,this._resizeHeight(),this._resizeScroll()},appendContent:function(t){this.$content.append(t),this._resizeHeight(),this.scrollTopTo(2e4)},clearContent:function(){this.setContent("")},_resizeHeight:function(){this.$content.css("height","");var t=this.$content.get(0),o=t.scrollHeight,l=Math.min(o,this._maxHeight);this.$content.css("height",l)},_resizeScroll:function(){var t=this.$content.get(0),o=t.scrollHeight,l=t.scrollTop,i=this.$content.innerHeight();i>=o?(this.$scrollBar.hide(),this.dom.addClass("tbui_no_scroll_bar"),this.trigger("onScrollBarHide"),this._hasScroll=!1):(this.$scrollBar.show(),this.$scrollBar.height(i),this.$scrollButton.height(i/o*i),this.$scrollButton.css("top",l/o*i),this.trigger("onScrollBarShow"),this._hasScroll=!0)}}});_.Module.define({path:"common/component/CustomEmotion",requires:[],sub:{ORIGINAL_PIC_URL_PREFIX:"http://imgsrc.baidu.com/forum/pic/item/",THUMBNAIL_PIC_URL_PREFIX:"http://imgsrc.baidu.com/forum/abpic/item/",_template:["","","","","","","","","","","",'',"","
    描述
    表情图片
    确定 ','取消
    "],initial:function(){},openDialog:function(t){var e=this;this.$root=$(this._template.join("")),e.$previewContainer=e.$root.find(".j_preview");var o=e.$root.find(".j_fake_button");if(t.url){var i=t.url,n=i.substring(i.lastIndexOf("/")+1,i.lastIndexOf("."));e.updatePictureId(n),e.$previewContainer.prev().hide()}this.$root.find(".j_ok").click(function(t){t.preventDefault(),t.stopPropagation();var o=e.$root.find(".j_title").val();null!=e.original&&null!=e.thumbnail?(e.addCustomEmotion({title:o,url:e.original,thumbnail:e.thumbnail}),e.trigger("ok"),a.close()):alert("请添加图片作为自定义表情!")}),this.$root.find(".j_cancel").click(function(t){t.preventDefault(),t.stopPropagation(),a.close()});var a=new $.dialog({title:"添加自定义表情",width:350,html:this.$root});a.show();var r=this.$root.find(".j_upload_button"),s=o.outerWidth(),u=o.outerHeight();r.css({width:s,height:u}),_.Module.use("common/component/image_uploader_manager",{container:r,width:s,height:u,queueLen:1,maxParallel:1,fid:t.forumId},function(t){t.bind("onFileSelected",function(o,i){var n=i.imageList[0];n&&(r.next().html(n.name),e.$previewContainer.html("正在上传,请稍候..."),t.startUpload())}),t.bind("onComplete",function(t,o){var i=o.imageList[0];if(i&&i.response){var n=i.response;0==n.error_code&&e.updatePictureId(n.info.pic_id_encode)}})})},updatePictureId:function(t){this.thumbnail=this.THUMBNAIL_PIC_URL_PREFIX+t+".jpg",this.original=this.ORIGINAL_PIC_URL_PREFIX+t+".jpg",this.$previewContainer.html("")},getCustomEmotions:function(){var t=$.tb.Storage.get("customEmotion");return t?$.json.decode(t):[]},addCustomEmotion:function(t){var e,o=$.tb.Storage.get("customEmotion");o?(e=$.json.decode(o),e.push(t)):e=[t],this.saveCustomEmotion(e)},removeCustomEmotion:function(t){var e=$.tb.Storage.get("customEmotion");if(e){for(var o,i=$.json.decode(e),n=null,a=0;o=i[a];a++)if(t===o.url){n=a;break}null!==n&&i.splice(n,1),this.saveCustomEmotion(i)}},saveCustomEmotion:function(t){var e=new Date;e.setFullYear(e.getFullYear()+1),$.tb.Storage.set("customEmotion",$.json.encode(t),e)}}});_.Module.define({path:"common/component/UeditorEmotion",requires:["common/component/ScrollPanel","common/component/CustomEmotion"],sub:{$container:null,_template:{inner:['
    ','
    ','
    '].join(""),tab:'
      #{content}
    ',tabItem:'
  • #{name}
  • ',table:'#{content}
    ',tr:"#{content}",td:'#{content}',tdEmpty:'',a:'#{content}'},path:"http://tb2.bdstatic.com/tb/editor/images/",defaultGroup:"face",sequence:["custom","face","ySmile","ali","luoluobu","qpx","xyj","lt","bfmn","zxh","tsj","wdj","lxs","baodong","baodong_d","bobo","shadow","ldw","10th","yxj"],tableWidth:540,count:0,colsNum:3,emotionConfig:{custom:{folder:"",name:"自定义",css:{cols:10,"class":"s_custom"},type:"custom",power:0},face:{tip:["呵呵","哈哈","吐舌","啊","酷","怒","开心","汗","泪","黑线","鄙视","不高兴","真棒","钱","疑问","阴险","吐","咦","委屈","花心","呼~","笑眼","冷","太开心","滑稽","勉强","狂汗","乖","睡觉","惊哭","升起","惊讶","喷","爱心","心碎","玫瑰","礼物","彩虹","星星月亮","太阳","钱币","灯泡","茶杯","蛋糕","音乐","haha","胜利","大拇指","弱","OK","伤心","加油","必胜","期待","牛逼","胜利","跟丫死磕","踢球","面壁","顶","巴西怒","伴舞","奔跑","点赞手","加油","哭泣","亮红牌","球迷","耶","转屁股"],num:70,prev:"i_f",folder:"face/",suffix:"png",name:"默认",css:{cols:10,"class":"s_face",width:35,offset:30},type:"img",power:1},yxj:{tip:["孤独寂寞冷","光棍吃根油条","可怜没人爱","去tmd光棍节","来捡肥皂啊","给跪了","惊呆了","拿去撸","哦女神","楼主好人"],num:10,prev:"yxj_0",folder:"yxj/",name:"痒小贱",suffix:"gif",css:{cols:10,"class":"s_yxj",width:30,offset:30},type:"img",power:1},"10th":{tip:["蹦蹦跳跳","晃悠","摇摇摆摆","大撒花","高高兴兴","弹吉他","魔法棒","扛大旗","点蜡烛","大秧歌","贴吧十周年","十周年"],num:12,prev:"10th_0",folder:"10th/",name:"十周年",css:{cols:10,"class":"s_tyears",width:42,offset:42},type:"img",power:1},ldw:{tip:["一楼喂熊","俯卧撑","打酱油","囧","大笑","瀑布汗~","惊讶","臭美","傻笑","抛媚眼","发怒","我错了","money","气愤","挑逗","吻","怒","胜利","委屈","受伤","说啥呢?","闭嘴","不","逗你玩儿","飞吻","眩晕","魔法","我来了","睡了","我打","闭嘴","打","打晕了","刷牙","爆揍","炸弹","倒立","刮胡子","邪恶的笑","不要不要","爱恋中","放大仔细看","偷窥","超高兴","晕","松口气","我跑","享受","修养","哭","汗","啊~","热烈欢迎"],num:53,prev:"w_00",folder:"ldw/",suffix:"gif",name:"绿豆蛙",css:{cols:10,"class":"s_ldw",width:40,offset:40},type:"img",power:1},lxs:{tip:["lxs不想动","lxs吃惊","lxs吹口哨","lxs打气","lxs打坐","lxs等待","lxs愤怒","lxs幻象","lxs惊喜","lxs开心","lxs哭啼","lxs哭着跑","lxs没钱","lxs怕鬼","lxs抛媚眼","lxs七夕","lxs骑马舞","lxs升天","lxs石化","lxs数钱","lxs偷吃","lxs偷笑","lxs万圣节","lxs无聊","lxs无奈","lxs无语","lxs妩媚","lxs捉急","lxs转晕","lxs撞豆腐","lxs赘肉"],num:31,prev:"lxs_0",folder:"lxs/",suffix:"gif",name:"冷先森",css:{cols:10,"class":"s_lxs",width:42,offset:42},type:"img",power:1},xyj:{tip:["疯啦","抱头跑","不想睡","不要呀","苍蝇","蹭痒","到碗里来","队长","发财啦","非洲舞","鼓掌","广场舞","滚筒","横行","挥手","火舞鸡","寂寞呀","加油","江南style","娇羞","惊慌失措","纠结","开饭啦","雷神","泪奔","聊QQ","麦霸","猫女","魔咒","尿急","扭屁股","瀑布汗","求饶","撒娇","少女","水冰鸡","天然呆","吐血","玩手机","威武","五道杠","舞动","洗洗","咸蛋鸡","向日葵","鸭子舞","游泳","招财鸡","照镜子","蜘蛛鸡"],num:50,prev:"xyj_0",folder:"xyj/",suffix:"gif",name:"小幺鸡",css:{cols:10,"class":"s_xyj",width:42,offset:42},type:"img",power:1},ySmile:{tip:["^_^","(-__-)b","⊙﹏⊙‖","⊙▽⊙"," ≧ε ≦","┳_┳","(╬▼皿▼)","\\("▔□▔)/","↖( ̄▽ ̄") ","(づ ̄3 ̄)づ ","(* ̄▽ ̄)y ","o(≧口≦)o ","( ̄ε ̄*)","/(ㄒoㄒ)/~~ ","( ̄ε ̄*)","<( ̄︶ ̄)> ","o(≧v≦)o","╮(╯3╰)╭ "," "," 罒ω罒","(ω<)☆ ","() ","(())","(●''●)","Σ(っ °Д °;)っ","ㄟ( ▔, ▔ )ㄏ","凸(艹皿艹 ) ","m(_ _)m","(⊙x⊙;)","( =∩ω∩= )"," ╮(╯▽╰)╭","(≧3≦)/ ","(@_@;)?"," o(* ̄▽ ̄*)ブ","(o゜▽゜)o☆",""o((>ω< ))o" "],num:36,prev:"",folder:"",name:"颜表情",css:{cols:6,"class":"s_ySmile"},type:"text",power:1},wdj:{tip:[],num:24,prev:"wdj_",suffix:"png",folder:"wdj/",name:"豌豆荚",css:{cols:10,"class":"s_wdj",width:30,offset:30},type:"img",power:1},ali:{tip:["赖皮","感动","惊讶","怒气","哭泣","吃惊","嘲弄","飘过","转圈哭","神经病","揪耳朵","惊汗","隐身","不要","遁","不公平","爬来了","蛋花哭","温暖","点头","撒钱","献花","寒","傻笑","扭扭","疯","抓狂","抓","蜷","挠墙","狂笑","抱枕","吼叫","嚷","唠叨","捏脸","狂笑","郁闷","潜水","开心","冷笑话","顶","潜","画圈圈","玩电脑","吐","哭着跑","阿狸侠","冷死了","惆怅~","摸头","蹭","打滚","叩拜","摸","数钱","拖走","热","加1","压力","表逼我","人呢","摇晃","打地鼠","这个屌","恐慌","晕乎乎","浮云","给力","杯具了"],num:70,prev:"ali_0",folder:"ali/",name:"阿狸",css:{cols:10,"class":"s_ali",width:42,offset:42},type:"img",power:1},luoluobu:{tip:["hold住","阿门","哎哟","唉~","不好意思","不要嘛!","唱歌","扯肚皮","扯脸","搓脸","搓手","打灯笼","打起精神","点头","点头2","动动脚","动动脚2","抖脚","抖脚2","嗯~","发呆","鼓掌","滚桌子","好闲阿~","喝茶发呆","哼!","晃","哭","困了","扩胸运动","来来来","来嘛~","冷静冷静","罗爸爸扭扭","罗妈妈扭扭","麋鹿罗罗布","扭pp","扭pp2","扭扭","欧也","趴着","切!","去去","撒花","上WC","圣诞老人","天使罗罗布","跳呀跳","跳呀跳2","玩个球","我来了","嘻嘻","向前进","亚克西","摇啊摇","一边呆着去!","一起扭","有礼了","这厢有礼了","走呀走"],num:60,prev:"llb_0",folder:"luoluobu/",name:"罗罗布",css:{cols:10,"class":"s_luoluobu",width:42,offset:42},type:"img",power:1},qpx:{tip:["微笑","帅哥","美女","老大","哈哈哈","奸笑","傻乐","飞吻","害羞","花痴","憧憬","你牛","鼓掌","可爱","委屈","大哭","泪奔","寻死","惊讶","疑问","鄙视","大骂","狂怒","囧","晕","呕吐","财迷","睡了","思考","汗","无语","拜","鞠躬","累了","病了","墙角","超人","戳","跳舞","鬼脸","无聊","撞墙","顶","HI","饭","蛋糕","礼物","心","心碎","玫瑰","炸弹","集体舞","打人","拍拍","亲亲","握手","安慰","石头","剪子","布","恭喜啦","啵啵"],num:62,prev:"b",folder:"qpx_n/",name:"气泡熊",css:{cols:10,"class":"s_qpx",width:35,offset:35},type:"img",power:1},zxh:{tip:["+1","哀伤","饱","濒死","病","吃货","不满","呆","倒吊","点子","顶","鼓掌","害羞","汗","呵呵呵","加油","奸笑","奸诈","惊讶","囧","看","抠鼻子","哭","困","乐","溜走","路过","买你妹的房纸","敲锣","亲吻","去你妹的工作","扇风","失落","刷牙","逃命","跳舞","听音乐","偷笑","吐","无语","喜","笑","兴奋","鸭子跳","咬","咬","礼物","赞","震惊","追钱","做鬼脸"],num:50,prev:"zxh_0",folder:"pczxh/",name:"张小盒",css:{cols:10,"class":"s_zxh",width:42,offset:42},type:"img",power:1},tsj:{tip:["Kiss","Love","Yeah","啊!","背扭","顶","抖胸","88","汗","瞌睡","鲁拉","拍砖","揉脸","生日快乐","摊手","睡觉","瘫坐","无聊","星星闪","旋转","也不行","郁闷","正Music","抓墙","撞墙至死","歪头","戳眼","飘过","互相拍砖","砍死你","扔桌子","少林寺","什么?","转头","我爱牛奶","我踢","摇晃","晕厥","在笼子里","震荡"],num:40,prev:"t_00",folder:"tsj/",name:"兔斯基",css:{cols:10,"class":"s_tsj",width:35,offset:35},type:"img",power:1},baodong:{tip:["心照不宣","蓝脸","困惑","够拽","瞪眼","藐视","思考","呵呵","想要妹子","幻想","无奈的笑","为什么","黑人歪嘴","歪嘴笑","苦逼","面瘫","咯咯咯","生气","高兴","喜极而泣","告诉我","有了","好吧","孤独一生","嘎嘎","暴躁","紫歪嘴","红歪嘴","这不科学","笑而不语","围观","牛仔歪嘴","方肘子","震惊","惊讶","颠覆三观","尼美藐视","尼美呵呵","尼美发呆","尼美有了","猫嘴笑","思春","尼美苦逼","笑尿","尼美咯咯","尼美歪嘴","尼美姚","暴走尼美","娇羞","尼美震惊","孤独尼美","尼美大哭","尼美愤怒","尼美嘎嘎","尼美愤懑","尼美不解"],num:56,prev:"b_00",folder:"baodong/",name:"暴漫静态",css:{cols:10,"class":"s_baodong",width:35,offset:35},type:"img",power:1},baodong_d:{tip:["坏淫","抓狂","悲戚","痛哭","犯贱","奸笑","屌丝","高呼","感叹","感动","憋屈","舒爽","坏笑","屁颠","瞳术","杂耍","姚脸","孤独","暴走","潇洒","失望","同桌","变脸","得瑟","腹黑男","腹黑女","够拽","白领","喵尼玛","汪尼玛","嘿嘿尼玛","勾引","发泄","操操操"],num:34,prev:"bd_00",folder:"baodong_d/",name:"暴漫动态",css:{cols:10,"class":"s_baodong_d",width:35,offset:35},type:"img",power:1},bobo:{tip:["HI","KISS","不说","不要","扯花","大心","顶","大惊","飞吻","鬼脸","害羞","口水","狂哭","来","泪眼","流泪","生气","吐舌","喜欢","旋转","再见","抓狂","汗","鄙视","拜","吐血","嘘","打人","蹦跳","变脸","扯肉","吃To","吃花","吹泡泡糖","大变身","飞天舞","回眸","可怜","猛抽","泡泡","苹果","亲","","骚舞","烧香","睡","套娃娃","捅捅","舞倒","西红柿","爱慕","摇","摇摆","杂耍","招财","被殴","被球闷","大惊","理想","欧打","呕吐","碎","吐痰"],num:63,prev:"B_00",folder:"bobo/",name:"波波",css:{cols:10,"class":"s_bobo",width:35,offset:35},type:"img",power:1},shadow:{tip:["焦糖舞","翻滚","拍屁股做鬼脸","不","河蟹掉啦","哦耶","我倒","投降","听音乐","被砸","吐舌头","太好啦","财源滚滚","人呢","挥手帕","偷笑","卷被","看楼上","我抽","有木有","哭","欢呼","傻兮兮","扇扇子","拍手","紧张","洗澡","耶","吃西瓜","纳尼","没有钱","拿玩偶","来看看","哇哇叫","招财猫","放屁","隆重介绍","求你了","撞玻璃","眺望","撒花","玩铃铛","思考者","抽风","吃苹果","光棍"],num:46,prev:"yz_0",folder:"shadow/",name:"影子",css:{cols:10,"class":"s_shadow",width:42,offset:42},type:"img",power:1},lt:{tip:["中箭","LS去死","LS去死子弹","LS去死增强","LS去死炮弹","板凳","不爽","不要","超人","吃零食","抽烟","串","打狗","打酱油","打你","戴墨镜","蛋","荡漾","顶破楼上","发懵","放屁","负分滚粗","喝大了","呼啦圈儿","护","滑冰","画圈圈","火钳刘","贱贱的","惊吓","抠脚","lt哭","拉粑粑","撸","挠PP","闹","排球","前排","敲手鼓","沙发","剔牙","兔子蹦起来","挖鼻屎","无语","瞎了","秀肌肉","摇滚","意外惊喜","震惊","正步"],num:50,prev:"ltn_0",folder:"lt/",name:"冷兔",css:{cols:10,"class":"s_lt",width:42,offset:42},type:"img",power:1},bfmn:{tip:["爱你","傲娇","打你","带回去压寨","给脸不要脸","滚(百度独家)","滚","好喜欢","泪奔","女屌丝","深井冰","算你狠","我美","虾米","不要","好崇拜","泪奔","你妹啊","你造么","求交往","骚年","土豪做朋友(百度独家)","围观","无药可医","再见","在么","call-me","no-zuo-no-die"],num:28,prev:"bfmn_0",folder:"bfmn/",name:"白发魔女",css:{cols:10,"class":"s_bfmn",width:40,offset:41},type:"img",power:1}},initial:function(t){var e=this,o=t.container;t.customEmotionEnable&&(this.emotionConfig.custom.power=1,this.defaultGroup="custom"),this.$container=o,this.defaultGroup=t.defaultGroup||e.defaultGroup,o.html(this._template.inner),this.$content=o.find(".j_content"),this.$tab=o.find(".j_tab"),e.scrollPanel=e.use("common/component/ScrollPanel",{container:e.$content,height:277,content:""}),t.customEmotionEnable&&(this.customEmotion=this.use("common/component/CustomEmotion"),this.customEmotion.bind("ok",function(){e.scrollPanel.$content.html(e.generateCustomTable())})),e.generateTabList(),e.switchTab(e.defaultGroup),e.initEvent()},initEvent:function(){this.$container;this.initEmotionEvent(),this.initTabEvent()},initEmotionEvent:function(){var t=this,e=this.getMouseenterHandler(this);this.$content.on("mouseleave",".j_emotion, .j_custom_emotion",function(){$(this).css("background-color","#ffffff"),$(".j_emotion_preview").hide().removeClass("emotion_preview_show")}),this.$content.on("mouseenter",".j_emotion, .j_custom_emotion",function(){e.call(this)}),this.$content.on("click",".j_emotion",function(){var e=$(this),o={url:e.data("surl"),type:e.data("stype"),title:e.tbattr("title")};"text"==e.data("stype")?$.stats.sendRequest("ev_type=click&st_mod=editor&st_type=text&st_value="+e.tbattr("title")):t.sendStats(e,"click"),t.trigger("insertemotion",o)}).on("click",".j_custom_emotion",function(e){var o=$(e.target);if(o.hasClass("j_delete")){if(confirm("确认要删除此表情吗?")){var s=o.parent().data("surl");t.customEmotion.removeCustomEmotion(s),t.scrollPanel.$content.html(t.generateCustomTable())}}else t.trigger("insertemotion",{url:$(this).data("surl"),type:"custom"})}).on("click",".j_add_emotion",function(){t.customEmotion.openDialog({forumId:PosterContext.getContext().forum.id})})},initTabEvent:function(){var t=this;this.$tab.on("click",".s_prev",function(){t.prevTab()}).on("click",".s_next",function(){t.nextTab()}).on("click","li",function(){var e=$(this).data("type");e&&t.switchTab(e)}).on("mouseenter",".s_tab_btn",function(){$(this).addClass("s_hover")}).on("mouseleave",".s_tab_btn",function(){$(this).removeClass("s_hover")})},sendStats:function(t,e){var o=t.data("value"),s=t.data("sname"),n=[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60];try{s&&"10th"==s&&$.stats.track(o,"PC端十周年发帖表情点击统计"),$.stats.sendRequest(-1!=$.inArray(o,n)?"st_all=doubleeleven&ev_type="+e+"&st_mod=editor&st_type="+s+"&st_value="+o:"ev_type="+e+"&st_mod=editor&st_type="+s+"&st_value="+o)}catch(i){}},getMouseenterHandler:function(){function t(){var t=e.width(),o=e.height();(t>60||o>60)&&(t>o?(e.width(60),e.height(60*(o/t))):(e.height(60),e.width(60*(t/o))));var s=(60-e.width())/2,n=(60-e.height())/2;e.css({left:s,top:n})}var e=null,o=null;return function(){var s=$(this),n=$(".j_emotion_preview");e&&e.remove(),s.css("background-color","#e8e8fd"),"text"!==s.data("stype")&&(e=$(""),e.addClass("review"),e.load(function(){clearTimeout(o),n.show();var i=e.width(),a=e.height();0==i||0==a?o=setTimeout(arguments.callee,50):(t(),1==s.data("posflag")&&n.addClass("emotion_preview_show"))}).error(function(){o=setTimeout(function(){e.tbattr("src",s.data("surl"))},50)}).tbattr("src",s.data("surl")),n.append(e))}},getEmotionFileName:function(t,e,o){return"i_f"==t&&e>=51&&(o="gif"),t+(10>e?"0":"")+e+"."+o},generateEmotions:function(t){var e=this,o=this.scrollPanel,s=this.emotionConfig,n=s[t],i=this.path,a=i+n.folder,l=n.css.cols,c=l/2,r=this.tableWidth/l,m=r;"text"==n.type&&(m/=2);var d,u=n.css["class"],p=n.css.offset,f=n.suffix||"gif",h=n.prev,_=this._template.table,b=this._template.tr,v=this._template.tdEmpty,g=this._template.td,x=this._template.a,w="",y=function(t){for(var o="",s=0,i=n.num;i>s;){for(var d="",_=0;l>_;_++,s++){var w=e.getEmotionFileName(h,s+1,f);if(w&&i>s){var y=a+w+"?t=20140803",j=c>_?0:1,C=p*s*-1;("lt"==t||"ali"==t)&&(C-=1),"ali"==t&&(C+=3);var E="text"==n.type?n.tip[s]:" ",T=$.tb.format(x,{offset:C,content:E});d+=$.tb.format(g,{tdClassName:u,tdWidth:r,tdHeight:m,index:s,groupName:t,configType:n.type,tip:n.tip[s],url:y,posflag:j,content:T})}else d+=$.tb.format(v,{})}o+=$.tb.format(b,{content:d})}return o};d="custom"==n.type?this.generateCustomTable():y(t),w+=$.tb.format(_,{content:d}),o.setContent(w),o.$content.css("height",277)},generateCustomTable:function(){function t(t,e){return t?t.option?'':(t.posFlag=5>e?0:1,$.tb.format('
    ',t)):" "}function e(e,o){var s=[];s.push("");for(var n=0;10>n;n++)s.push(t(e[n+o],n));return s.push(""),s.join("")}var o=this.customEmotion.getCustomEmotions();o.push({option:"add"});for(var s=[],n=0,i=Math.floor(o.length/10)+1;i>n;n++)s.push(e(o,10*n));return""+s.join("")+"
    "},generateTabList:function(){for(var t=this.sequence,e=this.emotionConfig,o=this._template.tab,s=this._template.tabItem,n="",i=0,a=t.length;a>i;i++){var l=t[i];if(e[l].power){var c={isSelected:l===this.currentGroup?"selected":"",index:i,type:l,name:e[l].name};n+=$.tb.format(s,c)}}n=$.tb.format(o,{content:n}),this.$tab.html(n)},getTab:function(t){return this.$tab.find("li").filter('[data-type="'+t+'"]')},nextTab:function(){var t=this,e=this.$tab.find("ul");t.count=++t.count>=t.colsNum?t.colsNum-1:t.count,e.stop().animate({marginLeft:-502*t.count},500,"linear")},prevTab:function(){var t=this,e=this.$tab.find("ul");t.count=--t.count<1?0:t.count,e.stop().animate({marginLeft:-502*t.count},500,"linear")},activateTab:function(t){var e=this.$tab;e.find("li").removeClass("selected"),this.getTab(t).addClass("selected")},switchTab:function(t){var e=this;e.currentGroup=t,e.activateTab(t),e.generateEmotions(t)}}});_.Module.define({path:"common/widget/IndependentEmotion",requires:[],sub:{initial:function(e){this.$container=e.container||$("body"),this.$smiley=e.smiley||null,this.editor=e.editor||null,this.caretLocate=e.caretLocate,this.emotion=!1,this._buildSmileBody()},_buildSmileBody:function(){var e='
    ';this.$container.html(e)},_render:function(){this.setCaretLocate(),this._renderEmotion(),this.emotion=!0},_renderEmotion:function(){var e=this,i=$('
    ');e.$container.find(".inde_edui_dropdown_menu").append(i),_.Module.use("common/component/UeditorEmotion",[{container:i}],function(i){i.bind("insertemotion",function(i,t){if(e.hide(),!e.editor)return!1;if("custom"==t.type)t.picType=1,e.editor.execCommand("insertimage",[t]);else{var n='',o="text"===t.type?t.title:$.tb.format(n,t);e.editor.execCommand("inserthtml",o)}})})},setCaretLocate:function(){var e=this.caretLocate,i={};e&&($.each(e,function(e,t){i[e]=t}),this.$container.find(".inde_edui_popup_caret").css(i))},show:function(){!this.emotion&&this._render(),this.$container.show()},hide:function(){this.$container.hide()},toggle:function(){!this.emotion&&this._render(),this.$container.toggle()}}});_.Module.define({path:"common/widget/QuickPoster",requires:[],sub:{initial:function(t){this.pOp=t.pOp,this.eOp=t.eOp;var e=$("#"+t.pOp.tpl_id).html();this.j_postor=$("#"+t.pOp._container),this._dataPostor=$.extend({},t.pOp._dataPostor);var i=this.j_postor;i.html(e),this.j_ed_container=i.find(".j_ed_container"),this._enabled=!0,this._event={},this._isPosting=!1,this.j_qp_error=i.find(".j_qp_error"),this.j_btn_submit=i.find(".j_btn_submit"),this.j_btn_smile=i.find(".j_btn_smile"),this.j_bannedTip=i.find(".j_bannedTip"),this._statInit(t.pOp._login,t.pOp._canPost,t.pOp._noUn)},_statInit:function(t,e,i){var o=this.pOp;return t?t&&1==e&&i?(this._cannotPost(),void this._showBannedTip("noUn")):t&&1!=e?(this._cannotPost(),void this._showBannedTip("cannotPost")):o._is_block?(this._cannotPost(),void this._showBannedTip("isBlock")):void(t&&1==e&&!i&&(this._editorInit("enable"),this._postBtnInit("enable"),this._smileBtnInit("enable"))):(this._cannotPost(),void this._showBannedTip("cannotPost"))},_editorInit:function(t){var e=this,i=e.eOp,o={initialFrameHeight:/%$/.test(i.height)?i.height:parseInt(i.height)||60,initialFrameWidth:/%$/.test(i.width)?i.width:parseInt(i.width)||620,maxHeight:parseInt(i.maxHeight)||60,maxWordNum:i.maxWordNum||140,focusChangeColor:0,noToolbar:1,toolbar:[]};switch(t){case"enable":e._editor=UE.getEditor("j_ed_container",o),e._editor.ready(function(){e._editorEvent()});break;case"disable":}},_editorEvent:function(){var t=this._editor,e=(this.pOp,this);$.browser.version>7&&t.focus(),t.addListener("overflow",function(){e._overFlow()}),t.addListener("unoverflow",function(){e._unoverFlow()}),e.j_ed_container.on("keydown",function(t){e._keyDown(t)}),e.j_ed_container.on("keyup",function(t){e._keyUp(t)}),e.j_ed_container.on("focus",function(){e._editorTip("focus")}),e.j_ed_container.on("blur",function(){e._editorTip("blur")})},_editorTip:function(t){var e=this._editor,i=$.trim(e.getContent()),o=this.pOp,n=o._setText,s=this;n&&("blur"!=t||""!=i&&"
    "!=i||s.j_ed_container.append('
    '+n+"
    ").find("#qp_guide_text").click(function(){e.focus()}),"focus"==t&&$("#qp_guide_text").remove())},_overFlow:function(){this._disableEditor()},_unoverFlow:function(){this._enableEditor()},_keyDown:function(t){17==t.keyCode?this._ctrl_down=!0:13==t.keyCode&&this._ctrl_down&&(this._submit(),t.srcElement?t.srcElement.blur():t.target.blur());var e=this;t.altKey&&83==t.keyCode&&(t.preventDefault?t.preventDefault():t.returnValue=!1,setTimeout(function(){e._submit()},0))},_disableEditor:function(){var t=this;t._enabled=!1;var e=t.j_btn_submit;e.addClass("qp_submit_disabled").removeClass("qp_submit").html("")},_disableSmile:function(){var t=this;t._enabled=!1;var e=t.j_btn_smile,i=t.pOp;return i._needSmile?(e.removeClass("qp_smile"),e.html(""),void e.addClass("qp_smile_disabled")):void e.hide()},_enableEditor:function(){var t=this;t._enabled=!0;var e=t.j_btn_submit;e.removeClass("qp_submit_disabled"),e.addClass("qp_submit"),e.html("发表")},_keyUp:function(t){17==t.keyCode&&(this._ctrl_down=!1)},_cannotPost:function(){this._editorInit("disable"),this._postBtnInit("disable"),this._smileBtnInit("disable"),this._enabled=!1},_postBtnInit:function(t){switch(t){case"disable":this._disableEditor();break;case"enable":var e=this,i=e.j_btn_submit;i.hover(function(){$(this).addClass("qp_submit_hover")},function(){$(this).removeClass("qp_submit_hover")}),i.mousedown(function(){i.addClass("qp_submit_active")}),i.mouseup(function(t){i.removeClass("qp_submit_active"),e._editor.focus(),e._submit(),t.target.blur()})}},bind:function(t,e,i){var o={stat:i?!0:!1,fun:e};this._event[t]?this._event[t].push(o):(this._event[t]=[],this._event[t].push(o))},triggerEvent:function(t,e){if(this._event[t])for(var i=this._event[t],o=0;o填写用户名",s.css({top:"10px",left:"200px"});break;case"cannotPost":i+=n._tip[o._forumType],i+="",1==o._forumType?(i+="",i+="登录",i+=" | ",i+="注册"):3==o._forumType?i+='4级头衔以上会员发贴。':9==o._forum_type?i+="一定级别以上会员发回复贴。":10==o._forum_type&&(i+="一定级别以上会员发主题贴。")}i+="",s.html(i),s.show()},_postSuccess:function(){var t=this,e=t.j_bannedTip,i="",o=this._editor,n=o.editArea;e.css({top:"10px",left:"85px"}),$(n).css({backgroundColor:"#F7F7F7"}),i+='

    发表成功!

    艾玛亲!你亏大了呀,要用贴吧客户端发能有3倍经验呢!

    ',e.html(i),e.show(),setTimeout(function(){e.hide(),$(n).css({backgroundColor:"#FFFFFF"})},1e3)},_getData:function(){var t=this,e=t._dataPostor;return e.content=t._getUbbContent(),e.new_vcode=1,e.tag=11,e},_getUbbContent:function(){return UE.utils.html2ubb(this._getHtml())},_getHtml:function(){var t=this._editor.getContent();return t=t.replace(/]*>/gi," ").replace(/[\u3000\s]+/g," ").replace(/ /g," ")},_validate:function(){var t=this,e=this._editor,i=t.j_qp_error;return this._enabled?e.getContentLength()?e.getSmileyNum()>10?(i.html("抱歉,每层楼插入的表情不能超过10个,请修改后重新提交").show(),!1):!0:(e.focus(),i.html("发贴内容需包含文字").show(),!1):!1},_submit:function(){this.triggerEvent("onsubmit"),this._validate()&&(this._isPosting||(this._isPosting=!0,this.j_qp_error.hide(),this._disableEditor(),this._submitData()))},_submitData:function(){var t=this;t._isPosting=!0;var e=t._getData();$.tb.post(FORUM_POST_URL.postAdd,e,function(i){if(0==i.no){var o=t.triggerEvent("onsuccess");if(!o)return;t._postSuccess(),t._editor.setContent(""),t._enableEditor(),_.Module.use("frs/widget/snowflow",[e.content])}else 40==i.no?t._showCaptchaDialog(i):(t._showAddResult(i),t._enableEditor());return t._isPosting=!1,!1})},_showCaptchaDialog:function(t){var e=this;e.captchaDialog?(this._isPosting=!1,e.captchaDialog.setTip(t.data.vcode.str_reason),e.captchaDialog.updateCaptchaImg(t.data.vcode.captcha_vcode_str,t.data.vcode.captcha_code_type),e.captchaDialog.show(),e.captchaDialog.focus()):_.Module.use("common/component/CaptchaDialog",{message:t.data.vcode.str_reason,vCode:t.data.vcode.captcha_vcode_str,vCodeType:t.data.vcode.captcha_code_type,forumName:e._dataPostor.kw,forumId:e._dataPostor.fid,postType:"reply",paramsCallback:function(){var t=e._getData(),i={content:t.content};return i.tid=e._dataPostor.tid,i}},function(t){e.captchaDialog=t,t.bind("onclose",function(){return e._isPosting=!1,e._enableEditor(),t.hide(),!1}),t.bind("onaccept",function(){e.setDataPostor({vcode:t.getInputValue(),vcode_md5:t.getVCode()}),e._submitData(),e.removeDataPostor("vcode"),e.removeDataPostor("vcode_md5")}),t.show()})},showPostor:function(){this.j_postor.show()},hidePostor:function(){this.j_postor.hide()},setDataPostor:function(t){var e=this;t&&(e._dataPostor=$.extend(!0,e._dataPostor,t))},removeDataPostor:function(t){var e=this;e._dataPostor[t]&&delete e._dataPostor[t]},_showErrorTip:function(t,e){var i='
    '+t.image+''+t.subMessage+"
    "+t.message+"
    ",o=$.dialog.alert(i,t.dialogSet);o.bind("onclose",e)},_errorTipShow:function(t){var e=this;e.j_qp_error.html(t).show(),e.j_qp_error.focus()},_showAddResult:function(t){var e=this;if(Thread_add_result.init(t),0!=t.no)if(Thread_add_result.isNeedWaitForCheck()){var i=Thread_add_result.getMessage(),o={image:'',subMessage:"等待审核...",message:i,dialogSet:{width:380,height:105,title:"发表贴子"}};e._showErrorTip(o,function(){return e._editor.setContent(""),e._editor.focus(),!0})}else if(901==t.no){var n="本楼层回复已达上限,请参与其他楼层讨论";e._errorTipShow(n)}else if(814==t.no){var n="抱歉,每层楼插入的表情不能超过10个,请修改后重新提交";e._errorTipShow(n)}else if(902==t.no){var n="抱歉,每层楼输入的文字不能超过140个,请修改后重新提交";e._errorTipShow(n)}else if(903==t.no){var n="线路升级改造,暂时无法发贴,请耐心等待,给您带来不便表示抱歉~";e._errorTipShow(n)}else if(3010==t.no){var n="抱歉,本吧只允许粉丝团成员发贴,快去认证吧。";e._errorTipShow(n)}else if(40==t.no){var n="验证码输入错误,请您返回后重新输入";e._errorTipShow(n)}else{var i=Thread_add_result.getMessage(),o={image:'',subMessage:"发贴失败",message:i,dialogSet:{width:410,height:95,title:"发表贴子"}};e._showErrorTip(o,function(){return e._editor.focus(),!0})}}}});_.Module.define({path:"common/component/image_exif",requires:[],sub:{initial:function(){},getOrientation:function(t){if(null==t)return 0;for(var e=0,r=0;e+3r||e+r>t.length)return 0;if(225==i&&r>=8&&1165519206==this.pack(t,e+2,4,!1)&&0==this.pack(t,e+6,2,!1)){e+=8,r-=8;break}e+=r,r=0}}if(r>8){var a=this.pack(t,e,4,!1);if(1229531648!=a&&1296891946!=a)return 0;var n=1229531648==a,s=this.pack(t,e+4,4,n)+2;if(10>s||s>r)return 0;e+=s,r-=s;for(var o=this.pack(t,e-2,2,n);o-->0&&r>=12;){if(a=this.pack(t,e,2,n),274==a){var c=this.pack(t,e+4,4,n),h=this.pack(t,e+8,c,n);switch(h){case 1:return 0;case 3:return 180;case 6:return 90;case 8:return 270}return 0}e+=12,r-=12}}return 0},pack:function(t,e,r,i){var a=1;i&&(e+=r-1,a=-1);for(var n=0;r-->0;)n=n<<8|255&t[e],e+=a;return n},rotateByorientation:function(t,e){var r=new FileReader,i=this;t.size||this.trigger("success",t),r.onload=function(){var r=this.result,a=new Uint8Array(r),n=i.getOrientation(a);i.trigger("degreeloaded",n),e||i.rotateFile(t,n)},r.readAsArrayBuffer(t)},rotateFile:function(t,e){if(90!=e&&180!=e&&270!=e)return this.trigger("success",t),void 0;var r=new FileReader,i=this;r.onload=function(){var t=this.result,r=new Image;r.onload=function(){i.rotateImage(r,e)},r.src=t},r.readAsDataURL(t)},rotateImage:function(t,e){var r=document.createElement("canvas"),i=r.getContext("2d"),a=t.width,n=t.height;i.save(),90==e||270==e?(r.width=n,r.height=a,90==e?i.translate(r.width,0):i.translate(0,r.height)):(r.width=a,r.height=n,i.translate(r.width,r.height)),i.rotate(e*Math.PI/180),i.drawImage(t,0,0,a,n),i.restore(),this.trigger("success",r)}}});_.Module.define({path:"common/component/ImageUploader",requires:["common/component/image_exif"],sub:{_url:"",_xhr:null,_active:!1,_successFilter:null,_variable:null,_MAX_SIZE:3145728,initial:function(t,e,i){this._url=t,this._successFilter=e||null,i=i||{},this._compressWidth=i.maxWidth||3e3,this._compressHeight=i.maxHeight||3e3},_createHXR:function(){var t=this,e=this._successFilter;this._xhr=new XMLHttpRequest,this._xhr.onload=function(){var i;try{i=$.parseJSON(t._xhr.responseText)}catch(r){i=t._xhr.responseText}e?e(i)?t.trigger("success",t._xhr,i):t.trigger("error",t._xhr,i):t.trigger("success",t._xhr,i)},this._xhr.onerror=function(){t.trigger("error",t._xhr)},this._xhr.onabort=function(){t.trigger("abort",t._xhr)},this._xhr.upload.onprogress=function(e){t.trigger("progress",e.loaded,e.total)}},_dataURLtoBlob:function(t){for(var e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),o=new Uint8Array(r),s=0;s=r)o._uploadBlob(i);else{var s=new Image,n=document.createElement("canvas");s.onload=function(){var t=o._getCompressSize(s.width,s.height);n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(s,0,0,s.width,s.height,0,0,t.width,t.height),s.onload=null,s.src="about:blank",s=null;var a=n.toDataURL("image/jpeg",(e/r).toFixed(1));n.getContext("2d").clearRect(0,0,t.width,t.height),n.width=n.height=0,n=null,i=o._dataURLtoBlob(a),i.size>e?o.trigger("error"):o._uploadBlob(i)},s.src=t}},_uploadBlob:function(t){var e=new FormData,i=this._variables;if(i&&"object"==typeof i)for(var r in i)e.append(r,i[r]);e.append("file",t),this._active=!0,this._xhr||this._createHXR(),this._xhr.open("POST",this._url,!0),this._xhr.withCredentials=!0,this._xhr.send(e),i&&i.html5stat&&$.stats.sendRequest("fr=tb0&st_type=html5upload&st_value=send")},_getCompressSize:function(t,e){var i=this._compressWidth,r=this._compressHeight,o=t/e,s={};return t>i||e>r?o>i/r?(s.width=i,s.height=i/o):(s.height=r,s.width=r*o):s={width:t,height:e},s},setVariable:function(t){this._variables=t},upload:function(t,e,i){if(t){e="undefined"==typeof e?this._MAX_SIZE:e;var r,o=this;if(t.getContext)r=i?t.toDataURL(i):t.toDataURL("image/jpeg",.8),t.getContext("2d").clearRect(0,0,t.width,t.height),t.width=t.height=0,t=null,o._compressFormDataURI(r,e);else if(t.size){var s=this.use("common/component/image_exif");s.bind("success",function(s,n){if(n.getContext)o.upload(n,e,i);else if(t.size>e){var a=new FileReader;a.onload=function(t){a.onload=null,r=t.target.result,o._compressFormDataURI(r,e)},a.readAsDataURL(n)}else o._uploadBlob(n)}),s.rotateByorientation(t)}}},abort:function(){this._active&&(this._xhr.abort(),this._active=!1)},distroy:function(){this.abort(),this.unbind("success"),this.unbind("error"),this.unbind("abort"),this.unbind("progress"),this._xhr=null}}});window.__discarding&&__discarding("common/component/image_uploader_manager"),_.Module.define({path:"common/component/image_uploader_manager",requires:["common/component/image_uploader_manager/uploader_flash","common/component/image_uploader_manager/uploader_html5"],sub:{initial:function(o){var t={container:null,width:200,height:50,isAutoUp:!1,queueLen:10,needWatermark:!1,fid:"",maxSize:3145728,maxWidth:3e3,maxHeight:3e3,uploadUrl:"http://upload.tieba.baidu.com/upload/pic",getUploadParams:null,tbsUrl:"http://tieba.baidu.com/dc/common/imgtbs",isFlash:!1};this._options=$.extend(t,o||{}),this.uploader=null,this.EVENTS=["onFileSelected","onStartUpload","onProgressListen","onComplete","onError"],this._reset()},_initUploadUrl:function(o){var t=this;if(this._options.uploadUrl.indexOf("tbs")>0)return void(o&&o.apply(t));var e=$.ajax({url:this._options.tbsUrl,dataType:"json"});e.done(function(e){0===Number(e.no)?(t._options.uploadUrl+="?tbs="+e.data.tbs+(t._options.isWater?"&is_wm=1":"")+"&fid="+(t._options.fid||""),o&&o.apply(t)):o&&t._error()}).fail(function(){o&&t._error()})},_reset:function(){var o=navigator.userAgent.toLowerCase().match(/chrome\/([\d]+)/);o&&parseInt(o[1])>=21||$.browser.mozilla||$.browser.safari||(this._options.isFlash=!0),this._initUploadUrl(this._startImageUploader)},_startImageUploader:function(){this._options.isFlash?this.uploader=this.use("common/component/image_uploader_manager/uploader_flash",this._options):this._options.container&&(this.uploader=this.use("common/component/image_uploader_manager/uploader_html5",this._options)),this._options.container&&this._generateCallBack()},_generateCallBack:function(){for(var o=this,t=0;t他/她的性别:
    请注意:*符号为必填。你所输入的信息将全部对公众开放,任何人都可查看或使用。
    ':'
    我的性别:
    请注意:*符号为必填。你所输入的信息将全部对公众开放,任何人都可查看或使用。
    '},_getVcode:function(){var e=this;if(e._needChangeVcode){var a=0,t="find"==e.type?1:2;PageData&&PageData.forum&&(a=PageData.forum.id),$.tb.get("/findpeople/needVcode",{type:t},function(a){0==a.no&&a.data.need_vcode&&(e._needChangeVcode=!1,e._needVcode=!0,e._vcode_md5=a.data.captcha_vcode_str,img_str="/cgi-bin/genimg?"+a.data.captcha_vcode_str+"&_t="+(new Date).getTime(),$("#ya_vcode_tr").show(),$("#ya_vcode_img").html(''))})}},_checkPeaceData:function(){var e=this,a=$("#ya_name").val(),t=$("#ya_sex_m").tbattr("checked")?"男":"女",d=$("#ya_age").val(),i=$("#ya_desc").val(),s=$("#ya_local").val(),n=$("#ya_vcode").val();if(a.length<=0||a.length>256||"请填写准确名字"==a)return alert("我的名字填写错误"),!1;if(s.length<=0||s.length>256)return alert("所在地填写错误"),!1;if(i.length<=0||i.length>512)return alert("更多情况填写错误"),!1;if(this._needVcode&&n.length<=0)return alert("请填写验证码"),!1;var c=0;return PageData&&PageData.forum&&(c=PageData.forum.id),{name:a,age:d,sex:t,desc:i,local:s,headpic:e._headPic,vcode:n,type:2,vcode_md5:e._vcode_md5,alt:"json",pic_url:e._headPicImg,tbs:PageData.tbs,fid:c}},_checkFindData:function(){var e=this,a=$("#ya_name").val(),t=$("#ya_sex_m").tbattr("checked")?"男":"女",d=$("#ya_age").val(),i=$("#ya_m_name").val(),s=$("#ya_desc").val(),n=($("#ya_find_name").val(),$("#ya_phone").val()),c=$("#ya_vcode").val();if(a.length<=0||a.length>256||"请填写准确名字"==a)return alert("寻找人的用户名填写错误"),!1;if(i.length<=0||i.length>256)return alert("我的名字填写错误"),!1;if(s.length<=0||s.length>256)return alert("更多情况出错"),!1;if(n.length<=0||n.length>256)return alert("联系方式填写错误"),!1;if(this._needVcode&&c.length<=0)return alert("请填写验证码"),!1;var l=0;return PageData&&PageData.forum&&(l=PageData.forum.id),{name:a,age:d,sex:t,desc:s,mname:i,mphone:n,headpic:e._headPic,vcode:c,vcode_md5:e._vcode_md5,alt:"json",type:1,tbs:PageData.tbs,pic_url:e._headPicImg,fid:l}},_checkPhone:function(e){var a=$.trim(e);if(""==a)return!1;for(var t=a.split(","),d=t.length,i=0;d>i;i++)if(!/^0(([1-9]\d)|([3-9]\d{2}))\d{8}$/.test(t[i])&&!/^1[3,5]\d{9}$/.test(t[i]))return!1;return!0},createDialog:function(e){var a=this,t=this.getFormHtml(e);this.type=e?"find":"peace",this._dialog=new $.dialog({html:t,title:e?"寻人":"报平安",draggable:!1,width:570}),$("#ya_close").unbind("click").click(function(){try{a._needChangeVcode=!0,a._dialog.close()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/ya_data_submit/ya_data_submit.js",method:"",ln:221}),e}}),this._dialog.bind("onclose",function(){a._needChangeVcode=!0}),this._getVcode(),this._bindEvent()},_submitFindData:function(e){var a=this;$.tb.post(a._conf.addFindUrl,e,function(e){0==e.no?a._dialog.close():10016==e.no?(a._needChangeVcode=!0,a._getVcode(),alert("验证码填写错误,请重试!")):alert("发生未知错误,请重试!"),a._needChangeVcode=!0})},_submitPeaceData:function(e){{var a=this;this.type?1:0}$.tb.post(a._conf.addPeaceUrl,e,function(e){0==e.no?a._dialog.close():10016==e.no?(a._needChangeVcode=!0,a._getVcode(),alert("验证码填写错误,请重试!")):alert("发生未知错误,请重试!"),a._needChangeVcode=!0})},_bindEvent:function(){var e=this;$("#ya_confim").unbind("click").bind("click",function(){try{if("find"==e.type){var a=e._checkFindData();a&&e._submitFindData(a)}else{var a=e._checkPeaceData();a&&e._submitPeaceData(a)}}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/ya_data_submit/ya_data_submit.js",method:"",ln:273}),t}}),$("#ya_vcode_tr").delegate("#ya_vcode","focus",function(){e._getVcode()}).delegate(".img_vcode","click",function(){try{e._needChangeVcode=!0,e._getVcode()}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/ya_data_submit/ya_data_submit.js",method:"",ln:279}),a}}),$("#ya_name").click(function(){try{var e=$(this).val();"请填写准确名字"==e&&$(this).val("")}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/ya_data_submit/ya_data_submit.js",method:"",ln:285}),a}}),$("#ya_name").blur(function(){var e=$(this).val();""==e&&$(this).val("请填写准确名字")}),e._uploadPic()},_uploadPic:function(){var e=this;e._headPic="",e._headPicImg="";var a={container:$("#ya_head_pic"),width:200,height:20,isAutoUp:!0,queueLen:10,workLen:3,isWater:!1,fid:"",maxSize:5242880,maxArea:1600,uploadUrl:"http://upload.tieba.baidu.com/upload/pic",isFlash:!0};this.upload=this.use("common/component/ImageUploaderManager",a),this.upload.bind("onComplete",function(a,t){var d=t.imageList[0].response.info;e._headPic=d.pic_id_encode;var i=1,s=d.fullpic_width,n=d.fullpic_height,c=!1,l="http://imgsrc.baidu.com/forum/pic/item/"+e._headPic+".jpg";s>560&&(i=560/s,c=!0,s=parseInt(s*i),n=parseInt(n*i)),e._headPicImg='",$('').appendTo($("#ya_user_pic").empty()).tbattr("src",l).bind("load",function(){var e=this,a=e.height;if(e.width>e.height)var a=e.width;if(a>60){i=60/a;var t=parseInt(e.height*i),d=parseInt(e.width*i);$("#ya_u_pic").tbattr("height",t+"px"),$("#ya_u_pic").tbattr("width",d+"px")}})})}}});!function(){function t(t,e,i,s){this.latestUrl=s+"?ie=utf-8&num="+this.latestNum+"&kw="+encodeURIComponent(t)+"&tid="+e,this.eventObj={},this.url=i,this.stopGetData=!1}function e(t,e,i,s){this.replyDomId=t,this.titleDomId=e,this.wrapperDomID=i,this.absDomId=s,this.init()}function i(t,e,i,s,n,a){this.isLogin=t,this.isBlock=e,this.forumType=i,this.guideText=a,this.cnt=$("#"+s).find(".j_tt_guidetexture")[0],this.forumId=n,t?e?this.initBlock():PageData.user.power.post||3!=i?this.guideTexture():this.belowLevel():this.needlogin()}function s(t,e,i,s,n,a){var o=null;return _.Module.use("common/widget/QuickPoster",{pOp:s,eOp:n},function(t){o=t}),o.bind("onsubmit",function(){o._isPosting=!1}),o.bind("onsuccess",function(){a.uiReady?(a.uiReady=!1,clearTimeout(a.refreshTimer),a.refreshTimer=setTimeout(function(){a.refresh()},1500)):a.needRefresh=!0},!0),o}window.FrsThreadItem=window.FrsThreadItem||{},window.FrsThreadItem.LivePost={init:function(i,s,n,a,o,r){"undefined"!=typeof PDC&&PDC.mark("c_liveavi"),this.type=o,this.setConfig(r),this.ui=new e(this.replyId,this.titleId,this.wrapperId,this.absId),this.data=new t(s.name,n.thread.id,this.loadUrl,this.freshUrl),this.dataQueue=[],this.bindEvent(),this.isLogin=i.is_login,this.isBlock=i.balv.is_block?!0:!1,this.canPost=i.power.post,this.tbs=a,this._widnowScrollTimer=null,this.noUsername=i.no_un,this.forumId=s.forum_id,this.forumName=s.forum_name,this.forumType=s.forbid_flag,this.data.fireEvent("init",n),this.refreshBtn=document.getElementById("lp_refresh");var h=this;$(this.refreshBtn).click(function(){try{h.hasMore&&(h.needRefresh=!0,h.hasMore=!1),$(this).hide(200)}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/thread_topic/thread_topic.js",method:"",ln:34}),t}})},setConfig:function(t){this.loadUrl="/zhibo/thread",this.freshUrl="/zhibo/forum","livepost"===this.type?(this.domId="live_post_thread",this.replyId="live_post_relynum",this.titleId="live_post_title",this.absId=void 0,this.wrapperId="live_thread_wrapper",this.editCnt="lp_text_area",this.guideTexture="#快速回复直播贴#",this.lpType=1,this.lpSubType=1):(this.domId="topic_post_thread",this.replyId="topic_post_relynum",this.titleId="topic_post_title",this.absId="tt_abs",this.wrapperId="topic_thread_wrapper",this.editCnt="tt_text_cnt",this.guideTexture="我也说一句",this.lpType=1,this.lpSubType=2),null!=t&&(this.theme=t.theme)},isLogin:null,isBlock:null,ui:null,post:null,data:null,dataQueue:null,getDataDelay:[5e3,1e4,15e3,3e4],delayIndex:0,waitingData:!1,needToGetData:10,hasMoreLimit:30,uiReady:!0,latestPid:null,hasMore:!1,needRefresh:!1,timeOffset:0,bindEvent:function(){var t=this;this.ui.on("ready",function(){t.onSlideReady()}),this.data.on("data",function(e){t.onData(e)}),this.data.on("update",function(e){t.ui.updateReplyNum(e)}),this.data.on("init",function(e){t.initData(e),t.ui.onInit(e)}),this.data.on("fatalerror",function(){document.getElementById(t.domId).style.display="none"}),this._doWindowScroll()},initData:function(t){var e=t.thread.fid,n=t.thread.fname,a=t.thread.id;this.data.setData(n,a),this.latestPid=t.post_list[t.post_list.length-1].id,this.quickPostor=null,new i(this.isLogin,this.isBlock,this.forumType,this.editCnt,this.forumId,this.guideTexture);var o={ie:"utf-8",kw:n,fid:e,tid:a,rich_text:1,tbs:this.tbs,lp_type:this.lpType,lp_sub_type:this.lpSubType},r=new CaptchaReqCom({forumName:n,forumId:e,tid:t.thread.id,postType:"reply"}),h={_canPost:this.canPost?1:0,_forumType:this.forumType,_noUn:this.noUsername,_isBlock:this.isBlock?!0:!1,_login:this.isLogin?1:0,_dataPostor:o,_container:this.editCnt,_needSmile:!0,_setText:this.guideTexture,tpl_id:"j_quickpotor_tpl",_captchaReq:r},l=this,d="638px";if("bright"==l.theme&&(d="620px"),1===l.lpType&&1===l.lpSubType){if(l.isLogin&&!l.isBlock){var u={autoFocus:!1,autoEnable:!0,height:"49px",width:d,maxHeight:"49",enableRefer:!0};l.quickPostor=new s(n,e,a,h,u,l)}}else $("#tt_invite").focus(function(){setTimeout(function(){var t={autoFocus:!1,autoEnable:!0,height:"50px",width:d,maxHeight:"50",enableRefer:!0};l.quickPostor=new s(n,e,a,h,t,l)},100)})},setDataDelayTimes:function(t){for(var e=this.getDataDelay,i=[],s=0;se+200?i||(i=!0,n.setDataDelayTimes(100)):i&&(i=!1,n.getDataDelay=s,n.data.getData(n.latestPid))},1e3)})},onSlideReady:function(){var t=this;t.uiReady=!0,t.addItem(),$("#thread_topic").slideDown(function(){t.ui.wrapperHeight=t.ui.wrapper.offsetHeight-2,$("#"+t.domId).css({position:"relative"})})},onData:function(t){for(this.waitingData=!1,t.length>0?this.delayIndex=0:this.delayIndexthis.latestPid&&(this.dataQueue.push(e),this.latestPid=e.id)}!this.uiReady||this.ui.scrollFlag||this.ui.mouseEnterFlag||this.addItem(),this.dataQueue.length>=this.hasMoreLimit&&!this.hasMore&&(this.hasMore=!0,$(this.refreshBtn).show(200))},addItem:function(){if(this.uiReady){if(this.needRefresh)return this.needRefresh=!1,this.refresh(),void 0;this.dataQueue.length>0&&(this.uiReady=!1,this.ui.addItem(this.dataQueue.shift()));var t=this;this.dataQueue.length0&&(this.latestPid=this.dataQueue[this.dataQueue.length-1].id),this.ui.updateReplyNum(t.thread.reply_num),this.ui.refresh(this.dataQueue),this.dataQueue=[],this.hasMore&&(this.hasMore=!1,$(this.refreshBtn).hide(200))}},t.prototype={eventObj:null,url:"",latestUrl:"",num:50,latestNum:50,curPid:null,setData:function(t,e){this.url+="?kw="+encodeURIComponent(t)+"&tid="+e+"&num="+this.num+"&ie=utf-8"},getData:function(t){this.curPid=t;var e=this;this.stopGetData||$.get(this.url+"&pid="+t+"&t="+(new Date).getTime(),function(t){0!==t.no?e.onError(t.no):(t=t.data,e.fireEvent("update",t.reply_num),e.fireEvent("data",t.post_list))},"json")},getLatestData:function(t){var e=this;$.get(this.latestUrl+"&t="+(new Date).getTime(),function(i){i&&0===i.no?"function"==typeof t?t(i.data):e.fireEvent("init",i.data):e.fireEvent("fatalerror")},"json")},onError:function(){var t=this;setTimeout(function(){t.getData(t.curPid)},5e3)},on:function(t,e){this.eventObj[t]=e},fireEvent:function(t){return"function"==typeof this.eventObj[t]?this.eventObj[t].apply(this,Array.prototype.slice.call(arguments,1)):void 0}},e.prototype={eventObj:null,cnt:null,wrapper:null,max:50,slideTime:1700,scrollFlag:!1,mouseEnterFlag:!1,timeOffset:0,replyEl:null,titleEl:null,tailList:{wap_1:{txt:"UC浏览器",url:"http://down2.uc.cn/ucbrowser/html/index.php?pub=chens@tb1"},wap_phone:{txt:"手机贴吧",url:"http://c.tieba.baidu.com/c/s/download/pc?src=webtb#wap"},imo_:{txt:"掌上百度",url:"http://shouji.baidu.com/zhangbai/tieba/"},tbclient_apple:{txt:"iphone客户端",url:"http://c.tieba.baidu.com/c/s/download/pc?src=webtb#android"},tbclient_android:{txt:"android客户端",url:"http://c.tieba.baidu.com/c/s/download/pc?src=webtb#android"}},utypesIcon:["",''],updateReplyNum:function(t){this.replyEl.title=t+"个回复",this.replyEl.firstChild.nodeValue=t},updateTitle:function(t,e){this.titleEl.setAttribute("href","http://tieba.baidu.com/p/"+e),this.titleEl.setAttribute("title",t),this.titleEl.innerHTML=$.tb.subByte(t,60)},updateAbs:function(t){this.absEl.innerHTML=$.tb.subByte(t,180)},updateList:function(t){this.cnt.innerHTML="";for(var e=document.createDocumentFragment(),i=0,s=t.length;s>i;i++)e.appendChild(this.obj2dom(t[i]));this.cnt.appendChild(e),this.mouseEnterFlag?this.wrapper.scrollTop=this.wrapper.scrollHeight:this.scrollFlag&&(this.cnt.style.position="absolute"),this.scrollFlag=!1;var n=this;setTimeout(function(){n.fireEvent("ready")},3e3)},init:function(){this.wrapper=document.getElementById(this.wrapperDomID),this.cnt=document.createElement("div"),this.cnt.className="live_thread_cnt",this.wrapper.appendChild(this.cnt),this.itemHTML=$("#th_item_tpl").html(),this.needFix=!1;var t=navigator.userAgent.match(/chrome\/(\d+)/i);t&&parseInt(t[1])>=21&&(this.needFix=!0,this.wrapper.style.overflowY="hidden"),this.tmpNode=document.createElement("div"),this.eventObj={},this.replyEl=document.getElementById(this.replyDomId),this.titleEl=document.getElementById(this.titleDomId),this.absDomId&&(this.absEl=document.getElementById(this.absDomId)),this.bindEvent();var e=this;setTimeout(function(){e.updateLeftTime()},5e3)},onInit:function(t){this.timeOffset=parseInt((new Date).getTime()/1e3)-t.server_time,this.updateReplyNum(t.thread.reply_num),this.updateTitle(t.thread.title,t.thread.id),"topicthread"==window.FrsThreadItem.LivePost.type&&t.thread.abs&&this.updateAbs(t.thread.abs),this.updateList(t.post_list)},refresh:function(t){this.updateList(t)},addingItem:!1,addItem:function(t){var e=this;this.addingItem=!0,this.cnt.childNodes.length>=this.max&&this.cnt.removeChild(this.cnt.firstChild),$(this.obj2dom(t)).hide().appendTo(this.cnt).slideDown(this.slideTime,function(){e.addingItem=!1,e.onAddComplete()})},onAddComplete:function(){this.mouseEnterFlag||this.scrollFlag?(this.cnt.style.position="static",this.needFix&&(this.wrapper.style.overflowY="scroll"),this.wrapper.scrollTop=this.wrapper.scrollHeight):this.fireEvent("ready")},onMouseLeave:function(){this.addingItem||this.scrollFlag||(this.cnt.style.position="absolute",this.needFix&&(this.wrapper.style.overflowY="hidden"),this.fireEvent("ready"))},tmpNode:null,itemHTML:null,obj2dom:function(t){return this.itemHTML=this.itemHTML||$("#th_item_tpl").html(),$($.tb.format(this.itemHTML,this.convertObj(t))).get(0)},convertObj:function(t){var e={};e.user_img_src="http://tb.himg.baidu.com/sys/portrait/item/"+t.user.portrait;var i=encodeURIComponent(t.user.name),s=$.tb.dataField({id:t.user.portrait});"1"===PageUnit.load("thread_topic_usedefaultpic")&&(e.user_img_src="http://tb2.bdstatic.com/tb/static-frs/img/icon/default_head.gif"),e.user_link='"http://tieba.baidu.com/home/main?un='+i+'&fr=frs&ie=utf-8" target="_blank" class="j_user_card"'+s,e.user_name='"+t.user.name+"";var n=t.contents;n=n.replace(/(\[+f+a+c+e+\])+/gi,''),1==t.ptype&&(n="[语音]"+n),e.contents=n,e.time=t.time,e.left_time=this.getLeftTime(t.time),e.data_th=$.tb.escapeHTML('{"reply_user": "'+t.user.name+'","quote_id" : 0, "floor_num" : 0}');var a=this.tailList[t.open_id+"_"+t.open_type];return e.tail=a?'来自'+a.txt+"":"",e.authenticate_user=this.utypesIcon[t.user.is_verify||0]||"",e},getLeftTime:function(t){var e=(new Date/1e3|0)-t;return 0>=e?"刚刚":60>e?e+"秒前":3600>e?parseInt(e/60)+"分钟前":86400>e?parseInt(e/60/60)+"小时前":parseInt(e/60/60/24)+"天前"},hasMoreData:function(){},noMoreData:function(){},bindEvent:function(){var t=this;$(this.wrapper).mouseenter(function(){t.mouseEnterFlag=!0,!t.addingItem&&!t.scrollFlag&&t.cnt.offsetHeight>t.wrapperHeight&&(t.cnt.style.position="static",t.needFix&&(t.wrapper.style.overflowY="scroll"),t.wrapper.scrollTop=t.wrapper.scrollHeight)}).mouseleave(function(){t.mouseEnterFlag=!1,t.onMouseLeave()}).scroll(function(){t.scrollFlag=this.scrollTop>=this.scrollHeight-t.wrapperHeight?!1:!0}).delegate(".j_th_wrapper","mouseenter mouseleave",function(){var t=window.FrsThreadItem.LivePost;t.isLogin&&t.canPost&&$(this).find(".j_reply").toggleClass("li_reply_show")}).delegate(".j_reply","click",function(){try{var t=$.json.decode($(this).closest("div[data-th]").tbattr("data-th"));$("#tt_invite").length>0&&$("#tt_invite").focus(),window.setTimeout(function(){var e=window.FrsThreadItem.LivePost.quickPostor._editor;e.setContent(""),e.execCommand("inserthtml","回复:@"+t.reply_user+" ")},50)}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/thread_topic/thread_topic.js",method:"",ln:634}),e}}).delegate(".j_user_card","click",function(){try{if(PageData.user.is_login)return;var t=$(this).tbattr("href");return window.open("/f/user/passport?jumpUrl="+$.tb.unescapeHTML(t)+"&statsInfo=frs_user#login_anchor"),!1}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/thread_topic/thread_topic.js",method:"",ln:642}),e}})},updateLeftTime:function(){var t=this;$(this.cnt).find(".left_time").each(function(){this.innerHTML=t.getLeftTime(parseInt(this.getAttribute("data-time")))}),this.updateTimer=setTimeout(function(){t.updateLeftTime()},5e3)},on:function(t,e){this.eventObj[t]=e},fireEvent:function(t){"function"==typeof this.eventObj[t]&&this.eventObj[t].apply(this,Array.prototype.slice.call(arguments,1))}},i.prototype={constructor:i,isLogin:null,isBlock:null,canPost:null,guideText:"",cnt:null,forumId:null,needlogin:function(){this.cnt.innerHTML="
    参与本吧讨论,请先登录|注册
    "},initBlock:function(){var t=this;_.Module.use("ueglibs/widget/Ban",[],function(e){t.cnt.innerHTML='
    '+e.render("simplePoster")+"
    "})},belowLevel:function(){this.cnt.innerHTML='
    抱歉,根据相关法律法规和政策,本吧目前仅允许4级头衔以上会员发贴。
    '},guideTexture:function(){this.cnt.innerHTML='
    '+this.guideText+"
    "}}}();_.Module.define({path:"frs/widget/LiveTv",sub:{_theme:"",initial:function(i){try{this.liveTv=$(".j_listLiveTvCnt"),this.liveTvBox=$(".j_live_tv"),this.title=this.liveTvBox.find(".j_live_tv_title"),this.content=this.liveTvBox.find(".j_live_tv_content"),this.liveTvWrapper=this.liveTv.find(".j_listLiveTvCnt_wrapper"),this.swfContainer=this.liveTvWrapper.find(".j_live_tv_swf_container"),this.swfThumb=this.liveTv.find(".j_threadlist_video"),this._theme=null!=i.theme?i.theme:"","bright"==this._theme&&(this.videoSize={min:{width:380,height:330},max:{width:598,height:481}});var e=/^iframe:/i;this.flag_iframe=e.test(i.video)?1:0,this.setup(i);var t="1"==$.cookie("liveTvBubbleClosed");if(!t){var s=new UiBubbleTipBase({content:"弹出后可以边看边聊哟~",arrow_dir:"left",bubble_css:{top:-6,left:0,width:150},arrow_pos:{top:8},wrap:$("#liveTvBubbleCnt"),closeBtn:!0});s.bind("onclose",function(){$.cookie("liveTvBubbleClosed","1",{expires:365,path:"/"}),s.hideBubble()}),s.showBubble()}}catch(o){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:o.message||o.description,path:"frs:widget/live_tv/live_tv.js",method:"",ln:75}),o}},isFuckingIE:$.browser.msie&&$.browser.version<8,videoSize:{min:{width:380,height:330},max:{width:630,height:481}},setup:function(i){this.videoId=i.videoId,this.title.css("width",this.videoSize.min.width),this._initBox(),0===this.flag_iframe?new $.swf(i.video,{container:this.swfContainer,width:this.videoSize.max.width,height:this.videoSize.max.height,params:{wmode:"transparent",allowFullScreen:!0}}):(this.videoURL=i.video.slice(7),this.video_iframe=$(""),this.swfContainer.append(this.video_iframe)),this.swfHtml=this.swfContainer.html()},_resizeFlash:function(i){this.swfContainer.css(i),0===this.flag_iframe?(this.swfContainer.find("object").css(i),this.swfContainer.find("embed").css(i)):(this.swfContainer.find("#video_iframe").css(i),this.swfContainer.find("#video_iframe").tbattr("src",this.videoURL+"?size="+i.width+"*"+i.height))},_initBox:function(){var i=this;$(window).on("resize",function(){i._resize()}),this.liveTv.on("click",".j_live_tv_slide_down",function(e){try{i._isLiveTvPoped()&&i.unpopBox(),i.maximizeVideo(),i.pause(),e.preventDefault()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/live_tv/live_tv.js",method:"",ln:153}),e}}).on("click",".j_live_tv_pop_btn",function(e){try{i._isLiveTvPoped()||(i.play(),i.popBox()),$.stats.sendRequest("fr=tb0_forum&st_mod=frs&st_type=live_tv_pop"),e.preventDefault()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/live_tv/live_tv.js",method:"",ln:160}),e}}).on("click",".j_live_tv_hide_btn",function(e){try{i.pause(),i.minimizeVideo()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/live_tv/live_tv.js",method:"",ln:163}),e}}),this.title.on("click",".j_live_tv_btn",function(e){try{i._isLiveTvPoped()?(i.unpopBox(),i.pause(),i.minimizeVideo()):i.popBox(),$.stats.sendRequest("fr=tb0_forum&st_mod=frs&st_type=live_tv_unpop"),e.preventDefault()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/live_tv/live_tv.js",method:"",ln:175}),e}}),this.liveTvWrapper.find(".live_tv_cover").on("click",function(e){try{i.play(),e.preventDefault()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/live_tv/live_tv.js",method:"",ln:180}),e}})},minimizeVideo:function(){this.liveTvWrapper.hide(),this.swfThumb.show()},maximizeVideo:function(){this.swfThumb.hide(),this.liveTvWrapper.show()},play:function(){this.swfContainer.html(this.swfHtml),this._resizeFlash(this._isLiveTvPoped()?this.videoSize.min:this.videoSize.max),this.liveTvWrapper.find(".live_tv_cover").hide(),this.swfContainer.show(),$.stats.hive("live_tv_play_"+this.videoId),$.stats.sendRequest("fr=tb0_forum&st_mod=frs&st_type=live_tv_play")},pause:function(){this.swfContainer.hide(),this.swfContainer.html(""),this.liveTvWrapper.find(".live_tv_cover").show()},unpopBox:function(){this.liveTvBox.addClass("minimized"),this._resizeFlash(this.videoSize.max),this.swfContainer.appendTo(this.liveTvWrapper),this.maximizeVideo(),this.isFuckingIE&&$(window).off("scroll",this._scroll)},popBox:function(){$(window),this.liveTvBox;this.liveTvBox.removeClass("minimized"),this.minimizeVideo(),this._resizeFlash(this.videoSize.min),this.swfContainer.appendTo(this.content),this.setPosition(),this.isFuckingIE?$(window).on("scroll",this._scroll):this.liveTvBox.draggable({handle:".j_live_tv_title"})},_isLiveTvPoped:function(){return!this.liveTvBox.hasClass("minimized")},setPosition:function(i,e){var t=this,s=this.liveTvBox;if(0!==i&!i&&0!==e&&!e){var o=$(document),n=$(window),h=t.isFuckingIE?[o.scrollLeft(),o.scrollTop()]:[0,0];i=h[0]+(n.width()-s.outerWidth()-5),e=140,e=e>=0?e:0}this.liveTvBox.css({left:i,top:e,right:"auto",bottom:"auto"})},_resize:function(){this._isLiveTvPoped()||this.setPosition()},_scroll:function(){$(".live_tv").css("top",document.documentElement.scrollTop+140)}}});_.Module.define({path:"frs/widget/pk",sub:{_conf:{},_total_time:1500,_num_change_times:20,_animate_finish:0,initial:function(t){try{this._conf=t;var e=this.$wrap=$("#pk_point_w");this.$prog=e.find(".j_progress_w"),this.$pk_icon=e.find(".pk_icon"),this.animate()}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/pk/pk.js",method:"",ln:15}),a}},bindEvent:function(){var t=this;this.$wrap.on("click",".j_vote_btn",function(e){try{e.preventDefault(),t.isLogin()&&t.vote(this)}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/pk/pk.js",method:"",ln:23}),a}})},vote:function(t){var e=this,a=$(t),n=a.hasClass("red_vote_btn")?1:2,o={uid:PageData.user.user_id,tid:e._conf.tid,vote_type:n};$.ajax({url:"/zhibo/pkVote",type:"post",data:o,dataType:"json"}).done(function(t){0===t.errno?e.handleSucc(t,a,n):40===t.errno?e._validVCode(t,function(t){e.openCustomScore(opt,tar,t)}):e.handleErr(t)})},handleSucc:function(t,e,a){var n=this.$wrap.find(".red_vote_num"),o=this.$wrap.find(".blue_vote_num"),i=$('');i.appendTo(e.parent(".j_point")).animate({top:"-=40",opacity:0},1e3),this.$wrap.find(".j_point").addClass("disabled_point").end().find(".j_vote_btn").removeClass("j_vote_btn"),e.text("已投票").parent(".j_point").addClass("voted_point"),1==a?n.text(parseInt(n.text())+1):o.text(parseInt(o.text())+1)},_validVCode:function(t,e){_.Module.use("common/component/CaptchaDialog",{message:t.data.vcode.str_reason,vCode:t.data.vcode.captcha_vcode_str,vCodeType:t.data.vcode.captcha_code_type,exceptionalAccount:1==t.data.vcode.userstatevcode,forumName:PageData.forum.forum_name,forumId:PageData.forum.forum_id,title:"pk贴投票",forumName:PageData.forum.forum_name,forumId:PageData.forum.forum_id,checkUrl:"/pk_thread/vcode/checkvcode?tbs="+PageData.tbs,vCodeUrl:"/pk_thread/vcode/getvcode",paramsCallback:function(){return{app:"pk_thread",tbs:PageData.tbs,forum_id:PageData.forum.forum_id}}},function(t){t.bind("onclose",function(){return t.hide(),!1}),t.bind("onaccept",function(){var a={};a.vcode=t.getInputValue(),a.vcode_md5=t.getVCode(),"function"==typeof e&&e(a)}),t.show()})},handleErr:function(t){var e;switch(t.errno){case 220034:e="亲,一个用户只能投一次票";break;default:e="系统出错,请稍后再试"}$.dialog.alert(e,{title:"错误提示"})},animate:function(){var t=this;this.$prog.each(function(e,a){var n=$(a),o=n.find(".j_vote_num"),i=parseInt(o.tbattr("data-n")),r=i/t._num_change_times*2;n.css({width:n.tbattr("data-w")+"%"});var d=setInterval(function(){var e=parseInt(o.text())+Math.ceil(Math.random()*r);i>e?o.text(e):(clearInterval(d),o.text(i),t._animate_finish++,2==t._animate_finish&&t.bindEvent())},t._total_time/t._num_change_times)}),setTimeout(function(){t.$pk_icon.css({visibility:"visible"}).addClass("bounceIn")},1450)},isLogin:function(){return PageData.user.is_login?PageData.user.no_un?(TbCom.process("User","buildUnameFrame"),!1):!0:(_.Module.use("common/widget/LoginDialog",["","userBar"]),!1)}}});_.Module.define({path:"frs/widget/List",extend:"frs/widget/List/Core",sub:{initial:function(t){try{this.__super__(t),this.bindEvent(),t.delayTimes&&"0"!==t.delayTimes&&this.setDataDelayTimes(t.delayTimes)}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/list/list.js",method:"",ln:15}),e}},bindEvent:function(){var t=this;t.config.$group.on("mouseenter.scroll",function(){t.mouseProcess&&clearTimeout(t.mouseProcess),$(this).stop(),t.$group.children().last().stop().removeAttr("style"),t.mouseenter=!0,t.canStart=!1,t.stop(),$(this).on("scroll",function(e){t.trigger("scrolling",e)})}).on("mousemove.scroll",function(){$(this).stop(),t.mouseenter=!0,t.canStart=!1,t.stop()}).on("mouseleave.scroll",function(){var e=$(this);t.mouseProcess=setTimeout(function(){t.mouseenter=!1,t.canStart=!0,e.off("scroll"),t.start(),t.trigger("scrollBottom")},1e3)}).on("click.reply",".pReply",function(e){try{t.trigger("reply",$(this).data("info"))}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/list/list.js",method:"",ln:50}),e}}).on("mouseenter.ItemHover",".listItemCnt",function(){$(this).addClass("listItemHover")}).on("mouseleave.ItemHover",".listItemCnt",function(){$(this).removeClass("listItemHover")})}}});_.Module.define({path:"frs/widget/interview/Editor",requires:["common/widget/QuickPoster"],sub:{initial:function(t){try{this.user=t.user,this.postorTplId=t.postorTplId,this.fName=t.fName,this.fId=t.fId,this.fType=t.fType,this.tId=t.tId,this.tbs=t.tbs,this.uType=t.uType,this.postable=Number(t.postable),this.isNoUn=Number(t.isNoUn),this.isBlock=!!Number(t.isBlock),this.isLogin=Number(t.isLogin),this.editorId=t.editorId,this.hasBuild=!1,this.isSubject=t.isSubject}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/interview/editor.js",method:"",ln:26}),e}},build:function(t){if(!this.hasBuild){var e=this,i={ie:"utf-8",kw:this.fName,fid:this.fId,tid:this.tId,rich_text:1,tbs:this.tbs,lp_type:1,lp_sub_type:1},s={_canPost:this.postable,_forumType:this.fType,_noUn:this.isNoUn,_isBlock:this.isBlock,_login:this.isLogin,_dataPostor:i,_container:this.editorId,_needSmile:!0,_setText:"参与直播,我也说一句~",tpl_id:this.postorTplId,_captchaReq:new CaptchaReqCom({forumName:this.fName,forumId:this.fId,tid:this.tId,postType:"reply"})},n={autoFocus:!t,autoEnable:!t,height:"50px",maxHeight:"60",enableRefer:!0},o=this.use("common/widget/QuickPoster",{pOp:s,eOp:n});if(o.bind("onsubmit",function(){e.trigger("submit");var t=e.$ptype.find(":checked").val();if(e.$ptype.hasClass("hide"))o._isPosting=!1,t=null,e.__a__=e.qBtn?{user:e.user,id:e.qBtn.data("id"),atData:e.qBtn.data("atData"),q:e.qBtn.remove(),a:o._editor.getContent()}:null;else{if(!t)return o._isPosting=!0,e.$ptype.addClass("noChecked"),void 0;e.$ptype.removeClass("noChecked"),o._isPosting=!1}o.setDataPostor({ie:"utf-8",kw:e.fName,fid:e.fId,tid:e.tId,tbs:e.tbs,rich_text:1,lp_type:1,lp_sub_type:1,repostid:o.repostid||null,talk_type:t}),e.$ptype.find(":checked").removeAttr("checked")}),o.bind("atSomeOne",function(t){o._editor.setContent(""),o.repostid=t.pid,o._editor.execCommand("inserthtml","回复 @"+t.uname+" : ")}),this.isSubject)try{o._editor._events.initcomplete=null,delete o._editor._events.initcomplete}catch(d){}o._editor.ready(function(){o._editor.addListener("ready",function(){e.trigger("initcomplete")})}),o.bind("onsuccess",function(){o.repostid=null,e.qBtn=null,e.trigger("onsuccess",e.__a__),e.__a__=null},!0),this.$ptype=$("#qp_type").addClass("hide"),1==this.uType&&(this.$ptype=$("#qp_type").removeClass("hide")),this.bind("showFace",function(){setTimeout(function(){$("#smile_btn").find(".insertsmiley_holder").click().end().click()},100)}),$("#smile_btn").bind("click",function(){try{e.isSubject?$(this).find(".tb-editor-overlay").css({left:"-345px",top:"-365px"}).find(".arrow").css({left:"345px",top:"355px"}):$(this).find(".tb-editor-overlay").css("left","-345px").find(".arrow").css("left","345px")}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/interview/editor.js",method:"",ln:161}),t}}),this.postor=o,this.bind("atSomeOne",function(t,i){var s,n;i.isTopic&&2==e.uType?(s=$("#item"+i.id),n=s.next(),s.hasClass("question")&&!n.hasClass("answer")?(s.data("atData",i),e.qBtn=s):e.qBtn=null):e.qBtn=null,o.triggerEvent("atSomeOne",i)}),this.bind("focus",function(){setTimeout(function(){o._editor.focus()},500)}),this.bind("blur",function(){setTimeout(function(){o._editor.blur()},500)}),this.hasBuild=!0}}}}); ;_.Module.define({path:"frs/widget/Interview",requires:["frs/widget/List","frs/widget/interview/Editor"],sub:{initial:function(t){try{this.maxCacheLength=30,this.$postRefreshBtn=t.$postRefreshBtn,this.$talkRefreshBtn=t.$talkRefreshBtn,this.$talkHistoryBtn=t.$talkHistoryBtn,this.$reply=t.$reply,this.$editor=$("#"+t.editorId),this.$editorCnt=t.$editorCnt,this.$talk=t.$talk,this.$post=t.$post,this.$talkCnt=t.$talkCnt,this.$postCnt=t.$postCnt,this.$postTitle=t.$postTitle,this.$editorHolder=t.$editorHolder,this.itemTpl=t.itemTpl,this.delTpl=t.delTpl,this.timeCnt=t.timeCnt,this.tfId=t.tfId,this.fId=t.fId,this.fName=t.fName,this.tId=t.tId,this.uType=t.cUserType,this.talkId=t.talkId||0,this.postId=t.postId||0,this.isSubject=t.isSubject,this.$subjectCnt=t.$subjectCnt,this.initPost(t.now),this.initTalk(t.now),this.initEditor(t),this.start(),this.initMarquee()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/interview/interview_main.js",method:"",ln:45}),i}},initPost:function(t){this.post=this.use("frs/widget/List",{$group:this.$postCnt,timeCnt:this.timeCnt,delayTimes:PageUnit.load("interview_refresh_times")}),this.bindPostEvent(),this.post.now=1e3*t,this.$postCnt.scrollTop(this.post.$group.height())},initTalk:function(t){this.talk=this.use("frs/widget/List",{$group:this.$talkCnt,history:!0,timeCnt:this.timeCnt,delayTimes:PageUnit.load("interview_refresh_times")}),this.talk.historyCount=0,this.bindTalkEvent(),this.$talkCnt.scrollTop(this.talk.$group.height()),this.talk.now=1e3*t},initEditor:function(t){this.editor=this.use("Editor",{editorId:t.editorId,postorTplId:t.editorTplId,user:t.user,fName:t.fName,fId:t.fId,fType:t.fType,tId:t.tId,tbs:t.tbs,uType:t.cUserType,postable:t.postable,isNoUn:t.isNoUn,isBlock:t.isBlock,isLogin:t.isLogin,isSubject:t.isSubject}),this.bindEditorEvent(),t.isSubject&&(this.editor.build(!0),this.$editorHolder.parent().removeClass("mini"))},__formatTalkData__:function(t,i,e){this.$postTitle.show();var s,o=this,n=[];for(o.talk.now=1e3*t;i.length;){if(s=i.shift(),!e){if(s.id<=o.talkId)continue;o.talkId=s.id}"0"==s.type?n.push(this.__TalkMode__(t,s,"comment")):(n.push(this.__TalkMode__(t,s,"question")),n.push(this.__TalkMode__(t,s,"answer")))}return n},userType:["nomalUser","adminUser","guestUser"],__TalkMode__:function(t,i,e){return i&&i[e]&&i[e].user?(1==i[e].ptype&&(i[e].contents="[语音]"+i[e].contents),this.__format__({isTopic:!0,fid:this.fId,fname:this.fname,userType:this.userType[i[e].user.type],type:e,id:i.id,spec:"
    ",del:!!i[e].del,uname:i[e].user.name,unick:i[e].user.nick||i[e].user.name,utype:this.utypesIcon[i[e].user.is_verify||0]||"",uicon:i[e].user.portrait,tid:this.tId,pid:i[e].id,altTitle:i[e].contents,title:this.formatFaceImg(i[e].contents),tail:this.tails[i[e].open_type||""]||"",date:1e3*i[e].time,uid:i[e].user.id,dateMsg:this.talk.formatDate(1e3*t,1e3*i[e].time)})):""},__formatPostData__:function(t,i){var e,s=this,o=[];for(s.post.now=1e3*t;i.length;)e=i.shift(),e.id<=s.postId||(s.postId=e.id,1==e.ptype&&(e.contents="[语音]"+e.contents),o.push(this.__format__({isTopic:!1,fid:this.fId,fname:this.fName,id:e.id,del:!!e.del,uname:e.user.name,unick:e.user.nick||e.user.name,spec:": ",utype:this.utypesIcon[e.user.is_verify||0]||"",uicon:e.user.portrait,tid:this.tId,pid:e.id,title:this.formatFaceImg(e.contents),tail:this.tails[e.open_type||""]||"",date:1e3*e.time,uid:e.user.id,dateMsg:this.post.formatDate(1e3*t,1e3*e.time)})));return o},__format__:function(t){return t.del?$.tb.format(this.delTpl,t):$.tb.format(this.itemTpl,t)},utypesIcon:["",''],tails:{wap_1:'来自UC浏览器',wap_phone:'来自手机贴吧',imo_:'来自掌上百度',tbclient_apple:'来自iphone客户端',tbclient_android:'来自android客户端'},formatFaceImg:function(t){return t.replace(/(.*?)\[face\](.+?)\[\/face](.*?)/g,'$1$3')},updateReply:function(t){this.$reply.tbattr("title",t+"个回复").html(t)},updateActiveNumber:function(t){$("#list_announcement_cnt").text(t)},bindPostEvent:function(){var t=this;this.post.bind("getData",function(i,e){return t.stopGetData?(t.stop(),void 0):($.get("/zhibo/talk/post",{fid:t.tfId,tid:t.tId,pid:e?0:t.postId,rn:t.maxCacheLength,t:+new Date},function(i){i=$.parseJSON(i),0==i.no?(i=i.data,i.post_list.length?t.post.minusPadding():t.post.addPadding(),t.updateReply(i.reply_num),t.updateActiveNumber(i.join_num),t.post.pushStack(t.__formatPostData__(i.server_time,i.post_list))):t.post.addPadding()}),void 0)}),this.post.bind("scrolling",function(){t.post.mouseenter||t.$postCnt.scrollTop()+t.$postCnt.height()!=t.post.$group.height()+10?(t.post.canStart=!1,t.post.stop()):(t.post.canStart=!0,t.post.start())}),this.post.bind("scrollBottom",function(){t.$postCnt.scrollTop(t.post.$group.height())}),this.post.bind("reply",function(i,e){t.editor.trigger("reply",e)}),this.post.bind("appendFinished",function(){t.trigger("iframeHeight","appendFinished")})},bindTalkEvent:function(){var t=this;this.talk.bind("getData",function(i,e){return t.stopGetData?(t.stop(),void 0):($.get("/zhibo/talk/talk",{fid:t.tfId,tid:t.tId,talkid:t.talkId,rn:t.maxCacheLength,direction:e?-1:0,t:+new Date},function(i){i=$.parseJSON(i),0==i.no?(i=i.data,i.talk.length?t.talk.minusPadding():t.talk.addPadding(),t.talk.pushStack(t.__formatTalkData__(i.server_time,i.talk))):t.talk.addPadding()}),void 0)}),this.talk.bind("appendFinished",function(){t.talk.$group.children().size()<5?t.$talk.tbattr("class","listTalkCnt autoHeight").show():t.$talk.tbattr("class","listTalkCnt fixHeight").show(),t.trigger("iframeHeight","appendFinished")}),this.talk.bind("scrolling",function(){t.talk.mouseenter||t.$talkCnt.scrollTop()+t.$talkCnt.height()!=t.talk.$group.height()?(t.talk.canStart=!1,t.talk.stop(),!t.$talkCnt.scrollTop()&&t.talk.$group.children().size()?t.talk.trigger("getHistory"):t.$talkHistoryBtn.slideUp()):(t.talk.canStart=!0,t.talk.start())}),this.talk.bind("getHistory",function(){t.talk.canStart=!1,"historyBtn"==t.$talkHistoryBtn.tbattr("class")||t.talk.historyCount>2?t.$talkHistoryBtn.tbattr("class","historyBtn").slideDown():t.$talkHistoryBtn.hasClass("allHistory")?t.$talkHistoryBtn.slideDown():t.$talkHistoryBtn.tbattr("class","historyBtn addHistory").slideDown().delay(200).slideUp(function(){$.get("/zhibo/talk/talk",{fid:t.tfId,tid:t.tId,talkid:t.talk.$group.children().eq(0).data("id"),direction:1,t:+new Date},function(i){i=$.parseJSON(i),0==i.no?(i=i.data,++t.talk.historyCount,i.talk.length<30?t.$talkHistoryBtn.tbattr("class","historyBtn allHistory").stop().slideDown().delay(200).slideUp():(t.$talkHistoryBtn.tbattr("class","historyBtn addedHistory").stop().slideDown().delay(200).slideUp(),t.talk.config.$group.scrollTop(10)),t.talk.prepend(t.__formatTalkData__(i.server_time,i.talk,!0).join("")),t.talk.canStart=!0):(t.$talkHistoryBtn.tbattr("class","historyBtn").slideDown(),t.talk.historyCount=10)})})}),this.talk.bind("scrollBottom",function(){t.$talkCnt.scrollTop(t.talk.$group.height())}),this.talk.bind("reply",function(i,e){t.editor.trigger("reply",e)}),t.$talkHistoryBtn.bind("click",function(){try{$(this).slideUp()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/interview/interview_main.js",method:"",ln:404}),t}})},scroll2editor:function(t){t=t||10,this.isSubject&&(t+=this.$subjectCnt.offset().top+50),this.scroll2bottom(this.$editorCnt,t)},scroll2top:function(t,i){var e=$(t).offset().top,i=i||0;this.scroll2num(e+i)},scroll2bottom:function(t,i){var e=$(t).offset().top,s=$(t).height(),i=i||10;this.scroll2num(e-$(window).height()+s+i)},scroll2num:function(t){var i=document,e="html";this.isSubject&&(i=window.parent.document),$.browser.webkit&&(e="body"),$(e,i).animate({scrollTop:t},500)},num2color:function(t,i){t/i|0?t=i-t%i:t%=i;var e=t.toString(16).toUpperCase();return 2==e.length?e:"0"+e},shakeEditorBorder:function(){var t,i=0,e=600,s=this;t=setInterval(function(){i+=20,e>i?s.$editorCnt.css("borderColor","#FF"+s.num2color(i,200)+s.num2color(i,200)):(clearInterval(t),s.$editorCnt.removeAttr("style"))},50)},bindEditorEvent:function(){var t=this;this.editor.bind("reply",function(i,e){t.$editorHolder.click(),setTimeout(function(){t.scroll2editor(null,"reply"),t.editor.trigger("atSomeOne",e)},200)}),this.editor.bind("initcomplete",function(){t.trigger("iframeHeight","initcomplete")}),this.editor.bind("submit",function(){t.trigger("iframeHeight","submit")}),this.editor.bind("onsuccess",function(){setTimeout(function(){t.talk.trigger("getData",!0),t.post.trigger("getData",!0)},100),t.editor.trigger("focus"),t.trigger("iframeHeight","success")}),this.$editorHolder.bind("click.focus",function(){try{t.editor.build(),t.editor.trigger("focus"),$(this).parent().removeClass("mini")}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/interview/interview_main.js",method:"",ln:516}),i}}).on("click.focusAndShowFace",".faceIcon",function(){try{t.editor.build(),setTimeout(function(){t.editor.trigger("showFace")},1e3)}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/interview/interview_main.js",method:"",ln:521}),i}})},initMarquee:function(){var t=$("#threadListGroupCnt");if($marqueeTarget=t.find(".j_marquee"),$listLotteryCnt=t.find(".j_listLotteryCnt"),1===$marqueeTarget.length&&$marqueeTarget.width()>340){var i=0,e=$marqueeTarget.width()/2,s=function(){-i>=e?i=0:i-=2,$marqueeTarget.css("left",i),o=setTimeout(s,60)},o=setTimeout(s,60);$listLotteryCnt.mouseover(function(){clearTimeout(o)}),$listLotteryCnt.mouseleave(function(){o=setTimeout(s,60)})}},start:function(){this.talk.start(),this.post.start()},stop:function(){this.talk.stop(),this.post.stop()}}});_.Module.define({path:"common/widget/MemberApi",sub:{initial:function(){},getMemberNameClass:function(e,i){var r="";return Env.server_time>13962816e5&&Env.server_time<1396368e6&&4!=i?r=" vip_red ":(e&&e.level&&e.level.end_time>Env.server_time/1e3&&(r=" vip_red "),r)}}});_.Module.define({path:"frs/widget/Thread",sub:{initial:function(){try{this.checkLogin(),this.redirectLocal58()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/thread/thread.js",method:"",ln:7}),t}},remove:function(t,e){function a(){var e={kw:PageData.forum.name,fid:PageData.forum.id,tid:t};e.ie="utf-8",e.tbs=PageData.tbs,PostHandler.execute("threadDelete",e,function(t){var e=t,a='
    删除主题操作失败
    ';switch(e.no){case 0:$.tb.location.reload(!0);break;case 12:case 13:break;default:$.dialog.alert(a,{title:"操作失败",width:380})}})}e>=10?confirm("此主题已有较多回复,您确认要删除?")&&a():a()},checkLogin:function(){$(".j_user_card").on("click",function(){try{if(PageData.user.is_login)return;var t=$(this).tbattr("href"),e="http://tieba.baidu.com"+$.tb.unescapeHTML(t);return window.open("/f/user/passport?jumpUrl="+e+"&statsInfo=frs_user#login_anchor"),!1}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"frs:widget/thread/thread.js",method:"",ln:57}),a}})},redirectLocal58:function(){$("#thread_list .j_is_local58").each(function(){var t=$(this).closest(".thread_local_58").getData().id||0;$.ajax({url:"http://jump.luna.58.com/ext/adshow?callback=?",context:$(this)[0],data:{sr:"frs",tids:t},dataType:"jsonp"}).done(function(e){try{if(e.sd){var a="http://jump.luna.58.com/ext/tieba?tid="+t+"&sd="+e.sd+"&sr=frs";$(this).tbattr("href",a)}}catch(i){}})})}}});_.Module.define({path:"frs/widget/FrsImgPost",requires:[],sub:{_uplDialog:null,_currDialogHeight:0,innerContent:"",_posterParms:{kw:null,ie:"utf-8",rich_text:1,floor_num:"1",fid:null,tid:"0",picsign:null,anonymous:0,title:"",content:null,new_vcode:1,tag:11,tbs:null,hasuploadpic:0,loc:0},_dialogConf:{title:"发表图贴",width:554,height:50,position:"center"},_imgPostSize:{defaultWidth:560},_flashConf:{width:82,height:28,name:"SingleUpload",url:"/tb/static-frs/swf/SingleUpload.swf?v=1.0.3",parms:{upload_url:"http://upload.tieba.baidu.com/upload/pic",compress_size_limit:1}},_message:{normal:"为了保证显示效果,请上传大于200*200像素的图片",err1:"图片无法上传,请上传大于200*200像素的图片",err2:"图片上传失败,请重新选择"},_imgObj:{jq_container:null,jq_progress:null,jq_loadingImg:null,jq_img:null,orgSize:null},_postType:"reply",initial:function(t){try{if(!t)return;var e=this;e._posterParms.kw=t.forum.name,e._posterParms.fid=t.forum.id,e._posterParms.tbs=t.tbs,e._posterParms.new_vcode=1,e._posterParms.tag=11,e._enabledFlag=t.forum.forbid_flag,e._userInfo=t.user,t.location&&(e._posterParms.loc=t.location,e._postType="reply")}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/frsImgPost/frsImgPost.js",method:"",ln:87}),i}},initFrsImgPostDialog:function(){var t=this;if(t._userInfo){if(!t._userInfo.is_login)return void TbCom.process("User","buildLoginFrame",null,null,null,"frs_img_upload");if(t._userInfo.is_login&&t._userInfo.no_un)return void TbCom.process("User","buildUnameFrame","填写用户名","有用户名才能上传图片,赶快给自己起一个吧~");var e=t._isShowTipDialog(t._enabledFlag);if(e)return void t._showTipDialog(t._enabledFlag);t._initFlashInterface(),t._showDialog(),t._bindEventToForm()}},_showDialog:function(){var t=this,e=t._getHtml();t._currDialogHeight=t._dialogConf.height,t._uplDialog=$.dialog.open(e,t._dialogConf),t._uplDialog.bind("onclose",function(){t._dialogDestroy()}),t._insertFlash($("#frs_img_post_flash")),t._imgObj.jq_container=$("#upload_img_container"),t._imgObj.jq_loadingImg=t._imgObj.jq_container.find(".review_loading"),t._imgObj.jq_progress=t._imgObj.jq_container.find("b"),t._imgObj.jq_img=t._imgObj.jq_container.find("img"),t._imgObj.jq_loadingImg.hide(),t._imgObj.jq_progress.hide(),t._imgObj.jq_img.hide()},_getHtml:function(){var t=this,e=['
    ','
    ','
    请选择图片
    ','
    ','
    '+t._message.normal+"
    ","
    ",'","
    "),e.join("")},_resetDialogHeight:function(t){var e=this,i=220;switch(t){case"firstUpl":e._currDialogHeight+=i}e._uplDialog.height(e._currDialogHeight)},_formatURL:function(t){return this._replace(t,[[/[\u3000\s]+/g,""],[/\\/g,"/"],[//g,""],[/"/g,""],[/;/g,""],[/\(/g,""],[/\)/g,""]])},_replace:function(t,e){for(var i=0;it._imgPostSize.defaultWidth){var a=t._imgPostSize.defaultWidth,r=Math.ceil(a*i/e);return'

    '}return'

    '},_postSubmit:function(t){var e=this;e._setParmsData();var i=e._checkPosterParms();i&&(1==e._posterParms.loc?(e._posterParms.tid=$("#pic_theme_list").tbattr("tid"),e._posterParms.lp_type=1,e._posterParms.lp_sub_type=3,$.tb.post("/f/commit/post/add",e._posterParms,function(i){return 0==i.no?void(i.data&&e._submitSuccessed(t)):void e._submitFailed(i)},"json")):$.tb.post("/f/commit/thread/add",e._posterParms,function(t){return 0==t.no?void(t.data&&e._submitSuccessed()):void e._submitFailed(t)},"json"))},_removeData:function(t){var e=this;e._posterParms[t]&&delete e._posterParms[t]},_submitSuccessed:function(t){var e=this;e._uplDialog.close();var i='
    上传成功!
    ',s='';if($.stats.sendRequest("fr=tb0_forum&st_mod=frs&st_value=uploadimgsuccess&st_data=frs"),1==$("#updata_img_totopic").length){clearTimeout(window.FrsThreadItem.PicLivePost.timeSet);var a="st_type=pic_theme&st_mod=pic&st_show=pic_show&how=sg";$.stats.sendRequest(a);var r=$("#pic_turn"),o=r.find("div"),n=r.find("li"),l=r.width();pic_list_width=o.css("width"),_innerHtml=o.html(),e.innerContent.length>70&&(e.innerContent=e.innerContent.substring(0,70)+"……");var _=$("
  • ");_.html(s),n.length<5?(o.append(_),r.css("width",parseInt(l)+106+"px")):5==n.length?(o.append(_),o.html(o.html()+_innerHtml),o.css("width",parseInt(pic_list_width)+530+"px"),pic_list_width=o.css("width")):_.insertBefore(n[n.length-5]),o.css("width",parseInt(pic_list_width)+106+"px");var d=$("#pic_theme_list .threadlist_rep_num");d.html(parseInt(d.html())+1),d.tbattr("title",d.html()+"个回复");var m=$("#pic_turn li").length;m>5&&(window.FrsThreadItem.PicLivePost.timeSet=setTimeout(window.FrsThreadItem.PicLivePost.rollPic,300))}var p=function(){0==e._posterParms.loc&&$.tb.location.reload(!0)};$.dialog.assert(i,p,{showTitle:!1,width:136,height:54,time:2e3,button:!1})},_submitFailed:function(t){var e=this,i=e._getErrMessage(t.no);if(4010==t.no){$.dialog.alert("
    "+i+"
    ",{title:"发贴失败",acceptValue:"绑定手机",width:410,onaccept:function(){return $.tb.location.setHref("http://passport.baidu.com/v2/?accountbindphone&tpl=tb&u="+encodeURIComponent($.tb.unescapeHTML($.tb.location.getHref()))),!1}})}else 40==t.no?(e.captchaDialog&&delete e.captchaDialog,_.Module.use("common/component/CaptchaDialog",{message:t.data.vcode.str_reason,vCode:t.data.vcode.captcha_vcode_str,vCodeType:t.data.vcode.captcha_code_type,forumName:t.data.fname,forumId:t.data.fid,isAnonymous:0,postType:e._postType,paramsCallback:function(){var t=e._getData(),i={content:t.content,title:t.title};return i.tid=e._posterParms.tid,i}},function(t){e.captchaDialog=t,t.bind("onclose",function(){return t.hide(),!1}),t.bind("onaccept",function(){e._removeData("vcode"),e._removeData("vcode_md5"),e._posterParms.vcode=t.getInputValue(),e._posterParms.vcode_md5=t.getVCode();var i={url:$.tb.unescapeHTML($(".review_img").tbattr("src")),width:$(".review_img").width(),height:$(".review_img").height()};e._postSubmit(i),e._removeData("vcode"),e._removeData("vcode_md5")}),t.show()})):($("#frs_upl_err_span").html(i),setTimeout(function(){$("#frs_upl_err_span").html("")},2e3))},_getErrMessage:function(t){var e=this;switch(t){case 14:return"您发布的贴子已经存在";case 17:case 705:return"本吧当前只能浏览,不能发贴!";case 18:case 21:return"其他未知原因";case 20:return"您发表的贴子的标题或正文包含太少的文字,请修改后再发表";case 36:return"请不要发广告贴!";case 38:return"验证码超时,请重新输入";case 40:return"验证码输入错误,请您重新输入";case 12:return null!=e._posterParms.fid?'操作失败,您的账号因违规操作而被封禁  查看封禁信息':"操作失败";case 13:return null!=e._posterParms.fid?'操作失败,您的网络地址由于非法操作被封
    查看封禁信息':"您的网络地址由于非法操作被封";case 4010:return"您的账号存在安全风险暂不能发贴,请先进行手机绑定后再发贴吧。";default:return"未知错误"}return""},_isShowTipDialog:function(t){if(t)switch(t){case 2:case 3:case 4:case 5:case 6:return!0;default:return!1}return!1},_showTipDialog:function(t){var e="";switch(t){case 2:e="抱歉,本吧目前仅限吧务团队及注册满一定时间的老用户发贴";break;case 3:e="抱歉,根据相关法律法规和政策
    本吧目前仅限会员发贴";break;case 4:e="抱歉,本吧目前仅限吧务团队发贴";break;case 5:e="抱歉,根据相关法律法规和政策
    本吧目前只能浏览,不能发贴";break;case 6:e="抱歉,本吧当前只能浏览,不能发贴!";break;default:return}var i='
    '+e+"
    ";$.dialog.alert(i,{width:420,height:45,title:"提示"})},_checkPosterParms:function(){var t=this;return 0==t._posterParms.hasuploadpic?!1:0==$.trim(t._posterParms.title).length&&0==t._posterParms.loc?(t._showTitleError(),!1):!0},_showTitleError:function(){var t=$("#upload_img_title"),e=$("#upl_img_title_err_span"),i=$("#upl_img_title_span"),s=1200;i.hide();var a=0,r=setInterval(function(){a++,3==a&&(a=1),1==a&&e.show(),2==a&&e.hide(),s-=200,0==s&&(clearInterval(r),e.hide(),t.focus())},200)},_setSubmitEnable:function(t){var e=$("#upload_submit");return t?void e.tbattr("disabled",!1).removeClass("submit_btn_disable"):void e.tbattr("disabled",!0).addClass("submit_btn_disable")},_changeFlashUploadMessage:function(t){var e=this,i=$("#img_upload_message");switch(t){case"normal":i.text(e._message.normal),i.removeClass("errC").addClass("norC");break;case"err1":i.text(e._message.err1),i.removeClass("norC").addClass("errC");break;case"err2":i.text(e._message.err2),i.removeClass("norC").addClass("errC")}},_insertFlash:function(t){var e=this,i=$.browser.msie?"?"+Math.random():"",s=e._flashConf.name,a=e._flashConf.url+i,r=e._flashConf.width,o=e._flashConf.height,n=e._flashConf.parms,l="";if("object"==typeof n){for(var _ in n)l+=_+"="+n[_]+"&";l=''}var d=''+l+"",m=''+l+"";return-1!=navigator.appName.indexOf("Microsoft")?void t.html(d):void t.html(m)},_bindEventToForm:function(){var t=this,e=$("#upload_img_descr"),i=$("#upl_img_descr_span");jq_submit_btn=$("#upload_submit"),e.bind("focus",function(){e.removeClass("normal_border").addClass("active_border"),i.hide()}).bind("blur",function(){return e.removeClass("active_border").addClass("normal_border"),""!=$.trim(e.val())?void i.hide():void i.show()}),i.bind("click",function(){try{e.focus()}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/frsImgPost/frsImgPost.js",method:"",ln:613}),t}});var s=$("#frs_img_post_flash"),a=$("#img_upload_btn");s.bind("mouseenter",function(){a.removeClass("state_normal").addClass("state_hover")}).bind("mouseleave",function(){a.removeClass("state_hover").addClass("state_normal")});var r=jq_submit_btn.tbattr("disabled");jq_submit_btn.bind("click",function(){try{var e={url:$.tb.unescapeHTML($(".review_img").tbattr("src")),width:$(".review_img").width(),height:$(".review_img").height()};t._postSubmit(e)}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/frsImgPost/frsImgPost.js",method:"",ln:628}),i}}).bind("mouseenter",function(){r||$(this).removeClass().addClass("submit_btn_hover")}).bind("mouseleave",function(){r||$(this).removeClass().addClass("submit_btn_nor")})},_bindEventToTitle:function(){{var t,e,i=this;$("#upload_img_descr")}0==i._posterParms.loc&&(t=$("#upload_img_title"),e=$("#upl_img_title_span")),t&&(t.bind("focus",function(){t.removeClass("normal_border").addClass("active_border"),e.hide()}).bind("blur",function(){return t.removeClass("active_border").addClass("normal_border"),""!=$.trim(t.val())?void e.hide():void e.show()}),i._subInput(t,60),e.bind("click",function(){try{t.focus()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/frsImgPost/frsImgPost.js",method:"",ln:669}),e}}))},_subInput:function(t,e,i){$.disableInput(t,function(t){return t.toString().getByteLength()>=e?!1:!0});var s=function(){var s=t.val().toString();s.getByteLength()>e&&t.val(s.subByte(e,i))};try{t.bind("input",s)}catch(a){}t.bind("keyup",s)},_displayProgress:function(t){var e=this;return t?(e._imgObj.jq_loadingImg.show(),e._imgObj.jq_progress.show(),void e._imgObj.jq_img.hide()):(e._imgObj.jq_loadingImg.hide(),e._imgObj.jq_progress.hide(),void e._imgObj.jq_img.show())},_dialogDestroy:function(){window.fipFlashInited=null,window.fip_img_tbs=null,window.onFipFlashInitComplete=null,window.onFipFlashStartUpload=null,window.onFipFlashFileItemComplete=null,window.onFipFlashProgressListener=null,window.onFipFlashFileItemError=null,window.outPutLog=null},_initFlashInterface:function(){var t=this;window.fipFlashInited=!1,window.fip_img_tbs=$.ajax({url:"http://tieba.baidu.com/dc/common/imgtbs",dataType:"json"}),window.onFipFlashInitComplete=function(){t._onFipFlashInitComplete.apply(t,arguments)},window.onFipFlashStartUpload=function(){t._onFipFlashStartUpload.apply(t,arguments)},window.onFipFlashFileItemComplete=function(){t._onFipFlashFileItemComplete.apply(t,arguments)},window.onFipFlashProgressListener=function(){t._onFipFlashProgressListener.apply(t,arguments)},window.onFipFlashFileItemError=function(){t._onFipFlashFileItemError.apply(t,arguments)},window.outPutLog=function(){t._outPutLog.apply(t,arguments)}},_getFlash:function(t){return-1!=navigator.appName.indexOf("Microsoft")?window[t]:document[t]},_outPutLog:function(){},_onFipFlashInitComplete:function(){var t=this;window.fipFlashInited=!0,window.fip_img_tbs.done(function(e){if(0===Number(e.no)){var i=t._getFlash(t._flashConf.name);i.setParameter("tbs",e.data.tbs),i.setParameter("fid",t._posterParms.fid)}}).fail(function(){})},_onFipFlashStartUpload:function(){var t=this,e=$("#frs_img_post").find(".main_content");e.is(":hidden")&&(e.show(),t._resetDialogHeight("firstUpl")),t._setSubmitEnable(!1),t._displayProgress(!0)},_onFipFlashFileItemComplete:function(t,e){var i=this,s=i._imgObj.jq_container;try{var a=$.json.decode(e)}catch(r){return}if("0"==a.error_code){$("#upload_img_descr").focus();var o=a.info.pic_id_encode,n="http://imgsrc.baidu.com/forum/abpic/item/"+o+".jpg";return(new Image).src=n,void setTimeout(function(){var t=a.info.fullpic_width,e=a.info.fullpic_height;i._imgObj.orgSize={w:t,h:e};var r=i._imgObj.jq_img[0];r.src=n;var l=t>e?150/t:150/e;r.style.width=parseInt(t*l)+"px",r.style.height=parseInt(e*l)+"px",r.style.left=parseInt((152-parseInt(t*l))/2)+"px",r.style.top=parseInt((152-parseInt(e*l))/2)+"px",s.tbattr("data-url","http://imgsrc.baidu.com/forum/pic/item/"+o+".jpg"),i._posterParms.picsign=a.info.full_sign0+a.info.full_sign1,i._posterParms.hasuploadpic=1,i._getFlash(i._flashConf.name).remove(),i._displayProgress(!1),i._changeFlashUploadMessage("normal"),i._setSubmitEnable(!0),i._uplDialog.setPosition()},300)}s.addClass("error")},_onFipFlashProgressListener:function(t){var e=this,i=e._imgObj.jq_progress[0];i.style.width=t.percent+"%"},_onFipFlashFileItemError:function(t,e){var i=this;i._displayProgress(!1),i._imgObj.jq_img.hide();return"err1"==e?void i._changeFlashUploadMessage("err1"):void i._changeFlashUploadMessage("err2")}}});!function(){window.FrsThreadItem=window.FrsThreadItem||{},window.FrsThreadItem.PicLivePost={timeChaneg:0,timeSet:0,pic_list_all_last:3,_isPicTheme:0,initPic:function(){var t=$("#pic_theme_list").tbattr("tid");if(t){var i={kw:PageData.forum.name_url,tid:t,t:Date.parse(new Date),pn:0,rn:30};$.ajax({url:"http://tieba.baidu.com/photo/bw/picture/toplist",data:i,type:"post",success:this.requestSuccess,error:this.requestError})}},requestError:function(){$("#thread_pic").hide()},requestSuccess:function(t){if(t=$.parseJSON(t),0!=t.no)$("#thread_pic").hide();else{var i=$("#pic_theme_list"),e=i.find(".threadlist_title a"),a=i.find("ul"),d=i.find(".threadlist_rep_num"),s=i.find("#pic_post_title"),r=i.find("span.all_num"),c=(i.find(".threadlist_li_right"),i.find(".threadlist_abs")),l=t.data.pic_list.length>5?5:t.data.pic_list.length,o=t.data.pic_list.length,n=0,p=0,m="";p="bright"==PageData.forum.theme?510:106*l,n=o>5?106*(o+5):106*o,m="
  • 5)for(var h=0;5>h;h++)t.data.pic_list[h].desc.length>70&&(t.data.pic_list[h].desc=t.data.pic_list[h].desc.substring(0,70)+"……"),m+='
  • 删除");window.FrsThreadItem.PicLivePost.timeChaneg=0,window.FrsThreadItem.PicLivePost.timeSet=setTimeout(window.FrsThreadItem.PicLivePost.rollPic,10)}},rollPic:function(){divOut=$("#pic_turn"),pic_list_inner=divOut.find("li"),divIn=divOut.find("div"),divWid=divOut.css("width"),divLeft=Math.floor(divIn.css("left"))5&&(Math.floor(divLeft)!=-(parseInt(divIn[0].style.width)-parseInt(divWid))?divIn.css("left",divLeft-1+"px"):divIn.css("left",0)),window.FrsThreadItem.PicLivePost.timeChaneg++,clearTimeout(window.FrsThreadItem.PicLivePost.timeSet),window.FrsThreadItem.PicLivePost.timeSet=Math.floor(parseFloat(divIn.css("left")))%106==0&&0!=Math.floor(parseFloat(divIn.css("left")))?setTimeout(window.FrsThreadItem.PicLivePost.rollPic,2e3):setTimeout(window.FrsThreadItem.PicLivePost.rollPic,10)},deletePic:function(t){var i=$(t).closest("li").tbattr("pid"),e={ie:"utf-8",tbs:PageData.tbs,kw:PageData.forum.name,fid:PageData.forum.forum_id,tid:$("#pic_theme_list").tbattr("tid"),pid:i,is_finf:0,is_vipdel:0};PostHandler.execute("postDelete",e,function(i){var e=$(t);switch(i.no){case 0:e.closest("li").siblings().each(function(){$(this).tbattr("pid")==e.closest("li").tbattr("pid")&&($(this).find("img").tbattr("src","http://tb2.bdstatic.com/tb/static-frs/img/v2/picerr.gif").css("width","100px").css("height","100px"),$(this).find("a").remove())}),e.closest("li").find("img").tbattr("src","http://tb2.bdstatic.com/tb/static-frs/img/v2/picerr.gif").css("width","100px").css("height","100px"),$(t).remove();break;case 2101:var a='
    这是一楼的图片,如需删除,请进入帖子直接将本帖删除。
    ';$.dialog.alert(a,{title:"无法删除该图片",width:300});break;default:var a='
    删除失败,请重试。
    ';$.dialog.alert(a,{title:"无法删除该图片",width:300})}})}}}();_.Module.define({path:"frs/widget/ThreadVote",sub:{thread_ids:[],initial:function(){try{}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/thread_vote/thread_vote.js",method:"",ln:7}),t}},_buildThread_ids:function(t){var e=$("#"+t),a=[],i=null,s=0,n=1,d=0;if(this.thread_ids.length=0,this.thread_ids=[],e.length>0)for(a=e.find("tr"),n=1,d=a.length;d>n;n++)i=a.eq(n),i.tbattr("tid")&&(s=i.tbattr("tid"),this.thread_ids.push(s));a=null},_buildThread_ids_new:function(t){var e=$("#"+t);this.thread_ids=[];var a=this.thread_ids;a.length=0,e.length>0&&e.children().each(function(){var t=$.tb.unescapeHTML($(this).tbattr("data-field"));if(t){var e=$.parseJSON(t).id;e&&a.push(e)}})},_buildParams:function(t,e){"undefined"!=typeof e&&e>=2?this._buildThread_ids_new(t):this._buildThread_ids(t);var a={},i=1,s=this.thread_ids;for(a.product_name="forum",i=1;i<=s.length;i++)a["id_first_"+i]=s[i-1],a["id_second_"+i]=0;return a},_getVoteStateHtml:function(t,e){if(e>=2)switch(t){case 0:return'';case 1:return''}else switch(t){case 0:return'[已截止] ';case 1:return'[进行中] '}},render:function(t,e){var a=this,i="/vote/data/relation_brief_vote?alt=json",s=this._buildParams(t,e),n=this;""!=s&&$.ajax({type:"POST",url:i,data:s,dataType:"html",success:function(t){var t=$.json.decode(t);if(0==t.errno)for(var i,s,d=0,r="",h=0,o=0,_=a.thread_ids.length;_>o;o++)h=a.thread_ids[o],r=n._getVoteStateHtml(0,e),h in t.vote_infos&&(i=t.vote_infos[h],d=i.is_expired,0==d&&(r=n._getVoteStateHtml(1,e))),s=document.getElementById("vote_state_"+h),s.innerHTML=r}})}}});_.Module.define({path:"frs/widget/PictureRotation",sub:{_cache:{obj:null,rad:0},initial:function(){try{}catch(t){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:t.message||t.description,path:"frs:widget/picture_rotation/picture_rotation.js",method:"",ln:15}),t}},rotationSimple:function(t,i,e){if(t.width&&t.height){var r=1*($(t).tbattr("rad")||0),o=1;r+="right"==i?90:-90,Math.abs(r)%180!=0&&t.height>e&&(o=e/t.height),this._rotation(t,r,o),$(t).tbattr("rad",r)}},_rotation:function(t,i,e){t.width&&t.height&&(this._checkCSS3("transform")?this._rotationForCSS3(t,i,e):this._rotationForIE(t,i,e))},_rotationForIE:function(t,i,e){var e=e||1;if($.browser.version<8){var r=this._getMatrix(i*Math.PI/180,e);t.style.filter="progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand')",$.extend(t.filters.item("DXImageTransform.Microsoft.Matrix"),r)}if($.browser.version>=8){var o=$(t).parent(),r=this._getMatrix(i*Math.PI/180,e);if(t.style.filter="progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand')",i%180!=0){{var a=t.width*e;t.height*e}$(t).css("visibility","hidden"),$.extend(t.filters.item("DXImageTransform.Microsoft.Matrix"),r),o.height(a),o.css("position","relative"),$(t).css({visibility:"",display:"block",position:"absolute",left:(o.width()-t.height*e)/2})}else $.extend(t.filters.item("DXImageTransform.Microsoft.Matrix"),r),o.height(t.height*e),o.css("position",""),$(t).css({display:"",position:"",left:0})}},_rotationForCSS3:function(t,i,e){var e=e||1,r=0,o=$(t).parent();r=i%180==0?0:-(t.height-t.width*e)/2,this._css3(t,"transform","translate(0px, "+r+"px) rotate("+i+"deg) scale("+e+", "+e+")"),$(o).height(i%180!=0?t.width*e:t.height*e)},_css3:function(t,i,e){if(!t||!i||""==i)return!1;var r=this._checkCSS3(i);return r?e?void(t.style[r]=e):t.style[r]:!1},_checkCSS3:function(t){for(var i,e=document.body.style,r=t.replace(/^\w/,function(t){return t.toUpperCase()}),o=[t,"Moz"+r,"webkit"+r,"O"+r,"ms"+r],a=0,s=o.length;s>a;a++)if(o[a]in e){i=o[a];break}return i?i:!1},_getMatrix:function(t,i){var e=Math.cos(t),r=Math.sin(t);return{M11:e*i,M12:-r*i,M21:r*i,M22:e*i}}}});_.Module.define({path:"album/widget/tbFav",requires:[],sub:{defaultConf:{appid:"314406",xiangceUrl:"http://favo.xiangce.baidu.com/",uploadUrl:"http://up.xiangce.baidu.com/",userId:0,cacheEnabled:!0},defaultData:{imgUrl:"",sourceURL:"",tags:"",descript:""},conf:{},data:{},cache:{},initial:function(){this.conf=$.extend(this.conf,this.defaultConf),this.data=$.extend(this.data,this.defaultData)},setConf:function(t){this.conf=$.extend(this.conf,t)},setData:function(t){this.data=$.extend(this.data,t)},getConf:function(){return this.conf},getData:function(){return this.data},checkStatus:function(t){t&&this.setData(t);var e=this,a=this.conf,t=this.data;if(a.cacheEnabled){if(1===this.checkCache(t.imgUrl))return void e.trigger("check_status_success","hit_cache");if(0===this.checkCache(t.imgUrl))return void e.trigger("check_status_success","hit_cache_notfav")}var c=a.xiangceUrl+"opencom/picture/fav/query?app_id="+a.appid+"&url="+t.imgUrl+"&callback=?";$.getJSON(c,function(c){if(a.cacheEnabled){var i=0==c.errno&&c.data&&0!=c.data.status;e.setCache(t.imgUrl,i)}e.trigger("check_status_success",c)})},addToFav:function(t){t&&this.setData(t);var e=this,a=this.conf,t=this.data,c=a.uploadUrl+"opencom/picture/fav/upload?app_id="+a.appid+"&descript="+encodeURIComponent(t.descript)+"&uid="+a.userId+"&source_url="+encodeURIComponent(t.sourceURL)+"&tags="+encodeURIComponent(t.tags)+"&url="+encodeURIComponent(t.imgUrl)+"&callback=?";$.getJSON(c,function(c){if(a.cacheEnabled){var i=0==c.errno;e.setCache(t.imgUrl,i)}e.trigger("add_to_fav_success",c)})},setCache:function(t,e){this.cache[t]=e?1:0},checkCache:function(t){return this.cache[t]}}});_.Module.define({path:"frs/widget/PopVideo",sub:{_isFuckingIE:$.browser.msie&&$.browser.version<8,_videoSize:{min:{width:440,height:356},normal:{width:534,height:386},max:{width:630,height:481}},initial:function(i){try{i=i||{},this.config=i,this.popBoxTemplate=['
    ','
    ','
    ','',"",' ',"
    ",'
    ','',"
    ","
    ","
    "].join(""),this._initEvent()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/pop_video/pop_video.js",method:"",ln:60}),e}},_resizeFlash:function(i){$("#pop_video").find("embed").tbattr(i||this._videoSize.min)},_initEvent:function(){var i=this;$("body").off("click",".media_box .j_pop_media").on("click",".media_box .j_pop_media",function(e){try{i.popBox($(this)),e.preventDefault()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"frs:widget/pop_video/pop_video.js",method:"",ln:79}),e}}),$("body").off("mousedown",".j_m_flash").on("mousedown",".j_m_flash",function(){i.unpopBox()}),$(window).on("resize",function(){i._resize()})},unpopBox:function(){var i=$("#pop_video");i.remove(),this._isFuckingIE&&$(window).off("scroll",this._scroll)},popBox:function(i){$(".live_tv").hasClass("minimized")||$(".live_tv_btn").trigger("click");var e=this;e.unpopBox();var o=i.parents(".j_media_disp").find("embed").tbattr("src"),t=i.parents(".j_thread_list").find(".threadlist_title a").html();t=$.tb.subByte(t,50,"...");var s=this.popBoxTemplate.replace(/#{src}/,o);$("body").append(s),i.prev(".j_retract_media").trigger("click");var n=$("#pop_video");n.find(".pop_video_title").css("width",this._videoSize.min.width).find(".title_text").html(t),this.setPosition(),n.on("click",".j_pop_video_btn",function(i){try{e.unpopBox(),i.preventDefault()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"frs:widget/pop_video/pop_video.js",method:"",ln:143}),i}}),this._isFuckingIE?$(window).on("scroll",this._scrollStop):this.draggableObj=new $.draggable({handle:n.find(".pop_video_title"),target:n,type:"",onUp:function(){var i=parseInt(n.css("top")),o=parseInt(n.css("left"));(0>i||0>o)&&(i=0>i?5:i,o=0>o?5:o,e.setPosition(o,i))}})},setPosition:function(i,e){var o=this,t=$("#pop_video");if(0!==i&!i&&0!==e&&!e){var s=$(document),n=$(window),p=o._isFuckingIE?[s.scrollLeft(),s.scrollTop()]:[0,0];i=p[0]+(n.width()-t.outerWidth()-5),e=p[1]+(n.height()-t.outerHeight())/2,e=e>=0?e:0}t.css({left:i,top:e,right:"auto",bottom:"auto"})},_resize:function(){0!=$("#pop_video").length&&this.setPosition()},_scrollStop:function(){$("#pop_video").css("top",$(document).scrollTop()+($(window).height()-$("#pop_video").height())/2)}}});var T,baidu=T=baidu||{version:"1.5.0"};baidu.guid="$BAIDU$",window[baidu.guid]=window[baidu.guid]||{},baidu.fn=baidu.fn||{},baidu.fn.blank=function(){},baidu.string=baidu.string||{},baidu.string.format=function(t,e){t=String(t);var i=Array.prototype.slice.call(arguments,1),n=Object.prototype.toString;return i.length?(i=1==i.length&&null!==e&&/\[object Array\]|\[object Object\]/.test(n.call(e))?e:i,t.replace(/#\{(.+?)\}/g,function(t,e){var s=i[e];return"[object Function]"==n.call(s)&&(s=s(e)),"undefined"==typeof s?"":s})):t},baidu.format=baidu.string.format,baidu.object=baidu.object||{},baidu.object.each=function(t,e){var i,n,s;if("function"==typeof e)for(n in t)if(t.hasOwnProperty(n)&&(s=t[n],i=e.call(t,s,n),i===!1))break;return t},baidu.extend=baidu.object.extend=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},baidu.number=baidu.number||{},baidu.number.pad=function(t,e){var i="",n=0>t,s=String(Math.abs(t));return s.length=2;i--)try{var n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);if(n){var s=n.GetVariable("$version");return s.replace(/WIN/g,"").replace(/,/g,".")}}catch(a){}}(),baidu.string.encodeHTML=function(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},baidu.encodeHTML=baidu.string.encodeHTML,baidu.swf.createHTML=function(t){t=t||{};var e,i,n,s,a,r,o=baidu.swf.version,u=t.ver||"6.0.0",l={},h=baidu.string.encodeHTML;for(s in t)l[s]=t[s];if(t=l,!o)return"";for(o=o.split("."),u=u.split("."),n=0;3>n&&(e=parseInt(o[n],10),i=parseInt(u[n],10),!(e>i));n++)if(i>e)return"";var d=t.vars,c=["classid","codebase","id","width","height","align"];if(t.align=t.align||"middle",t.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",t.codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0",t.movie=t.url||"",delete t.vars,delete t.url,"string"==typeof d)t.flashvars=d;else{var g=[];for(s in d)r=d[s],g.push(s+"="+encodeURIComponent(r));t.flashvars=g.join("&")}var p=["n;n++)r=c[n],p.push(" ",r,'="',h(t[r]),'"');p.push(">");var f={wmode:1,scale:1,quality:1,play:1,loop:1,menu:1,salign:1,bgcolor:1,base:1,allowscriptaccess:1,allownetworking:1,allowfullscreen:1,seamlesstabbing:1,devicefont:1,swliveconnect:1,flashvars:1,movie:1};for(s in t)r=t[s],s=s.toLowerCase(),f[s]&&(r||r===!1||0===r)&&p.push('');t.src=t.movie,t.name=t.id,delete t.id,delete t.movie,delete t.classid,delete t.codebase,t.type="application/x-shockwave-flash",t.pluginspage="http://www.macromedia.com/go/getflashplayer",p.push(""),p.join("")},baidu.swf.create=function(t,e){t=t||{};var i=baidu.swf.createHTML(t)||t.errorMessage||"";e&&"string"==typeof e&&(e=document.getElementById(e)),e?e.innerHTML=i:document.write(i)},function(){var t=window[baidu.guid];baidu.lang.guid=function(){return"TANGRAM__"+(t._counter++).toString(36)},t._counter=t._counter||1}(),window[baidu.guid]._instances=window[baidu.guid]._instances||{},baidu.lang.Class=function(t){this.guid=t||baidu.lang.guid(),window[baidu.guid]._instances[this.guid]=this},window[baidu.guid]._instances=window[baidu.guid]._instances||{},baidu.lang.Class.prototype.dispose=function(){delete window[baidu.guid]._instances[this.guid];for(var t in this)baidu.lang.isFunction(this[t])||delete this[t];this.disposed=!0},baidu.lang.Class.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"},baidu.lang.isString=function(t){return"[object String]"==Object.prototype.toString.call(t)},baidu.isString=baidu.lang.isString,baidu.lang.Event=function(t,e){this.type=t,this.returnValue=!0,this.target=e||null,this.currentTarget=null},baidu.lang.Class.prototype.addEventListener=function(t,e,i){if(baidu.lang.isFunction(e)){!this.__listeners&&(this.__listeners={});var n,s=this.__listeners;if("string"==typeof i&&i){if(/[^\w\-]/.test(i))throw"nonstandard key:"+i;e.hashCode=i,n=i}0!=t.indexOf("on")&&(t="on"+t),"object"!=typeof s[t]&&(s[t]={}),n=n||baidu.lang.guid(),e.hashCode=n,s[t][n]=e}},baidu.lang.Class.prototype.removeEventListener=function(t,e){if("undefined"==typeof e||(!baidu.lang.isFunction(e)||(e=e.hashCode))&&baidu.lang.isString(e)){!this.__listeners&&(this.__listeners={}),0!=t.indexOf("on")&&(t="on"+t);var i=this.__listeners;if(i[t])if("undefined"!=typeof e)i[t][e]&&delete i[t][e];else for(var n in i[t])delete i[t][n]}},baidu.lang.Class.prototype.dispatchEvent=function(t,e){baidu.lang.isString(t)&&(t=new baidu.lang.Event(t)),!this.__listeners&&(this.__listeners={}),e=e||{};for(var i in e)t[i]=e[i];var i,n=this.__listeners,s=t.type;if(t.target=t.target||this,t.currentTarget=this,0!=s.indexOf("on")&&(s="on"+s),baidu.lang.isFunction(this[s])&&this[s].apply(this,arguments),"object"==typeof n[s])for(i in n[s])n[s][i].apply(this,arguments);return t.returnValue},baidu.lang.createClass=function(t,e){e=e||{};var i=e.superClass||baidu.lang.Class,n=function(){i!=baidu.lang.Class?i.apply(this,arguments):i.call(this),t.apply(this,arguments)};n.options=e.options||{};var s=function(){},a=t.prototype;s.prototype=i.prototype;var r=n.prototype=new s;for(var o in a)r[o]=a[o];return"string"==typeof e.className&&(r._className=e.className),r.constructor=a.constructor,n.extend=function(t){for(var e in t)n.prototype[e]=t[e];return n},n},baidu.lang.inherits=function(t,e,i){var n,s,a=t.prototype,r=new Function;r.prototype=e.prototype,s=t.prototype=new r;for(n in a)s[n]=a[n];t.prototype.constructor=t,t.superClass=e.prototype,"string"==typeof i&&(s._className=i)},baidu.inherits=baidu.lang.inherits,baidu.lang.isBoolean=function(t){return"boolean"==typeof t},baidu.lang.isElement=function(t){return!(!t||!t.nodeName||1!=t.nodeType)},baidu.lang.isNumber=function(t){return"[object Number]"==Object.prototype.toString.call(t)&&isFinite(t)},baidu.lang.isObject=function(t){return"function"==typeof t||!(!t||"object"!=typeof t)},baidu.isObject=baidu.lang.isObject,baidu.fn.bind=function(t,e){var i=arguments.length>2?[].slice.call(arguments,2):null;return function(){var n=baidu.lang.isString(t)?e[t]:t,s=i?i.concat([].slice.call(arguments,0)):arguments;return n.apply(e||n,s)}},baidu.each=baidu.array.forEach=baidu.array.each=function(t,e,i){var n,s,a,r=t.length;if("function"==typeof e)for(a=0;r>a&&(s=t[a],n=e.call(i||t,s,a),n!==!1);a++);return t},baidu.array.some=function(t,e,i){for(var n=0,s=t.length;s>n;n++)if(n in t&&e.call(i||t,t[n],n))return!0;return!1},baidu.browser.chrome=/chrome\/(\d+\.\d+)/i.test(navigator.userAgent)?+RegExp.$1:void 0,baidu.browser.firefox=/firefox\/(\d+\.\d+)/i.test(navigator.userAgent)?+RegExp.$1:void 0,baidu.browser.isWebkit=/webkit/i.test(navigator.userAgent);try{/(\d+\.\d+)/.test(external.max_version)&&(baidu.browser.maxthon=+RegExp.$1)}catch(e){}!function(){var t=navigator.userAgent;baidu.browser.safari=/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(t)&&!/chrome/i.test(t)?+(RegExp.$1||RegExp.$2):void 0}(),baidu.dom=baidu.dom||{},baidu.dom.g=function(t){return"string"==typeof t||t instanceof String?document.getElementById(t):t&&t.nodeName&&(1==t.nodeType||9==t.nodeType)?t:null},baidu.g=baidu.G=baidu.dom.g,baidu.dom._styleFixer=baidu.dom._styleFixer||{},baidu.dom._styleFilter=baidu.dom._styleFilter||[],baidu.dom._styleFilter.filter=function(t,e,i){for(var n,s=0,a=baidu.dom._styleFilter;n=a[s];s++)(n=n[i])&&(e=n(t,e));return e},baidu.string.toCamelCase=function(t){return t.indexOf("-")<0&&t.indexOf("_")<0?t:t.replace(/[-_][^-_]/g,function(t){return t.charAt(1).toUpperCase()})},baidu.dom.setStyle=function(t,e,i){var n,s=baidu.dom;return t=s.g(t),e=baidu.string.toCamelCase(e),(n=s._styleFilter)&&(i=n.filter(e,i,"set")),n=s._styleFixer[e],n&&n.set?n.set(t,i):t.style[n||e]=i,t},baidu.setStyle=baidu.dom.setStyle,baidu.dom.setStyles=function(t,e){t=baidu.dom.g(t);for(var i in e)baidu.dom.setStyle(t,i,e[i]);return t},baidu.setStyles=baidu.dom.setStyles,baidu.dom._NAME_ATTRS=function(){var t={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",usemap:"useMap",frameborder:"frameBorder"};return baidu.browser.ie<8?(t["for"]="htmlFor",t["class"]="className"):(t.htmlFor="for",t.className="class"),t}(),baidu.dom.setAttr=function(t,e,i){return t=baidu.dom.g(t),"style"==e?t.style.cssText=i:(e=baidu.dom._NAME_ATTRS[e]||e,t.setAttribute(e,i)),t},baidu.setAttr=baidu.dom.setAttr,baidu.dom.setAttrs=function(t,e){t=baidu.dom.g(t);for(var i in e)baidu.dom.setAttr(t,i,e[i]);return t},baidu.setAttrs=baidu.dom.setAttrs,baidu.dom.create=function(t,e){var i=document.createElement(t),n=e||{};return baidu.dom.setAttrs(i,n)},baidu.cookie=baidu.cookie||{},baidu.cookie._isValidKey=function(t){return new RegExp('^[^\\x00-\\x20\\x7f\\(\\)<>@,;:\\\\\\"\\[\\]\\?=\\{\\}\\/\\u0080-\\uffff]+$').test(t)},baidu.cookie.getRaw=function(t){if(baidu.cookie._isValidKey(t)){var e=new RegExp("(^| )"+t+"=([^;]*)(;|$)"),i=e.exec(document.cookie);if(i)return i[2]||null}return null},baidu.cookie.get=function(t){var e=baidu.cookie.getRaw(t);return"string"==typeof e?e=decodeURIComponent(e):null},baidu.cookie.setRaw=function(t,e,i){if(baidu.cookie._isValidKey(t)){i=i||{};var n=i.expires;"number"==typeof i.expires&&(n=new Date,n.setTime(n.getTime()+i.expires)),document.cookie=t+"="+e+(i.path?"; path="+i.path:"")+(n?"; expires="+n.toGMTString():"")+(i.domain?"; domain="+i.domain:"")+(i.secure?"; secure":"")}},baidu.cookie.remove=function(t,e){e=e||{},e.expires=new Date(0),baidu.cookie.setRaw(t,"",e)},baidu.cookie.set=function(t,e,i){baidu.cookie.setRaw(t,encodeURIComponent(e),i)},baidu.sio=baidu.sio||{},baidu.sio._createScriptTag=function(t,e,i){t.setAttribute("type","text/javascript"),i&&t.setAttribute("charset",i),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t)},baidu.sio._removeScriptTag=function(t){if(t.clearAttributes)t.clearAttributes();else for(var e in t)t.hasOwnProperty(e)&&delete t[e];t&&t.parentNode&&t.parentNode.removeChild(t),t=null},baidu.sio.callByServer=function(t,e,i){function n(t){return function(){try{t?l.onfailure&&l.onfailure():(e.apply(window,arguments),clearTimeout(a)),window[s]=null,delete window[s]}catch(i){}finally{baidu.sio._removeScriptTag(o)}}}var s,a,r,o=document.createElement("SCRIPT"),u="bd__cbs__",l=i||{},h=l.charset,d=l.queryField||"callback",c=l.timeOut||0,g=new RegExp("(\\?|&)"+d+"=([^&]*)");baidu.lang.isFunction(e)?(s=u+Math.floor(2147483648*Math.random()).toString(36),window[s]=n(0)):baidu.lang.isString(e)?s=e:(r=g.exec(t))&&(s=r[2]),c&&(a=setTimeout(n(1),c)),t=t.replace(g,"$1"+d+"="+s),t.search(g)<0&&(t+=(t.indexOf("?")<0?"?":"&")+d+"="+s),baidu.sio._createScriptTag(o,t,h)};var mbox=mbox||{};T.extend(mbox,{namespace:function(){var t,e,i,n=arguments,s=null;for(t=0,len=n.length;len>t;t++)for(i=(""+n[t]).split("."),s=mbox,e="mbox"==i[0]?1:0;e=i?(n.reset(),n._timerComplete()):(n._currentCount++,n._listener(e,n._currentCount))},e)}},addEventListener:function(t,e){"timer"==t?(this._listener=e,this._timer=this._createTimer(this._delay,this._repeatCount)):"timerComplete"==t&&(this._timerComplete=e)},reset:function(){this.stop(),1==this._repeatCount&&(this._timer=this._createTimer(this._delay,this._repeatCount)),this._currentCount=0,this._remain=this._delay,this._startTime=this._endTime=0},start:function(){this._timerID||(this._timerID=this._timer(),1==this._repeatCount&&(this._startTime=(new Date).getTime()),this._isRunning=!0)},stop:function(){this._timerID&&(1==this._repeatCount?t.clearTimeout(this._timerID):t.clearInterval(this._timerID),this._timerID=null,this._isRunning=!1)},pause:function(){1==this._repeatCount?this._timerID&&(this.stop(),this._endTime=(new Date).getTime(),this._remain=this._remain-(this._endTime-this._startTime),this._remain>0?this._timer=this._createTimer(this._remain,1):this.reset()):this.stop()},getCurrentCount:function(){return this._currentCount},isRunning:function(){return this._isRunning}},e}(window),StopWatch:function(){var t=0,e=function(){this.startTime=0,this.isRunning=!1,this.isReset=!0,this.passedTime=0,t++};return e.prototype={reset:function(){this.startTime=0,this.pauseTime=0,this.passedTime=0,this.isRunning=!1,this.isReset=!0},start:function(){this.isReset?(this.reset(),this.startTime=(new Date).getTime()):this.isRunning||(this.startTime=(new Date).getTime()),this.isRunning=!0,this.isReset=!1},pause:function(){!this.isReset&&this.isRunning&&(this.pauseTime=(new Date).getTime(),this.passedTime+=this.pauseTime-this.startTime,this.isRunning=!1)},isRunning:function(){return this.isRunning},isReset:function(){return this.isReset},getTime:function(){return this.isReset?0:this.isRunning?(new Date).getTime()-this.startTime+this.passedTime:this.passedTime},getCounts:function(){return t}},e}(window)}),mbox.namespace("mbox.lang"),T.extend(mbox.lang,{createClass:function(t,e){var i=T.lang.createClass(t,e);return i.prototype.removeEventListener=function(t,e){if("undefined"==typeof e||(!baidu.lang.isFunction(e)||(e=e.hashCode))&&baidu.lang.isString(e)){!this.__listeners&&(this.__listeners={});var i=t.split(".");t.length>1&&(t=i[0],e=i[1]),0!=t.indexOf("on")&&(t="on"+t);var n=this.__listeners;if(n[t])if("undefined"!=typeof e)n[t][e]&&delete n[t][e];else for(var s in n[t])delete n[t][s]}},i.extend=function(t){for(var e in t)i.prototype[e]=function(t,e){return T.lang.isFunction(t)?function(){this.dispatchEvent(e,{name:e,arguments:arguments});var i=t.apply(this,arguments);return i}:t}(t[e],e);return i},i}});var mbox=mbox||{};!function(){var t="mbox";mbox.CONF={instanceCallName:t,autoPlay:!1,autoNext:!1,engineArg:{audio:{constructorName:"PlayEngine_Audio"},fmp:{constructorName:"PlayEngine_FMP_MP3",args:{swfPath:"http://play.baidu.com/player/static/flash/fmp.swf",instanceName:t+".player"}}},logOpt:{ref:"pc_widget_tieba"},songLinkHost:{link:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.song.play&format=jsonp&bit=128&songid=",lrc:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.song.lry&fromat=jsonp&songid=",sug:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common&page_size=1&page_no=1&query="}}}(void 0);var PlayEngine_Interface=mbox.lang.createClass(function(){var t=0,e={mute:!1,volume:50},i=function(t){this.STATES={INIT:"init",READY:"ready",STOP:"stop",PLAY:"play",PAUSE:"pause",END:"end",BUFFERING:"buffering",PREBUFFER:"pre-buffer",ERROR:"error"},this.EVENTS={STATECHANGE:"player_playStateChange",POSITIONCHANGE:"player_positionChange",PROGRESS:"player_progress",ERROR:"player_error",INIT:"player_initSuccess",INITFAIL:"player_initFail"},t=t||{},this.mute="undefined"==typeof t.mute?e.mute:!!t.mute,this.volume="undefined"==typeof t.volume?e.volume:t.volume,this.ready=!1,this.url="",this.state=this.STATES.INIT,this.engineType="",this.stateStack=[this.STATES.INIT],this.supportMimeType=[]};return i.prototype={newId:function(){return"_m3_"+t++},init:function(){},reset:function(){},setUrl:function(){},getUrl:function(){return this.url},play:function(){},pause:function(){},stop:function(){},setMute:function(){},getMute:function(){return this.mute},setVolume:function(){},getVolume:function(){return this.volume},getState:function(){return""},setCurrentPosition:function(){},getCurrentPosition:function(){return 0},getLoadedPercent:function(){return 0},getLoadedBytes:function(){return 0},getTotalBytes:function(){return 0},getTotalTime:function(){return 0},getVersion:function(){return""},getEngineType:function(){return this.engineType},canPlayType:function(t){var e=this.getSupportMimeTypeList();return T.array.some(e,function(e){return t==e})},getSupportMimeTypeList:function(){return this.supportMimeType},setEventListener:function(t,e,i){var n=T.fn.bind(function(){return e.apply(this,arguments)},this);this.addEventListener(t,n,i)}},i}(window),{superClass:T.lang.Class,className:"PlayEngine_Interface"}),PlayEngine_Audio=mbox.lang.createClass(function(t){t=t||{},this.engineType="audio",this.contentType={mp3:["audio/mpeg","audio/mp3"],mp4:["audio/mp4","audio/MP4A-LATM","video/mpeg4","audio/mpeg4-generic"],m4a:["audio/mp4","audio/MP4A-LATM","video/mpeg4","audio/mpeg4-generic"],aac:["audio/aac","audio/aacp"],"3gp":["audio/3gpp","audio/3gpp2"],ogg:["audio/ogg","video/ogg","application/ogg","audio/vorbis"],oga:["audio/ogg","application/ogg","audio/vorbis"],wma:["audio/x-ms-wma"]},this.supportAudio="undefined"!=typeof Audio,this.supportMimeType=[],this.supportAudio&&(this.audio=new Audio,"function"==typeof this.audio.canPlayType&&T.object.each(this.contentType,T.fn.bind(function(t,e){for(var i=0;i=0&&n[1]-s[1]>=0?!0:(t&&this.dispatchEvent(this.EVENTS.INITFAIL,{engineType:this.engineType}),!1)}return t&&this.dispatchEvent(this.EVENTS.INITFAIL,{engineType:this.engineType}),!1}}),PlayEngine=mbox.lang.createClass(function(t){t=t||{},this.subEnginesConf=[],this.subEnginesInitArgs={},this.curEngine=null,this.curEngineType="",this.unInitEngineList=[],this.engineList=[],this.engineTypeList=[],this.ready=!1,this.defaultExt=".mp3",this.coreContainer=null,this.EVENTS={STATECHANGE:"player_playStateChange",POSITIONCHANGE:"player_positionChange",PROGRESS:"player_progress",ERROR:"player_error",INIT:"player_initSuccess",INITFAIL:"player_initFail"},this.STATES={INIT:"init",READY:"ready",STOP:"stop",PLAY:"play",PAUSE:"pause",END:"end",BUFFERING:"buffering",PREBUFFER:"pre-buffer",ERROR:"error"},this.progressTimer=new mbox.Timer(200,0),this.positionTimer=new mbox.Timer(100,0),this._initEngines(t)},{className:"PlayEngine"}).extend({_error:function(t){throw new Error(t)},_initEngines:function(config){this.coreContainer=config.el||null,this.subEnginesConf=config.subEngines||[],T.array.each(this.subEnginesConf,T.fn.bind(function(item,index){var subEngineName=item.constructorName,args=item.args||{},subEngineConstructor;this.subEnginesInitArgs[subEngineName]=args;try{if(subEngineConstructor=eval(subEngineName),!T.lang.isFunction(subEngineConstructor))return}catch(e){return}var engine=new subEngineConstructor(args);this.unInitEngineList.push(engine)},this)),this.curEngine=this.unInitEngineList[0]},init:function(t){if(this.ready)return this._error("");if(t=t||{},this.subEnginesInitArgs=t.subEngines?t.subEngines:this.subEnginesInitArgs,this.coreContainer=t.el?t.el:this.coreContainer,!this.coreContainer){var e=T.dom.create("div",{id:"_player_container_"+T.lang.guid()});T.dom.setStyles(e,{width:"1px",height:"1px",overflow:"hidden"}),document.body.appendChild(e),this.coreContainer=t.el=e}T.array.each(this.unInitEngineList,T.fn.bind(function(t){var e=t.toString(),i="",n=/^\[object (.*)\]$/i;n.test(e)&&(i=RegExp.$1);var s=this.subEnginesInitArgs[i]||{};t.test(!0)&&(s.instanceName=s.instanceName+".engineList["+this.engineList.length+"]",s.el=s.el||this.coreContainer,this.engineList.push(t),t.init.apply(t,[s]))},this)),this.switchEngineByUrl(this.defaultExt),this.ready=!0,this._initProgressEvent(),this._initPositionChangeEvent()},canPlayType:function(t){return T.array.some(this.engineList,function(e){return e.canPlayType(t)})},getSupportMimeTypeList:function(){var t=[];return T.array.each(this.engineList,T.fn.bind(function(e){t=t.concat(e.getSupportMimeTypeList())},this)),t},switchEngineByUrl:function(t){var e=T.array.some(this.engineList,T.fn.bind(function(e){var i=e.getSupportMimeTypeList().join("|"),n=new RegExp("\\.("+i+")(\\?|$)","ig");return n.test(t)?(this.curEngine=e,this.curEngineType=e.getEngineType(),!0):void 0},this)),i=arguments[1];e||i||arguments.callee.apply(this,[this.defaultExt,!0])},switchEngineByMimeType:function(t){T.array.some(this.engineList,T.fn.bind(function(e){return e.canPlayType(t)?(this.curEngine=e,this.curEngineType=e.getEngineType(),!0):void 0},this))},reset:function(){this.curEngine.reset.apply(this.curEngine,arguments)},setUrl:function(t){var e=this.curEngine;this.switchEngineByUrl(t),e&&e!=this.curEngine&&e.stop(),this.curEngine&&this.curEngine.setUrl.apply(this.curEngine,arguments)},getUrl:function(){return this.curEngine.getUrl.apply(this.curEngine,arguments)},play:function(t){return"undefined"!=typeof t?this.setCurrentPosition(t):this.curEngine?this.curEngine.play.apply(this.curEngine,arguments):void 0},pause:function(){return this.curEngine?this.curEngine.pause.apply(this.curEngine,arguments):void 0},stop:function(){return this.curEngine?this.curEngine.stop.apply(this.curEngine,arguments):void 0},setMute:function(){var t=arguments;T.array.each(this.engineList,function(e){e.setMute.apply(e,t)})},getMute:function(){return this.curEngine?this.curEngine.getMute.apply(this.curEngine,arguments):!1},setVolume:function(){var t=arguments;T.array.each(this.engineList,function(e){e.setVolume.apply(e,t)})},getVolume:function(){return this.curEngine?this.curEngine.getVolume.apply(this.curEngine,arguments):0},setCurrentPosition:function(){return this.curEngine?this.curEngine.setCurrentPosition.apply(this.curEngine,arguments):void 0},getCurrentPosition:function(){return this.curEngine?this.curEngine.getCurrentPosition.apply(this.curEngine,arguments):0},getCurrentPositionString:function(){return mbox.convertTime(this.getCurrentPosition())},getLoadedPercent:function(){return this.curEngine?this.curEngine.getLoadedPercent.apply(this.curEngine,arguments):0},getLoadedBytes:function(){return this.curEngine?this.curEngine.getLoadedBytes.apply(this.curEngine,arguments):void 0},getTotalBytes:function(){return this.curEngine?this.curEngine.getTotalBytes.apply(this.curEngine,arguments):0},getTotalTime:function(){return this.curEngine?this.curEngine.getTotalTime.apply(this.curEngine,arguments):0},getTotalTimeString:function(){return mbox.convertTime(this.getTotalTime())},getCurEngine:function(){return this.curEngine},getEngineType:function(){return this.getCurEngine().getEngineType()},getVersion:function(){var t={};return T.array.each(this.engineList,function(e){t[e.getEngineType()]=e.getVersion()}),t},getState:function(){return this.curEngine?this.curEngine.getState.apply(this.curEngine,arguments):null},setEventListener:function(t,e,i){var n;n=t==this.EVENTS.INITFAIL||t==this.EVENTS.INIT?T.fn.bind(function(){e.apply(this,arguments)},this):T.fn.bind(function(t){t.target&&t.target.getEngineType()==this.curEngineType&&e.apply(this,arguments)},this),T.array.each(this.unInitEngineList,function(e){e.setEventListener(t,n,i) })},removeEventListener:function(t,e){T.array.each(this.unInitEngineList,function(i){i.removeEventListener(t,e)})},_initProgressEvent:function(){this.progressTimer.addEventListener("timer",T.fn.bind(function(){var t=this.getLoadedPercent();this.curEngine.dispatchEvent(this.EVENTS.PROGRESS,{progress:t,totalBytes:this.getTotalBytes(),loadedBytes:this.getLoadedBytes(),totalTime:this.getTotalTime()}),1==t&&"wmp"!=this.curEngineType&&this.progressTimer.stop()},this)),this.setEventListener(this.EVENTS.STATECHANGE,T.fn.bind(function(t){var e=t.newState;switch(e){case this.STATES.PREBUFFER:case this.STATES.PLAY:this.getLoadedPercent()<1&&this.progressTimer.start();break;case this.STATES.STOP:case this.STATES.READY:case this.STATES.END:this.progressTimer.reset()}},this)),this.setEventListener("setUrl",T.fn.bind(function(){this.progressTimer.reset(),this.progressTimer.start()},this))},_initPositionChangeEvent:function(){this.positionTimer.addEventListener("timer",T.fn.bind(function(){var t=this.getCurrentPosition();this.curEngine.dispatchEvent(this.EVENTS.POSITIONCHANGE,{position:t})},this)),this.setEventListener(this.EVENTS.STATECHANGE,T.fn.bind(function(t){var e=t.newState;switch(e){case this.STATES.PLAY:this.positionTimer.start();break;case this.STATES.STOP:case this.STATES.PAUSE:this.positionTimer.pause(),this.curEngine.dispatchEvent(this.EVENTS.POSITIONCHANGE,{position:this.getCurrentPosition()});break;case this.STATES.READY:case this.STATES.END:this.positionTimer.reset()}},this)),this.setEventListener("setUrl",T.fn.bind(function(){this.positionTimer.reset()},this))}});mbox.SongModel=function(t){t=t||{},this.hasLink=!1,this.songId=0,this.songName="",this.artistId=0,this.artistName="",this.albumId=0,this.albumName="",this.songPicSmall="",this.songPicBig="",this.songPicRadio="",this.lrcLink="",this.time=0,this.songLink="",this.showLink="",this.format="",this.rate=0,this.size=0,this.lyricContent="",this.relateStatus=0,this.resourceType=0,this.copyType=0;for(var e in t){var i=t[e];if(!T.isString(this[e])&&""!=i){var n=+i;n==i?i=n:null==i&&(i="")}this[e]=i}},mbox.SongModel.prototype={set:function(t){for(var e in t){var i=t[e];if(!T.isString(this[e])&&""!=i){var n=+i;n==i?i=n:null==i&&(i="")}this[e]=i}},get:function(t){return this[t]},unset:function(t){delete this[t]}},function(){var t=T.lang.createClass(function(){this.allSongCache={},this.apiAddress=mbox.CONF.songLinkHost.link,this.lrcAddress=mbox.CONF.songLinkHost.lrc,this.sugAddress=mbox.CONF.songLinkHost.sug}).extend({createSongModel:function(t,e){var i=[],t=T.lang.toArray(t),e=T.lang.toArray(e);return T.each(t,function(t){t&&"null"!==t&&"undefined"!==t&&(this.allSongCache[t]||(this.allSongCache[t]=new mbox.SongModel({songId:t})),i.push(this.allSongCache[t]))},this),T.object.each(e,function(t){this.allSongCache[t.queryId||t.id]&&this.allSongCache[t.queryId||t.id].set(t)},this),i},fetchIdByQuery:function(t,e){var i=t.split("$$"),n=i[0]||i[2],s=i[1];T.sio.callByServer(this.sugAddress+n+" "+s,function(i){e(i.song_list&&i.song_list.length?i.song_list[0].song_id:t)})},fetchSong:function(t,e){t.hasLink?T.lang.isFunction(e.success)&&e.success(t,this):t.songId.toString().indexOf("$$")>-1?this.fetchIdByQuery(t.songId,T.fn.bind(function(i){T.sio.callByServer(this.apiAddress+i,function(i){if(22e3===i.error_code){var n=i.songinfo,s=i.bitrate;if(n.extra){var a=n.extra.split("$$");n.song_id=n.extra,n.title=a[0]||a[2],n.author=a[1]}t.set({hasLink:!0,songId:n.song_id,songName:n.title,artistId:n.ting_uid,artistName:n.author,albumId:n.album_id,albumName:n.album_title,songPicBig:n.pic_big,songPicSmall:n.pic_small||"http://mu9.bdstatic.com/player/t/i/JJn494Tv.jpg",songPicRadio:n.pic_radio,resourceType:n.resource_type,relateStatus:n.relate_status,copyType:n.copy_type,lrcLink:n.lrclink,rate:s.file_bitrate,songLink:s.file_link,showLink:s.show_link,format:s.file_extension,size:s.file_size,time:s.file_duration}),T.lang.isFunction(e.success)&&e.success(t,this)}else T.lang.isFunction(e.error)&&e.error(t,i.error_code)})},this)):T.sio.callByServer(this.apiAddress+t.songId,function(i){if(22e3===i.error_code){var n=i.songinfo,s=i.bitrate;if(n.extra){var a=n.extra.split("$$");n.song_id=n.extra,n.title=a[0]||a[2],n.author=a[1]}t.set({hasLink:!0,songId:n.song_id,songName:n.title,artistId:n.ting_uid,artistName:n.author,albumId:n.album_id,albumName:n.album_title,songPicBig:n.pic_big,songPicSmall:n.pic_small||"http://mu9.bdstatic.com/player/t/i/JJn494Tv.jpg",songPicRadio:n.pic_radio,resourceType:n.resource_type,relateStatus:n.relate_status,copyType:n.copy_type,lrcLink:n.lrclink,rate:s.file_bitrate,songLink:s.file_link,showLink:s.show_link,format:s.file_extension,size:s.file_size,time:s.file_duration}),T.lang.isFunction(e.success)&&e.success(t,this)}else T.lang.isFunction(e.error)&&e.error(t,i.error_code)})},getLrcContent:function(t,e){var i=T.lang.isFunction,n=i(e)?e:i(e.success)?e.success:function(){},s=i(e.error)?e.error:function(){};t.lrcContent?n(t.lrcContent):t.songLink&&t.lrcLink?T.sio.callByServer(this.lrcAddress+t.songId,function(e){e.lrcContent?(t.lrcContent=e.lrcContent,n(e.lrcContent)):s()}):s()}});mbox.SongDataModel=new t}(void 0),function(){var t={RANDOM:0,SINGLE:1,CYCLE:2};mbox.PlayList=T.lang.createClass(function(){this.curSongIndex=-1,this.curSong=null,this.songModels=[],this.mode=t.SINGLE}).extend({_random:function(){return parseInt(Math.random()*this.getLength(),10)},addSong:function(t){t=T.lang.toArray(t),t.length&&(this.songModels=this.songModels.concat(t),this.dispatchEvent("add:songModels",{songModels:t}))},removeSong:function(t){if(-1===t)this.reset(),this.dispatchEvent("remove:songModels",{indexes:e});else{var e=T.lang.toArray(t),i=e.length;if(i){e.sort(function(t,e){return t-e});for(var n=this.curSongIndex,s=n,a=!1;i--;){var r=e[i];this.songModels.splice(r,1),-1!==s&&(r===n&&(a=!0),n>=r&&n--)}a&&n++,-1!==s&&(0>n&&songlist.length>0?(n=0,a=!0):n>songlist.length-1&&(n=0)),a&&(this.curSong=songlist[n],this.curSongIndex=n),this.dispatchEvent("remove:songModels",{indexes:e})}}},prev:function(){var e=this.getLength(),i=-1===this.curSongIndex?0:(this.curSongIndex+e-1)%e;e&&this.setCurIndex(this.mode===t.RANDOM?this._random():i)},next:function(){var e=this.getLength(),i=(this.curSongIndex+1)%e;e&&this.setCurIndex(this.mode===t.RANDOM?this._random():i)},autoNext:function(){this.mode===t.SINGLE?this.setCurIndex(this.curSongIndex):this.next()},setCurIndex:function(t){this.curSongIndex=t,this.setCurSong(this.songModels[t]),this.dispatchEvent("change:curSongIndex",{index:t})},setCurSong:function(t){this.curSong=t,this.dispatchEvent("change:curSong",{curSong:t})},getCurIndex:function(){return this.curSongIndex},getCurSong:function(){return this.curSong},getSongList:function(){return this.songModels},setMode:function(t){this.mode=t},getMode:function(){return this.mode},getLength:function(){return this.songModels.length},reset:function(){this.curSongIndex=-1,this.curSong=null,this.songModels=[],this.playlist=[]},fetchLink:function(t){mbox.SongDataModel.fetchSong(this.curSong,t)}})}(),mbox.LogModel=T.lang.createClass(function(t,e){this.logUrl="http://nsclick.baidu.com/v.gif",this.playerRules={},this.playerRuleCtrl=null,this.player=t,this.playList=e,this.initLog()}).extend({initLog:function(){{var t=this;new mbox.PlayerLog({time:100,resetOnNoVoice:!0,type:"play100ms",player:this.player,handler:function(){t.sendLog("playsong100ms",t.logUrl,{sendCurSong:!0})}}),new mbox.PlayerLog({time:6e4,resetOnNoVoice:!1,type:"play60s",player:this.player,handler:function(){t.sendLog("60play",t.logUrl,{sendCurSong:!0})}})}this.player.setEventListener("setUrl",function(){t.sendLog("playstart",t.logUrl,{sendCurSong:!0})})},_addCurSong:function(t){var e={song_id:"songId",song_title:"songName",singer_id:"artistId",singer_name:"artistName",album_id:"albumId",album_name:"albumName",copytype:"copyType",format:"format",queryid:"queryId",rate:"rate",relatestatus:"relateStatus",resourcetype:"resourceType",songsize:"size",linkCode:"linkCode",lrcLink:"lrcLink",time:"time",status:"status",from:"from",link:"songLink"},i=this.playList.getCurSong();T.object.each(e,function(e,n){t.push(n+"="+encodeURIComponent(null==i[e]?"":i[e]))})},sendLog:function(t,e,i){var n=[],s=(new Date).getTime();window["naga_log_"+s]=new Image;var a=window["naga_log_"+s];n.push("pid=304"),n.push("url="),n.push("type="+t),i.sendCurSong&&this._addCurSong(n),i.pos&&n.push("pos="+i.pos),n.push("r"+Math.random()+"=1"),mbox.CONF.logOpt&&(mbox.CONF.logOpt.ref||(mbox.CONF.logOpt.ref="pc_aldsinglebox"),T.object.each(mbox.CONF.logOpt,function(t,e){n.push(e+"="+t)})),i.otherInfo&&_.each(i.otherInfo,function(t,e){n.push(e+"="+encodeURIComponent(t+""||""))}),a.onload=function(){a=null;try{delete window["naga_log_"+s]}catch(t){}},a.src=e+"?"+n.join("&")}}),mbox.PlayerLog=function(t){this.type=t.type,this.time=t.time,this.resetOnNoVoice=t.resetOnNoVoice,this.player=t.player,this.active=!1,this.timer=null,this.handlers=[],t.handler&&this.handlers.push(t.handler),this._init()},mbox.PlayerLog.prototype={_init:function(){this.timer||null==this.time||(this.timer=new mbox.Timer(this.time,1),this.addHandler(this.handler),this.timer.addEventListener("timer",T.fn.bind(function(){for(var t=0,e=this.handlers.length;e>t;t++)this.handlers[t]&&this.handlers[t].apply(this,arguments)},this)));var t=this.player.EVENTS.STATECHANGE,e=this.player.STATES;this.player.setEventListener("setUrl",T.fn.bind(function(){this.active=!0,this.timer.reset()},this)),this.player.setEventListener(t,T.fn.bind(function(t){this.active&&(t.newState==e.PLAY?this.timer.start():this.resetOnNoVoice?this.timer.reset():t.newState==e.PAUSE||t.newState==e.BUFFERING?t.oldState==e.PLAY&&this.timer.pause():this.timer.reset())},this))},addHandler:function(t){this.handlers.push(t)}},mbox.PlayCtrl=mbox.lang.createClass(function(t){var e=[],i=mbox.CONF.instanceCallName,n=mbox.CONF.engineArg;"object"!=typeof window[i]&&(window[i]={}),/(macintosh|iphone|ipod|ipad)/i.test(navigator.userAgent)?(e.push(n.audio),e.push(n.fmp)):(e.push(n.fmp),e.push(n.audio)),this.player=window[i].player=new PlayEngine({subEngines:e}),this.player.init(),this.curSong=null,this.playList=new mbox.PlayList,this.log=new mbox.LogModel(this.player,this.playList),window[i].logger=this.log,this._init(t),mbox.CONF.exportAPI&&(window[i][mbox.CONF.exportAPI]=this.exportAPI())}).extend({_init:function(t){t=t||{};var e=this.player,i=this.playList,n=t.songId||[],s=mbox.SongDataModel.createSongModel(n),a=this,r=T.lang.isFunction;t.logOpt&&T.object.extend(mbox.CONF.logOpt||{},t.logOpt),e.setEventListener(e.EVENTS.POSITIONCHANGE,function(e){var i=e.position,n=a.getTotalTime();r(t.onPositionChange)&&t.onPositionChange(i,100*i/n||0)}),r(t.onProgressChange)&&e.setEventListener(e.EVENTS.PROGRESS,function(e){t.onProgressChange(100*e.progress)}),e.setEventListener(e.EVENTS.STATECHANGE,function(n){switch(r(t.onPlayStateChange)&&t.onPlayStateChange(n.newState,n.oldState),n.newState){case e.STATES.END:mbox.CONF.autoNext?(i.autoNext(),a.play()):e.stop()}}),i.addEventListener("change:curSong",function(i){e.stop(),(a.curSong=i.curSong)?a.playList.fetchLink({success:function(e){r(t.onChangeCurSong)&&t.onChangeCurSong(e),a.dispatchEvent("fetch:link",{song:e})},error:function(e){r(t.onChangeCurSong)&&t.onChangeCurSong(null,e)}}):r(t.onChangeCurSong)&&t.onChangeCurSong(null)}),i.addSong(s),this.playList.setCurIndex(0),(void 0!==t.autoPlay?t.autoPlay:mbox.CONF.autoPlay)&&this.play()},getCurSong:function(){return this.curSong},getTotalTime:function(){return this.curSong&&1e3*this.curSong.time||this.player.getTotalTime()},setPlayIndex:function(t,e){this.playList.setCurIndex(t),e&&this.play()},play:function(){if(this.curSong&&this.curSong.songLink)this.curSong.songLink!==this.player.getUrl()&&(this.player.reset(),this.player.setUrl(this.curSong.songLink)),this.player.play();else{var t=this;this.addEventListener("fetch:link",function(e){if(!e.song)throw"fetch songLink fail";t.player.setUrl(e.song.songLink),t.player.play(),t.removeEventListener("fetch:link.link")},"link")}},pause:function(){this.player.pause()},stop:function(){this.player.stop()},exportAPI:function(){var t=this,e=this.player.EVENTS;return{getCurSong:function(){return t.curSong},getTotalTime:function(){return t.totalTime},getPlayerState:function(){return t.player.getState()},getPosition:function(){return t.player.getPosition()},getProgress:function(){return t.player.getProgress()},play:function(){t.play.apply(t,arguments)},pause:function(){t.pause()},stop:function(){t.stop()},listenToStateChange:function(i){t.player.setEventListener(e.STATECHANGE,i)},listenToPosChange:function(i){t.player.setEventListener(e.POSITIONCHAGNE,i)},listenToLoadedPercentChange:function(i){t.player.setEventListener(e.PROGRESS,i)},getCurIndex:function(){return t.playList.getCurIndex()},addSong:function(e){var i=T.lang.toArray(e);i.length&&"object"!=typeof i[0]&&(i=mbox.SongDataModel.createSongModel(i)),t.playList.addSong(i)},removeSong:function(e){t.playList.removeSong(e)},setPlayIndex:function(e,i){this.setPlayIndex.call(t,e,i)},setPlayMode:function(e){t.playList.setMode(e)}}}}),mbox.uiConf={prefix:"mbox",allWidget:["slider","time","volume","mute","title","lrc","album","playList","playBtn"],tpl:'
    歌手:<%var i =0, len = all_artist.length; for(;len -i; i++){%> <%=all_artist[i]%><%};%> 专辑:<%=albumName%> 来源:
    <%=curTime%>/<%=totalTime%>
     
    '},function(t){var e="undefined"==typeof module?t.baidu=t.baidu||{}:module.exports;e.template=function(e,n){var s=function(){if(!t.document)return i._compile(e);var n=document.getElementById(e);if(n){if(i.cache[e])return i.cache[e];var s=/^(textarea|input)$/i.test(n.nodeName)?n.value:n.innerHTML;return i._compile(s)}return i._compile(e)}(),a=i._isObject(n)?s(n):s;return s=null,a};var i=e.template;i.versions=i.versions||[],i.versions.push("1.0.6"),i.cache={},i.LEFT_DELIMITER=i.LEFT_DELIMITER||"<%",i.RIGHT_DELIMITER=i.RIGHT_DELIMITER||"%>",i.ESCAPE=!0,i._encodeHTML=function(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/\\/g,"\").replace(/"/g,""").replace(/'/g,"'")},i._encodeReg=function(t){return String(t).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},i._encodeEventHTML=function(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\n/g,"\n").replace(/\\r/g,"\r")},i._compile=function(t){var e="var _template_fun_array=[];\nvar fn=(function(__data__){\nvar _template_varName='';\nfor(name in __data__){\n_template_varName+=('var '+name+'=__data__[\"'+name+'\"];');\n};\neval(_template_varName);\n_template_fun_array.push('"+i._analysisStr(t)+"');\n_template_varName=null;\n})(_template_object);\nfn = null;\nreturn _template_fun_array.join('');\n";return new Function("_template_object",e)},i._isObject=function(t){return"function"==typeof t||!(!t||"object"!=typeof t)},i._analysisStr=function(t){var e=i.LEFT_DELIMITER,n=i.RIGHT_DELIMITER,s=i._encodeReg(e),a=i._encodeReg(n);return t=String(t).replace(new RegExp("("+s+"[^"+a+"]*)//.*\n","g"),"$1").replace(new RegExp("","g"),"").replace(new RegExp(s+"\\*.*?\\*"+a,"g"),"").replace(new RegExp("[\\r\\t\\n]","g"),"").replace(new RegExp(s+"(?:(?!"+a+")[\\s\\S])*"+a+"|((?:(?!"+s+")[\\s\\S])+)","g"),function(t,e){var i="";if(e)for(i=e.replace(/\\/g,"\").replace(/'/g,"'");/<[^<]*?'[^<]*?>/g.test(i);)i=i.replace(/(<[^<]*?)'([^<]*?>)/g,"$1\r$2");else i=t;return i}),t=t.replace(new RegExp("("+s+"[\\s]*?var[\\s]*?.*?[\\s]*?[^;])[\\s]*?"+a,"g"),"$1;"+n).replace(new RegExp("("+s+":?[hvu]?[\\s]*?=[\\s]*?[^;|"+a+"]*?);[\\s]*?"+a,"g"),"$1"+n).split(e).join(" "),t=i.ESCAPE?t.replace(new RegExp("\\t=(.*?)"+a,"g"),"',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'"):t.replace(new RegExp("\\t=(.*?)"+a,"g"),"',typeof($1) === 'undefined'?'':$1,'"),t=t.replace(new RegExp("\\t:h=(.*?)"+a,"g"),"',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'").replace(new RegExp("\\t(?::=|-)(.*?)"+a,"g"),"',typeof($1)==='undefined'?'':$1,'").replace(new RegExp("\\t:u=(.*?)"+a,"g"),"',typeof($1)==='undefined'?'':encodeURIComponent($1),'").replace(new RegExp("\\t:v=(.*?)"+a,"g"),"',typeof($1)==='undefined'?'':baidu.template._encodeEventHTML($1),'").split(" ").join("');").split(n).join("_template_fun_array.push('").split("\r").join("\\'")}}(window),function(t,e){t.widget&&"function"===t.widget&&(t.box_widget=t.widget);var i=0,n=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(a){}s(e)},t.box_widget=function(e,i,n){var s,a,r,o,u=e.split(".")[0];e=e.split(".")[1],s=u+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[u]=t[u]||{},a=t[u][e],r=t[u][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),o=new i,o.options=t.box_widget.extend({},o.options),t.each(n,function(e,s){t.isFunction(s)&&(n[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,a=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=a,e}}())}),r.prototype=t.box_widget.extend(o,{widgetEventPrefix:e},n,{constructor:r,namespace:u,widgetName:e,widgetBaseClass:s,widgetFullName:s}),a?(t.each(a._childConstructors,function(e,i){var n=i.prototype;t.box_widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete a._childConstructors):i._childConstructors.push(r),t.box_widget.bridge(e,r)},t.box_widget.extend=function(i){for(var s,a,r=n.call(arguments,1),o=0,u=r.length;u>o;o++)for(s in r[o])a=r[o][s],r[o].hasOwnProperty(s)&&a!==e&&(i[s]=t.isPlainObject(a)?t.box_widget.extend({},i[s],a):a);return i},t.box_widget.bridge=function(i,s){var a=s.prototype.widgetFullName;t.fn[i]=function(r){var o="string"==typeof r,u=n.call(arguments,1),l=this;return r=!o&&u.length?t.box_widget.extend.apply(null,[r].concat(u)):r,this.each(o?function(){var n,s=t.data(this,a);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,u),n!==s&&n!==e?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}:function(){var e=t.data(this,a);e?e.option(r||{})._init():new s(r,this)}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.box_widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetName,this),t.data(n,this.widgetFullName,this),this._on({remove:"destroy"}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,n){var s,a,r,o=i;if(0===arguments.length)return t.box_widget.extend({},this.options);if("string"==typeof i)if(o={},s=i.split("."),i=s.shift(),s.length){for(a=o[i]=t.box_widget.extend({},this.options[i]),r=0;r=9||e.button?this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted):this._mouseUp(e)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target==this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){var e=5;t.box_widget("ui.box_slider",t.ui.box_mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",progressbar:!1,progress:0,constraintProgress:!1,range:!1,step:1,value:0,values:null},_create:function(){var i=this,n=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="",r=n.values&&n.values.length||1,o=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(n.disabled?" ui-slider-disabled ui-disabled":"")),this.range=t([]),n.range&&(n.range===!0&&(n.values||(n.values=[this._valueMin(),this._valueMin()]),n.values.length&&2!==n.values.length&&(n.values=[n.values[0],n.values[0]])),this.range=t("
    ").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===n.range||"max"===n.range?" ui-slider-range-"+n.range:""))),n.progressbar&&(this.progressbar=t("
    ").appendTo(this.element).addClass("ui-slider-progressbar ui-widget-header"));for(var u=s.length;r>u;u+=1)o.push(a);this.handles=s.add(t(o.join("")).appendTo(i.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(t){t.preventDefault()}).hover(function(){n.disabled||t(this).addClass("ui-state-hover ui-slider-handle-hover")},function(){t(this).removeClass("ui-state-hover ui-slider-handle-hover")}).focus(function(){n.disabled?t(this).blur():(t(".ui-slider .ui-state-focus").removeClass("ui-state-focus ui-slider-handle-focus"),t(this).addClass("ui-state-focus ui-slider-handle-focus"))}).blur(function(){t(this).removeClass("ui-state-focus ui-slider-handle-focus")}),this.handles.each(function(e){t(this).data("index.ui-slider-handle",e)}),this.handles.keydown(function(n){var s,a,r,o,u=t(this).data("index.ui-slider-handle");if(!i.options.disabled){switch(n.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n.preventDefault(),!i._keySliding&&(i._keySliding=!0,t(this).addClass("ui-state-active ui-slider-handle-active"),s=i._start(n,u),s===!1))return}switch(o=i.options.step,a=r=i.options.values&&i.options.values.length?i.values(u):i.value(),n.keyCode){case t.ui.keyCode.HOME:r=i._valueMin();break;case t.ui.keyCode.END:r=i._valueMax();break;case t.ui.keyCode.PAGE_UP:r=i._trimAlignValue(a+(i._valueMax()-i._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:r=i._trimAlignValue(a-(i._valueMax()-i._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(a===i._valueMax())return;r=i._trimAlignValue(a+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(a===i._valueMin())return;r=i._trimAlignValue(a-o)}i._slide(n,u,r)}}).keyup(function(e){var n=t(this).data("index.ui-slider-handle");i._keySliding&&(i._keySliding=!1,i._stop(e,n),i._change(e,n),t(this).removeClass("ui-state-active ui-slider-handle-active"))}),this._refreshValue(),this._refreshProgress(),this._animateOff=!1},destroy:function(){return this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy(),this},_mouseCapture:function(e){var i,n,s,a,r,o,u,l,h,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,r=this,this.handles.each(function(e){var i=Math.abs(n-r.values(e)); s>i&&(s=i,a=t(this),o=e)}),d.range===!0&&this.values(1)===d.min&&(o+=1,a=t(this.handles[o])),u=this._start(e,o),u===!1?!1:(this._mouseSliding=!0,r._handleIndex=o,a.addClass("ui-state-active ui-slider-handle-active").focus(),l=a.offset(),h=!t(e.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active ui-slider-handle-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,s,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),a=this._valueMin()+n*s,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,s,a;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&n>i)&&(i=n),i!==this.values(e)&&(s=this.values(),s[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:s}),n=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("change",t,i)}},_progress:function(t){var e={progress:this.options.progress};this._trigger("progress",t,e)},progress:function(t){var e=this._trimAlignProgress(t);return arguments.length&&this.options.progress!=e?(this.options.progress=e,this._refreshProgress(),this._progress(null),void(this.options.constraintProgress&&this.value()>e&&this.value(e))):this.options.progress},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,s,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,s=arguments[0],a=0;an;n+=1)this._change(null,n);this._animateOff=!1;break;case"progress":this._refreshProgress(),this._progress(null),this.options.constraintProgress&&this.options.value>this.options.progress&&(this._animateOff=!0,this.value(this.options.progress),this._animateOff=!1);break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._refreshProgress(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);for(i=this.options.values.slice(),n=0;n=this._valueMax())return this._valueMax();this.options.progressbar&&this.options.constraintProgress&&t>=this.options.progress&&(t=this.options.progress);var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_trimAlignProgress:function(t){return t<=this._valueMin()?this._valueMin():t>=this._valueMax()?this._valueMax():t},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,s,a,r=this.options.range,o=this.options,u=this,l=this._animateOff?!1:o.animate,h={};this.options.values&&this.options.values.length?this.handles.each(function(n){e=(u.values(n)-u._valueMin())/(u._valueMax()-u._valueMin())*100,h["horizontal"===u.orientation?"left":"bottom"]=e+"%",t(this).stop(1,1)[l?"animate":"css"](h,o.animate),u.options.range===!0&&("horizontal"===u.orientation?(0===n&&u.range.stop(1,1)[l?"animate":"css"]({left:e+"%"},o.animate),1===n&&u.range[l?"animate":"css"]({width:e-i+"%"},{queue:!1,duration:o.animate})):(0===n&&u.range.stop(1,1)[l?"animate":"css"]({bottom:e+"%"},o.animate),1===n&&u.range[l?"animate":"css"]({height:e-i+"%"},{queue:!1,duration:o.animate}))),i=e}):(n=this.value(),s=this._valueMin(),a=this._valueMax(),e=a!==s?(n-s)/(a-s)*100:0,h["horizontal"===u.orientation?"left":"bottom"]=e+"%",this.handle.stop(1,0)[l?"animate":"css"](h,o.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,0)[l?"animate":"css"]({width:e+"%"},o.animate),"max"===r&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-e+"%"},{queue:!1,duration:o.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,0)[l?"animate":"css"]({height:e+"%"},o.animate),"max"===r&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-e+"%"},{queue:!1,duration:o.animate}))},_refreshProgress:function(){var t=this.options,e=this._valueMax(),i=t.progress,n=i/e*100;this.progressbar&&this.progressbar.css("horizontal"===this.orientation?{width:n+"%"}:{height:n+"%"})},setLoading:function(t,e){var i;arguments.length<=1?(e=t,i=this.handle):i=this.handles.eq(t),i[e?"addClass":"removeClass"]("ui-slider-handle-loading")}}),t.extend(t.ui.box_slider,{version:"1.8.20"})}(jQuery),function(t){t.cutString=function(t,e,i){var n,s,a,r=t.length,o=0,u=0;for(s=0;r>s;s++)if(o+=t.charCodeAt(s)>128?2:1,o>e){n=t.substring(0,s-1)+"...";break}for(a=r;a>0;a--){if(s>=a||0===i)return n;if(u+=t.charCodeAt(s)>128?2:1,u>i)return n+=t.substring(a)}return t}}(jQuery),mbox.UiCtrl=mbox.lang.createClass(function(t,e){this.guid="mbox_ui_"+setTimeout(function(){},0),this.conf=e||mbox.uiConf,this.conf&&(this.widget={},this._init(t),this.EVENTS={POSITIONCHANGE:"ui_poschange",TOGGLEPLAY:"ui_toggleplay",VOLCHANGE:"ui_volchange",MUTECHANGE:"ui_mutechange"},this.volume=80,this.$root=$(t),this.active=!1)}).extend({_init:function(t){if(this.conf.tpl){for(var e=$(this.conf.tpl).appendTo(t||"body").css("display","none"),i=this.conf.allWidget,n=this.conf.prefix,s={},a=i.length-1;a>-1;a--){var r=e.find("."+n+"-"+i[a]),o=r.html();o=o&&o.replace(/<%/g,"<%").replace(/%>/g,"%>"),s[i[a]]={dom:r,tpl:o}}this.conf.domJson=s,e.css("display","block"),this.$root=e}var u=this.conf.domJson;for(var l in u)if(u.hasOwnProperty(l))switch(l){case"slider":this._initSlider(u[l]);break;case"volume":this.widget[l]=$(u[l].dom).box_slider({animate:!0,max:100,min:0,orientation:"horizental",progressbar:!1,range:"min",value:80}).bind("slide",T.fn.bind(function(t,e){this.active&&this.fireVolChange(+e.value,0===+e.value)},this)).bind("slidestop",T.fn.bind(function(){this.active||this.widget.volume.box_slider("option","value",this.volume)},this));break;case"mute":var h=this;this.widget[l]=$(u[l].dom).click(function(){var t=$(this).hasClass("mute");h.fireVolChange(h.volume,!t)});break;case"title":case"time":case"playList":case"album":this.widget[l]=$(u[l].dom),this.widget[l].tpl=u[l].tpl;break;case"playBtn":this.widget[l]=$(u[l].dom).bind("click",T.fn.bind(function(){var t=this.widget.playBtn.hasClass("stop");this.dispatchEvent(this.EVENTS.TOGGLEPLAY,{isPlay:t})},this))}this.conf.tpl&&this.tplToHtml()},_initSlider:function(t){var e=t.maxValue||1e4;this.widget.slider=$(t.dom).box_slider({animate:175,max:e,min:0,orientation:"horizontal",progressbar:!0,progress:0,constraintProgress:!0,range:"min",value:0}),this.widget.slider.maxValue=e,this.widget.slider.sliding=!1;var i=this;this.widget.slider.bind("slidestart",function(){i.widget.slider.isSliding=!0}).bind("slidestop",function(t,e){i.widget.slider.isSliding=!1,i.dispatchEvent(i.EVENTS.POSITIONCHANGE,{percent:e.value/i.widget.slider.maxValue}),!i.active&&i.widget.slider.box_slider("option","value",0)})},tplToHtml:function(t,e,i,n){function s(t){$(e).delegate("."+t,"click",function(){n.sendLog("click",n.logUrl,{pos:i[t]})})}if(this.widget.title){var a=this.createSongFilter(t);a.songName&&"该歌曲已下架"!==a.songName?this.widget.title.removeClass("grey"):this.widget.title.addClass("grey"),this.widget.title.html(baidu.template(this.widget.title.tpl,a))}if(this.widget.lrc&&this.widget.lrc.lrc("setLrc",""),this.widget.album){this.widget.album.html(baidu.template(this.widget.album.tpl,t));var r=this.widget.album.find("img");if(!r[0].src){var o=r.attr("data-src");o&&r.attr("src",o)}}this.widget.time&&this.widget.time.html(baidu.template(this.widget.time.tpl,{curTime:mbox.convertTime(0),totalTime:mbox.convertTime(0)}));for(var u in i)s(u)},fireVolChange:function(t,e){return this.active?(this.volume=t,e?(this.widget.mute&&this.widget.mute.addClass("mute").attr("title","取消静音"),this.widget.volume&&this.widget.volume.box_slider("option","value",0)):(this.widget.mute&&this.widget.mute.removeClass("mute").attr("title","静音"),this.widget.volume&&this.widget.volume.box_slider("option","value",this.volume)),this.dispatchEvent(this.EVENTS.VOLCHANGE,{volume:t}),this.dispatchEvent(this.EVENTS.MUTECHANGE,{mute:e}),!0):!1},setActive:function(t){this.active=t,this.$root[t?"addClass":"removeClass"]("active")},setShowLink:function(t,e){var i=t.showLink,n=i?$.cutString(i,16,5):"";("2"==t.resourceType.toString()||void 0===t.resourceType)&&($(e).find(".link-source a").text(n).attr("href",i),$(e).find(".source").show())},createSongFilter:function(t){var e,i,n=[],s=[],a=[];if(t){e="http://music.baidu.com/",n=t.artistId.toString().split(","),s=t.artistName.split(","),a=[];for(var r=0,o=s.length;o>r;r++)a[r]=n[r]?e+"artist/"+n[r]:"javascript:;";i={songId:t.songId,songName:t.songName||"该歌曲已下架",albumId:t.albumId,albumLink:t.albumId?e+"album/"+t.albumId:"javascript:;",albumName:t.albumName,all_artist:s,all_artist_id:n,all_artist_link:a}}else i={songId:"",songName:"",albumId:"",albumLink:"",albumName:"",all_artist:s,all_artist_id:n,all_artist_link:a};return i}}),function(){var t=function(t,e){if([].indexOf)return[].indexOf.call(t,e);for(var i=t.length-1;i>-1;i--)if(t[i]===e)return i;return-1};mbox.Controller=function(t){this.playctrl=t,this.uiList=[]},mbox.Controller.prototype={_init:function(){},bindUi:function(e,i){if(t(this.uiList,e)>-1||!e)return!1;if(i&&this.uiList.length>0)for(var n=this.uiList.length;n;n--)this.unbindUi(this.uiList[n-1]),this.uiList.splice(n-1,1);this.bindPlayerEvent(this.playctrl,e),this.bindSongInfoEvent(this.playctrl,e),this.bindPlayListEvent(this.playctrl,e),this.bindUIEvent(this.playctrl,e),this.uiList.push(e);var s=this.playctrl.player;return this._onPosition(e,s.getCurrentPosition()),this._onProgress(e,s.getLoadedPercent()),this._onState(e,s.getState()),e.setActive(!0),e.fireVolChange(e.volume,!e.volume),!0},unbindUi:function(t){var e,i=playctrl.player,n=t.guid,s=i.EVENTS,a=t.EVENTS;for(e in s)s.hasOwnProperty(e)&&i.removeEventListener(s[e]+"."+n);for(e in a)a.hasOwnProperty(e)&&t.removeEventListener(a[e]+"."+n);playctrl.removeEventListener("fetch:link."+n),t.setActive(!1)},bindPlayListEvent:function(){},bindPlayerEvent:function(t,e){var i=t.player,n=e.guid;i.setEventListener(i.EVENTS.POSITIONCHANGE,T.fn.bind(function(t){this._onPosition(e,t.position)},this),n),i.setEventListener(i.EVENTS.PROGRESS,T.fn.bind(function(t){this._onProgress(e,t.progress)},this),n),i.setEventListener(i.EVENTS.STATECHANGE,T.fn.bind(function(t){this._onState(e,t.newState)},this),n)},bindSongInfoEvent:function(t,e){t.addEventListener("fetch:link",T.fn.bind(function(t){this._onSongInfo(e,t.song)},this),e.guid)},bindUIEvent:function(t,e){var i=t.player;e.addEventListener(e.EVENTS.POSITIONCHANGE,function(e){i.setCurrentPosition(t.getTotalTime()*e.percent)},e.guid),e.addEventListener(e.EVENTS.VOLCHANGE,function(t){i.setVolume(t.volume)},e.guid),e.addEventListener(e.EVENTS.TOGGLEPLAY,function(e){t.player[e.isPlay?"play":"pause"]()},e.guid),e.addEventListener(e.EVENTS.MUTECHANGE,function(t){i.setMute(t.mute)},e.guid)},_onSongInfo:function(t,e){if(t.widget.title){var i=t.createSongFilter(e);i.songName&&"该歌曲已下架"!==i.songName?t.widget.title.removeClass("grey"):t.widget.title.addClass("grey"),t.widget.title.html(baidu.template(t.widget.title.tpl,i))}if(t.widget.lrc&&e&&mbox.SongDataModel.getLrcContent(e,{success:function(e){t.widget.lrc.lrc("setLrc",e)},error:function(){t.widget.lrc.lrc("setLrc","")}}),t.widget.album){t.widget.album.html(baidu.template(t.widget.album.tpl,e));var n=t.widget.album.find("img");if(!n[0].src){var s=n.attr("data-src");s&&n.attr("src",s)}}if(t.widget.time){var a=this.playctrl.getTotalTime();t.widget.time.html(baidu.template(t.widget.time.tpl,{curTime:mbox.convertTime(0),totalTime:mbox.convertTime(a)}))}},_onPosition:function(t,e){var i=this.playctrl.getTotalTime();t.widget.slider&&!t.widget.slider.isSliding&&t.widget.slider.box_slider("option","value",e*t.widget.slider.maxValue/i||0),t.widget.lrc&&t.widget.lrc.lrc("scrollTo",e),t.widget.time&&t.widget.time.html(baidu.template(t.widget.time.tpl,{curTime:mbox.convertTime(e),totalTime:mbox.convertTime(i)}))},_onProgress:function(t,e){t.widget.slider&&!t.widget.slider.sliding&&t.widget.slider.box_slider("progress",e*t.widget.slider.maxValue)},_onState:function(t,e){if(t.widget.playBtn){var i=this.playctrl.player;playing=e===i.STATES.PLAY||e===i.STATES.PREBUFFER||e===i.STATES.BUFFERING,playing?t.widget.playBtn.removeClass("stop"):t.widget.playBtn.addClass("stop")}}}}(window); ;_.Module.define({path:"common/widget/MusicPlayer",requires:[],sub:{initial:function(t,i){window.playctrl||(window.playctrl=new window.mbox.PlayCtrl),this.api=window.playctrl.exportAPI(),this.log=window.playctrl.log,this.controller=new window.mbox.Controller(window.playctrl),this.logList={"song-name a":"song_title","artist-name a":"artist_name","album-name a":"album_name",logo:"logo","lrc-btn":"lrc","download-btn":"download","go-to-listen-btn":"to_musicbox"},this.ui=[];for(var o=0;on;n++){var d=$(this._jq_pics.get(n)),a=d.position(),o=a.left,r=d.width(),c=o+r;if(c>t){e=n,_=o;break}}this._windowWidth+_>this._jq_picsWrap.width()&&(_=this._jq_picsWrap.width()-this._windowWidth,p=!0),_>0&&(this._jq_picsWrap.animate({left:-_+"px"},this._speend,this._easing),p&&this.trigger("lastend"))},slidePrev:function(){for(var i=this._jq_picsWrap.position(),s=i.left,t=-s,e=0,_=-1,p=!1,h=this._jq_pics.size(),n=0;h>n;n++){var d=$(this._jq_pics.get(n)),a=d.position(),o=d.width(),r=a.left,c=r+o;if(r>=t){t=c-this._windowWidth,0>t&&(t=0),e=n;break}}for(var n=e;n>=0;n--){var d=$(this._jq_pics.get(n)),a=d.position(),o=d.width(),r=a.left,c=r+o;if(t>=r||0==n){e=n,_=r;break}}p=0==_,_>=0&&(this._jq_picsWrap.animate({left:-_+"px"},this._speend,this._easing),p&&this.trigger("firstend"))}}});_.Module.define({path:"common/widget/image_uploader_manager",requires:["common/widget/image_uploader_manager/uploader_flash","common/widget/image_uploader_manager/uploader_html5"],sub:{initial:function(t){var e={container:null,width:200,height:50,isAutoUp:!1,queueLen:10,needWatermark:!1,fid:"",maxSize:3145728,maxWidth:3e3,maxHeight:3e3,uploadUrl:"http://upload.tieba.baidu.com/upload/pic",getUploadParams:null,tbsUrl:"http://tieba.baidu.com/dc/common/imgtbs",isFlash:!1,save_yun_album:1};this._options=$.extend(e,t||{}),this.uploader=null,this.EVENTS=["onFileSelected","onStartUpload","onProgressListen","onComplete","onError"],this._reset()},_initUploadUrl:function(t){var e=this;if(this._options.uploadUrl.indexOf("tbs")>0)return void(t&&t.apply(e));var o=$.ajax({url:this._options.tbsUrl,dataType:"json"});o.done(function(o){0===Number(o.no)?(e._options.uploadUrl+="?tbs="+o.data.tbs+(e._options.isWater?"&is_wm=1":"")+"&fid="+(e._options.fid||"")+"&save_yun_album="+e._options.save_yun_album,t&&t.apply(e)):t&&e._error()}).fail(function(){t&&e._error()})},_reset:function(){var t=navigator.userAgent.toLowerCase().match(/chrome\/([\d]+)/);t&&parseInt(t[1])>=21||$.browser.mozilla||$.browser.safari||(this._options.isFlash=!0),this._initUploadUrl(this._startImageUploader)},_startImageUploader:function(){this._options.isFlash?this.uploader=this.use("common/widget/image_uploader_manager/uploader_flash",this._options):this._options.container&&(this.uploader=this.use("common/widget/image_uploader_manager/uploader_html5",this._options)),this._options.container&&this._generateCallBack()},_generateCallBack:function(){for(var t=this,e=0;e','

    规则:',""+t.actDesc+"","

    ",'

    注:为保证效果,请上传大于200×200的图片

    ','
    ','
    ','
    上传图片','
    ',"
    ",'',"
    ",'',"
    ",'
    ','确认','取消',"
    ","
    "].join("");if(t.dialog=new $.dialog({html:e,title:"晒图参加活动",width:428,draggable:!0,closeable:!0,show:!1}),$.browser.msie&&_.Module.use("common/component/Placeholder",[t.dialog.element.find(".pic_act_img_desc"),"请输入图片描述(选填),140字以内"]),!PageData.user.is_login){var i=$.tb.unescapeHTML($.tb.location.getHref());return t.use("common/component/force_login",i,"userbar","dialog","pic_act_poster"),!1}PageData.user.is_like?(t.dialog.show(),t._uploadImg(t.dialog.element.find(".pic_prev_wrapper")),t.dialog.element.on("click","#pic_act_post_btn",function(e){try{if(e.preventDefault(),$(this).hasClass("ui_btn_disable"))return!1;t._postPhoto()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"pb:widget/pic_act_poster/pic_act_poster.js",method:"",ln:74}),i}}).on("click","#pic_act_cancel_btn",function(e){try{e.preventDefault(),t.dialog.close()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"pb:widget/pic_act_poster/pic_act_poster.js",method:"",ln:77}),i}})):t._doLike()},_doLike:function(){var t=new $.dialog({html:'

    参与晒图需要先关注本吧哦~


    关注本吧',width:420,holderClassName:"dialog_tip_holder"});t.element.on("click",".j_like",function(e){try{e.preventDefault(),_.Module.use("ucenter/widget/Balv",[{}],function(t){t.dolike()}),$.stats.track("spic","plat_like","pb","click",{obj_id:self.activityId}),t.close()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"pb:widget/pic_act_poster/pic_act_poster.js",method:"",ln:96}),i}})},_uploadImg:function(t){var e=this,i=$(new Image),a=t.find(".photo_up_container"),o=t.find(".pic_previewer"),c=t.find(".pic_act_upload_btn"),s=$("#pic_act_post_btn"),n=e.use("common/widget/image_uploader_manager",{container:a,width:a.width(),height:a.height(),isFlash:!1,isAutoUp:!1});n.bind("onFileSelected",function(){n.startUpload()}),n.bind("onStartUpload",function(){c.css("top","-9999px"),o.show(),o.tbattr("src","http://tb1.bdstatic.com/tb/static-pb/img/pic_act/pic_loading.gif")}),n.bind("onComplete",function(t,a){var n=a.imageList[a.imageList.length-1].response;if(null!=n&&0==n.error_code){var _=n.info,p=_.pic_id_encode,d=_.fullpic_width,l=_.fullpic_height,r=e.THUMBNAIL_PIC_URL_PREFIX+p+".jpg",g=e.ORIGINAL_PIC_URL_PREFIX+p+".jpg";if(200>d||200>l)$(".img_bad_tip").css("color","red"),c.css("top","38px"),o.hide();else{var h=new Image;h.src=r,h.onload=function(){o.tbattr("src","http://tb1.bdstatic.com/tb/static-common/editor_img/layer/i.gif"),o.css("background-image","url("+r+")"),(h.width<110||h.height<100)&&o.css("background-size","auto")},$(".img_bad_tip").css("color","#666"),c.css("top","-9999px"),o.show(),s.removeClass("ui_btn_disable ui_btn_m_disable").addClass("ui_btn ui_btn_m"),i.addClass("BDE_Image"),i.tbattr({width:d>560?560:d,height:d>560?parseInt(560*l/d):l,src:g,unselectable:"on",pic_type:0}),e.orgImg=i.get(0).outerHTML,e.pic_encode=p}}else c.css("top","38px"),o.hide(),e._uploadErrorHandler()})},_uploadErrorHandler:function(){$.dialog.alert("哦,粗了点问题,图片上传失败了",{title:"失败提示",acceptValue:"再试一次",holderClassName:"alert_holder",onaccept:function(){return!0}})},_postPhoto:function(){var t=this,e="",i=PosterContext.getContext(),a=t.use("common/widget/PostService");return $(this).hasClass("ui_btn_disable")?!1:(a.success(function(e,i){var a={activity_id:t.activityId,post_id:i.data.post_id,thread_id:t.threadId,user_name:PageData.user.user_name,pic_encode:t.pic_encode,thread_title:t.threadTitle,canva_from:"poster"};t.dialog.close(),t._showCanvaDialog(a)}),e=t.dialog.element.find(".pic_act_img_desc").val(),a.post("reply",{tid:t.threadId,content:$.tb.escapeHTML(UE.utils.html2ubb(e,!0))+UE.utils.html2ubb("
    "+t.orgImg),ptype:4},i),void 0)},_showCanvaDialog:function(t){var e=this,i=['
    ','

    发表成功

    ','

    转发到你常去的吧拉票,让小伙伴们助你获奖吧~

    ','","
    "].join(""),a=new $.dialog({html:i,width:380,draggable:!0,closeable:!0,holderClassName:"pat-noTitle"});a.bind("onclose",function(){"pb"==PageData.product?setTimeout(function(){var t=$.tb.location.getHash(),i=$.tb.location.getPathname();i=="/p/"+e.threadId?"#pic_sort_new"!=t?($.tb.location.setHref("/p/"+e.threadId+"#pic_sort_new"),$.tb.location.reload()):$.tb.location.reload():$.tb.location.setHref("/p/"+e.threadId+"#pic_sort_new")},500):setTimeout(function(){$.tb.location.reload()},500)}),a.element.on("click","#canva_repost_btn",function(t){try{t.preventDefault(),a.hide()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"pb:widget/pic_act_poster/pic_act_poster.js",method:"",ln:247}),e}}).on("click","#canva_cancel_btn",function(t){try{t.preventDefault(),a.close()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"pb:widget/pic_act_poster/pic_act_poster.js",method:"",ln:250}),e}})}}});_.Module.define({path:"pb/widget/pic_act_repost",requires:["common/component/force_login","common/widget/PostService"],sub:{ORIGINAL_PIC_URL_PREFIX:"http://imgsrc.baidu.com/forum/pic/item/",THUMBNAIL_PIC_URL_PREFIX:"http://imgsrc.baidu.com/forum/abpic/item/",MAX_REPOST_SHOW_FORUMS:20,initial:function(){try{this.postService=this.use("common/widget/PostService"),this.bindEvent()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:19}),e}},bindEvent:function(){var e=this;$("body").delegate(".j_pic_act_repost","click",function(t){try{var i=$(this);return e.repostData=i.getData(),t.preventDefault(),e.repostCheck(),!1}catch(o){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:o.message||o.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:31}),o}})},repostCheck:function(){var e=this;if(!PageData.user.is_login){var t=$.tb.unescapeHTML($.tb.location.getHref());return e.use("common/component/force_login",t,"userbar","dialog","pic_act_repost"),!1}var i;PageData.user_forumlist&&PageData.user_forumlist.info&&(e.userFormList=PageData.user_forumlist.info),PageData.user.user_forum_list&&PageData.user.user_forum_list.info&&(e.userFormList=PageData.user.user_forum_list.info),void 0!==e.userFormList?(e.MAX_REPOST_SHOW_FORUMS=e.userFormList.length>20?20:e.userFormList.length,0===e.userFormList.length?(i="亲,目前只能转发到你关注的吧哦,请先去“关注”你要转发到的吧。",e.showWarningTip(i)):1==e.userFormList.length&&e.userFormList[0].forum_name==PageData.forum.forum_name?(i="亲,只能转发到本吧之外你关注过的吧哦,请先去“关注”你要转发到的吧。",e.showWarningTip(i)):e.showRepostDialog()):(i="亲,目前只能转发到你关注的吧哦,请先去“关注”你要转发到的吧。",e.showWarningTip(i))},showRepostDialog:function(){var e=this;e.dialog?(e.dialog.show(),e.dialog.setContent(e.renderDialogHTML())):e.dialog=new $.dialog({html:e.renderDialogHTML(),title:"转发",width:460,draggable:!0,closeable:!0,hideOnclose:!0}),e.getElement(),$.browser.msie&&_.Module.use("common/component/Placeholder",[e.$pic_repost_desc,"小伙伴们快点儿来给"+e.curRole+"投票吧"]),e.bindDialogEvent()},renderDialogHTML:function(){var e=this,t=[],i={},o={},a=PageData.forum.forum_name,r=PageData.user.user_name==e.repostData.user_name?"我":"TA",s=r+"正在"+a+"吧参加【"+e.repostData.thread_title+"】活动哦,来帮"+r+"投票吧~",p="小伙伴们快点儿来给"+r+"投票吧",c="",_="";e.curRole=r;for(var n=0;n'+i.forum_name+"吧");return c=t.join(""),_=['
    ','
    ','','',"
    ",'
    ','','',"
    ",'
    '+c+"
    ",'
    ','','
    ','',"
    ",'
    ','确认','取消',"
    ",'

    转发成功!

    ',"
    "].join("")},getElement:function(){var e=this,t=e.$dlgRoot=$("#pic_repost_dialog");e.$pic_repost_title=t.find("#pic_repost_title"),e.$pic_repost_fname=t.find("#pic_repost_fname"),e.$pic_repost_desc=t.find("#pic_repost_desc"),e.$j_pic_fname_wrap=t.find(".j_pic_fname_wrap"),e.$j_pic_like_forums=t.find(".j_pic_like_forums"),e.$pic_act_repost_btn=t.find("#pic_act_repost_btn"),e.$pic_act_recancel_btn=t.find("#pic_act_recancel_btn"),e.$pic_repost_tip=t.find("#pic_repost_tip")},bindDialogEvent:function(){var e=this,t={},i=e.THUMBNAIL_PIC_URL_PREFIX+e.repostData.pic_encode+".jpg";e.dialog.element.find(".pic_repost_img_wraper").css({"background-image":"url("+i+")"}),$.JsLoadManager.use("http://tb1.bdstatic.com/tb/static-common/js/jquery-ui-autocomplete.min.js",function(){e.$pic_repost_fname.autocomplete({source:e.getLikedForumName(),minLength:0}),e.$pic_repost_fname.bind("click",function(){try{$(this).autocomplete("search","")}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:175}),e}})}),e.$pic_act_repost_btn.bind("click",function(t){try{{$(this)}if(t.preventDefault(),""==e.$pic_repost_title.val())return e.showErrorTip("标题不能为空"),!1;if(""==e.$pic_repost_fname.val())return e.showErrorTip("请选择要转发的吧"),!1;if($.browser.msie&&e.$pic_repost_desc.val().length>99)return e.showErrorTip("转贴理由最多只能输入99个汉字哦~"),!1;e.sendRepost()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:199}),i}}),e.$pic_act_recancel_btn.bind("click",function(t){try{t.preventDefault(),"pb"==PageData.product&&"poster"==e.repostData.canva_from?setTimeout(function(){var t=$.tb.location.getHash(),i=$.tb.location.getPathname();i=="/p/"+e.repostData.thread_id?"#pic_sort_new"!=t?($.tb.location.setHref("/p/"+e.repostData.thread_id+"#pic_sort_new"),$.tb.location.reload()):$.tb.location.reload():$.tb.location.setHref("/p/"+e.repostData.thread_id+"#pic_sort_new"),e.dialog.hide()},1e3):e.dialog.hide()}catch(i){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:i.message||i.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:224}),i}}),e.$j_pic_like_forums.delegate(".j_pic_like_forum_link","click",function(i){try{var o=$(this);return i.preventDefault(),t=o.getData(),e.$pic_repost_fname.val(t.forum_name.replace(/\s/g," ")).trigger("change"),e.$j_pic_fname_wrap.find("a").remove(),e.$j_pic_fname_wrap.append(o.clone()),e.$pic_repost_fname.css("color","#fff").tbprop("readonly","readonly").autocomplete({disabled:!0}),o.siblings().removeClass("seleted_forum_link"),o.addClass("seleted_forum_link"),!1}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:240}),a}}),e.$j_pic_fname_wrap.delegate(".j_pic_like_forum_link","click",function(t){try{var i=$(this),o=$.tb.unescapeHTML(i.tbattr("title"));return t.preventDefault(),e.$pic_repost_fname.val("").trigger("change"),e.$j_pic_like_forums.find('a[title="'+o+'"]').removeClass("seleted_forum_link"),e.$pic_repost_fname.css("color","#000").tbprop("readonly",!1).autocomplete({disabled:!1}),i.remove(),!1}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"pb:widget/pic_act_repost/pic_act_repost.js",method:"",ln:252}),a}})},sendRepost:function(){var e=this,t=e.$pic_repost_fname.val(),i=PosterContext.getContext(),o=""==e.$pic_repost_desc.val()?e.$pic_repost_desc.tbattr("placeholder"):e.$pic_repost_desc.val(),a={65535:"你今天的转贴已达上限",65534:"这个吧你已经转过啦",65533:"今天转贴的人太多了,明天再来吧",65532:"同时转贴的人太多了,请稍等一会儿哈",3011:"只能转到你关注过的吧",308:"用户权限不足"};for(var r in a)!function(t){e.postService.resultHandlerManager.registerHandler(t,function(){e.showErrorTip(a[t])})}(r);e.postService.success(function(t,i){e.$pic_repost_tip.text("转发成功!").removeClass("ele_hidden"),e.$pic_repost_tip.prepend('ok'),e.$pic_repost_tip.append('查看转贴'),"pb"==PageData.product&&void 0!==e.repostData.canva_from&&"poster"==e.repostData.canva_from?setTimeout(function(){var t=$.tb.location.getHash();"#pic_sort_new"!=t?$.tb.location.setHref("/p/"+e.repostData.thread_id+"#pic_sort_new"):$.tb.location.reload()},1e3):setTimeout(function(){$.tb.location.reload()},1e3)}),e.postService.post("repost",{ptid:e.repostData.thread_id,ftid:e.forumIdMap[t],title:e.$pic_repost_title.val(),content:e.repostData.pic_encode+"#"+o,ie:"utf-8",tbs:PageData.tbs,new_vcode:1,tag:11,ppid:e.repostData.post_id,activity_id:e.repostData.activity_id,act_type:"photo"},i)},getLikedForumName:function(){for(var e=this,t=e.userFormList.length,i=[],o={},a={},r="",s=0;t>s;s++)a=e.userFormList[s],r=$.tb.unescapeHTML(a.forum_name.replace(/\s/g," ")),a.forum_name!=PageData.forum.forum_name&&i.push(r),o[r]=a.id;return e.forumIdMap=o,i},showWarningTip:function(e){var t=new Array;t.push('
    '+e+"
    ");new $.dialog({html:t.join(""),title:"温馨提示",showTitle:!0,draggable:!1,width:300,holderClassName:"pat-noTitle"})},showErrorTip:function(e){var t=this;t.$dlgRoot.addClass("msg_dialog_holder"),t.$pic_repost_tip.text(e).removeClass("ele_hidden"),setTimeout(function(){t.$pic_repost_tip.addClass("ele_hidden"),t.$dlgRoot.removeClass("msg_dialog_holder")},1500)}}});_.Module.define({path:"pb/widget/pic_act_vote",requires:["common/component/force_login"],sub:{initial:function(t){try{this.option=t,this.voteData={tbs:PageData.tbs,word:PageData.forum.forum_name,forum_id:PageData.forum.forum_id},this.bindEvent()}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"pb:widget/pic_act_vote/pic_act_vote.js",method:"",ln:20}),a}},bindEvent:function(){var t=this;$("body").delegate(".j_pic_act_vote_btn","click",function(a){try{var e=$(this),o=e.closest(".j_pic_act_vote_area"),i=o.find(".j_pic_act_vote_num"),n=Number(i.text());if(a.preventDefault(),t.repostData=o.getData(),!PageData.user.is_login){var c=$.tb.unescapeHTML($.tb.location.getHref());return _.Module.use("common/component/force_login",[c,"userbar","dialog","pic_act_vote"]),!1}if(PageData.user.is_like)t._postVoteData().done(function(a){"0"==a.no?(e.text("已投票"),e.addClass("act_voted_btn"),i.animate({"margin-top":"-10px"},300).animate({"margin-top":"0"},300).text(n+1)):"40"==a.no?t._showCaptchaDialog(a,e,i,n):"2130008"==a.no?t._showCanvaDialog():t._showErrorTip(a.no)});else{var s=new $.dialog({html:'

    参与投票需要先关注本吧哦~


    关注本吧',width:420,holderClassName:"dialog_tip_holder"});s.element.on("click",".j_like",function(a){try{a.preventDefault(),_.Module.use("ucenter/widget/Balv",[{}],function(t){t.dolike()}),$.stats.track("vote","plat_like","pb","click",{obj_id:t.repostData.activity_id}),s.close()}catch(e){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:e.message||e.description,path:"pb:widget/pic_act_vote/pic_act_vote.js",method:"",ln:54}),e}})}}catch(r){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:r.message||r.description,path:"pb:widget/pic_act_vote/pic_act_vote.js",method:"",ln:71}),r}})},_postVoteData:function(){var t=this;t.voteData.activity_id=t.repostData.activity_id,t.voteData.post_id=t.repostData.post_id,t.voteData.user_id_ed=t.repostData.user_id,t.voteData.user_name_ed=t.repostData.user_name,t.voteData.thread_id=t.repostData.thread_id;var a=$.post("/actstage/photoVote?",t.voteData,function(){},"json");return a},_showCaptchaDialog:function(t,a,e,o){var i=this;_.Module.use("common/component/CaptchaDialog",{title:"投票",message:"请输入验证码完成投票~支持你喜欢的美图!",vCode:t.data.vcode.captcha_vcode_str,vCodeType:t.data.vcode.captcha_code_type,paramsCallback:function(){return i.voteData}},function(t){t.bind("onclose",function(){return t.hide(),!1}),t.bind("onaccept",function(){i.voteData.vcode=t.getInputValue(),i.voteData.vcode_md5=t.getVCode(),i._postVoteData().done(function(t){"0"==t.no?(a.text("已投票"),a.addClass("act_voted_btn"),e.animate({"margin-top":"-10px"},300).animate({"margin-top":"0"},300).text(o+1)):"40"==t.no?i._showCaptchaDialog(t):"2130008"==t.no?i._showCanvaDialog():i._showErrorTip(t.no)})}),t.show()})},_showCanvaDialog:function(){var t=this,a=['
    ','

    你今天已经投过票了

    ','

    如果想支持TA,可以转贴到其他吧帮忙拉票哦!

    ','","
    "].join(""),e=new $.dialog({html:a,width:380,draggable:!0,closeable:!0,holderClassName:"pat-noTitle"});e.element.on("click","#canva_repost_btn",function(t){try{t.preventDefault(),e.hide()}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"pb:widget/pic_act_vote/pic_act_vote.js",method:"",ln:147}),a}}).on("click","#canva_cancel_btn",function(t){try{t.preventDefault(),e.close()}catch(a){throw"undefined"!=typeof alog&&alog("exception.fire","catch",{msg:a.message||a.description,path:"pb:widget/pic_act_vote/pic_act_vote.js",method:"",ln:150}),a}})},_showErrorTip:function(t){var a="";switch(Number(t)){case 8:case 9:case 220012:a="你在本吧被封禁,暂时不能进行操作";break;case 220:a="你被吧主加入黑名单,暂时不能进行操作";break;case 3110003:a="同时有太多人在投票,请稍后再来~";break;default:a="服务器出错啦~请再试一次吧"}var e=new Array;e.push('
    '+a+"
    ");new $.dialog({html:e.join(""),showTitle:!0,draggable:!1,width:300,height:40})}}});_.Module.define({path:"common/widget/blockUser",requires:[],sub:{template:'
    • 1天
      修改
      删除
      保存
      取消
    封禁ID
    封禁ID+IP1天
    ',errTemplate:'
    ',initial:function(e,t,a,o,i,n){this.config={block_reason_list:"/pmc/tpl",add_block_reason:"/pmc/tpl",modify_block_reason:"/pmc/tpl",del_block_reason:"/pmc/tpl",save_block_id:"/pmc/blockid",save_block_id_nd_ip:"/pmc/blockid"},this.block_userlist=this.duplicateRemoval(e),this.power=t,this.forum=a,this.tbs=o,this.pid=i,this.sucCallback=n,this.user_num=this.block_userlist.length,this.add_new_temp="+新建模板",this.textarea_maxlength=200,this.curr_pattern="",this.$blockPopWinHtml=$(this.template),this.$responseBlockInfo=$(this.errTemplate),this.paramValidate(),this.setBlockDefaultInfo(),this.textareaKeyupEvtBind(),this.blockIDbtnEvtBind(),this.tabSwitchEvtBind(),this.textareaFocusEvtBind(),this.textareaBlurEvtBind(),this.logicalControl(),this.blockDialog.show(),this.trigger("show")},duplicateRemoval:function(e){for(var t={},a=[],o=e.length,i=0;o>i;i++)t[e[i]]||(a.push(e[i]),t[e[i]]=!0);return a},paramValidate:function(){var e=this;null===e.power.ban_id||null===e.power.ban_ip||""===e.power.ban_id||""===e.power.ban_ip?(this.blockDialog=new $.dialog({title:"封禁提示",width:"556",html:this.$responseBlockInfo}),e.$responseBlockInfo.find(".block_response_info").html("你没有封禁操作权限!")):e.blockDialog=new $.dialog({title:"封禁操作",width:"556",html:this.$blockPopWinHtml}),e.blockDialog.bind("onclose",function(){e.user_num>1&&$.tb.location.reload()}),e.blockDialog.bind("onhide",function(){e.user_num>1&&$.tb.location.reload()})},insertDefaultNewTemp:function(){var e=this,t=0,a=0,o=!1;if($(".b_reason_ul .b_reason_item").each(function(e,o){$(o).hasClass("b_add_new_reason")||($(o).data("reasonId")&&""!=$(o).data("reasonId")&&$(o).data("isBuiltinTpl")===!1&&t++,a++)}),6>t){$(".b_reason_ul .b_reason_item").each(function(t,i){o&&$(".b_reason_ul .b_reason_item").eq(t).remove(),""!==$(i).html().trim()||o||($(i).tbattr("data-is-builtin-tpl",!1).tbattr("data-prefix",a),$(i).addClass("b_add_new_reason").append(e.add_new_temp),o=!0)});var i=$(".b_reason_ul .b_add_new_reason").length;0==i&&$(".b_reason_ul").append('
  • '+e.add_new_temp+"
  • ")}},setTextareaVal:function(){var e=this;0!=e.$blockPopWinHtml.find(".b_reason_curr").length||e.$blockPopWinHtml.find(".b_reason_item").eq(0).hasClass("b_add_new_reason")||e.$blockPopWinHtml.find(".b_reason_item").eq(0).addClass("b_reason_curr");var t=e.$blockPopWinHtml.find(".b_reason_curr");if(t.hasClass("b_add_new_reason"))e.$blockPopWinHtml.find(".b_textarea").val("");else if(t.html()){var a=t.html(),o=2;t.data("prefix")>=10&&(o=3),e.$blockPopWinHtml.find(".b_textarea").val(a.substr(o,a.length))}},noReasonCantModify:function(){var e=0,t=this;t.$blockPopWinHtml.find(".b_reason_item").each(function(t,a){"undefined"!=typeof $(a).tbattr("data-reason-id")&&e++}),0==e&&(t.$blockPopWinHtml.find(".b_add_new_reason").removeClass("b_reason_curr"),t.$blockPopWinHtml.find(".b_reason_top").hide(),""==t.$blockPopWinHtml.find(".b_textarea").val()&&t.$blockPopWinHtml.find(".b_label_tips").show())},setBlockReasonList:function(){var e=this,t=!1;$.ajax({url:e.config.block_reason_list,type:"POST",dataType:"json",data:{fid:e.forum.forum_id,tbs:e.tbs},success:function(a){if("0"==a.errno){var o=a.data;if(0==o.length)e.$blockPopWinHtml.find(".b_label_tips").show(),e.$blockPopWinHtml.find(".b_textarea").val(""),e.noReasonCantModify(),e.$blockPopWinHtml.find(".b_reason_item").each(function(e,t){$(t).removeAttr("data-reason-id").html("")}),e.$blockPopWinHtml.find(".b_reason_item").removeClass("b_reason_curr");else{var i=e.$blockPopWinHtml.find(".b_reason_item").length,n=o.length,s=n-i;if(s>0){for(var l=i,r="";s>0;)r+='
  • ',l++,s--;$(".b_reason_ul").append(r)}e.$blockPopWinHtml.find(".b_reason_item").each(function(a,i){0==a&&(e.curr_pattern="undefined"!=typeof o[a]?"modify":"add"),"undefined"!=typeof o[a]?$(i).html(a+1+"."+o[a].template_text).tbattr("data-reason-id",o[a].template_id).tbattr("data-is-builtin-tpl",o[a].is_builtin_tpl).tbattr("data-prefix",a+1):$(i).html(""),$(i).hasClass("b_add_new_reason")&&!t&&($(i).removeClass("b_add_new_reason"),t=!0)}),e.$blockPopWinHtml.find(".b_reason_item").each(function(t,a){""==$(a).html()&&e.$blockPopWinHtml.find(".b_reason_item").eq(t).remove(),$(a).hasClass("b_reason_curr")&&($(a).data("isBuiltinTpl")?$(".b_top_mod_bar .b_del_bar").hide():$(".b_top_mod_bar .b_del_bar").show())})}(e.power.ban_id&&e.power.ban_ip||e.power.can_filter_id&&e.power.can_filter_ip)&&e.insertDefaultNewTemp(),e.setTextareaVal()}else e.setResponseTips(2,"获取封禁原因列表失败!")},error:function(t){e.setNewDialogRespTips(2,t)}})},setBlockDefaultInfo:function(){var e=this,t=e.block_userlist.join();e.$blockPopWinHtml.find(".b_username").html($.tb.subByte(t,30,"…")),e.setBlockReasonList()},textareaKeyupEvtBind:function(){var e=this;e.$blockPopWinHtml.find(".b_textarea").on("keyup",function(){var t=$(this).val(),a=$.tb.getByteLength(t),o=e.$blockPopWinHtml.find(".block_tips");o.css({display:"block"}),e.textarea_maxlength-a>0?($(this).hasClass("input_right_pattern")||$(this).addClass("input_right_pattern"),$(this).removeClass("input_error_pattern"),o.html("还可输入"+parseInt((e.textarea_maxlength-a)/2)+"字").addClass("b_green")):($(this).hasClass("input_error_pattern")||$(this).addClass("input_error_pattern"),$(this).removeClass("input_right_pattern"),o.removeClass("b_green").addClass("b_red").html("已超出"+parseInt(parseInt((a-e.textarea_maxlength)/2)+1)+"字"))})},textareaFocusEvtBind:function(){var e=this;e.$blockPopWinHtml.on("focus.showEditor",".b_textarea",function(){e.curr_pattern="add",e.toogleToolBar(),e.$blockPopWinHtml.find(".block_tips").html("").removeClass("b_red,b_green"),e.$blockPopWinHtml.find(".b_label_tips").css({display:"none"}),e.power.ban_id&&e.power.ban_ip||e.power.can_filter_id&&e.power.can_filter_ip?e.$blockPopWinHtml.find(".b_reason_top").show():e.$blockPopWinHtml.find(".b_reason_top").hide()})},textareaBlurEvtBind:function(){var e=this;e.$blockPopWinHtml.on("click",function(t){var a=$(t.target);if(0==a.closest(".b_reason_box").length){e.curr_pattern="modify",e.toogleToolBar(),0==e.$blockPopWinHtml.find(".b_reason_curr").length&&e.$blockPopWinHtml.find(".b_reason_top").hide();var o="undefined"==e.power.can_filter_id?!e.power.ban_id||!e.power.ban_ip:!e.power.can_filter_id||!e.power.can_filter_ip;o&&(""==e.$blockPopWinHtml.find(".b_textarea").val()?e.$blockPopWinHtml.find(".b_label_tips").show():e.$blockPopWinHtml.find(".b_label_tips").hide()),e.$blockPopWinHtml.find(".block_tips").html(""),e.noReasonCantModify()}})},modifyTextareaCon:function(){var e=this;e.$blockPopWinHtml.find(".b_mod_bar").on("click",function(){e.$blockPopWinHtml.find(".b_textarea").trigger("focus")})},deleteTextareaCon:function(){var e=this;e.$blockPopWinHtml.find(".b_del_bar").on("click",function(){if("undefined"==typeof e.$blockPopWinHtml.find(".b_reason_curr").tbattr("data-reason-id")||e.$blockPopWinHtml.find(".b_reason_curr").hasClass("b_add_new_reason")||e.$blockPopWinHtml.find(".b_reason_curr").data("isBuiltinTpl"))return!1;var t={op:"del",id:e.$blockPopWinHtml.find(".b_reason_curr").tbattr("data-reason-id"),fid:e.forum.forum_id,tbs:e.tbs};$.ajax({url:e.config.del_block_reason,type:"POST",dataType:"json",data:t,success:function(t){"0"==t.errno?(e.$blockPopWinHtml.find(".b_reason_curr").removeAttr("data-reason-id"),e.setBlockReasonList(),e.setResponseTips(1,"删除成功!")):e.setResponseTips(2,"删除失败!")},error:function(t){e.setNewDialogRespTips(2,t)}})})},toogleToolBar:function(){var e=this;e.power.ban_id&&e.power.ban_ip||e.power.can_filter_id&&e.power.can_filter_ip?(e.$blockPopWinHtml.find(".b_reason_top").css({display:"block"}),"modify"==this.curr_pattern?(e.$blockPopWinHtml.find(".b_top_mod_bar").css({display:"block"}),e.$blockPopWinHtml.find(".b_top_save_bar").css({display:"none"})):"add"==this.curr_pattern&&(e.$blockPopWinHtml.find(".b_top_mod_bar").css({display:"none"}),e.$blockPopWinHtml.find(".b_top_save_bar").css({display:"block"}))):e.$blockPopWinHtml.find(".b_reason_top").css({display:"none"})},saveTextareaCon:function(){var e,t=this,a={},o=t.$blockPopWinHtml.find(".b_textarea");t.$blockPopWinHtml.find(".b_save_bar").on("click",function(){if(!t.checkCanbeBlocked())return!1;var i=t.$blockPopWinHtml.find(".b_reason_curr").hasClass("b_add_new_reason")||0==t.$blockPopWinHtml.find(".b_reason_curr").length;i?(a={op:"add",tbs:t.tbs,fid:t.forum.forum_id,ie:"gbk",text:o.val()},e=t.config.add_block_reason):(a={op:"update",tbs:t.tbs,fid:t.forum.forum_id,ie:"gbk",text:t.$blockPopWinHtml.find(".b_textarea").val(),id:t.$blockPopWinHtml.find(".b_reason_curr").tbattr("data-reason-id")},e=t.config.modify_block_reason),$.ajax({url:e,type:"POST",dataType:"json",data:a,success:function(e){t.curr_pattern="modify",t.toogleToolBar(),"0"==e.errno?(t.setBlockReasonList(),t.setResponseTips(1,"保存成功!"),i?$.stats.track("AddReasonItem","uegCount","bawuAppeal","success"):$.stats.track("modifyReasonItem"+$(".b_reason_curr").index(),"uegCount","bawuAppeal","success")):t.setResponseTips(2,"保存失败!")},error:function(e){t.setNewDialogRespTips(2,e)}})})},cancelTextareaCon:function(){var e=this;e.$blockPopWinHtml.find(".b_cancel_bar").on("click",function(){e.setTextareaVal(),e.curr_pattern="modify",e.toogleToolBar(),e.$blockPopWinHtml.find(".b_reason_curr").hasClass("b_add_new_reason")&&e.$blockPopWinHtml.find(".b_reason_item").siblings().removeClass("b_reason_curr").end().eq(0).addClass("b_reason_curr")})},getSavesData:function(e){var t=this,a={};a.user_name=t.block_userlist,a.day="block"===t.$blockPopWinHtml.find(".b_fixed_time").css("display")?"1":t.$blockPopWinHtml.find(".b_select_time").find("option:selected").tbattr("data-info"),a.fid=t.forum.forum_id,a.tbs=t.tbs,a.pid=t.pid,a.ie="gbk";var o=t.$blockPopWinHtml.find(".b_textarea"),i=0;return t.$blockPopWinHtml.find(".b_reason_item").each(function(e,t){"undefined"==typeof $(t).tbattr("data-reason-id")&&i++}),a.reason=6==i&&""===o.val().trim()?t.$blockPopWinHtml.find(".b_label_tips").html():t.$blockPopWinHtml.find(".b_textarea").val(),2===e&&(a.ip="1"),a},checkCanbeBlocked:function(){var e=this,t=e.$blockPopWinHtml.find(".b_textarea"),a=0;return t.hasClass("input_error_pattern")||""===t.val().trim()?(e.$blockPopWinHtml.find(".b_reason_item").each(function(e,t){"undefined"==typeof $(t).tbattr("data-reason-id")&&a++}),6==a?!0:(e.$blockPopWinHtml.find(".b_textarea").trigger("focus"),t.hasClass("input_error_pattern")?e.setResponseTips(2,"封禁原因不能超出100字"):e.setResponseTips(2,"封禁原因不能为空"),!1)):!0},blockIDbtnEvtBind:function(){{var e=this;e.$blockPopWinHtml.find(".b_textarea")}e.$blockPopWinHtml.find(".b_id_btn,.b_id_nd_ip_btn").on("click",function(){if(!e.checkCanbeBlocked())return!1;var t=e.getSavesData(1),a=function(o){t=o?$.extend(t,o):t,$.ajax({url:e.config.save_block_id,type:"POST",dataType:"json",data:t,success:function(t){"0"==t.errno?(e.setNewDialogRespTips(1,"封禁成功!"),(e.sucCallback||"function"==typeof e.sucCallback)&&e.sucCallback()):224011==t.errno?e.getCaptcha(t,a,e):e.setNewDialogRespTips(2,"封禁失败!")},error:function(t){e.setNewDialogRespTips(2,t)}})};a()})},getCaptcha:function(e,t,a){var o=this;a=a||o;var i=PageData.forum_name||(PageData.forum?PageData.forum.forum_name:""),n=PageData.forum_id||(PageData.forum?PageData.forum.forum_id:"");_.Module.use("common/component/CaptchaDialog",{title:"封禁",message:"封禁了那么多人,输个码验证下身份吧~",vCode:e.res.captcha_vcode_str,vCodeType:e.res.captcha_code_type,forumName:i,forumId:n,postType:"thread",paramsCallback:function(){return{}}},function(e){o.captchaDialog=e,e.bind("onclose",function(){return e.hide(),!1}),e.bind("onaccept",function(){var o={vcode:e.getInputValue(),vcode_md5:e.getVCode()};t.call(a,o)}),e.show()})},setResponseTips:function(e,t){var a=this,o=a.$blockPopWinHtml.find(".block_tips");1==e?o.removeClass("b_red").addClass("b_green").html(t):o.removeClass("b_green").addClass("b_red").html(t),window.setTimeout(function(){o.hasClass("b_green")&&o.html("")},2e3)},setNewDialogRespTips:function(e,t){var a=this,o=a.$blockPopWinHtml;o.html(a.$responseBlockInfo),1==e?o.find(".block_response_info").removeClass("b_red").addClass("b_green").html(t):o.find(".block_response_info").removeClass("b_green").addClass("b_red").html(t),window.setTimeout(function(){a.blockDialog.hide(),a.user_num>1&&$.tb.location.reload(),a.trigger("hide")},2e3)},tabSwitchEvtBind:function(){var e=this;e.$blockPopWinHtml.on("click",".b_reason_item",function(){return $(this).data("isBuiltinTpl")?$(".b_top_mod_bar .b_del_bar").hide():$(".b_top_mod_bar .b_del_bar").show(),"undefined"!=typeof $(this).tbattr("data-reason-id")||$(this).hasClass("b_add_new_reason")?("none"==e.$blockPopWinHtml.find(".b_reason_top").css("display")&&e.$blockPopWinHtml.find(".b_reason_top").css({display:"block"}),$(this).siblings(".b_reason_item").removeClass("b_reason_curr").end().addClass("b_reason_curr"),$(this).hasClass("b_add_new_reason")?(e.curr_pattern="add",e.$blockPopWinHtml.find(".b_textarea").trigger("focus")):(e.curr_pattern="modify",$.stats.track("reasonItem"+$(this).index(),"uegCount","bawuAppeal","click")),e.setTextareaVal(),e.toogleToolBar(),void 0):!1})},logicalControl:function(){var e=this,t=e.$blockPopWinHtml.find(".b_fixed_time"),a=e.$blockPopWinHtml.find(".b_select_time");e.$blockPopWinHtml.find(".b_reason_item").eq(0).addClass("b_reason_curr"),e.power.ban_id&&e.power.ban_ip||e.power.can_filter_id&&e.power.can_filter_ip?(e.$blockPopWinHtml.find(".b_fixed_tips").html("提示:大吧主可编辑原因模版,保存后小吧主可直接使用文案~"),e.user_num>1?(t.css({display:"block"}),a.css({display:"none"}),e.$blockPopWinHtml.find(".b_id_nd_ip_btn").css({display:"none"})):1==e.user_num&&(t.css({display:"none"}),a.css({display:"block"}),e.$blockPopWinHtml.find(".b_id_nd_ip_btn").css({display:"block"})),e.$blockPopWinHtml.find(".b_reason_top,.b_top_mod_bar").css({display:"block"}),e.modifyTextareaCon(),e.deleteTextareaCon(),e.saveTextareaCon(),e.cancelTextareaCon()):(e.$blockPopWinHtml.find(".b_fixed_tips").html("提示:原因模版只有大吧主可以编辑,小吧主也可直接在输入框中写上内容并完成封禁~"),t.css({display:"block"}),a.css({display:"none"}))}}});