var userId=0;var isPermanentUser=false;var messageOverrides="";var isEmailVerified=false;var cache={boxes:{},popupLogins:{}};var searchKeyHint="从你感兴趣的开始...";var urlStatic=urlStatic||"";In.add("form",{path:urlStatic+"/js/widget/ajaxForm.$25675.js",type:"js"});In.add("humanmessage",{path:urlStatic+"/js/humanmessage.$27721.js",type:"js"});In.add("mbox-css",{path:urlStatic+"/css/widget/mbox.$27721.css",type:"css"});In.add("mbox",{path:urlStatic+"/js/widget/mbox.$23673.js",type:"js",rely:["mbox-css"]});In.add("suggest-css",{path:urlStatic+"/css/widget/suggest.$17016.css",type:"css"});In.add("suggest",{path:urlStatic+"/js/widget/suggest.$25495.js",type:"js",rely:["suggest-css"]});In.add("overlay-css",{path:urlStatic+"/css/widget/overlay.$27722.css",type:"css"});In.add("overlay",{path:urlStatic+"/js/widget/overlay.$17387.js",type:"js",rely:["overlay-css"]});In.add("tips-css",{path:urlStatic+"/css/widget/tips.$25884.css",type:"css"});In.add("tips",{path:urlStatic+"/js/widget/tips.$26034.js",type:"js",rely:["tips-css"]});var mbox={show:function(e,d,c,b){if(cache.boxes[e]){cache.boxes[e].show();return cache.boxes[e]}var a=$extend(b,{title:d});In("mbox",function(){cache.boxes[e]=new MBox(c,a);cache.boxes[e].show()});return cache.boxes[e]},showAjax:function(e,d,c,b){if(cache.boxes[e]){cache.boxes[e].show();return cache.boxes[e]}var a=$extend(b,{title:d});In("mbox",function(){cache.boxes[e]=new MBox(c,a);cache.boxes[e].show()});return cache.boxes[e]}};var ajaxForm={init:function(b,a){In("form",function(){new AjaxForm(b,a)})}};var login={callbacks:[],notloginCallbacks:[],popupLogin:function(d,b){if(userId){d();return false}var a=$merge({title:"<strong>登录音悦Tai</strong>",width:296,overlay:{color:"#000",opacity:"0.3"}},b);var c=("popupLogin"+d.toString()+a.toString()).toSHA1();cache.popupLogins[c]=cache.popupLogins[c]||false;if(cache.popupLogins[c]){login.prepareCallback(d,c);cache.popupLogins[c].show();return false}In("mbox","form",function(){function e(f){cache.popupLogins[c]=new MBox(f,{title:a.title,width:a.width,overlay:a.overlay,onInit:function(i){loginapi_js(i);var h=i.getElement("form");if(!h){return}new AjaxForm(h,{onComplete:function(j){if(j.error){var k=i.getElement("[name=login_error]");k.setStyle("display","block");k.getElement("em").set("html",j.message);return false}login.loginComplete(j)}});if(Browser.Engine.trident){h.addEvent("keydown",function(j){if(j.key=="enter"){$(this).fireEvent("submit")}})}var g=h.email.value;$(h.email).addEvents({focus:function(){this.getParent().addClass("focus");if(this.get("value")==g){this.set("value","")}},blur:function(){this.getParent().removeClass("focus");if(this.get("value").trim()==""){this.set("value",g)}}});$(h.password).addEvents({focus:function(){this.getParent().addClass("focus")},blur:function(){this.getParent().removeClass("focus")}})},onShow:function(h){var g=h.getElement("form");if(!g){return}g.getElement("input[name=email]").focus()},onHide:function(h){if(a.hideCallback){a.hideCallback()}var i=h.getElement("[name=login_error]");i.setStyle("display","none");var g=h.getElement("[name=password]");g.value=""}})}new Request({url:"/ajax/login-form-new",method:"post",onSuccess:function(f){e(f);login.prepareCallback(d,c);cache.popupLogins[c].show()}}).send()})},refreshLoginInfo:function(){new Request.JSON({url:"/login-info",onSuccess:function(a){if(!a.error){login.loginComplete(a)}}.bind(this)}).send()},loginComplete:function(c){var d,b,a;if(c.userId!=0){userId=c.userId;if(c.isPermanentUser){isPermanentUser=c.isPermanentUser}isEmailVerified=c.isEmailVerified;if(login.callbacks&&login.callbacks.length>0){d=login.callbacks.length;for(b=0;b<d;b++){a=login.callbacks.shift();a(c)}}if(login.callonceCallbacks&&login.callonceCallbacks.length>0){d=login.callonceCallbacks.length;for(b=0;b<d;b++){a=login.callonceCallbacks.shift();a(c)}}}else{if(login.notloginCallbacks&&login.notloginCallbacks.length>0){d=login.notloginCallbacks.length;for(b=0;b<d;b++){a=login.notloginCallbacks.shift();a()}}}},logout:function(){},prepareCallback:function(b,a){login.callonceCallbacks.empty();login.callonceCallbacks.push(function(){cache.popupLogins[a].hide()});if(b){login.callonceCallbacks.push(b)}},callonceCallbacks:[]};Array.implement({explode:function(b){var a="";this.each(function(d,c){if(c>0){a+=b}a+=d.toString()});return a}});(function(){var b={rotateLeft:function(e,d){return(e<<d)|(e>>>(32-d))},hex:function(f){var e,g,d="";for(e=7;e>=0;e--){g=(f>>>(e*4))&15;d+=g.toString(16)}return d}};function a(g){var f,e,d="",h=String.fromCharCode;for(f=0;e=g.charCodeAt(f);f++){if(e<128){d+=h(e)}else{if((e>127)&&(e<2048)){d+=h((e>>6)|192);d+=h((e&63)|128)}else{d+=h((e>>12)|224);d+=h(((e>>6)&63)|128);d+=h((e&63)|128)}}}return d}function c(d){var v,u,t,k=1732584193,j=4023233417,i=2562383102,h=271733878,g=3285377520,p,o,n,m,l;d=a(d);var f=d.length,q=new Array(),s=new Array(80),e=function(w){return d.charCodeAt(w)},r=function(w){l=m;m=n;n=b.rotateLeft(o,30);o=p;p=w};for(v=0;v<f-3;v+=4){u=e(v)<<24|e(v+1)<<16|e(v+2)<<8|e(v+3);q.push(u)}switch(f%4){case 0:v=2147483648;break;case 1:v=e(f-1)<<24|8388608;break;case 2:v=e(f-2)<<24|e(f-1)<<16|32768;break;case 3:v=e(f-3)<<24|e(f-2)<<16|e(f-1)<<8|128;break}q.push(v);while((q.length%16)!=14){q.push(0)}q.push(f>>>29);q.push((f<<3)&4294967295);for(t=0;t<q.length;t+=16){for(v=0;v<16;v++){s[v]=q[t+v]}for(v=16;v<=79;v++){s[v]=b.rotateLeft(s[v-3]^s[v-8]^s[v-14]^s[v-16],1)}p=k;o=j;n=i;m=h;l=g;for(v=0;v<=19;v++){r((b.rotateLeft(p,5)+((o&n)|(~o&m))+l+s[v]+1518500249)&4294967295)}for(v=20;v<=39;v++){r((b.rotateLeft(p,5)+(o^n^m)+l+s[v]+1859775393)&4294967295)}for(v=40;v<=59;v++){r((b.rotateLeft(p,5)+((o&n)|(o&m)|(n&m))+l+s[v]+2400959708)&4294967295)}for(v=60;v<=79;v++){r((b.rotateLeft(p,5)+(o^n^m)+l+s[v]+3395469782)&4294967295)}k=(k+p)&4294967295;j=(j+o)&4294967295;i=(i+n)&4294967295;h=(h+m)&4294967295;g=(g+l)&4294967295}return(b.hex(k)+b.hex(j)+b.hex(i)+b.hex(h)+b.hex(g)).toLowerCase()}String.implement({toUTF8:function(){return a(this)},toSHA1:function(){return c(this)}})})();var topbar={links:[{info:{src:"",className:"topBarAvatar",text:"",link:"#"},links:[{link:"/home/profile/avatar",className:"icon_avatar",text:"修改头像"},{link:"/home/profile",className:"icon_userInfo",text:"修改个人资料"},{link:"/home/profile/password",className:"icon_userPassword",text:"修改密码"}]},{info:{className:"icon_newMsg",text:"",link:"/home/message"},links:[{link:"/home/message",className:"icon_inbox",text:"收件箱"},{link:"/home/message/notification",className:"icon_information",text:"提醒"},{link:"/home/message/announcement",className:"icon_notice",text:"公告"}]},{info:{text:"我的",link:"#"},links:[{link:"/u/",className:"icon_home",text:"<strong>我的展示页</strong>"},{link:"/home/blog/write",className:"icon_blog",text:"发表日志"},{link:"/home/album",className:"icon_photoUpload",text:"上传照片"},{link:"/home/fanclub",className:"icon_group",text:"我的饭团"},{link:"/home",className:"icon_yinyuetai",text:"<strong>我的音悦Tai</strong>"},{link:"/home/mv",className:"icon_mv",text:"我的MV"},{link:"/home/pl",className:"icon_playlist",text:"我的悦单"},{link:"/home/friend",className:"icon_friend",text:"我的好友"}]}],toggleLoginForm:function(){var a=$("topBarLogin");var b=a.getElement("a");a.hasClass("topBarLoginBtn")?a.removeClass("topBarLoginBtn"):a.addClass("topBarLoginBtn");b.blur()},init:function(){loginapi_js($("topBarLogin"));var a=$("topBarLogin");var b=a.getElement("a[.topBarLoginPanelOpA]");b.removeEvents("click");b.addEvent("click",function(){this.toggleLoginForm();return false}.bind(this));if($("topBarProposal")){$("topBarProposal").addEvent("click",function(){showAdviceDialog();return false})}$$("#pop-username-top,#pop-password-top").each(function(c){var d=c.get("value");c.addEvents({focus:function(){if(c.get("value")==d){c.set("value","")}c.getParent().addClass("focus")},blur:function(){if(c.get("value")==d||!c.get("value")){c.getParent().removeClass("focus");c.set("value",d)}}})});$$("#topBarLoginForm input").each(function(c){if(c.hasClass("i_text")){c.addEvents({blur:function(){if(c.get("value")==""){c.set("value",c.get("defaultValue"));c.removeClass("focus")}},focus:function(){if(c.get("value")==c.get("defaultValue")){c.set("value","")}}})}});if(Browser.Engine.trident4){$("topBarLoginSubmit").addEvents({mouseover:function(){this.className="hover"},mouseout:function(){this.className=""}});topbar.fixIE6($$("#topBarUserPanel>ul>li"))}login.callbacks.push(function(d){topbar.toggleLoginForm();topbar.links[0].info.src=d.headImg;if(Browser.Engine.trident){topbar.links[0].info.text=(d.userName).substr(0,4)}else{topbar.links[0].info.text=(d.userName).substr(0,6)}topbar.links[0].info.link="/home";topbar.links[1].info.text=d.messageSessionsInfo.totalUnreadCount;if(topbar.links[1].info.text){topbar.links[1].info.src="/images/core/new_msg.gif"}topbar.links[2].links[0].link="/u/"+d.userId;if($("topBarUserPanel")){var c=$("topBarUserPanel").getElement("ul");c.innerHTML=topbar.makeHtml()+c.innerHTML;topbar.fixIE6($$("#topBarUserPanel>ul>li"));$("topBarLogin").setStyle("display","none");$("topBarReg").setStyle("display","none");$("topBarLogined").setStyle("display","inline")}});ajaxForm.init($("topBarLoginForm"),{onRequest:function(){return true},onComplete:function(c){if(c.error){var d=$("login_error");d.setStyle("display","block");d.getElement("em").set("html",c.message);return false}login.loginComplete(c)}})},makeHtml:function(){var c=topbar.links;var e="";for(var d=0,a=c.length;d<a;d++){var b="";if(c[d].info.className){var f=c[d].info.src||"/images/core/opacity.png";b='<img src=" '+f+' " class=" '+c[d].info.className+' " alt=" '+c[d].info.text+' "/>'}e+='<li class="topBarUserPanelOption loginedOption">';e+='<a href="'+c[d].info.link+'" class="topBarUserPanelOptionA">'+b+"<em>"+c[d].info.text+'</em><img src="/images/core/opacity.png" alt="" class="icon_selectDown"/><!--[if lt IE 9]><span></span><![endif]--></a>';e+=topbar.makeHtml2(c[d].links);e+="</li>"}return e},makeHtml2:function(b){var d='<div class="topBarUserSelect"><!--[if lt IE 9]><span class="topBarUserSelectBgT"></span><![endif]--><ul>';for(var c=0,a=b.length;c<a;c++){d+='<li><a href="'+b[c].link+'"><img src="/images/core/opacity.png" class="'+b[c].className+'" alt=""/> '+b[c].text+" </a></li>"}d+='</ul><!--[if lt IE 9]><span class="topBarUserSelectBgB"></span><![endif]--></div>';return d},fixIE6:function(a){if(Browser.Engine.trident4){a.each(function(b){b.removeEvents("mouseenter");b.removeEvents("mouseleave");b.addEvents({mouseenter:function(){b.addClass("hover")},mouseleave:function(){b.removeClass("hover")}})})}}};function doSearch(a){var b=$("hidden_search_form");if(!b){b=new Element("form",{id:"hidden_search_form",action:"/search",method:"get",target:"_blank",styles:{display:"none"}});new Element("input",{type:"hidden",name:"keyword",value:a}).inject(b);b.inject(document.body)}b.keyword.value=a;b.submit()}function tabToggle(a,c,b){b=b||"mouseenter";a.each(function(e,d){if(e.hasClass("current")){c[d].setStyle("display","block")}else{c[d].setStyle("display","none")}e.addEvent(b,function(){c.setStyle("display","none");c[d].setStyle("display","block");a.removeClass("current");e.addClass("current");e.blur();return false})})}function checkFlash(){var a=0;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a=1}catch(b){if(navigator.plugins&&navigator.plugins.length>0&&navigator.plugins["Shockwave Flash"]){a=1}}if(!a){return"<p>您的浏览器不支持Flash,<a href='http://get.adobe.com/cn/flashplayer/' target='_target'>立即下载</a></p>"}return""}function getFlashVersion(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(b){return"6,0,0"}}catch(b){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(b){}}return"0,0,0"}function checkFlashVersion(a){return""}function loadFlash(b,h,c,d,i,e,k,l){var a;var j=checkFlash();if(j!=""){a=j;documentWrite(k,h,a);return}if(l&&l.version){j=checkFlashVersion(l.version);if(j!=""){a=j;documentWrite(k,h,a);return}}c=c||"flashplayer";d=d||"100%";i=i||"100%";e=e||"";var f="window";var g="#000000";if(l){f=l.wmode||"window";g=l.bgColor||"#000000"}if(Browser.Engine.trident){a='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+d+'" height="'+i+'" id="'+c+'" name="'+c+'"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="movie" value="'+b+'" /><param name="loop" value="true" /><param name="menu" value="false" /><param name="wmode" value='+f+' /><param name="quality" value="high" /><param name="bgcolor" value='+g+' /><param name="flashvars" value="'+e+'" /></object>'}else{a='<embed  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+d+'" height="'+i+'" flashvars="'+e+'" bgcolor="'+g+'" allowfullscreen="true" allowscriptaccess="always" wmode="'+f+'" id="'+c+'" name="'+c+'" src="'+b+'" />'}documentWrite(k,h,a)}function documentWrite(a,c,b){if(a){document.write(b)}else{window.addEvent("domready",function(){$(c).set("html",b)})}}function addBookmark(a,d){try{window.external.AddFavorite(a,d);return false}catch(c){try{window.sidebar.addPanel(d,a,"");return false}catch(b){return false}}}function setHomepage(){try{document.body.style.behavior="url(#default#homepage)";document.body.setHomePage("http://www.yinyuetai.com")}catch(a){alert("暂不支持此浏览器")}}var mobile={};mobile.init=function(){mobile.d=navigator.userAgent.toLowerCase();mobile.android=/android/.test(mobile.d);mobile.ipod=/ipod\;/.test(mobile.d);mobile.iphone=/iphone os/.test(mobile.d);mobile.realIpad=/ipad/.test(mobile.d);mobile.wphone=/windows phone os/.test(mobile.d);mobile.ipad=mobile.realIpad||mobile.iphone};function showMessage(b,a){In("humanmessage",function(){window[a+"Message"](b)})}window.addEvent("domready",function(){mobile.init();if($("topBarLogin")){topbar.init()}login.refreshLoginInfo();(function(){var a=window.location.hostname;var c=window.location.pathname;var b=window.location.search;new Request({method:"post",url:"/page-visit"}).send("hostname="+encodeURIComponent(a)+"&pathname="+encodeURIComponent(c)+"&search="+encodeURIComponent(b))})();$$("form").each(function(c){if(!c.action.match(/(http:\/\/[^/]+)?\/search($|\/)/ig)){return}c.method="get";c.addEvent("submit",function(){var d=this["keyword"].value.trim();if(d==searchKeyHint){this["keyword"].value=""}return true});var b=$(c.keyword);if(b){b.setAttribute("autocomplete","off");if(Browser.Engine.trident){if(b.value.trim().length==""){b.value=searchKeyHint;b.addClass("placeholder")}b.addEvents({focus:function(){if(this.value==searchKeyHint){this.value=""}this.removeClass("placeholder")},blur:function(){if(this.value==""){this.value=searchKeyHint}this.addClass("placeholder")}})}if(c.get("name")=="searchForm"){initSearchType(b);var a=10;if(b.get("position")=="footer"){a=5}In("suggest",function(){new Suggest(b,{maxResults:a})})}}});showDarenRewords();(function(){var a=[];document.onkeydown=function(c){c=c||window.event;var d=c.keyCode;if(d!=17&&d!=18&&d!=16&&d!=89){return}if(!a.contains(d)){a.push(d)}if(a.length==4){a.empty();var b=window.YYTrequestEnd-window.YYTrequestStart;var e="CostTime : "+b+" ms\n";e+="Host : "+window.YYThostName+"\n";e+="Rev : "+window.YYTrev;e+="\n\n亲，你居然能按到这个神奇的快捷键！！";alert(e)}};document.onkeyup=function(b){b=b||window.event;var c=b.keyCode;a.erase(c)}})()});function initSearchType(f){var e=f.getParent("div.searchBar");var a=e.getElement("[name=st]");var c=e.getElement("[name=searchTypeList]");var d=e.getElement("[name=searchType]");var b;a.addEvents({mouseenter:function(){c.setStyle("display","block");f.blur()},mouseleave:function(){b=setTimeout(function(){b=0;c.fireEvent("mouseleave")},200)}});c.addEvents({mouseenter:function(){if(b){clearTimeout(b)}},mouseleave:function(){c.setStyle("display","none")},click:function(i){var j=$(i.target);var h=j.get("tag");var g=j.getParent("li");if(h=="a"||h=="em"){d.set("value",g.get("name"));a.set("html",g.get("text")+"<b></b>");this.fireEvent("mouseleave")}}})}function showComplainDialog(){var b="complainDialog";var a=$("siteAdviceDiv").get("html");login.popupLogin(function(){mbox.show(b,"请说明投诉团长的理由",a,{width:408,className:"suggestnew",onInit:function(e){e.initContent="我要投诉**团长**";var d=e.getElement("form");if(!d){return}var f=$(d.content);f.set("html",e.initContent);f.addClass("hint_color");f.addEvent("focus",function(){if(this.value==e.initContent){this.value="";this.removeClass("hint_color")}}.bind(f));f.addEvent("click",function(){if(this.value==e.initContent){this.value="";this.removeClass("hint_color")}}.bind(f));f.addEvent("blur",function(){if(this.value==""){this.value=e.initContent;this.addClass("hint_color")}}.bind(f));var c=e.getElement("[name=waring_info]");ajaxForm.init(d,{onRequest:function(){var g=d.elements.content;if(g.value.trim()==""||g.value.trim()==e.initContent){c.set("html","请输入您要投诉的内容");c.setStyle("display","");g.addEvent("focus",function(){c.setStyle("display","none")});return false}return true},onComplete:function(g){if(!g.error){successMessage("您的投诉已经提交成功，我们会尽快处理并通过站内消息回复。");e.hide()}else{c.set("html","action.message");c.setStyle("display","")}}})}})},null)}function showAdviceDialog(){var c="adviceDialog";var a=$("siteAdviceDiv").get("html");var b="我们非常感谢您的用心，我们的点滴进步离不开您的建议反馈，音悦Tai衷心的谢谢您，请在这里描述您遇到的问题。";mbox.show(c,"欢迎留下您的意见，经采用后有积分奖励哦",a,{width:450,className:"suggestnew",onInit:function(g){var f=g.getElement("form");if(!f){return}var e=g.getElement("iframe");if(e){e.set("src","https://id.b.qq.com/static/account/bizqq/wpa/wpa_a06.html?type=6&kfuin=800002945&ws=www.yinyuetai.com&btn1=%E5%9C%A8%E7%BA%BF%E5%AE%A2%E6%9C%8D")}var h=$(f.content);h.set("html",b);h.addClass("hint_color");h.addEvent("focus",function(){if(this.value==b){this.value="";this.removeClass("hint_color")}}.bind(h));h.addEvent("click",function(){if(this.value==b){this.value="";this.removeClass("hint_color")}}.bind(h));h.addEvent("blur",function(){if(this.value==""){this.value=b;this.addClass("hint_color")}}.bind(h));var d=g.getElement("[name=waring_info]");ajaxForm.init(f,{loginBeforeSubmit:true,onRequest:function(){var i=f.elements.content;if(i.value.trim()==""||i.value.trim()==b){d.set("html","请输入您的意见或遇到的问题");d.setStyle("display","");i.addEvent("focus",function(){d.setStyle("display","none")});return false}return true},onComplete:function(i){if(!i.error){successMessage("您的意见已经提交成功，我们会尽快处理并通过站内消息回复。");g.hide()}else{d.set("html",i.message);d.setStyle("display","")}}})}})}function send_apply_fan(b){var c="sendApplyFan"+b;var a=new Request({url:"/fan/ajax/send-fan-apply",method:"get",data:"fid="+b});login.popupLogin(function(){mbox.showAjax(c,"申请团长",a,{width:440,onInit:function(e){var d=e.getElement("form");d.action="/fan/apply-for-fan";ajaxForm.init(d,{onRequest:function(){var f=d.elements.content;if(f.value.trim()==""){errorMessage("请输入申请的理由");f.focus();return false}if(f.value.trim().length>1000){errorMessage("内容不能超过1000字");f.focus();return false}return true},onComplete:function(f){if(!f.error){successMessage("申请已发送成功，请等待审核!");e.hide()}else{errorMessage(f.message)}}})}})},null)}function send_resign_fan(b){var c="resignApplyFan"+b;var a=new Request({url:"/fan/ajax/send-fan-apply",method:"get",data:"fid="+b});login.popupLogin(function(){mbox.showAjax(c,"辞去团长",a,{width:440,onInit:function(e){var d=e.getElement("form");d.action="/fan/resign-for-fan";ajaxForm.init(d,{onRequest:function(){var f=d.elements.content;if(f.value.trim()==""){errorMessage("请输入辞职的理由");f.focus();return false}if(f.value.trim().length>1000){errorMessage("内容不能超过1000字");f.focus();return false}return true},onComplete:function(f){if(!f.error){successMessage("辞职申请已发送成功，请等待审核!");e.hide()}else{errorMessage(f.message)}}})}})},null)}function send_message(a){var c="sendMessage"+a;var b=new Request({url:"/home/message/ajax/write-message",method:"get",data:"friendId="+a});login.popupLogin(function(){mbox.showAjax(c,"发送短消息",b,{width:440,onInit:function(e){var d=e.getElement("form");ajaxForm.init(d,{onRequest:function(){var f=d.elements.content;if(f.value.trim()==""){errorMessage("请输入消息内容");f.focus();return false}if(f.value.trim().length>1000){errorMessage("消息内容不能超过1000字");f.focus();return false}return true},onComplete:function(f){if(!f.error){successMessage("短消息发送成功");e.hide()}else{errorMessage(f.message)}}})}})},null)}function follow(a,b){login.popupLogin(function(){if(userId==a){errorMessage("似乎没必要关注自己哦");return}var c="/home/friend/follow";var d="friendId="+a;new Request.JSON({url:c,method:"post",data:d,onSuccess:function(e){if(!e.error){successMessage(e.message);if(b){b()}}else{errorMessage(e.message)}}}).send()},null)}function openWindowCenter(d,f,b){var c=window.getSize();var e=c.x;var h=c.y;var a,g;if(f>=e){a=0;f=e}else{a=(e-f)/2}if(b>=e){g=0;b=h}else{g=(h-b)/2}window.open(d,"newwindow","height="+b+",width="+f+",left="+a+",top="+g+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no")}function openPlafFormFail(a){In("humanmessage",function(){errorMessage(a)})}function sinaLogined(a){login.loginComplete(a);if(a.firstlogined){var b=new Request({url:"/ajax/binding",method:"post"});In.load(urlStatic+"/css/bind.$16847.css","css",null,function(){mbox.showAjax("sinaReg","音悦Tai",b,{width:774,className:"login_bind",onInit:function(f){var e=f.getElement("div.info span");e.set("html",a.userName+"的微博");var g=f.getElement("div.first_come strong");g.set("html","新浪微博");var c=f.getElement("div.info img");c.setProperty("src","/images/bind/sina.png");var h=f.getElement("form");ajaxForm.init(h,{onRequest:function(){var i=h.getElement("input");i.disabled=true;return true},onComplete:function(i){if(i.error){var j=f.getElement("[name=login_error]");j.setStyle("display","block");j.getElement("em").set("html",i.message);return false}successMessage("与新浪微博绑定成功");f.hide();setTimeout(function(){window.location.href="/home/connection/info"},500)}});var d=f.getElement("a.popup_close");if(d){d.addEvent("click",function(){f.hide();if(window.location.href.indexOf("home")>=0||window.location.href.indexOf("login")>=0){window.location.href="/home"}return false})}},onShow:function(c){$$("#pop-username,#pop-password").each(function(e){var f=e.get("value");e.addEvents({focus:function(){if(e.get("value")==f){e.set("value","")}e.getParent().addClass("focus")},blur:function(){if(e.get("value")==f||!e.get("value")){e.getParent().removeClass("focus");e.set("value",f)}}})});if(Browser.Engine.trident4){$("pop-form-loginBtn").addEvents({mouseover:function(){this.className="hover"},mouseout:function(){this.className=""}})}var d=c.getElement("[name=enter_yyt]");d.addEvent("click",function(){c.hide();window.open("/reg_step3?callback=/home/connection");return false})}})})}}function bindSinaSuccess(b,a,c){In("humanmessage",function(){successMessage(b)});setTimeout(function(){var d='<div class="binded"><img src="/images/bind/sync_sina.png" alt="新浪微博" title="新浪微博"/><img height="16" width="16" alt="绑定成功" src="/images/bind/ok.gif"/><b>已绑定新浪微博 <a href="http://t.sina.com.cn/'+a+'" target="_blank" class="blue">'+c+'</a></b></div><a href="javascript:void(0)" class="onbind" onclick="cancleBindSina()">取消绑定</a><a href="javascript:void(0)" class="shareBtn" name="SINA" title="设置同步动作" onclick="setSharePlatform(this)">设置同步动作</a>';if($("sina")){$("sina").set("html",d)}},200)}function renrenLogined(a){login.loginComplete(a);if(a.firstlogined){var b=new Request({url:"/ajax/binding",method:"post"});In.load(urlStatic+"/css/bind.$16847.css","css",null,function(){mbox.showAjax("sinaReg","音悦Tai",b,{width:774,className:"login_bind",onInit:function(e){var g=e.getElement("div.info span");g.set("html",a.userName);var f=e.getElement("div.first_come strong");f.set("html","人人网");var c=e.getElement("div.info img");c.setProperty("src","/images/bind/renren.png");var h=e.getElement("form");if(h){ajaxForm.init(h,{onRequest:function(){var i=h.getElement("input");i.disabled=true;return true},onComplete:function(i){if(i.error){var j=e.getElement("[name=login_error]");j.setStyle("display","block");j.getElement("em").set("html",i.message);return false}successMessage("与人人绑定成功");e.hide();setTimeout(function(){window.location.href="/home/connection/info"},500)}})}var d=e.getElement("a.popup_close");if(d){d.addEvent("click",function(){e.hide();if(window.location.href.indexOf("home")>=0||window.location.href.indexOf("login")>=0){window.location.href="/home"}return false})}},onShow:function(c){$$("#pop-username,#pop-password").each(function(e){var f=e.get("value");e.addEvents({focus:function(){if(e.get("value")==f){e.set("value","")}e.getParent().addClass("focus")},blur:function(){if(e.get("value")==f||!e.get("value")){e.getParent().removeClass("focus");e.set("value",f)}}})});if(Browser.Engine.trident4){$("pop-form-loginBtn").addEvents({mouseover:function(){this.className="hover"},mouseout:function(){this.className=""}})}var d=c.getElement("[name=enter_yyt]");d.addEvent("click",function(){c.hide();window.open("/reg_step3?callback=/home/connection");return false})}})})}}function bindRenrenSuccess(c,b,a){In("humanmessage",function(){successMessage(c)});setTimeout(function(){var d='<div class="binded"><img src="/images/bind/sync_renren.png" alt="人人网" title="人人网"/><img height="16" width="16" alt="绑定成功" src="/images/bind/ok.gif"/><b>已绑定人人网 <a href="http://www.renren.com/profile.do?id='+b+'" target="_blank" class="blue">'+a+'</a></b></div><a href="javascript:void(0)" class="onbind" onclick="cancleBindRenren()">取消绑定</a><a href="javascript:void(0)" class="shareBtn" name="RENREN" title="设置同步动作" onclick="setSharePlatform(this)">设置同步动作</a>';if($("renren")){$("renren").set("html",d)}},200)}function qqLogined(a){login.loginComplete(a);if(a.firstlogined){var b=new Request({url:"/ajax/binding",method:"post"});In.load(urlStatic+"/css/bind.$16847.css","css",null,function(){mbox.showAjax("sinaReg","音悦Tai",b,{width:774,className:"login_bind",onInit:function(f){var e=f.getElement("div.info span");e.set("html",a.userName);var g=f.getElement("div.first_come strong");g.set("html","QQ登录");var c=f.getElement("div.info img");c.setProperty("src","/images/bind/qqlogin.png");var h=f.getElement("form");ajaxForm.init(h,{onRequest:function(){var i=h.getElement("input");i.disabled=true;return true},onComplete:function(i){if(i.error){var j=f.getElement("[name=login_error]");j.setStyle("display","block");j.getElement("em").set("html",i.message);return false}successMessage("与QQ绑定成功");f.hide();setTimeout(function(){window.location.href="/home/connection/info"},500)}});var d=f.getElement("a.popup_close");if(d){d.addEvent("click",function(){f.hide();if(window.location.href.indexOf("home")>=0||window.location.href.indexOf("login")>=0){window.location.href="/home"}return false})}},onShow:function(c){$$("#pop-username,#pop-password").each(function(e){var f=e.get("value");e.addEvents({focus:function(){if(e.get("value")==f){e.set("value","")}e.getParent().addClass("focus")},blur:function(){if(e.get("value")==f||!e.get("value")){e.getParent().removeClass("focus");e.set("value",f)}}})});if(Browser.Engine.trident4){$("pop-form-loginBtn").addEvents({mouseover:function(){this.className="hover"},mouseout:function(){this.className=""}})}var d=c.getElement("[name=enter_yyt]");d.addEvent("click",function(){c.hide();window.open("/reg_step3?callback=/home/connection");return false})}})})}}function bindQQSuccess(b,c,a){In("humanmessage",function(){successMessage(b)});setTimeout(function(){var d='<div class="binded"><img src="/images/bind/sync_qqlogin.png" alt="QQ登录" title="QQ登录"/><img height="16" width="16" alt="绑定成功" src="/images/bind/ok.gif"/><b>已绑定QQ <a href="javascript:void(0)" class="blue">'+a+'</a></b></div><a href="javascript:void(0)" class="onbind" onclick="cancleBindQQLogin()">取消绑定</a><a href="javascript:void(0)" class="shareBtn" name="QQ" title="设置同步动作" onclick="setSharePlatform(this)">设置同步动作</a>';if($("qqlogin")){$("qqlogin").set("html",d)}},200)}function baiduLogined(a){login.loginComplete(a);if(a.firstlogined){var b=new Request({url:"/ajax/binding",method:"post"});In.load(urlStatic+"/css/bind.$16847.css","css",null,function(){mbox.showAjax("sinaReg","音悦Tai",b,{width:774,className:"login_bind",onInit:function(f){var e=f.getElement("div.info span");e.set("html",a.userName);var g=f.getElement("div.first_come strong");g.set("html","百度");var c=f.getElement("div.info img");c.setProperty("src","/images/bind/baidu.png");var h=f.getElement("form");ajaxForm.init(h,{onRequest:function(){var i=h.getElement("input");i.disabled=true;return true},onComplete:function(i){if(i.error){var j=f.getElement("[name=login_error]");j.setStyle("display","block");j.getElement("em").set("html",i.message);return false}successMessage("与百度绑定成功");f.hide();setTimeout(function(){window.location.href="/home/connection/info"},500)}});var d=f.getElement("a.popup_close");if(d){d.addEvent("click",function(){f.hide();if(window.location.href.indexOf("home")>=0||window.location.href.indexOf("login")>=0){window.location.href="/home"}return false})}},onShow:function(c){$$("#pop-username,#pop-password").each(function(e){var f=e.get("value");e.addEvents({focus:function(){if(e.get("value")==f){e.set("value","")}e.getParent().addClass("focus")},blur:function(){if(e.get("value")==f||!e.get("value")){e.getParent().removeClass("focus");e.set("value",f)}}})});if(Browser.Engine.trident4){$("pop-form-loginBtn").addEvents({mouseover:function(){this.className="hover"},mouseout:function(){this.className=""}})}var d=c.getElement("[name=enter_yyt]");d.addEvent("click",function(){c.hide();window.open("/reg_step3?callback=/home/connection");return false})}})})}}function bindBaiduSuccess(b,a,c){In("humanmessage",function(){successMessage(b)});setTimeout(function(){var d='<div class="binded"><img src="/images/bind/sync_baidu.png" alt="百度" title="百度"/><img height="16" width="16" alt="绑定成功" src="/images/bind/ok.gif"/><b>已绑定百度 <a href="http://hi.baidu.com/'+c+'/home" target="_blank" class="blue">'+c+'</a></b></div><a href="javascript:void(0)" class="onbind" onclick="cancleBindSina()">取消绑定</a><a href="javascript:void(0)" class="shareBtn" name="BAIDU" title="设置同步动作" onclick="setSharePlatform(this)">设置同步动作</a>';if($("baidulogin")){$("baidulogin").set("html",d)}},200)}function setMainVideo(c,a,b,d){login.popupLogin(function(){var e="/mv/set-main-video";var f="videoId="+c;new Request.JSON({url:e,method:"post",data:f,onSuccess:function(g){if(!g.error){successMessage("OK啦，您已经把&nbsp;&nbsp;"+a+" - "+b+" 设为个人主页的主打歌!");if(d){d()}}else{errorMessage("该曲目已经是您的个人主页主打歌了:)")}}}).send()},null)}function addFavoriteVideo(e,d,b,c,f){e=$(e);var a=e.get("flag");if(!a){e.set("flag",1);login.popupLogin(function(){var g="/mv/add-favorite";var h="videoId="+d;new Request.JSON({url:g,method:"post",data:h,onSuccess:function(i){if(!i.error){var j="";if(b&&c){j="OK啦，您已经把&nbsp;&nbsp;"+b+" - "+c+"添加到收藏夹"}else{j="OK啦，已经添加到收藏夹"}successMessage(j,1200);if(f){f(d)}}else{infoMessage(i.message,1200)}e.erase("flag")}}).send()},{hideCallback:function(){e.erase("flag")}})}}function addFavoritePlaylist(c,b,d){c=$(c);var a=c.get("flag");if(!a){c.set("flag",1);login.popupLogin(function(){var e="/pl/add-playlist-favorite";var f="playlistId="+b;new Request.JSON({url:e,method:"post",data:f,onSuccess:function(g){if(!g.error){successMessage("OK啦，您已经将该悦单添加到你的收藏夹");if(d){d(b)}}else{infoMessage(g.message)}c.erase("flag")}}).send()},{hideCallback:function(){c.erase("flag")}})}}function join_fanclub(a,b){login.popupLogin(function(){var c="/home/fanclub/join-fanclub";var d="artistId="+a;new Request.JSON({url:c,method:"post",data:d,onSuccess:function(f){if(!f.error){successMessage("成功加入饭团"+f.artist_name);if(b){var e=$("joinFanClub");e.setStyle("display","none")}}else{errorMessage(f.message)}}}).send()},null)}function reloadDocument(a){a=a||2000;setTimeout(function(){window.location.href=window.location.href},a)}function checkComment(b,c,a){var e=b.content;var d=e.value.trim().length;if(d==0){$("commentFormHint").set("html","请输入评论内容");e.focus();return false}if(d<c){$("commentFormHint").set("html","评论应至少有"+c+"个字");e.focus();return false}if(d>a){$("commentFormHint").set("html","您的评论有点长哦，精简一下吧，请控制在"+a+"字以内");e.focus();return false}$("commentFormHint").set("html","");return true}function showCommentForm(a){if($("comment_cp_open")){$("comment_cp_open").tween("opacity","0")}if($("comment_cp")){$("comment_cp").setStyles({display:"block",height:"160px"})}if($("userLogin")){if(userId==0){$("userLogin").setStyle("display","block");if($("buttonField")){$("buttonField").setStyle("display","none")}if($("editor")){$("editor").setStyle("display","none")}}else{$("userLogin").setStyle("display","none");if($("buttonField")){$("buttonField").setStyle("display","block")}if($("editor")){$("editor").setStyle("display","block");$("editor").focus()}window.editorcheck=checkTextareaChar("editor","commentContentLength",a,"showLeftCount")}}else{window.editorcheck=checkTextareaChar("editor","commentContentLength",a,"showLeftCount")}}function hideCommentForm(){if($("comment_cp")){$("comment_cp").tween("height","0");setTimeout(function(){$("comment_cp").setStyle("display","none")},500)}if($("comment_cp_open")){$("comment_cp_open").tween("opacity","1")}if($("commentForm")){$("commentForm")["content"].value=""}if($("commentFormHint")){$("commentFormHint").set("html","")}clearInterval(window[editorcheck]);var a=$("synFanBox");if(a){a.getElement("input[type=checkbox]").checked=false;a.setStyle("display","none")}}function errorMessage(b,a){var d=b.split("\n");var c="";d.each(function(e){if(e.trim().length>0){c+="<span>"+e+"</span>"}});if(messageOverrides!=""){In("humanmessage",function(){new HumanMessage(messageOverrides,{type:"error",textAlign:"center"},a)});return}In("humanmessage",function(){new HumanMessage(c,{type:"error",textAlign:"left"},a)})}function successMessage(b,a){var d=b.split("\n");var c="";d.each(function(f,e){if(f.trim().length>0){if(e>0){c+="<br/>"}c+=f}});if(messageOverrides!=""){In("humanmessage",function(){new HumanMessage(messageOverrides,{type:"error",textAlign:"center"},a)});return}In("humanmessage",function(){new HumanMessage(c,{type:"success",textAlign:"center"},a)})}function infoMessage(b,a){var d=b.split("\n");var c="";d.each(function(f,e){if(f.trim().length>0){if(e>0){c+="<br/>"}c+=f}});if(messageOverrides!=""){In("humanmessage",function(){new HumanMessage(messageOverrides,{type:"error",textAlign:"center"},a)});return}In("humanmessage",function(){new HumanMessage(c,{type:"info",textAlign:"center"},a)})}function checkTextareaChar(d,c,g,h,b){var e=d;d=typeof d=="object"?d:$(d);c=typeof c=="object"?c:$(c);var i=d.value;var a="textarea"+(+new Date());var f=$("synFanBox");window[a]=setInterval(function(){if(!d){clearInterval(window[a]);return}var j=d.value.length;f=$("synFanBox");if(e=="editor"&&f){var k=f.getStyle("display");if(j>200&&k=="none"){f.setStyle("display","inline").fade("in")}else{if(j<200&&k=="inline"){f.fade("out").setStyle("display","none")}}}if(j>g){d.value=d.value.substr(0,g)}if(!h){c.set("html",j)}else{if(b&&d.value==i){c.set("html",g)}else{c.set("html",g-j)}}},250);return a}function initRichTextArea(a){richEditor.init({mode:"exact",elements:a,theme:"advanced",plugins:"pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",theme_advanced_buttons1:"bold,italic,underline,link,forecolor,backcolor,emotions,image,media,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect",theme_advanced_buttons2:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_fonts:"\u5B8B\u4F53=simsun;\u9ED1\u4F53=simhei;\u6977\u4F53=\u6977\u4F53;\u96B6\u4E66=\u96B6\u4E66;\u5E7C\u5706=\u5E7C\u5706;\u4EFF\u5B8B=\u4EFF\u5B8B_GB2312;\u5FAE\u8F6F\u96C5\u9ED1=microsoft yahei;Arial=arial,helvetica,sans-serif;Comic Sans MS=comic sans ms,sans-serif;Georgia=georgia,times new roman,times,serif;Courier New=courier new,courier,monospace;Impact=impact,chicago;Tahoma=tahoma,arial,helvetica,sans-serif;Verdana=verdana,geneva;",theme_advanced_font_sizes:"\u4E00\u53F7=26pt;\u5C0F\u4E00=24pt;\u4E8C\u53F7=22pt;\u5C0F\u4E8C=18pt;\u4E09\u53F7=16pt;\u5C0F\u4E09=15pt;\u56DB\u53F7=14pt;\u5C0F\u56DB=12pt;\u4E94\u53F7=10pt;\u5C0F\u4E94=9pt",language:"zh",style_formats:[{title:"Bold text",inline:"b"},{title:"Red text",inline:"span",styles:{color:"#ff0000"}},{title:"Red header",block:"h1",styles:{color:"#ff0000"}},{title:"Example 1",inline:"span",classes:"example1"},{title:"Example 2",inline:"span",classes:"example2"},{title:"Table styles"},{title:"Table row 1",selector:"tr",classes:"tablerow1"}],template_replace_values:{username:"Some User",staffid:"991234"}})}function ajax_title_content_form(g,c,b,f,d,e,a){ajaxForm.init(g,{onRequest:function(){a.getSource();var k=g.title;var j=g.content;var i=k.value.trim().length;var h=j.value.trim().length;if(c>0&&i<c){errorMessage("标题应至少有"+c+"个字");k.focus();return false}if(b>0&&i>b){errorMessage("您的标题有点长哦，请控制在"+b+"字以内吧");k.focus();return false}if(f>0&&h<f){errorMessage("内容应至少有"+f+"个字");return false}if(d>0&&h>d){errorMessage("您的内容有点长哦，请控制在"+d+"字以内吧");return false}successMessage("正在发表，请稍候...");return true},onComplete:function(h){if(!h.error){if(e&&e.hide){e.hide()}setTimeout(function(){successMessage("发表成功,正在更新页面内容，请稍候...")},2600);setTimeout(function(){window.location.reload()},3800)}else{setTimeout(function(){errorMessage(h.message)},2800)}}})}function getSelectedText(){if(Browser.Engine.trident){return document.selection.createRange().text}else{return window.getSelection().toString()}}function executeInProgress(d,c,b,a,e){e=e||0;if(a<0){a=a||-1;if(e<=b){return}}else{a=a||1;if(e>=b){return}}e+=a;d(e);setTimeout(function(){executeInProgress(d,c,b,a,e)},c)}function smoothScrollTo(c){var e=window.getScroll().y;var d=c-e;var b=d<0;var a=Math.ceil(Math.abs(d)/10);if(a<50){a=50}a=b?0-a:a;executeInProgress(function(f){window.scrollTo(window.getScroll().x,f)},20,c,a,e)}function setcopy_gettext(f,a){try{var b=$(f);if(b){var c;if(b.tagName.toLowerCase()=="input"){c=b.value}else{c=b.get("html")}window.document[a].SetVariable("str",c)}}catch(d){}}var floatwin=function(){alert("代码已经复制到粘贴板，您可以使用 Ctrl+V 将内容粘贴到需要的地方去了")};function toggleMoreRelatedMvs(b){var a=$("moreRelatedMvsLink");if(a){if(!cache.hiddenMvs){cache.hiddenMvs=[]}cache.showHiddenMvs=cache.showHiddenMvs||false;if(!a.getProperty("ajaxFlag")){a.setProperty("ajaxFlag",true);$("relatedMvs").innerHTML+='<div class="ajax_loading"></div>';new Request({url:"/mv/ajax/video_more_related?videoId="+b,method:"get",onSuccess:function(c){$$("#relatedMvs>div").dispose();$("relatedMvs").innerHTML+=c;cache.hiddenMvs=$("relatedMvs").getElements("li[class=hidden]");toggleMoreRelatedMvs(b)}}).send();return}if(cache.showHiddenMvs){cache.hiddenMvs.each(function(c){c.removeClass("show");c.addClass("hidden")});cache.showHiddenMvs=false;a.removeClass("ico_stats_open");a.addClass("ico_stats_close");a.set("html","展开更多")}else{cache.hiddenMvs.each(function(c){c.removeClass("hidden");c.addClass("show")});cache.showHiddenMvs=true;a.removeClass("ico_stats_close");a.addClass("ico_stats_open");a.set("html","收起列表")}}}function stripUrlServerPart(b){b=(b||"").trim();var a=new RegExp(/(?:http:\/\/[^/]+)($|\/.*)/ig).exec(b);if(a&&a.length&&a.length>1){var c=a[1].trim();if(c==""){return"/"}else{return c}}return b}function loginapi_js(l){var b=l.getElement("div.coop_box");if(b){var a=b.getElement("ul");var h=l.getElement("div.icon");var k=new Element("div",{"class":"coop_more",html:'<a href="javascript:void(0)">查看更多</a>'});var i=a.getElements("li");var j=k.getElement("a");var c=i.getElement("a");var d;i.each(function(m){d+=m.getSize().y});var g=new Element("div",{"class":"icon_btm"});var e=new Fx.Tween(a);e.start("height","44px");var f=i.length;if(f>3&&f<9){b.removeEvents("mouseenter");b.addEvents({mouseenter:function(){e.start("height",Math.ceil(i.length/3)*44+"px")}})}else{if(f>=9){b.removeEvents("mouseenter");b.addEvents({mouseenter:function(){e.start("height","132px");h.setStyle("display","none");k.inject(a,"after");k.setStyle("display","block");if(g){g.setStyle("display","none")}}})}}if(f>3){h.setStyle("display","block");b.removeEvents("mouseleave");b.addEvents({mouseleave:function(){e.start("height","44px");h.setStyle("display","block");k.setStyle("display","none");if(g){g.setStyle("display","none")}}})}j.addEvent("click",function(){k.setStyle("display","none");a.setStyle("height",d);g.inject(a,"after");g.setStyle("display","block");h.setStyle("display","none")});c.addEvent("click",(function(){if(navigator.userAgent.toLowerCase().indexOf("se 2.x")>-1?true:false){var n,m=0;return function(){if(m<30){login.refreshLoginInfo();m==0?n=setTimeout(arguments.callee,10000):n=setTimeout(arguments.callee,3000);m++}else{clearTimeout(n)}}}})())}}function xheditorInit(d,c,f,b){var e=window.In||undefined;if(!e){throw'Please insert an &lt;script&gt; tag to include in-min.js first!&lt;script type="text/javascript" src="'+urlStatic+'/js/in-min.$22739.js" core="" autoload="false"&gt;&lt;/script&gt;'}else{e.add("jquery",{path:urlStatic+"/js/xheditor/jquery/jquery-1.6.2.min.$21975.js",type:"js"});e.add("xheditor",{path:urlStatic+"/js/xheditor/xheditor-1.1.7-zh-cn.min.$23556.js",type:"js",rely:["jquery"]});var a;return e("xheditor",function(){jQuery.noConflict();var g={skin:"default",tools:"Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Align,List,Outdent,Indent,Link,Unlink,Img,Flash,Emot,Table,Source",upImgUrl:"/editor/editor-img-upload?editorUploadType="+f.type,upImgExt:"jpg,jpeg,gif,png,bmp",upMediaUrl:"/editor/get-media-info",background:"transparent url("+urlStatic+"/js/xheditor/watermark/yinyuetai-logo.png) no-repeat fixed right bottom",loading:urlStatic+"/js/xheditor/watermark/indicator_arrows.gif"};if(Browser.Engine.trident4){delete g.background}a=jQuery(d).xheditor(g);a=a instanceof Array?a.pop():a;if(jQuery(c).length>0){jQuery(c).click(function(){a.toggleSource();return false})}return a},function(){if(b){b(a)}}).returns}}function getPlayer(a){a=a||"yinyuetaiplayer";if(window.document[a]){return window.document[a]}else{if(navigator.appName.indexOf("Microsoft")==-1){if(document.embeds&&document.embeds[a]){return document.embeds[a]}}}return document.getElementById(a)}function playerPause(){var b=$("player");if(b){b.setStyle("visibility","hidden")}var a=$$("[name=mvplayerbox]");if(a&&a.length>0){a.each(function(c){c.setStyle("visibility","hidden")})}}function playerPlay(){var b=$("player");if(b){b.setStyle("visibility","visible")}var a=$$("[name=mvplayerbox]");if(a&&a.length>0){a.each(function(c){c.setStyle("visibility","visible")})}}function showDarenRewords(a){a=a||$$(".daren_icon");if(a&&a.length>0){var b=Browser.Engine.trident4;a.each(function(c){var d=c.get("data-src");if(b){c.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '"+d+"', sizingMethod = 'scale')"}else{c.set("src",d)}})}}Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);if(typeof(this.element)!="element"){this.element=document.id(this.element.getDocument().body)}if(this.options.wheelStops){var c=this.element,d=this.cancel.pass(false,this);this.addEvent("start",function(){c.addEvent("mousewheel",d)},true);this.addEvent("complete",function(){c.removeEvent("mousewheel",d)},true)}},set:function(){var a=Array.flatten(arguments);if(Browser.firefox){a=[Math.round(a[0]),Math.round(a[1])]}this.element.scrollTo(a[0],a[1])},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a)})},start:function(b,c){if(!this.check(b,c)){return this}var a=this.element.getScroll();return this.parent([a.x,a.y],[b,c])},calculateScroll:function(f,e){var c=this.element,a=c.getScrollSize(),g=c.getScroll(),i=c.getSize(),b=this.options.offset,h={x:f,y:e};for(var d in h){if(!h[d]&&h[d]!==0){h[d]=g[d]}if(typeof(h[d])!="number"){h[d]=a[d]-i[d]}h[d]+=b[d]}return[h.x,h.y]},toTop:function(){return this.start.apply(this,this.calculateScroll(false,0))}});var scroll={timer:{},duration:100,toTop:function(e){e=$(e);if(!e){return}var d=new Fx.Tween(e,{duration:250});var c=this;e.addEvent("click",function(){if(Browser.Engine.trident4){window.scrollTo(0,0)}else{new Fx.Scroll(document.body,{onStart:function(){e.erase("show");d.start("opacity",0);clearInterval(c.timer.toTop)},onComplete:function(){c.timer.toTop=setInterval(f,100)}}).toTop()}});c.timer.toTop=setInterval(f,100);var g,b,a=e.getHeight();function f(){g=window.getScrollTop();b=window.getHeight();if(g>0){if(Browser.Engine.trident4){var h=g+b-a;e.setStyle("top",h+"px")}if(e.get("show")){return}e.set("show",true);d.start("opacity",1)}else{if(!e.get("show")){return}e.erase("show");d.start("opacity",0)}}}};function setUserPreference(a,b){new Request.JSON({url:a,method:"post",onSuccess:function(c){if(c.error){errorMessage(c.message)}else{if(b){b()}}}}).send()}function checkEmail(){In("mbox",function(){var a=new Request({url:"/ajax/check-email",method:"post"});mbox.showAjax("checkEmail","请先进行邮箱验证",a,{width:400,className:"checkEmail",onInit:function(b){}})})}window.addEvent("domready",function(){var a=0;var c=$("mainNav");var b=$("main_subNav");if(c&&b){var e=c.hasClass("sub_nav_show");var i=e;var l=c.getElements("li");var k,g;var d=new Fx.Tween(b,{duration:150});l.each(function(m){if(m.hasClass("on")){k=g=m}m.addEvents({mouseenter:function(){a=setTimeout(function(){a=0;var n=m.getElement("div.subnav_box");if(e&&m!=g){f(m);return}if(!e){if(i){if(m!=k){k.removeClass("hover");k=m}if(n){k.addClass("hover")}else{j()}}else{n&&h(m)}}},100)},mouseleave:function(){clearTimeout(a)}})});c.getElement("ul").addEvents({mouseleave:function(){if(k!=g){f(g)}if(!e){j();g&&g.removeClass("hover")}}});function f(m){k&&k.removeClass("hover");m&&m.addClass("hover");k=m}function h(m){d.cancel();d.addEvent("cancel",function(){d.removeEvents("complete")});d.removeEvents("complete");d.addEvent("complete",function(){d.removeEvents("cancel");if(m!=k){f(m)}else{k.addClass("hover")}i=true});d.start("height","41px")}function j(){d.cancel();d.addEvent("cancel",function(){d.removeEvents("complete")});d.removeEvents("complete");d.addEvent("complete",function(){d.removeEvents("cancel");i=false});d.start("height","0")}}});
