window.Xwb||(Xwb={});
(function(p,l){var u=document,t=RegExp("(?:^\\s*)|(?:\\s*$)","g");window.__debug=!!window.__debug;var o=0,m=u.selection;if(window.__debug===false)window.onerror=function(){return true};var g=p.util={templ:function(a,e,k,r){return a.replace(/\{([\w_$]+)\}/g,function(c,i){var q=e[i];if(r&&typeof q==="string")q=argument.callee(q,e,k,r);if(q===void 0||q===null)return"";return k?encodeURIComponent(q):q})},extendIf:function(a,e){a||(a={});if(e)for(var k in e)if(a[k]===void 0)a[k]=e[k];return a},extend:function(a,
e,k){a||(a={});if(e)for(var r in e)if(a[r]===void 0||k)a[r]=e[r];return a},trim:function(a){return a.replace(t,"")},queryString:function(a){if(!a)return"";var e=[],k;for(k in a){var r=a[k];k=encodeURIComponent(k);var c=typeof r;if(c==="undefined")e.push(k,"=&");else if(c!="function"&&c!="object")e.push(k,"=",encodeURIComponent(r),"&");else if(r instanceof Array)if(r.length){c=0;for(var i=r.length;c<i;c++)e.push(k,"=",encodeURIComponent(r[c]===void 0?"":r[c]),"&")}else e.push(k,"=&");else if(c==="object")for(var q in r)e.push(k,
"[",q,"]","=",encodeURIComponent(r[q]),"&")}e.pop();return e.join("")},bind:function(a,e){return function(){return a.apply(e,arguments)}},ajax:function(a){var e,k=a.url;if(window.XMLHttpRequest)e=new XMLHttpRequest;else if(window.ActiveXObject)try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(r){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}if(e){a.method=a.method?a.method.toUpperCase():"GET";var i=a.data,q=!a.cache;if(i||q){var s=k.indexOf("?")>=0;if(q)k=s?k+"&_="+ +new Date:k+"?_="+ +new Date;
if(i){if(typeof i==="object")i=g.queryString(i);if(a.method==="GET"){if(!s&&!q)k+="?";k=k+"&"+i}}}e.open(a.method,k,true);if(a.method==="POST")e.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset="+(a.encoding?a.encoding:""));e.onreadystatechange=function(){if(e.readyState===4){var w=e.status===200;if(w&&a.success){try{var x=!a.dt||a.dt==="json"?eval("("+e.responseText+");"):e.responseText}catch(y){__debug&&console.error("服务器返回JSON格式有误，请检查。\n",y,"\n",e.responseText);w=false}if(w)a.success.call(a.scope||
this,x,e)}if(!w&&a.failure)a.failure.call(a.scope||this,e.responseText,e)}};e.send("POST"===a.method?i:void 0);return e}},jsonp:function(a){function e(){if(!s){try{delete window[k];i.parentNode.removeChild(i);i=null}catch(w){}s=true}}var k="jsonp_"+ +new Date,r=a.doc||document,c=a.url,i=r.createElement("script");r=r.getElementsByTagName("head")[0];var q;if(typeof a=="function"){q=a;a={}}else q=a.success;i.type="text/javascript";a.charset&&(i.charset=a.charset);a.deffer&&(i.deffer=a.deffer);c+=c.indexOf("?")>=
0?"&"+(a.jsonp||"jsonp")+"="+k:"?"+(a.jsonp||"jsonp")+"="+k;if(a.data)c+="&"+g.queryString(a.data);if(a.script){g.extend(i,a.script);delete a.script}i.src=c;var s=false;window[k]=function(){e();if(q)q.apply(a.scope||this,arguments)};i.onreadystatechange=i.onload=function(){var w=this.readyState;if(!s&&(!w||w==="loaded"||w==="complete")){e();if(a.failure)a.failure.call(a.scope||this)}};r.appendChild(i);return i},arrayRemove:function(a,e){a.splice(e,1)},arrayIndexOf:function(a,e){for(var k=0,r=a.length;k<
r;k++)if(a[k]===e)return k;return-1},create:function(){var a=function(){this.init.apply(this,arguments)};if(arguments.length===0)return a;var e,k,r,c=l.makeArray(arguments);if(typeof c[0]==="string"){r=c[0];k=c[1];c.shift()}else k=c[0];c.shift();if(k)k=k.prototype;if(k){e=function(){};e.prototype=k;a.prototype=e=new e}if(r){e.type=r;g.ns(r,a)}r=0;for(var i=c.length;r<i;r++)e=l.extend(e,typeof c[r]==="function"?c[r](k):c[r]);return e.constructor=a},domUp:function(a,e,k){k=k||u.body;for(var r=typeof e===
"string";a;){if(r){if(l(a).is(e))break}else if(e(a))break;a=a.parentNode;if(a===k)return null}return a},ns:function(a,e){for(var k=a.split("."),r=window,c,i=0,q=k.length-1;i<q;i++){c=k[i];r[c]||(r[c]={});r=r[c]}r[k[i]]=e},calWbText:function(a,e){if(e===void 0)e=140;var k=a.match(/[^\x00-\xff]/g);return Math.floor((e*2-a.length-(k&&k.length||0))/2)},byteLen:function(a){var e=a.length;if(a=a.match(/[^\x00-\xff]/g))e+=a.length;return e},byteCut:function(a,e){if(g.byteLen(a)>e){var k=a.replace(/&/g," ").replace(/[^\x00-\xff]/g,
"&&");a=a.slice(0,k.slice(0,e).replace(/&&/g," ").replace(/&/g,"").length)}return a},stringReplace:function(a,e,k,r){return a.substring(0,k)+e+a.substring(r)},focusEnd:function(a,e){a.focus();if(e===void 0)e=a.value.length;if(u.selection){var k=a.createTextRange();k.collapse();k.moveStart("character",e);k.moveEnd("character",e);k.select()}else a.selectionStart=a.selectionEnd=e},selectionStart:function(a){if(!m)return a.selectionStart;var e=m.createRange(),k,r=u.body.createTextRange();r.moveToElementText(a);
try{for(k=0;r.compareEndPoints("StartToStart",e)<0;k++)r.moveStart("character",1)}catch(c){k=this.getCursorPos(a)}return k},selectionBefore:function(a){return a.value.slice(0,this.selectionStart(a))},selectText:function(a,e,k){a.focus();if(m){a=a.createTextRange();a.collapse(1);a.moveStart("character",e);a.moveEnd("character",k-e);a.select()}else a.setSelectionRange(e,k)},hasSelectionSupport:function(){return!l.browser.msie},getCursorPos:function(a){var e=0;if(this.hasSelectionSupport()){if(a.selectionStart||
a.selectionStart=="0")e=a.selectionStart}else try{a.focus();var k=null;k=m.createRange();var r=k.duplicate();r.moveToElementText(a);r.setEndPoint("EndToEnd",k);a.selectionStart=r.text.length-k.text.length;a.selectionEnd=a.selectionStart+k.text.length;e=a.selectionStart}catch(c){}return e},getSelectionText:function(a){var e="";return e=window.getSelection?a.selectionStart!=void 0&&a.selectionEnd!=void 0?a.value.substring(a.selectionStart,a.selectionEnd):"":m.createRange().text},setCursor:function(a,
e,k){e=e==null?a.value.length:e;k=k==null?0:k;a.focus();if(a.createTextRange){a=a.createTextRange();a.move("character",e);a.moveEnd("character",k);a.select()}else a.setSelectionRange(e,e+k)},replaceSelection:function(a,e){a.focus();var k=this.selectionStart(a),r=this.getSelectionText(a).length,c=a.value;r=r===0?k:k+r;a.value=g.stringReplace(c,e,k,r);this.setCursor(a,k+e.length);return k},escapeHtml:function(a){return a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;"):""},disable:function(a,e,k){e?l(a).addClass(k||
"btn-s1-disabled"):l(a).removeClass(k||"btn-s1-disabled")},getBind:function(a,e){var k="_xwbbnd_"+e,r=a[k];r||(r=a[k]=g.bind(a[e],a));return r},uniqueId:function(){return++o},formQuery:function(a){var e="",k="";a=l(a)[0];for(var r=a.elements,c=r.length,i=0;i<c;i++){k=r[i];if(k.tagName==="INPUT")if(k.type==="radio"||k.type==="checkbox")if(!k.checked)continue;if(a=k.name||k.id){if(e!="")e+="&";e+=encodeURIComponent(k.name||k.id)+"="+encodeURIComponent(k.value)}}return e},appendParam:function(a,e){var k=
typeof e!=="string"?this.queryString(e):e;return a+(a.indexOf("?")!==-1?"&"+k:"?"+k)},dequery:function(a){var e={};if(a=a.substr(a.indexOf("?")+1)){a=a.split("&");for(var k=0,r=a.length;k<r;k++){var c=a[k].split("=");e[c[0]]=decodeURIComponent(c[1])}}return e},getFileName:function(a,e){if(a.indexOf("\\"))a=a.split("\\").pop();if(a.length>e)a=a.substr(0,e-4)+".."+a.substr(a.length-4);return a},split:function(a,e,k){var r,c=[],i=[];k||(k="\\");for(var q=0,s=a.length;q<s;q++){r=a.charAt(q);if(r===e){c.push(i.join(""));
i.length=0}else{if(r===k&&a.charAt(q+1)===e){r=e;q++}i[i.length]=r}}i.length&&c.push(i.join(""));return c},parseKnV:function(a){var e={},k,r=this.split(a||"",",");try{for(var c=0,i=r.length;c<i;c++)if(r[c].indexOf(":")===-1)e[r[c]]=true;else{k=g.split(r[c],":");e[k[0]]=k[1]}}catch(q){__debug&&console.trace();throw"Syntax Error:rel字符串格式出错。"+a;}return e},ancestorOf:function(a,e,k){if(a.contains&&!l.browser.webkit)return a.contains(e);else if(a.compareDocumentPosition)return!!(a.compareDocumentPosition(e)&
16);if(k===void 0)k=65535;e=e.parentNode;for(var r=u.body;e!=r&&k>0&&e!==null;){if(e==a)return true;e=e.parentNode;k--}return false},getClassByName:function(a,e){for(var k=function(y){for(var z=a.length,B=0;B<z;B++)if(y.toLowerCase()==a[B])return true;return false},r=function(y){if(typeof e=="string")return y.indexOf(e)<0?false:true;else{for(var z=0;z<e.length;z++)if(y.indexOf(e[z])>-1)return true;return false}},c={},i=0;i<document.styleSheets.length;i++){var q;if(e)if(!document.styleSheets[i].href||
!r(document.styleSheets[i].href))continue;q=document.styleSheets[i].cssRules?document.styleSheets[i].cssRules:document.styleSheets[i].rules;if(typeof a=="string")for(var s=0;s<q.length;s++){if(q[s].selectorText&&q[s].selectorText.toLowerCase()==a)c=q[s].style}else{s=0;for(var w=q.length;s<w;s++){var x=q[s].selectorText&&q[s].selectorText.toLowerCase()||"";if(x&&k(x))c[x]=q[s].style}}}return c},setClassAttr:function(a,e,k){a.slice(0);if(k=this.getClassByName(a,k))if(typeof a=="string")for(var r in e)k[r]=
e[r];else for(var c=0,i=a.length;c<i;c++)if(k[a[c]])for(r in e[c])k[a[c]][r]=e[c][r]},getCursorOffset:function(){function a(r){var c={"<":"&lt;",">":"&gt;",'"':"&quot;","\\":"&#92;","&":"&amp;","'":"&#039;","\r":"","\n":"<br>"," ":!k?"<span style='white-space:pre-wrap;'> </span>":"<pre style='overflow:hidden;display:inline;word-wrap:break-word;'> </pre>"};return r.replace(/<|>|\'|\"|&|\\|\r\n|\n| /gi,function(i){return c[i]})}function e(r){this.ele=r;this.init()}var k=false;if(l.browser.msie&&l.browser.version<
8)k=true;e.prototype={$p:null,$f:null,css:["overflowY","height","width","paddingTop","paddingLeft","paddingRight","paddingBottom","marginTop","marginLeft","marginRight","marginBottom","fontFamily","borderStyle","borderWidth","wordWrap","fontSize","lineHeight","overflowX"],init:function(){var r=this.$p=l("<div></div>"),c={opacity:0,position:"absolute",left:0,top:0,zIndex:2E4},i=this.ele;l.each(this.css,function(q,s){c[s]=i.css(s)});r.css(c);l("body").append(r)},setContent:function(r,c,i){var q=this.$p;
q.html("<span>"+a(r)+"</span>");this.$f=r=l("<span>"+a(c)+"</span>");q.append(r);q.append("<span>"+a(i)+"</span>")},getPos:function(){return this.$f.position()}};return function(r,c){var i=l(r);i.data("mirror")||i.data("mirror",new e(i));var q=i.data("mirror");if(!q)return{};var s=i.val();i=s.substring(0,c);var w=s.charAt(c);s=s.substring(c+1);q.setContent(i,w,s);return q.getPos()}}()};if(window.__debug){if(!window.console)window.console={};g.extendIf(console,{debug:l.noop,trace:l.noop,log:l.noop,
warn:l.noop,error:l.noop,group:l.noop,groupEnd:l.noop})}if(l.browser.msie&&l.trim(l.browser.version)=="6.0"){g.ie6=true;u.execCommand("BackgroundImageCache",false,true)}p.ax={};var j=/\[\?(!?)\.([\w_$]+?)\?([\S\s]*?)\?\]/g,h=/\{(\.?[\w_$]+)\}/g,b=p.ax.Tpl={tpls:{},parse:function(a,e){e||(e={});if(a.charAt(0)!=="<"){var k=b.tpls[a];if(k)a=k}a=a.replace(j,function(r,c,i,q){if(c==="!")return!e[i]?q:"";return e[i]===void 0?"":q});return a.replace(h,function(r,c){var i=c.charAt(0)==="."?e[c.substr(1)]:
b.tpls[c];if(i===void 0||i===null)return"";if(i.toString().charAt(0)==="<")return b.parse(i,e);if(b.tpls[i])return b.parse(b.tpls[i],e);return i})},forNode:function(a,e){if(e)a=this.parse(a,e);return l(a).get(0)},get:function(a){return this.tpls[a]},reg:function(a){l.extend(this.tpls,a)}};(p.ax.Cache={MAX_ITEM_SIZE:3,reg:function(a,e,k){if(this[a])this[a][1]=e;else this[a]=[null,e];k!==void 0&&this.sizeFor(a,k)},get:function(a){a=this[a];if(a===void 0)return null;var e=a[1];a=a[0];if(a===null)return e();
if(a.length>1)return a.pop();if(e)return e();return null},put:function(a,e){var k=this[a];if(k){var r=k[0];r||(k[0]=r=[this.MAX_ITEM_SIZE]);r.length-1>=r[0]||r.push(e)}else this[a]=[[this.MAX_ITEM_SIZE,e]]},remove:function(a){this[a]&&delete this[a]},sizeFor:function(a,e){var k=this[a];k||(this[a]=k=[[]]);k[0]||(k[0]=[]);k[0][0]=e}}).reg("div",function(){return u.createElement("DIV")});p.getCfg=function(a){return p.cfg&&p.cfg[a]};p.getSiteUid=function(){return parseInt(p.getCfg("siteUid"))};p.getUid=
function(){var a=p.getCfg("uid");return a!=="0"&&a};p.getWb=function(a){var e=p.getCfg("wbList");return a?e&&e[a]:e};p.setWb=function(a,e){p.cfg.wbList&&(p.cfg.wbList[a]=e)};l.extend(p,{_cls:{},reg:function(a,e,k){if(this._cls[a]!==void 0&&!k){__debug&&console.trace();throw"已定义类"+a;}return this._cls[a]=e},use:function(a,e){var k=this._cls[a];if(k){if(typeof k==="object")return k;if(typeof e==="function")return new k(e(k.prototype));return new k(e)}return null},isModule:function(a){return this.getModule()===
a},getModule:function(){if(this._mod===void 0)this._mod=this.getCfg("page")||"";return this._mod}});p.ax.Uploader=p.reg("Uploader",function(a){this.init(a)});p.ax.Uploader.prototype={init:function(a){l.extend(this,a);a=this.form;var e=this.formEl=l(a)[0],k="xwb_upload_frame_"+g.uniqueId();this.iframe=b.forNode('<iframe src="about:blank" style="display:none;" id="'+k+'" name="'+k+'"></iframe>');l('<input type="hidden" name="callback"/>').appendTo(a);l(this.iframe).appendTo(u.body);e.target=k;if(!this.action)this.action=
e.action||p.request.apiUrl("action","upload_pic")},setAction:function(a){this.action=a;return this},isLoading:function(){return!!this.jsonpFn},beforeUpload:l.noop,upload:function(a){if(this.beforeUpload(this.form)!==false){this.isLoading()&&this.abort();var e=this,k=this.jsonpFn="jsonp"+(new Date).getTime();window[k]=function(r){window[k]=null;delete e.jsonpFn;r=p.request.parseProtocol(r);(a||e.onload).call(e,r);delete e.jsonpFn};this.formEl.action=g.appendParam(this.action,{callback:"parent."+k,
_:g.uniqueId(),verifyhash:p.getCfg("verifyhash")});this.formEl.submit()}},onload:l.noop,abort:function(){if(this.isLoading()){var a=this.jsonpFn;window[a]=function(){window[a]=null}}}};var d=p.lang={texts:{},getText:function(a,e){var k=d.texts;if(a in k)a=k[a];if(e!==void 0)return g.templ(a,l.isArray(e)||typeof e=="object"?e:[e]);return a}}})(Xwb,$);(function(p){p.texts={};p.ERRORMAP={"0":"发布失败。","5":"超过字数了！","1":"图片正在上传，请稍候。","2":"正在发布,请稍候。。","3":"请先输入内容。","4":"请写上你要说的话题。","1010005":"超出字数了哦！","1020002":"请不要重复发布相同的内容。","1010006":"不能采用sina域下的邮箱。","1010007":"已经提交，请耐心等待管理员审核，谢谢！","20011":"评论字数超过限制","20016":"他还没有关注你,不能发私信","30000":"信息已进入审核中","30001":"皮肤保存失败，请重试。","20020":"上传图片为空","20021":"上传图片大小超过限制","20022":"上传图片类型不符合要求","20023":"上传图片失败，重新试试看？","20024":"非法的上传图片","1021200":"此昵称不存在","1020500":"此微博已被作者移除。","1020301":"此微博已被作者移除。","1020700":"此微博已被作者移除。",
"1020402":"此微博已被作者移除。","1020504":"此微博已被作者移除。","1020501":"此评论已被作者移除。","1020600":"此评论已被作者移除。","1040003":"您尚未登录，请先登录再操作","1040000":"您尚未登录，请先登录再操作","1050000":"系统繁忙，请稍候再试。","1040007":"发评论太多啦，休息一会儿吧。","1040006":"发微博太多啦，休息一会儿吧。","1040005":"你已经被禁止发言","1040004":"请不要发表违法和不良信息。","1021301":"该昵称已存在，请换一个昵称。","1020104":"不要太贪心哦，发一次就够啦。","1020809":"你的关注人数已达到上限","1020808":"你不能关注自己。","1020801":"关注的用户不存在。","1020800":"关注失败","1020805":"已关注该用户","1050000":"操作失败，重新试试看？","1020404":"由于用户设置，你暂不能发表评论。","1020405":"根据对方的设置，你不能进行此操作。",
"1020806":"你使用的帐号或IP关注过于频繁，今日将无法再进行同类操作，请谅解！","2010009":"上传图片大小超过限制。","2010010":"上传图片大小超过限制。","2010011":"上传图片的数据不完整，重新试试看？","2010012":"图片上传失败，重新试试看？","2010013":"上传图片失败，重新试试看？","2010014":"上传图片失败，重新试试看？","1040016_def":"出错啦，该网站调用API次数已超过限制，请联系站长解决！","1040016":"抱歉，目前{0}功能暂不可用，请联系网站管理员！","1040017":"只能使用POST方法","1040018":"缺少参数","1040019":"参数格式不正确","1040020":"创建备份目录失败","1040021":"错误的帐号密码","1040022":"指定的数据库可能不存在","1040023":"请填写数据库的相关信息","1040024":"没有可以恢复的数据","1040025":"请先使用connect()方法连接数据库","1040026":"指定的存放路径不存在",
"1040027":"找不到文件要恢复的文件","1040028":"执行备份的SQL时出错","1040029":"连接时出错，可能输入的帐号信息不正确","1020100":"没有上传图片或图片内容为空。","1020101":"上传图片格式类型不符合要求。","1020102":"上传图片大小超过限制。","1010000":"参数不能为空","1010002":"参数必须为数字","1010003":"参数格式必须为email格式","1010004":"参数格式必须为json格式","1040001":"当前用户没有开通微博","1040002":"api访问超时或拒绝访问","1040003":"token为空","1040014":"不要太贪心哦，发一次就够啦","1040015":"接口不可用","1020000":"发微博内容不能为空","1020001":"发微博内容超过140个字","1020003":"请不要重复发送类同内容","1020100":"上传的不是图片或图片内容为空","1020103":"分享图片微博内容超过140个字","1020200":"转发微博id为空",
"1020201":"转发微博内容超过140个字","1020300":"删除微博id为空","1020302":"删除的微博不是本人发的","1020400":"评论微博id为空","1020401":"评论微博内容为空","1020502":"回复评论评论内容为空","1020503":"回复评论评论内容超过140个字","1020601":"删除评论id不存在或不是本人发的","1020602":"删除评论失败","1020701":"删除收藏微博微博id为空或不存在","1020802":"取消关注的用户id为空或不存在","1020803":"取消关注的用户name为空或不存在","1020804":"关注失败","1020807":"你已经把此用户加入黑名单，加关注前请先解除","1020900":"发私信的内容为空","1020901":"发送方的id为空或本人","1020902":"发送方的不是本人的粉丝","1020903":"删除私信id为空或不是本人发的","1020904":"删除私信id不存在","1021001":"订阅分类名称为空","1021100":"设置用户提醒参数为空",
"1021300":"更改的昵称已经存在","1021302":"请重写简介","1021500":"标签为空","1021501":"添加标签失败","1021502":"删除标签的标签id为空","1021600":"要加入黑名单的用户不存在","1021700":"要更新的选项值都为空","1021800":"id为空","1021900":"注册失败 使用sina的email注册","1021901":"ip被封或不合法","1021902":"昵称重复或者非法","1021903":"该邮箱地址已被注册","1021904":"ip受限制","1020810":"hi 超人，你今天已经关注很多喽，...问题，请联系新浪客服：400 690 0000","1020811":"hi 超人，你今天已经关注很多喽，接下来的时间想想如何让大家都来关注你吧！如有问题，请联系新浪客服：400 690 0000","1010001":"搜索的用户不存在","1022000":"不能自己向自己发送私信","1022001":"对方未登录本网站，无法收到你的私信","1022002":"未登录网站用户不允许发送本地私信",
"1022003":"根据用户设置，你不能给他发私信","1022004":"本地私信发送过程中出现了内部错误","1022005":"搜索的用户不存在","1022006":"私信内容超过300个字，请适当缩短"}})(window.Xwb.lang);(function(p){window.__debug||(__debug=false);var l=location.hostname,u=/:\/\/(.[^\/]+)/,t=p.util,o={init:function(g){this.basePath=g;return this},direct:function(g){g||(g={});var j=g.success;g.success=function(b,d){var a=new (g.responseDefinition||o.DefaultResponseDefinition)(b,g,d);__debug&&console.log("req e:",a);g.scope?j.call(g.scope,a):j(a)};var h=g.url.match(u);return!h||h[1]==l?t.ajax(g):t.jsonp(g)},postReq:function(g,j,h,b){!b&&(b={});b.method="POST";return this.q(g,j,h,b)},q:function(g,j,
h,b){!b&&(b={});b.url=g;if(b.data)t.extend(b.data,j);else b.data=j;b.success=h;return this.direct(b)},basePath:"/",act:function(g,j,h,b){var d=this.apiUrl("action",g);if(j)j.verifyhash=p.getCfg("verifyhash");else j={verifyhash:p.getCfg("verifyhash")};return this.postReq(d,j,function(){h&&h.apply(this,arguments);for(var a=["api."+g],e=0,k=arguments.length;e<k;e++)a.push(arguments[e]);p.fire.apply(p,a)},b)},mkUrl:function(g,j,h,b){g=(b||"index.php")+"?m="+g;if(j)g+="."+j;if(h){g+="&";typeof h==="string"?
g+=h:g+=t.queryString(h)}return this.basePath+g},apiUrl:function(g,j,h){return this.mkUrl("api/weibo/"+g,j,h)},parseProtocol:function(g){return new o.DefaultResponseDefinition(g)},event:function(g,j,h,b){this.postReq(this.mkUrl("event",g),j,h,b)},post:function(g,j,h,b){g={text:g};if(h)g.pic=h;o.act("update",g,j,b)},postImgText:function(g,j,h,b){o.act("upload",{text:g,pic:j},h,b)},repost:function(g,j,h,b,d){o.act("repost",{id:g,text:j,rtids:h},b,d)},getEmotion:function(g){o.act("emotions",null,g)},
del:function(g,j,h,b){o.act("destroy",{id:g,v:j},h,b)},comment:function(g,j,h,b,d,a){o.act("comment",{id:g,text:j,forward:h,type:b},d,a)},delComment:function(g,j,h){o.act("comment_destroy",{id:g},j,h)},reply:function(g,j,h,b,d,a,e){o.act("reply",{id:g,cid:j,text:h,forward:b,type:d},a,e)},follow:function(g,j,h,b){o.act("createFriendship",{uid:g,type:j},h,b)},unfollow:function(g,j,h,b){o.act("deleteFriendship",{id:g,name:j,is_follower:0},h,b)},removeFans:function(g,j,h,b){o.act("deleteFriendship",{id:g,
name:j,is_follower:1},h,b)},fav:function(g,j,h){o.act("createFavorite",{id:g},j,h)},delFav:function(g,j,h){o.act("deleteFavorite",{id:g},j,h)},updateHeadPic:function(g,j,h){o.act("updateProfileImage",{image:g},j,h)},setProfile:function(g,j,h){o.act("saveProfile",g,j,h)},unread:function(g,j,h){o.act("unread",{id:g},j,h)},clearUnread:function(g,j,h){o.act("clearTip",{type:g},j,h)},getComments:function(g,j,h,b,d){o.act("getComments",{id:g,page:j,type:h||1},b,d)},msg:function(g,j,h,b,d){o.act("sendDirectMessage",
{id:j?"":g,name:j?g:"",text:h},b,d)},delMsg:function(g,j,h){o.act("deleteDirectMessage",{id:g},j,h)},followed:function(g,j,h,b,d,a){var e={};if(h)e.t_name=g;else e.t_id=g;if(b)if(d)e.s_name=b;else e.s_id=b;o.act("friendShip",e,j,a)},setting:function(g,j,h){o.act("setting",{type:g},j,h)},shieldBlog:function(g,j,h){o.postReq(o.mkUrl("show","disabled"),{id:g},j,h)},reportSpam:function(g,j,h,b){o.postReq(o.mkUrl("show","reportSpam"),{cid:g,content:j},h,b)},createTags:function(g,j,h){o.act("createTags",
{tagName:g},j,h)},delTag:function(g,j,h){o.act("deleteTags",{tag_id:g},j,h)},updateShowProfile:function(g,j,h){o.act("saveShow",g,j,h)},updateNoticeProfile:function(g,j,h){o.act("saveNotice",g,j,h)},saveLocalpmSet:function(g,j,h){o.act("saveLocalpmSet",g,j,h)},notice:function(g,j,h,b,d,a){o.postReq(o.apiUrl("action","sendNotice"),{available_time:b,uid:g,title:j,content:h},d,a)},saveSkin:function(g,j,h){o.postReq(o.mkUrl("setting","setSkin"),g,j,h)},saveMgrSkin:function(g,j,h){o.postReq(o.mkUrl("mgr/setting",
"setSkin"),g,j,h)},counts:function(g,j,h){o.act("getCounts",{ids:g},j,h)},blacklistAdd:function(g,j,h,b){o.act("createBlocks",{id:g,name:j},h,b)},blacklistDel:function(g,j,h,b){o.act("deleteBlocks",{id:g,name:j},h,b)},getProvinces:function(g){o.act("getProvinces",null,g)},feedback:function(g,j,h){this.postReq(this.mkUrl("feedback","save"),g,j,h)},sinaurl:function(g,j){o.act("sinaurl",{id:g},j)},eventSave:function(g,j){o.event("saveEvent",g,j)},eventJoin:function(g,j){g=$.extend({},g,{action:"join"});
o.event("joinEvent",g,j)},eventClose:function(g,j){o.event("closeEvent",{eid:g},j)},eventDelete:function(g,j){o.event("deleteEvent",{eid:g},j)},eventExit:function(g,j,h){o.event("doAction",{action:"exit",eid:g},j,h)}};o.DefaultResponseDefinition=function(g,j,h){this.raw=g;this.reqCfg=j;if(h)this.connector=h};o.DefaultResponseDefinition.prototype={getRequestCfg:function(){return this.reqCfg},getConnector:function(){return this.connector},getRaw:function(){return this.raw},getData:function(){return this.getRaw().rst},
isOk:function(){return!this.getCode()},getCode:function(){return this.getRaw().errno},getError:function(){return this.getRaw().err},getMsg:function(g,j){var h=this.getCode(),b=h+"_def";b=m[j?h:b]||m[h];if(__debug)b||console.warn("未定义错误码消息："+h,"@",this.getRaw());h=b||g;return(j?t.templ(h,$.isArray(j)||typeof j=="object"?j:[j]):h)||p.lang.getText("系统不给力，请稍后再试试吧。")},each:function(g,j){var h=0,b=this.getData(),d;for(d in b)if(!isNaN(d)){if(j){if(g.call(j,b[d],h)===false)break}else if(g(b[d],h)===false)break;
h++}}};var m=o.ERRORMAP=p.lang.ERRORMAP;if(!p.fire)p.fire=function(){};p.request=o})(window.Xwb);(function(p,l){var u=true,t=parseInt,o=!!(l.browser.msie&&l.browser.version=="6.0"),m=function(){this.cid="imageCtrler";this.canvas=null;this.maxWidth=440;this.curAngle=this.height=this.width=0};m.prototype={init:function(g){g=g.el;this.width=g.offsetWidth;this.height=g.offsetHeight;var j=this.browserVer=parseInt(l.browser.version);if(l.browser.msie&&(document.documentMode||j)<9){g.style.filter="progid:DXImageTransform.Microsoft.Matrix()";g.filters.item("DXImageTransform.Microsoft.Matrix").SizingMethod=
"auto expand";l(g).addClass("narrow-move")}else{this.canvas=l("<canvas></canvas>").attr({height:this.height,width:this.width}).addClass("narrow-move").attr("rel","e:zo").insertBefore(g)[0];if(this.canvas.getContext){l(g).hide();this.canvas.getContext("2d")}}j=g.parentNode;this._clientWidth=j.clientWidth;this._clientHeight=j.clientHeight;this.element=g},rotate:function(g){if(this.element){if(g==="right"){g=this.curAngle+90;this.curAngle=g>=360?0:g}else if(g==="left"){g=this.curAngle-90;this.curAngle=
g<0?360+g:g}var j,h;g=this.width;var b=this.height;this.width=b;this.height=g;if(b>this.maxWidth){g=t(this.maxWidth*g/b);b=this.maxWidth}if(this.canvas){var d=this.canvas.getContext("2d"),a=this.element,e=0,k=0;l(this.canvas).attr({width:b,height:g});d.clearRect(0,0,b,g);switch(this.curAngle){case 0:k=e=0;j=b;h=g;break;case 90:e=b;k=0;j=g;h=b;break;case 180:e=b;k=g;j=b;h=g;break;case 270:e=0;j=k=g;h=b}d.save();d.translate(e,k);d.rotate(this.curAngle*Math.PI/180);d.drawImage(a,0,0,j,h);d.restore()}else{a=
this.curAngle*Math.PI/180;d=Math.cos(a);e=Math.sin(a);a=this.element;a.filters.item("DXImageTransform.Microsoft.Matrix").M11=d;a.filters.item("DXImageTransform.Microsoft.Matrix").M12=-e;a.filters.item("DXImageTransform.Microsoft.Matrix").M21=e;a.filters.item("DXImageTransform.Microsoft.Matrix").M22=d;switch(this.curAngle){case 0:case 180:j=b;h=g;break;case 90:case 270:j=g;h=b}a.width=j;a.height=h;if((document.documentMode||this.browserVer)==8){j=l(a);l(a).css({display:"block","margin-left":(this._clientWidth-
a.offsetWidth)/2}).parent().height(j.height())}}}}};l.extend(l.fn,{zoomText:function(g,j){this.each(function(){var h,b=l(this),d=b.offset(),a=b.text();j=isNaN(j)?2:j;isNaN(+a)||(a=+a+(g||1));b.text(a);h=b.clone().attr("id","").css({position:"absolute",top:d.top,left:d.left,font:b.css("font"),color:b.css("color")}).appendTo(l(document.body));a=j*parseInt(b.css("font-size"));h.animate({"font-size":a,top:d.top-b.height()/4,left:d.left-b.width()/2,opacity:0.1},{duration:300,complete:function(){h.remove()}})});
return this},imgRotate:function(g){this.each(function(){if(this.tagName!=="IMG")return false;var j=l(this).data("img");if(!j){j=new m;j.init({el:this});j.maxWidth=l(this).parent().width();l(this).data("img",j)}j.rotate(g)});return this},focusText:function(g,j,h,b){this.each(function(){l(this).focus(function(){if(this.value===g){var d=l(this).data("xwb_selholder");if(d)d.setText("");else this.value=""}if(j)b?l(h||this).removeClass(j):l(h||this).addClass(j)}).blur(function(){if(l.trim(this.value)===
""){var d=l(this).data("xwb_selholder");if(d)d.setText(g);else this.value=g}if(j)b?l(h||this).addClass(j):l(h||this).removeClass(j)})})},cssDisplay:function(g){var j=this.length;if(j)if(j===1)if(g===undefined)return!this.hasClass("hidden");else g?this.removeClass("hidden"):this.addClass("hidden");else this.each(function(){g?l(this).removeClass("hidden"):l(this).addClass("hidden")});return this},checkClass:function(g,j){g&&this.each(function(){var h=l(this),b=h.hasClass(g);if(j)b||h.addClass(g);else b&&
h.removeClass(g)});return this},switchClass:function(g,j){this.each(function(){var h=l(this);h.removeClass(g);h.addClass(j)});return this},absolutePos:function(){var g=this.offset(),j=l(document),h=j.scrollTop();j=j.scrollLeft();g.left-=j;g.top-=h;return g},slideMenu:function(g,j){this.each(function(){(function(h){function b(){a.show().cssDisplay(true);j&&h.addClass(j)}function d(){j&&h.removeClass(j);a.cssDisplay(false)}var a=h.find(g),e,k;h.hover(function(){if(k){clearTimeout(k);k=false}e=setTimeout(b,
100)},function(){if(e){clearTimeout(e);e=false}k=setTimeout(d,80)})})(l(this))})},substrText:function(g,j){var h=RegExp("(?:<a.*?>.*?<\\/a>)|(?:<img.*?>)|.","gi");this.each(function(){var b=b||"...",d=this.innerHTML;d=d.match(h);g=g||10;if(d&&d.length>g){d=d.slice(0,g).join("");d=j?d:d.replace(/<img.*?title=\"(.*?)\".*?>/gi,"[$1]");l(this).html(d+b)}});return this},fixPng:function(){if(o){var g=function(){if(this.tagName=="IMG"){var j=l("<span></span>").css({width:this.offsetWidth,height:this.offsetHeight,
display:"inline-block"});j[0].style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+this.src+'", sizingMethod="crop")';l(this).replaceWith(j)}};this.each(function(){if(this.complete)g.call(this);else this.onload=g})}return this},makeScroll:function(g){function j(){if(g.ldisabledCs){var x=k.scrollWidth>k.offsetWidth;q.cssDisplay(x);i.cssDisplay(x);q.checkClass(g.ldisabledCs,k.scrollLeft==0);i.checkClass(g.rdisabledCs,k.scrollLeft+k.offsetWidth===k.scrollWidth)}}function h(){var x=
k.scrollLeft+g.pace*c;if(x<0)x=0;if(x>k.scrollWidth)x=k.scrollWidth;k.scrollLeft=x;j();r=setTimeout(arguments.callee,g.interval||20)}function b(){s=false;h()}function d(){s=true;c=-1;mid=setTimeout(b,200);return false}function a(){s=true;c=1;mid=setTimeout(b,200);return false}function e(){if(s){var x=k.scrollLeft+g.pace*c*4;if(x<0)x=0;if(x>k.scrollWidth)x=k.scrollWidth;l(k).animate({scrollLeft:x},"fast",function(){j()})}clearTimeout(r);clearTimeout(mid)}var k=this[0],r,c=1,i=l(g.nextBtn),q=l(g.prevBtn);
g.pace=g.pace||25;var s;g.nextBtn&&l(g.nextBtn).mousedown(a).mouseup(e).click(function(){return false});g.prevBtn&&l(g.prevBtn).mousedown(d).mouseup(e).click(function(){return false});if(g.moveScorll){i.hover(a,e);q.hover(d,e)}var w=0;if(g.items){l(k).find(g.items).each(function(){w+=l(this).outerWidth(true)});l(k).find(g.ct||":first-child").css("width",w)}j();return g},scrollView:function(){function g(a){var e=l(j.children(":last")),k=e.height();e.height(0).css({opacity:0,"font-size":0,overflow:"hidden"}).remove().prependTo(j).animate({height:k},
1E3,"cubicOut",function(){e.css({"font-size":"12px"})}).animate({opacity:1},500,function(){!b&&l.isFunction(a)&&a()})}var j=this,h=j.children(),b;if(h.length){var d=0;l.each(h,function(a,e){d+=l(e).height()});if(d>j.height()){j.hover(function(){if(b)b=window.clearInterval(b)},function(){b||(b=window.setInterval(g,4E3))});b||(b=window.setInterval(g,4E3))}}},scrollMass:function(g,j,h){function b(){a.animate({marginLeft:-r},h?h:1E3,function(){if(k!=0){a.css("marginLeft",0);a.append(a.children(":lt("+
g+")"))}c||d()})}function d(){k=window.setTimeout(b,j)}var a=this,e=a.children().length,k;j=j;var r=a.children()[0].offsetWidth*g,c=false;if(e<=g)return this;this.hover(function(){c=true;clearTimeout(k)},function(){c=false;d()});d();return this}});(function(){function g(){d=/INPUT|IMG|SCRIPT|STYLE|HEAD|MAP|AREA|TEXTAREA|SELECT|META|OBJECT|IFRAME/i;a=/^\s+$/;e=/(\.|\\|\/|\*|\?|\+|\[|\(|\)|\]|\{|\}|\^|\$|\|)/g;k=/</g;r=/>/g;c=u}function j(i,q){if(i){c||g();if(typeof i==="string")i=l.trim(i).split(a);
for(var s=[],w=0,x=i.length;w<x;w++)if(i[w]&&!a.test(i[w]))s[s.length]=i[w].replace(k,"&lt;").replace(r,"&gt;").replace(e,"\\$1");var y=RegExp("("+s.join("|")+")","gi"),z='<span class="'+(q||j.cls)+'">$1</span>',B=document.createElement("DIV");this.each(function(){h(this,y,z,B)});return this}}function h(i,q,s,w){var x=i.childNodes,y=[],z,B;z=0;for(B=x.length;z<B;z++)d.test(x[z].tagName)||y.push(x[z]);z=0;for(B=y.length;z<B;z++){x=y[z];if(x.nodeType===3)try{x=x;var C=q,A=s,D=w,E=x.data;if(!a.test(E)){E=
E.replace(k,"&lt;").replace(r,"&gt;");if(C.test(E)){D||(D=document.createElement("DIV"));D.innerHTML=E.replace(C,A);var F=D.childNodes;C=[];var G=document.createDocumentFragment();A=0;for(var H=F.length;A<H;A++)C[A]=F[A];for(A=0;A<H;A++)G.appendChild(C[A]);x.parentNode.replaceChild(G,x)}}}catch(I){}else arguments.callee(x,q,s,w)}}function b(i,q){var s=i.childNodes,w=[],x,y,z;x=0;for(y=s.length;x<y;x++)d.test(s[x].tagName)||w.push(s[x]);x=0;for(y=w.length;x<y;x++){s=w[x];z=s.nodeType;if(z!==3)if(z===
1&&s.tagName==="SPAN"&&s.className===q){z=s.childNodes[0];var B=s.parentNode,C=s.previousSibling,A=s.nextSibling;if(C&&C.nodeType===3){B.removeChild(C);z.data=C.data+z.data}if(A&&A.nodeType===3){B.removeChild(A);z.data+=A.data}B.replaceChild(z,s)}else arguments.callee(s,q)}}var d,a,e,k,r,c;l.fn.highlight=j;l.fn.clearHighlight=function(i){c||g();i=i||j.cls;this.each(function(){b(this,i)})};j.cls="search-txt"})();l.cookie=function(g,j,h){if(typeof j!="undefined"){h=h||{};if(j===null){j="";h.expires=
-1}var b="";if(h.expires&&(typeof h.expires=="number"||h.expires.toUTCString)){if(typeof h.expires=="number"){b=new Date;b.setTime(b.getTime()+h.expires*24*60*60*1E3)}else b=h.expires;b="; expires="+b.toUTCString()}var d=h.path?"; path="+h.path:"",a=h.domain?"; domain="+h.domain:"";h=h.secure?"; secure":"";document.cookie=[g,"=",encodeURIComponent(j),b,d,a,h].join("")}else{j=null;if(document.cookie&&document.cookie!=""){h=document.cookie.split(";");for(b=0;b<h.length;b++){d=jQuery.trim(h[b]);if(d.substring(0,
g.length+1)==g+"="){j=decodeURIComponent(d.substring(g.length+1));break}}}return j}};l.easing.cubicOut=function(g,j,h,b,d){return b*((j=j/d-1)*j*j+1)+h}})(Xwb,jQuery);Xwb.ax.Tpl.reg({Box:'<div class="win-pop {.cs}"><div class="win-t"><div></div></div><div class="win-con"><div class="win-con-in">[?.title?{BoxTitlebar}?]<div class="win-box" id="xwb_dlg_ct">{.contentHtml}</div></div><div class="win-con-bg"></div></div><div class="win-b"><div></div></div>[?.closeable?<a href="#" class="ico-close-btn" id="xwb_cls" title="关闭"></a>?]{.boxOutterHtml}</div>',DialogContent:'{.dlgContentHtml}<div class="btn-area" id="xwb_dlg_btns">{.buttonHtml}</div>',BoxTitlebar:'<h4 class="win-tit x-bg"><span id="xwb_title">{.title}</span></h4>',
Mask:'<div class="shade-div"></div>',ForwardDlgContentHtml:'<p id="xwb_forward_text"></p><div class="forward-tool"><span id="xwb_warn_tip">还可以输入140字</span><a href="#" class="icon-face-choose" id="xwb_face_trig"></a></div><textarea id="xwb_fw_input" class="style-normal"></textarea><div id="xwb_fw_lbl"></div>',ForwardDlgLabel:'<label><input type="checkbox" value="{.uid}">同时作为{.nick}的评论发布</label>',MsgDlgContent:'<div class="tips-c"><div class="icon-alert" id="xwb_msgdlg_icon"></div><p id="xwb_msgdlg_ct"></p></div>',
Button:'<a href="#" class="btn-s1 {.cs}" id="xwb_btn_{.id}"><span>{.title}</span></a>',EmotionHotList:'<div class="hot-e-list" id="hotEm">{.hotList}</div>',EmotionBoxContent:'<div class="win-tab bottom-line" id="cate">\t{.category} </div><div class="emotion-box" id="box">{EmotionHotList}<div class="e-list" id="flist0">{.faces}</div></div>',ArrowBoxBottom:'<div class="arrow"></div>',EmotionIcon:'<a href="javascript:;" title="{.title}" rel="e:em"><img src="{.src}"></a>',Loading:'<div id="xweibo_loading" class="loading"></div>',
CommentArea:'<div class="feed-comment box-style hidden"><div class="box-t skin-bg"><span class="skin-bg"></span></div><div class="box-content">{.cmtBoxHtml}<ul id="cmtCt" class="hidden"></ul><div class="more-comment" id="more">还有<span id="lefCnt"></span>条评论，<a href="{.cmtUrl}">点击查看</a></div></div><div class="box-b skin-bg"><span class="skin-bg"></span></div><span class="box-arrow skin-bg"></span></div>',CmtBox:'<div class="post-comment" id="cmtBox"><div class="post-comment-main"><a href="javascript:;" class="icon-face-choose" rel="e:ic"></a><a class="btn-s1" href="javascript:;" rel="e:sd"><span>评论</span></a><div class="comment-keyin style-normal"><div><textarea class="comment-textarea" id="inputor"></textarea></div></div></div><div><span class="keyin-tips" id="warn">您还可以输入70字</span><label><input type="checkbox" id="sync"/>同时发一条微博</label></div></div>',
atwho:'<div class="atwho">    [?!.noAt?<h4 id="title">想用@提到谁？</h4>?]\t<ul id="mainUL">\t</ul></div>',MBCmtBox:'<div class="feed-comment box-style" id="cmtBox"><div class="box-t skin-bg"><span class="skin-bg"></span></div><div class="box-content"><div class="post-comment"><div class="post-comment-main"><a class="icon-face-choose" href="#" rel="e:ic"></a><a href="javascript:;" class="btn-s1" rel="e:sd"><span>评论</span></a><div class="comment-keyin style-normal"><div><textarea id="inputor" class="comment-textarea style-normal"></textarea></div></div></div><div><span class="keyin-tips" id="warn">您还可以输入70字</span><label><input type="checkbox" id="sync">同时发一条微博</label></div></div></div><div class="box-b skin-bg"><span class="skin-bg"></span></div><span class="box-arrow skin-bg"></span></div>',
Comment:'<li rel="c:{.id},n:{.nick}"><div class="user-pic"><a href="{.usrUrl}"><img src="{.profileImg}" title="{.nick}" alt="{.nick}的头像" width="{.picSz}" height="{.picSz}" /></a></div><div class="comment-content"><p><a href="{.usrUrl}">{.nick}{.verifiedHtml}</a>：{.text}<span>({.time})</span></p><div>[?.canDel?<a class="ico-del" href="javascript:;" rel="e:dl">删除</a>?]<a class="ico-reply" href="javascript:;" rel="e:rp">回复</a></div></div></li>',MBlogCmt:'<li rel="c:{.id},n:{.nick}"><div class="user-pic"><a href="{.usrUrl}"><img alt="" src="{.profileImg}" /></a></div><div class="comment-c"><p class="c-info"><a href="{.usrUrl}">{.nick}{.verifiedHtml}</a> {.text}({.time}) </p><div class="c-for" id="trigs"><a href="javascript:;" class="ico-reply" rel="e:rp">回复</a>[?.canDel?<a href="javascript:;" class="ico-del" rel="e:dl">删除</a>?]</div>{.cmtBoxHtml}</div></li>',
Followed:'<span class="followed-icon {.cs}">已关注</span>',MediaBoxContentHtml:'<div class="insert-box"><p>请输入<a href="http://video.sina.com.cn" target="_blank">新浪播客</a>、<a href="http://www.youku.com" target="_blank">优酷网</a>、<a href="http://www.tudou.com" target="_blank">土豆网</a>、<a href="http://www.ku6.com/" target="_blank">酷6网</a>等视频网站的视频播放页链接</p><input type="text" id="xwb_inputor" class="style-normal"><a href="#" class="btn-s1" rel="e:ok"><span>确定</span></a><p class="error-tips hidden" id="xwb_err_tip">你输入的链接地址无法识别<span><a href="#" rel="e:cc">取消操作</a>或者<a href="#" rel="e:nm">作为普通的链接</a>发布。</span></p></div>',
PictureBox:'<div class="box-style" style="display:none">\t<div class="box-t skin-bg"><span class="skin-bg"></span></div>\t<div class="box-content">   <div class="show-img"><p><a href="#" rel="e:zo" class="ico-piup">收起</a>   <a href="{.org}" target="_blank" class="ico-src">查看原图</a>   <a href="#" class="ico-turnleft" rel="e:tl">向左转</a>   <a href="#" class="ico-turnright" rel="e:tr">向右转</a></p>   <div name="img"></div></div>   </div>\t<div class="box-b skin-bg"><span class="skin-bg"></span></div>\t<span class="box-arrow skin-bg"></span></div>',
PictureBoxForward:'<div class="show-img cutline" style="display:none"><p><a class="ico-piup" rel="e:zo" href="#">收起</a><a class="ico-src" target="_blank" href="{.org}">查看原图</a><a rel="e:tl" class="ico-turnleft" href="#">向左转</a><a rel="e:tr" class="ico-turnright" href="#">向右转</a></p><div name="img"></div></div>',PreviewBox:'<div class="preview-img"></div>',VideoThumbHtml:'<div class="feed-img"><img width="120px" height="90px" src="{.img}" alt=""><div class="video-view" rel="e:pv,i:{.id}"></div></div>',
VideoBox:'<div class="box-style showbox" style="display:none">\t<div class="box-t skin-bg"><span class="skin-bg"></span></div>\t<div class="show-video box-content">   <p><a rel="e:cv" href="#" class="ico-piup">收起</a><span>|</span><a title="{.title}" target="_blank" href="{.href}">{.title}</a></p>   <div>{.flash}</div></div>\t<div class="box-b skin-bg"><span class="skin-bg"></span></div>\t<span class="box-arrow skin-bg"></span></div>',VideoBoxForward:'<div class="cutline show-video"><p><a rel="e:cv" href="#" class="ico-piup">收起</a><span>|</span><a title="{.title}" target="_blank" href="{.href}">{.title}</a></p><div>{.flash}</div></div>',
MusicBoxContentHtml:'<div class="insert-box music-box"><p>请输入<a href="http://music.sina.com.cn/yueku/" target="_blank">新浪乐库</a>等音乐站点的音乐播放页链接</p><input type="text" id="xwb_inputor" class="style-normal"><a href="#" class="btn-s1" rel="e:ok"><span>确定</span></a><p class="error-tips hidden" id="xwb_err_tip">你输入的链接地址无法识别<span><a href="#" rel="e:cc">取消操作</a>或者<a href="#" rel="e:nm">作为普通的链接</a>发布。</span></p></div>',UploadImgBtn:'<a href="#" rel="e:dlp" class="ico-close-btn" title="删除"></a>',SearchDropdownList:'<ul class="head-searchlist"><li class="mouseover">含<span></span>的微博</li><li>名<span></span>的人</li></ul>',
PrivateMsgContent:'<div class="field"><label>发私信给：</label><input class="style-normal" type="text" id="sender" /><span class="tips-wrong hidden" id="warnPos">她还没有关注你,暂时不能发私信</span></div><div class="field"><label>私信内容：</label><textarea class="style-normal" id="content"></textarea></div><input type="hidden" id="uid" value=""><div class="field-area"><div class="icon-face-choose" rel="e:ic"></div><a class="btn-s1 btn-s1-light fl" href="javascript:;" rel="e:sd"><span>发送</span></a><span class="tips-txt" id="word">您还可以输入140字</span></div>',
NoticeLayer:'<div class="new-tips-fixed hidden"><h4 id="xwb_title">提示</h4><p id="wbs" class="hidden"><span id="c">0</span>条新微博，<a href="{.wbsUrl}">点击查看</a></p><p id="fans" class="hidden"><span id="c">0</span>个新粉丝，<a href="{.fansUrl}">点击查看</a></p><p id="cmts" class="hidden"><span id="c">0</span>条新评论，<a href="{.cmtsUrl}">点击查看</a></p><p id="msgs" class="hidden"><span id="c">0</span>封新私信，<a href="{.msgsUrl}">点击查看</a></p><p id="refer" class="hidden"><span id="c">0</span>条微博提到你，<a href="{.referUrl}">点击查看</a></p><p id="notify" class="hidden"><span id="c">0</span>条通知，<a href="{.notifyUrl}">点击查看</a></p><a href="#" class="ico-close-btn" id="xwb_cls" ></a></div>',
NoticeLayer2:'<div class="new-tips"><a id="wbs" class="hidden" href="{.wbsUrl}"><span id="c">0</span>条新微博</a><a id="fans" class="hidden" href="{.fansUrl}"><span id="c">0</span>个新粉丝</a><a id="cmts" class="hidden" href="{.cmtsUrl}"><span id="c">0</span>条新评论</a><a id="msgs" class="hidden" href="{.msgsUrl}"><span id="c">0</span>封新私信</a><a id="refer" class="hidden" href="{.referUrl}"><span id="c">0</span>条微博提到你</a><a id="notify" class="hidden" href="{.notifyUrl}"><span id="c">0</span>条通知</a><a href="javascript:;" class="ico-close-btn" id="xwb_cls"></a></div>',
Login:'<div class="login-area">\t<span><a href="{.regUrl}">注册帐号</a></span><a class="btn-web-account bind-btn-bg" href="{.siteLoginUrl}">{.siteName}登录</a>\t<span><a href="{.sinaRegUrl}" target="_blank">开通微博</a></span><a class="btn-sina-account bind-btn-bg" href="#" id="oauth">新浪微博帐号登录</a></div><div class="bind-tips">提示：您可以使用{.siteName}帐号或新浪微博帐号登录本网站</div>',PostBoxContent:'<div class="post-box"><div class="post-title" id="postTitle">有什么新鲜事告诉大家？</div><div class="key-tips" id="xwb_word_cal">您还可以输入<span>140</span>字</div><div class="post-textarea" id="focusEl"><div class="inner"><textarea id="xwb_inputor"></textarea></div></div><div class="add-area"><a class="ico-face" href="#" rel="e:ic">表情</a><span class="pic_uploading hidden" id="xwb_upload_tip">正在上传..</span><span class="pic-name hidden" id="xwb_photo_name"><a class="ico-close-btn" href="#" ></a></span><div class="share-upload-pic" id="uploadBtn"><form class="upload-pic"  method="post"  enctype="multipart/form-data" id="xwb_post_form" action="" target=""><input type="file" name="pic" id="xwb_img_file" value="" /></form><a class="ico-pic" href="#" id="xwb_btn_img">图片</a></div><a class="ico-video" href="#" id="xwb_btn_vd" rel="e:vd">视频</a><a class="ico-music" href="#" id="xwb_btn_ms" rel="e:ms">音乐</a><a class="ico-topic" href="#" id="xwb_btn_tp" rel="e:tp">话题</a></div><div class="share-btn" rel="e:sd"></div><div class="post-success hidden" id="xwb_succ_mask"><span class="icon-success"></span>发布成功！</div><div class="post-verify ico-verify hidden" id="xwb_veri_mask">信息已进入审核中</div></div>',
AnchorTipContent:'<div class="tips-c"><div class="tips-ok"></div><p id="xwb_title"></p></div>',AnchorDlgContent:'<div class="tips-c"><div class="ico-ask"></div><p id="xwb_title"></p></div>',SpanBoxContent:'<div class="win-box-inner"><p class="desc">不良信息是指含有色情、暴力、广告或其他骚扰你正常微博生活的内容。</p><p>你要举报的是“{.nick}”发的微博：</p><div class="report-box"><div>{.text}</div><img src="{.img}" class="user" width="30px" height="30px" ></div><p>你可以填写更多举报说明：（选填）</p><p><textarea rows="" cols="" id="content"></textarea></p><div class="foot-con"><p>请放心，你的隐私将会得到保护。<br>举报电话：400 690 0000</p><div class="btn-area"><a href="#" class="btn-s1 btn-s1-light" rel="e:ok"><span>确认举报</span></a><a href="#" class="btn-s1" rel="e:cancel"><span>取消</span></a></div></div></div>',
addFollowContent:'<input type="text" id="Content"/><a class="btn-s1" href="javascript:;" rel="e:submit" ><span>保存</span></a><p>请添加想关注的话题</p><p class="warn hidden">添加关注话题失败</p>',evevtApplicants:'<div class="field"><label>联系方式：</label><input type="text" name="contact" id="contact"/></div>        <div class="field"><label>备注：</label><textarea name="note" id="note"></textarea></div>          <div class="field-area">            <a href="javascript:;" class="btn-s1 btn-s1-light fl" rel="e:sd"><span>发送</span></a>            <span class="tips-txt" id="tips">说明：长度不能超过100个字</span>            <span class="tips-wrong hidden" id="wrong">这里是提示信息</span>        </div>',
colorBox:'<ul><li class="cur" rel="e:getCls,c:#000,w:bg1"><span style="background:#000"></span></li><li rel="e:getCls,c:#808080,w:bg2"><span style="background:#808080"></span></li><li rel="e:getCls,c:#f66,w:bg3"><span style="background:#f66"></span></li><li rel="e:getCls,c:#90c,w:bg4"><span style="background:#90c"></span></li><li rel="e:getCls,c:#e7f2fb,w:bg5"><span style="background:#e7f2fb"></span></li><li rel="e:getCls,c:#fff,w:bg6"><span style="background:#fff"></span></li><li rel="e:getCls,c:#f00,w:bg7"><span style="background:#f00"></span></li><li rel="e:getCls,c:#f60,w:bg8"><span style="background:#f60"></span></li><li rel="e:getCls,c:#fc0,w:bg9"><span style="background:#fc0"></span></li><li rel="e:getCls,c:#090,w:bg10"><span style="background:#090"></span></li></ul><div class="btn-area"><a href="#" class="btn-s1" rel="e:comf"><span>确定</span></a></div>',
colorpicker:'<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div><div class="cp-oper"><span class="txt" id="cltitle">主链接色</span><span class="c-view" id="cRealColor"><span style="background:#0082cb;"></span></span><label>#<input value="" class="input-txt" id="colorshow" /></label></div><a href="#" class="btn-close" rel="e:closeCls"></a></div>',
verify:'<div class="verify-c tips ico-verify">该信息在审核中，请稍后再试！</div>'});(function(p,l){var u=p.util.arrayRemove,t=p.ax.Eventable=function(o){o&&l.extend(this,o);l.extend(this,t.prototype)};t.prototype={fire:function(o){__debug&&console.log("发送:%o",arguments);if(this.events){var m=this.events[o];if(m){var g=l.makeArray(arguments),j,h,b,d,a;g.shift();j=g.length;m._evtLocked=true;b=0;for(d=m.length;b<d;b++){a=m[b];if(!a.removed){if(a.args)g[j]=a.args;h=a.ds?a.cb.apply(a.ds,g):a.cb.apply(this,g);if(h===false)break}}m._evtLocked=false}}return h},on:function(o,m,g,j){if(!o||
!m){__debug&&console.trace();throw"eid or callback can not be null";}if(!this.events)this.events={};var h=this.events[o];h||(h=this.events[o]=[]);h[h.length]={cb:m,ds:g,args:j};return this},un:function(o,m){if(!this.events)return this;if(m===undefined){delete this.events[o];return this}var g=this.events[o];if(g){if(g._evtLocked)g=this.events[o]=g.slice(0);for(var j=0;j<g.length;j++){var h=g[j];if(h.cb==m){u(g,j);h.removed=true;break}}}return this},fireOnce:function(o){var m=this.fire.apply(this,arguments);
this.un(o);return m}}})(Xwb,$);(function(p,l,u){p.ax.SelectionHolder=function(t){u.extend(this,t);l.hasSelectionSupport()||this.initEvent(this.elem)};p.ax.SelectionHolder.prototype={pos:-1,length:0,initEvent:function(){var t=this,o=function(){try{t.saveSpot()}catch(m){}};u(this.elem).mouseup(o).keyup(o).data("xwb_selholder",this)},saveSpot:function(){var t=this.elem;this.pos=l.getCursorPos(t);this.length=l.getSelectionText(t).length},insertText:function(t){var o=this.elem,m=o.value;if(l.hasSelectionSupport())l.replaceSelection(o,
t);else if(this.pos===-1){o.value=m+t;l.focusEnd(o)}else{o.value=l.stringReplace(m,t,this.pos,this.pos+this.length);l.setCursor(o,this.pos+t.length)}this.saveSpot()},setText:function(t){this.elem.value=t;try{this.focusEnd()}catch(o){}},clearSpot:function(){this.length=0;this.pos=-1},focusEnd:function(){l.focusEnd(this.elem);this.saveSpot()},focusStart:function(){l.setCursor(this.elem,0);this.saveSpot()},replaceString:function(t,o,m){this.elem.value=l.stringReplace(this.elem.value,t,o,m);l.setCursor(this.elem,
o+t.length);this.saveSpot()}};p.reg("SelectionHolder",p.ax.SelectionHolder)})(Xwb,Xwb.util,$);(function(p,l,u){function t(m){this.q=m;this.idx=-1;this.end=this.q.length-1}t.prototype={prevented:void 0,stopPropagationed:void 0,get:function(m){var g=this.getRel(m);return g&&g.data&&g.data[m]},escape:function(m){m=this.get(m);if(m!==void 0)return escape(m)},getEl:function(m){return(m=this.getRel(m))&&m.src},clear:function(m){m=m?this.getRel(m):this;m=u(m.src);m.data("xwb_rel",null);m.attr("rel","")},save:function(m,g,j){var h=j?this.getRel(j):this;j=u(h.src);var b=j.data("xwb_rel");if(b)b=b[m]=
g;else{b=p.ax.ActionMgr.parseRel(j.attr("rel"));b[m]=g}h.data=b;j.data("xwb_rel",b);m=[];for(var d in b)m.push(d+":"+(b[d]||"").replace(":","\\:").replace(",","\\,"));m=m.join(",");j.attr("rel",m)},jq:function(m,g){var j=u(this.getEl(m));if(g)j=j.find(g);return j},getRel:function(m){for(var g=this.q,j=this.idx,h=this.end;j<=h;j++)if(g[j].data[m]!==void 0)return g[j]},_next:function(){var m=this.q[++this.idx];if(m===void 0)this.idx=0;return m},clone:function(){var m=new t(this.q);m.idx=0;return m},
preventDefault:function(m){this.prevented=m},stopPropagation:function(m){this.stopPropagationed=m},lock:function(m,g){var j="xwb_e_"+this.data.e;if(g)j+="_"+g;if(m===void 0)return u(this.src).data(j);u(this.src).data(j,m)}};p.ax.ActionMgr=p.reg("ActionMgr",function(m){m&&u.extend(this,m);if(!this.actions)this.actions={};if(!this.filters)this.filters=[];if(this.target){this.bind(this.target);delete this.target}});var o=[];p.ax.ActionMgr.parseRel=function(m){if(typeof m==="string")return l.parseKnV(m);
return l.parseKnV(u(m).attr("rel"))};p.ax.ActionMgr.collectRels=function(m,g,j){var h,b,d=this;if(j===void 0)j=true;l.domUp(m,function(a){var e=u(a);if(j){b=e.data("xwb_rel");if(!b)if(b=e.attr("rel")){b={src:a,data:d.parseRel(b)};e.data("xwb_rel",b)}}else if(b=e.attr("rel"))b={src:a,data:d.parseRel(b)};if(b){h||(h=[]);h[h.length]=b}},g);return h};p.ax.ActionMgr.wrapRel=function(m,g,j){m=this.collectRels(m,g,j);m=new t(m);m._next();return m};p.ax.ActionMgr.getRel=function(m,g,j){return this.wrapRel(m,
j).get(g)};p.ax.ActionMgr.prototype={trigEvent:"click",cacheNodeData:true,reg:function(m,g,j){g={n:m,h:g};j&&u.extend(g,j);this.actions[m]=g;return this},get:function(m){return this.actions[m]},addFilter:function(m,g){g?o.push(m):this.filters.push(m);return this},bind:function(m,g){var j=this;u(m).bind(g||this.trigEvent,function(h){var b=p.ax.ActionMgr.collectRels(h.target,this,this.cacheNodeData);b&&j.fireRels(b,h)});return this},doAct:function(m,g,j){m=p.ax.ActionMgr.collectRels(m,g,j);return!(m&&
this.fireRels(m))},fireRels:function(m,g){var j=new t(m);j.evt=g;__debug&&console.log("act e:",j);for(var h,b,d=o.length,a=this.filters.length,e,k,r;h=j._next();){b=h.data;if(b.e){j.src=h.src;j.data=b;if(j.lock()){__debug&&console.warn("action e:"+j.data.e+" has been locked for resubmiting");k=r=e=true;break}else{h=this.actions[b.e];if(d){e=true;if(this._fireArray(o,j,h)===false){r=j.stopPropagationed;k=j.prevented;break}}if(a){e=true;if(this._fireArray(this.filters,j,h)===false)break}r=j.stopPropagationed;
k=j.prevented;if(h){var c=j.clone();c.src=j.src;c.data=b;c.evt=g;__debug&&console.log("act e:",c);e||(e=true);if(h.h.call(this,c)===false){if(c.stopPropagationed!==void 0)r=c.stopPropagationed;if(c.prevented!==void 0)k=c.prevented;break}if(c.stopPropagationed!==void 0)r=c.stopPropagationed;if(c.prevented!==void 0)k=c.prevented}}}}if(g&&e){if(k===void 0)k=true;if(r===void 0)r=true;k&&g.preventDefault();r&&g.stopPropagation()}},_fireArray:function(m,g,j){for(var h=0,b=m.length;h<b;h++)if(m[h].call(this,
g,j)===false)return false}};p.reg("action",p.use("ActionMgr"))})(Xwb,Xwb.util,$);(function(){function p(o,m){this.elem=m;this.context=o;this.nextChain=u.bind(this._doNextChain,this)}var l=Xwb,u=l.util;p.prototype={validate:function(o){if(this.validating)throw"Concurrent validation exception.";this.setValue(this._getRawValue(this.elem));this._finalChain=o;this.idx=-1;this.error=0;this.msgs=[];this._doNextChain()},_getRawValue:function(o){o=o.value;if(typeof o==="string")o=$.trim(o);return o},getValue:function(){return this.value},setValue:function(o){this.value=o},getErrors:function(){return this.msgs},
addError:function(o){this.msgs.push(o)},doPrehandling:function(){for(var o=this.context,m=0,g;(g=o.nextValidatorData(m++,this.elem))&&g.isPreCmd;)if(typeof g[0]==="string"){var j=o.getValidator(g[0]);if(!j)throw"ValidationException:Undefined validator '"+g[0]+"' in element "+this.elem.name;j.call(this,this.elem,g[1])}else g[0].call(this,this.elem,g[1])},_doNextChain:function(){this.idx++;var o=this.context.nextValidatorData(this.idx,this.elem);if(o)if(o.isPreCmd)this.nextChain();else if(typeof o===
"function"){o[1]={};o.call(this,this.elem,this.getValue(),o[1],this.nextChain)}else if(typeof o[0]==="string"){var m=this.context.getValidator(o[0]);if(!m)throw"ValidationException:Undefined validator ["+o[0]+"] in element "+this.elem.name;m.call(this,this.elem,this.getValue(),o[1],this.nextChain)}else o[0].call(this,this.elem,this.getValue(),o[1],this.nextChain);else{if(!this.error){__debug&&console.log("onpass",this.elem,this);this.context.onpass(this.elem,this)}this._finalChain&&this._finalChain();
this._finalChain=null}},report:function(o,m){o||this.error++;var g=this.elem;this.context.report(o,m,g,this);if(!o){__debug&&console.log("onerror",g,m);this.context.onerror(g,m,this)}}};var t;l.ax.ValidationMgr=function(o){$.extend(this,o);this.init()};l.ax.ValidationMgr.prototype={nextValidatorData:function(o,m){var g=this._getBindingValidators(m);return g&&g[o]},getValidator:function(o){var m=this.validators,g;if(m)g=m[o];if(!g&&t)g=t[o];return g},report:function(o,m,g,j){if(!o)if(j.multival){this.error++;
if(this.error===1&&this.autoFocus)try{g.focus()}catch(h){}}},getMgr:function(){return this},trigOnSubmit:true,onfinal:$.noop,autoFocus:true,init:function(){t||(t={});this.nextChain=u.getBind(this,"_doNextChain");this.form=$(this.form)[0];var o=this;$.each(this._getElements(),function(){(new p(o,this)).doPrehandling()});var m=function(){o.validate();return false};if(this.trigOnSubmit)this.form.onsubmit=m;if(this.trigger){this.trigger=$(this.trigger)[0];$(this.trigger).click(function(){return m()})}},
validateElement:function(o){this.isGlobalVal||this._validateElem(o)},validate:function(){if(!this.isGlobalVal){this.elems=this._getElements();this.currElIdx=-1;this.error=0;this.isGlobalVal=true;this.data={};this.param&&$.extend(this.data,this.param);this.uniqueId=u.uniqueId();this.decorateTrigger&&this.trigger&&u.disable(this.trigger,true);this._doNextChain()}return false},reg:function(o,m){t||(t={});if($.isArray(o))for(var g=0,j=o.length;g<j;g++)this.reg.apply(this,o[g]);else t[o]=m;return this},
onsuccess:function(o,m){m()},_getElements:function(){return this.elements||this.form.elements},_doNextChain:function(){var o=this.elems.length;this.currElIdx>=0&&this.currElIdx<o&&!this.error&&this._collectValue(this.elems[this.currElIdx]);this.currElIdx++;if(this.currElIdx===o)if(this.error)this._finalChain();else{__debug&&console.log("onsuccess",this.data);this.onsuccess(this.data,this.nextChain)!==false&&this.form.submit()}else if(this.currElIdx>o)this._finalChain();else{o=this.elems[this.currElIdx];
o.disabled?this._doNextChain():this._validateElem(o,this.nextChain,true)}},_validateElem:function(o,m,g){if($(o).attr("vrel")){o=new p(this,o);if(g){o.multival=true;this.currentChain=o}o.validate(m)}else m&&m()},lock:function(o){this.isGlobalVal=o?true:false},_finalChain:function(){this.onfinal();this.isGlobalVal=false;this.data&&delete this.data;delete this.currentChain;this.decorateTrigger&&this.trigger&&u.disable(this.trigger,false)},_collectValue:function(o){if(this.currentChain&&this.currentChain.elem===
o)this.data[o.name]=this.currentChain.getValue();else{if(o.tagName==="INPUT")if(o.type==="radio"||o.type==="checkbox"){if(!o.checked)return}else if(o.type==="submit")return;this.data[o.name]=o.value}},_getBindingValidators:function(o){var m,g=$(o);if(this.useCache)if(g.data("xwb_vd_cmds"))m=g.data("xwb_vd_cmds");else{m=this.parseCmd(g.attr("vrel"));this._mergeExtraValidators(m,o);g.data("xwb_vd_cmds",m)}else{m=this.parseCmd(g.attr("vrel"));g.data("xwb_vd_cmds",m);this._mergeExtraValidators(m,o)}return m},
_mergeExtraValidators:function(o,m){var g=this.extraValidators;if(g&&g[m.name||m.id])$.merge(o,g[m.name||m.id])},parseCmd:function(o){if(!o)return[];var m=[];o=u.split(o,"|");for(var g,j=0,h=o.length;j<h;j++){if(o[j].indexOf("=")===-1)g=[o[j],{}];else{g=u.split(o[j],"=");g[1]=u.parseKnV(g[1])}if(g[0].charAt(0)==="_"){g.isPreCmd=true;g[0]=g[0].substr(1)}m[m.length]=g}return m},errTipName:"warntip",tipTextNode:"#tle",warnType:1,tipTextType:"",comForm:false,focusCss:"style-focus",disableCss:"style-disabled",
errCss:"style-wrong",haveSpace:true,okTip:"oktip",onerror:function(o,m,g){var j=true;g.addError(m.m);if(m=$(o).attr(this.errTipName)){m=this.getWarnTip(o,m);if(this.isGlobalVal&&g.error==1){var h=m.data("vrel_previd"),b=m.data("vrel_errors")||0;if(this.uniqueId!=h){m.data("vrel_previd",this.uniqueId);m.data("vrel_errors",0);b=0}else j=b==0;m.data("vrel_errors",++b)}}if(j){g=g.getErrors();if(this.warnType===1){if(g.length!=0)g=g[0]}else g=g.join("，");this.tipWarn(o,g)}},getWarnTip:function(o,m){var g=
$(o).find(m);g.length||(g=$(m));return g},onpass:function(o){var m=$(o).attr(this.errTipName),g=true;if(m){m=this.getWarnTip(o,m);if(this.isGlobalVal){var j=m.data("vrel_previd"),h=m.data("vrel_errors")||0;if(this.uniqueId!=j){m.data("vrel_previd",this.uniqueId);m.data("vrel_errors",0)}else g=h==0}}g&&this.tipPass(o)},tipWarn:function(o,m){var g=$(o).attr(this.errTipName);if(g){g=this.getWarnTip(o,g);var j=g.cssDisplay(true).find(this.tipTextNode);j.length||(j=g);this.tipTextType==="text"?j.text(m):
j.html(m);return g}if(g=$(o).attr(this.okTip))this.haveSpace?$(g).css("visibility","hidden"):$(g).cssDisplay(false)},tipPass:function(o){var m=$(o).attr(this.errTipName);m&&$(m).cssDisplay(false);if(o=$(o).attr(this.okTip))this.haveSpace?$(o).css("visibility",""):$(o).cssDisplay(true)}};l.reg("Validator",l.ax.ValidationMgr)})();(function(p,l,u){p.ax.Shortlink=function(t){u.extend(this,t);this._c={}};p.ax.Shortlink.prototype={EXTERNAL_URL:"http://t\\.cn|http://sinaurl\\.cn",local:"",_getReg:function(t){var o=this.slReg;if(!o){o=this.local;o=this.slReg=[o?RegExp("(?:"+o.replace(".","\\.")+"|"+this.EXTERNAL_URL+")/([0-9a-z]+)","gi"):RegExp("(?:"+this.EXTERNAL_URL+")/([0-9a-z]+)","gi"),o?RegExp("(?:"+o.replace(".","\\.")+"|"+this.EXTERNAL_URL+")/([0-9a-z]+)","i"):RegExp("(?:"+this.EXTERNAL_URL+")/([0-9a-z]+)","i")]}return o[t]},
getUrls:function(){return this._c},search:function(t){var o=[];if(t)for(var m=this._getReg(0);m.exec(t)!=null;)o.push(RegExp.$1);return o},is:function(t){return this._getReg(1).test(t)&&RegExp.$1},from:function(t,o){var m={},g=[],j,h,b,d,a,e;for(e in t){a=t[e].shortlinks=[];j=this.search(t[e].tx);h=0;for(b=j.length;h<b;h++){d=j[h];if(!m[d]){m[d]=true;g.push(d)}a.push([d])}if(t[e].rt){j=this.search(t[e].rt.tx);h=0;for(b=j.length;h<b;h++){d=j[h];if(!m[d]){m[d]=true;g.push(d)}a.push([d,true])}}if(t[e].s){j=
this.search(t[e].s);h=0;for(b=j.length;h<b;h++){d=j[h];if(!m[d]){m[d]=true;g.push(d)}a.push([d])}}}this.info(g,function(k){for(var r in t)for(var c=t[r].shortlinks,i,q=0,s=c.length;q<s;q++){i=c[q][0];if(k[i]){c[q][0]=k[i];k[i].id=i}else c[q][0]=null;c[i]=c[q]}o(t)})},info:function(t,o){for(var m=this._c,g=t.length-1;g>=0;g--)m[t[g]]&&l.arrayRemove(t,g);t.length?p.request.sinaurl(t.join(","),function(j){if(j.isOk()){u.each(j.raw.data,function(h,b){m[h]||(m[h]=b)});o(m)}}):o(m)},render:function(t,o){var m=
this,g=[],j=[];u(t).find("a").each(function(){if(sl=m.is(this.href)){g.push([sl,this]);j.push(sl)}});this.info(j,function(h){for(var b=0,d=g.length;b<d;b++)o(h[g[b][0]],g[b][1])})}}})(Xwb,Xwb.util,$);(function(p,l){function u(){return this.view}var t=p.util,o=p.ax.Tpl,m=document,g=l(window),j=l(m),h=p.ui={Base:t.create()},b=h.Base;h.Base.prototype={autoRender:false,titleNode:"#xwb_title",init:function(d){this.cacheId="c"+t.uniqueId();d&&l.extend(this,d);this.initUI();this.autoRender&&this.getView()},initUI:l.noop,clsNode:"#xwb_cls",initClsBehave:function(d){this.jq(this.clsNode).click(t.bind(this.onClsBtnClick,this));this.setCloseable(d)},setCloseable:function(d){l(this.clsNode).cssDisplay(d);
this.closeable=d},onClsBtnClick:function(){this.close(true);return false},close:function(){if(!this.onclose||this.onclose()!==false)this.destroyOnClose?this.destroy():this.display(false)},tplData:false,createView:function(){var d=this.view;if(typeof d==="string")d=this.view=o.forNode(o.get(d)||d,this.tplData||this,true);else this.view=d=m.createElement("DIV");return l(d)[0]},innerViewReady:l.noop,setTitle:function(d){this.jq(this.titleNode).html(d);return this},getView:function(){var d=this.view;
if(!d||!d.tagName)d=this.createView();this.getView=u;if(this.appendTo){l(this.appendTo).append(d);delete this.appendTo}this.closeable!==void 0&&this.initClsBehave(this.closeable);if(this.actionMgr){this.actionMgr=p.use("ActionMgr",this.actionMgr);this.actionMgr.bind(d);if(this.onactiontrig){var a=this;this.actionMgr.addFilter(function(k){return a.onactiontrig(k)})}}this.innerViewReady(d);this.onViewReady&&this.onViewReady(d);if(this.hidden!==void 0){var e=this.hidden;this.hidden=void 0;this.display(!e)}return d},
fly:function(d){this.view=d&&d[0]||d;return this},beforeShow:l.noop,afterShow:l.noop,beforeHide:l.noop,afterHide:l.noop,jqExtra:function(){for(var d=arguments,a=0,e=d.length;a<e;a++){var k=d[a],r=this.jq("#"+k);if(r){k=k.charAt(0).toUpperCase()+k.substring(1);this["jq"+k]=r}}return this},display:function(d){var a=this.jq();if(d===void 0)return!a.hasClass("hidden");d=!d;if(this.hidden!==d)if(d){if(this.beforeHide()!==false){this.hidden=d;a.addClass("hidden");this.afterHide&&this.afterHide();this.contexted&&
this.setContexted(false)}}else{this.hidden=d;a.css("visibility","hidden").removeClass("hidden");this.beforeShow();a.css("visibility","");this.contextable&&!this.contexted&&this.setContexted(true);this.afterShow()}return this},onContextRelease:function(){this.display(false)},appendAt:function(d){l(d).append(this.getView());return this},ancestorOf:function(d,a){d=d.view||d;return t.ancestorOf(this.view,d,a)},jq:function(d){return d===void 0?l(this.getView()):l(this.getView()).find(d)},destroy:function(){this.display(false);
this.jq().remove()},domEvent:function(d,a,e){if(d==="mousedown"){var k=this,r=function(c){k.contexted||p.use("contextMgr").releaseAll(c);return a.apply(k,arguments)};if(!this._mousedownFns)this._mousedownFns={};this._mousedownFns[a]=r;this.jq(e).bind(d,r)}else this.jq(e).bind(d,a)},unDomEvent:function(d,a,e){if(d==="mousedown"){var k=this._mousedownFns[a];this.jq(e).unbind(d,k);delete this._mousedownFns[a]}else this.jq(e).unbind(d,a)},setContexted:function(d){if(this.contexted!==d)d?p.use("contextMgr").context(this):
p.use("contextMgr").release(this);return this},templ:function(d){for(var a in d)this.jq(a).html(d[a]);return this},offset:function(){if(arguments.length){this.jq().css(arguments[0]);return this}return this.jq().offset()},offsetsTo:function(d){d=d instanceof l&&d[0]||d;d=d==window?{left:j.scrollLeft(),top:j.scrollTop()}:l(d).offset();var a=this.jq().offset();return[a.left-d.left,a.top-d.top]},scrollIntoView:function(d,a){var e=d?d.view||d[0]||d:m.body,k=this.getHiddenAreaOffsetVeti(e);if(k!==false)e.scrollTop=
k;if(a){k=this.getHiddenAreaOffsetHori(d);if(k!==false)e.scrollLeft=k}return this},getHiddenAreaOffsetVeti:function(d){var a=d.view||d[0]||d,e=this.view,k=this.offsetsTo(a);d=parseInt(a.scrollTop,10);k=k[1]+d;e=e.offsetHeight;var r=k+e;a=a.clientHeight;var c=d+a;if(e>a||k<d)return k;else if(r>c){r-=a;if(d!=r)return r}return false},getHiddenAreaOffsetHori:function(d){var a=d.view||d[0]||d,e=this.view;d=parseInt(a.scrollLeft,10);var k=this.offsetsTo(a)[0]+d;e=e.offsetWidth;a=a.clientWidth;var r=k+e,
c=d+a;if(e>a||k<d)return k;else if(r>c){r-=a;if(r!=d)return r}return false},anchor:function(d,a,e,k){var r=l(d);d=this.jq();var c=r.offset(),i=r.width(),q=r.height();r=d.width();var s=d.height(),w=a.charAt(0),x=a.charAt(1);a=c.left;c=c.top;switch(w){case "t":c-=s;break;case "b":c+=q;break;case "c":c+=Math.floor((q-s)/2)}switch(x){case "c":a+=Math.floor((i-r)/2);break;case "r":a+=i-r}if(e){i=i=[a,c];e(i,r,s);a=i[0];c=i[1]}if(k){if(c<0)c=0;else{e=g.height();if(c+s-j.scrollTop()>e)c=e-s+j.scrollTop()}if(a<
0)a=0;else{e=g.width();if(a+r-j.scrollLeft()>e)a=e-r+j.scrollLeft()}}d.css("left",a+"px").css("top",c+"px")},center:function(){var d=this.jq(),a=[g.width(),g.height()];d=[d.width(),d.height()];var e=(a[1]-d[1])*0.8;this.view.style.left=Math.max((a[0]-d[0])/2|0,0)+(this.isFixed&&!t.ie6?0:j.scrollLeft())+"px";this.view.style.top=Math.max(e-e/2|0,0)+(this.isFixed&&!t.ie6?0:j.scrollTop())+"px";return this},clip:function(){if(!b.CLIP_WRAPPER_CSS){b.CLIP_WRAPPER_CSS={position:"absolute",clear:"both",overflow:"hidden"};
b.CLIPPER_CSS={position:"absolute",left:0,top:0}}if(!this.jqClipWrapper){var d=l(p.ax.Cache.get("div")),a=this.getView(),e=this.jq(),k=a.parentNode,r=e.offset();d.css(b.CLIP_WRAPPER_CSS).css(r).css("width",e.width()+"px").css("height",e.height()+"px").css("z-index",e.css("z-index")).append(a);r=this._tmpClipedCss={};for(var c in b.CLIPPER_CSS)r[c]=a.style[c];e.css(b.CLIPPER_CSS);k&&d.appendTo(k);this.jqClipWrapper=d}return this.jqClipWrapper},unclip:function(){if(this.jqClipWrapper){var d=this.jqClipWrapper[0],
a=d.style,e=this.jq(),k=e[0].style,r;for(r in b.CLIP_WRAPPER_CSS)a[r]="";this.jqClipWrapper.css("overflow","").css("width","").css("height","");a=this._tmpClipedCss;for(r in a)k[r]=a[r];delete this._tmpClipedCss;d.removeChild(e[0]);d.parentNode&&this.jqClipWrapper.replaceWith(e);p.ax.Cache.put("div",d);delete this.jqClipWrapper}},slide:function(d,a,e,k,r,c){var i=this.jq(),q=i.width(),s=i.height(),w=0,x=0,y=0,z=0;this.clip();var B=d.charAt(0);d=d.charAt(1);switch(B){case "l":w=0-q;break;case "r":w=
0+q;break;case "t":x=0-s;break;case "b":x=0+s}switch(d){case "l":y=0-q;break;case "r":y=0+q;break;case "t":z=0-s;break;case "b":z=0+s}i.css("left",w).css("top",x);k||(k={});if(y!=w)k.left=k.left===void 0?y:k.left+y;if(z!=x)k.top=k.top===void 0?z:k.top+z;a&&i.css("visibility","");var C=this;i.animate(k,r||"fast",c,function(){if(!a){C.display(false);i.css("visibility","")}setTimeout(function(){C.unclip();e&&e(C)},0)})}};p.reg("base",b)})(Xwb,$);Xwb.reg("contextMgr",function(){var p=Xwb,l=p.util,u=document,t={context:function(o){o.contexted&&this.release(o);var m=this.q;if(!m)this.q=m=[];m.length||$(u).mousedown(this._getDocEvtHandler());m[m.length]=o;this._setCompEvtHandler(o,true);o.contexted=true;__debug&&console.log("contexted",o)},release:function(o,m){o.contexted=false;if(o.onContextRelease(m)!==false){this._setCompEvtHandler(o,false);l.arrayRemove(this.q,o);this.q.length||$(u).unbind("mousedown",this._getDocEvtHandler())}else o.contexted=
true;__debug&&console.log("release context",o)},releaseAll:function(o){var m=this.q;if(m){if(o)var g=o.target;for(var j=m.length-1;j>=0;j--)if(!g||!m[j].ancestorOf(g))this.release(m[j],o)}},_setCompEvtHandler:function(o,m){m?o.domEvent("mousedown",this._compEvtStopHandler):o.unDomEvent("mousedown",this._compEvtHandler)},_getDocEvtHandler:function(){var o=this.docEvtHd;if(!o)o=this.docEvtHd=l.bind(this._docHandler,this);return o},_releaseFollower:function(o,m){var g=this.q;if(g){var j=g.length-1;if(j!==
-1&&g[j]!==o)for(;j>=0;j--){if(g[j]===o)break;this.release(g[j],m)}}},_compEvtStopHandler:function(o){if($.inArray(o.target.nodeName,["SELECT","INPUT","TEXTAREA"])!=-1)return true;t._releaseFollower(this,o);return false},_compEvtHandler:function(o){t._releaseFollower(this,o)},_docHandler:function(o){this.releaseAll(o)}};p.ax.contextMgr=t;p.reg("contextMgr",t,true);return t});(function(p,l){var u=p.util,t=p.ax.Tpl,o=document,m=p.ui.Base,g=p.ui,j=10001,h=l(window),b={layers:[],hash:{},keyListeners:0,add:function(a){var e=a.cacheId;if(!this.hash[e]){this.layers.push(a);if(a.keyEvent){if(this.keyListeners===0){__debug&&console.log("bind key listener");l(o).bind("keydown",this.getEvtHandler())}this.keyListeners++}this.hash[e]=true}},remove:function(a){var e=a.cacheId;if(this.hash[e]){var k=this.layers;k[k.length-1]===a?k.pop():u.arrayRemove(k,a);this.keyListeners--;if(this.keyListeners===
0){__debug&&console.log("remove key listener");l(o).unbind("keydown",this.getEvtHandler())}delete this.hash[e]}},getEvtHandler:function(){var a=this._onDocKeydown;if(!a)a=this._onDocKeydown=u.bind(this.onDocKeydown,this);return a},onDocKeydown:function(a){var e=this.layers[this.layers.length-1];if(e&&e.keyEvent)return e.onKeydown(a)}},d=g.Layer=u.create(m,{hidden:true,onViewReady:l.noop,frameMask:l.browser.msie,trackZIndex:function(){if(this.z!==j){j+=3;this.mask&&l(this.mask).css("z-index",j-1);
this.frameMask&&l(this.getFrameMask()).css("z-index",j-2);this.jq().css("z-index",j);this.z=j}},keyEvent:true,onKeydown:function(a){if(a.keyCode===27&&!this.cancelEscKeyEvent){this.close();return false}},beforeShow:function(){this.mask&&this._applyMask(true);var a=this.jq().css("position");if(a==="absolute"||a==="fixed")this.trackZIndex();b.add(this);this.autoCenter&&this.center()},afterHide:function(){this.mask&&this._applyMask(false);b.remove(this)},getFrameMask:function(){if(this.frameMaskEl)return this.frameMaskEl;
return this.frameMaskEl=t.forNode('<iframe class="shade-div shade-iframe" frameborder="0"></iframe>')},_applyMask:function(a){var e=this.mask;if(!e||e===true)e=this.mask=t.forNode(t.get("Mask"));var k=h.height();if(a){l(e).height(k).appendTo(o.body);this.frameMask&&l(this.getFrameMask()).height(k).appendTo(o.body);h.bind("resize",u.getBind(this,"onMaskWinResize"))}else{l(e).remove();this.frameMask&&l(this.getFrameMask()).remove();h.unbind("resize",u.getBind(this,"onMaskWinResize"))}},onMaskWinResize:function(){var a=
this.mask,e=h.height();a&&l(a).height(e);this.frameMask&&l(this.getFrameMask()).height(e);this.autoCenter&&this.center()}});d.setCurrentZ=function(a){j=a};p.reg("Layer",d);g.Switcher=function(a){a&&l.extend(this,a);this.initUI()};p.reg("Switcher",g.Switcher);g.Switcher.prototype={trigMode:"click",initUI:function(){this.items&&this.add(this.items,this.contents)},select:function(a){var e=this.selectedItem;this.autoRecover&&this.clearTimer(1);if(this.selectedCS){e&&l(e).removeClass(this.selectedCS);
l(a).addClass(this.selectedCS)}this.onselect&&this.onselect(a);this.selectedItem=a;if(a.contentEl){var k=a.contentEl;setTimeout(function(){e&&e.contentEl&&l(e.contentEl).cssDisplay(false);l(k).cssDisplay(true)},0)}},unselect:function(a){this.selectedCS&&l(a).removeClass(this.selectedCS);a.contentEl&&l(a.contentEl).cssDisplay(false);this.mouseoutTimer&&this.clearTimer(1);this.selectedItem=NULL},clearTimer:function(a){if(a!==0){if(this.mouseoutTimer){clearTimeout(this.mouseoutTimer);this.mouseoutTimerFn=
this.mouseoutTimer=false}}else if(this.mouseoverTimer){clearTimeout(this.mouseoverTimer);this.mouseoverTimerFn=this.mouseoverTimer=false}},add:function(a,e){if(a.length)if(e)for(var k=0,r=a.length;k<r;k++)this.add(a[k],e[k]);else{k=0;for(r=a.length;k<r;k++)this.add(a[k])}else{k=l(a);var c=this;if(k.hasClass(this.selectedCS)){this.selectedItem&&this.unselect();this.selectedItem=a}if(e)a.contentEl=e;if(this.trigMode==="hover"||this.autoRecover)k.hover(function(){c.autoRecover&&c.mouseoutTimer&&c.clearTimeout(1);
if(c.trigMode==="hover")if(this!==c.selectedItem)if(c.delaySelect){c.mouseoverTimer&&c.clearTimeout(0);c.mouseoverTimer=setTimeout(function(){c.select(a)},c.delaySelect)}else c.select(this);return!c.enableBubble},function(i){c.mouseoverTimer&&c.clearTimeout(0);if(c.trigMode==="hover"){if(this!==c.selectedItem&&c.mouseoutTimerFn){c.mouseoutTimerFn();c.mouseoutTimerFn=NULL}i=i.target;if(c.autoRecover&&(i===this||u.ancestorOf(this,i)))if(!c.mouseoutTimer){var q=this;c.mouseoutTimerFn=function(){c.unselect(q)};
c.mouseoutTimer=setTimeout(c.mouseoutTimerFn,c.delayHide||500)}}return!c.enableBubble});if(this.trigMode==="click")k.bind(this.clickEvent||"mousedown",function(){c.select(this);return false})}}};g.Box=p.reg("Box",u.create(g.Layer,{view:"Box"}));g.Tip=p.reg("Tip",u.create(g.Box,{cs:"win-fixed",autoHide:true,timeoutHide:1E3,timeoutShow:200,stayHover:false,offX:25,offY:-10,innerViewReady:function(){var a=this.jq();this.stayHover&&a.hover(u.bind(this.onMouseover,this),u.bind(this.onMouseout,this))},onMouseover:function(){this.clearHideTimer()},
onMouseout:function(){this.setHideTimer()},clearHideTimer:function(){if(this.hideTimerId){clearTimeout(this.hideTimerId);this.hideTimerId=false}},beforeShow:function(){if(d.prototype.beforeShow.apply(this,arguments)===false)return false;this.autoHide&&this.setHideTimer()},setShowTimer:function(a){if(a)this.showTimerId=setTimeout(u.getBind(this,"onTimerShow"),this.timeoutShow);else if(this.showTimerId){clearTimeout(this.showTimerId);this.showTimerId=false}},setHideTimer:function(){this.clearHideTimer();
this.hideTimerId=setTimeout(u.getBind(this,"onTimerHide"),this.timeoutHide)},onTimerHide:function(){this.display(false);this.clearHideTimer()},onTimerShow:function(){this.display(true);this.setShowTimer(false)}}))})(Xwb,$);(function(p,l){var u=p.util,t=document,o=p.ax.Tpl,m=p.ui,g=p.lang.getText;m.Dialog=p.reg("Dlg",u.create(m.Box,function(j){return{cs:"win-tips win-fixed",contentHtml:"DialogContent",focusBtnCs:"btn-s1-light",mask:true,closeable:true,initUI:function(){if(this.buttons&&!this.buttonHtml){for(var h=[],b=0,d=this.buttons,a=d.length;b<a;b++)h.push(o.parse(this.buttonTpl||"Button",d[b]));this.buttonHtml=h.join("")}j.initUI.call(this)},onClsBtnClick:function(){this.onbuttonclick("cancel")!==false&&this.close();
return false},setFocus:function(h){if(h||this.defBtn)this.jq("#xwb_btn_"+(h||this.defBtn)).focus().addClass(this.focusBtnCs)},afterShow:function(){j.afterShow.call(this);this.defBtn&&this.setFocus()},onbuttonclick:function(h){__debug&&console.log(h+" clicked")},setHandler:function(h){this.onbuttonclick=h;return this},getButton:function(h){return this.jq("#xwb_btn_"+h)},innerViewReady:function(h){j.innerViewReady.call(this,h);var b=this;l(h).find("#xwb_dlg_btns").click(function(d){if(d=u.domUp(d.target,
function(e){return e.id&&e.id.indexOf("xwb_btn_")===0},this)){var a=d.id.substr(8);b.buttons&&l.each(b.buttons,function(){if(this.id===a){var e;if(this.onclick)e=this.onclick(b);if(e!==false&&b["on"+a])e=b["on"+a]();e!==false&&b.onbuttonclick(a)!==false&&b.close()}});return false}})}}}));m.MsgBox=p.reg("msgbox",{getSysBox:function(){var j=this.sysBox;if(!j)j=this.sysBox=p.use("Dlg",{appendTo:t.body,title:g("提示"),dlgContentHtml:"MsgDlgContent",mask:true,buttons:[{title:g("确&nbsp;定"),id:"ok"},{title:g("取&nbsp;消"),
id:"cancel"},{title:g("&nbsp;是&nbsp;"),id:"yes"},{title:g("&nbsp;否&nbsp;"),id:"no"},{title:g("关&nbsp;闭"),id:"close"}],setContent:function(h){this.jq("#xwb_msgdlg_ct").html(h)},setIcon:function(h){var b=j.jq("#xwb_msgdlg_icon");b.attr("className",b.attr("className").replace(/icon\-\S+/i,"icon-"+h))},afterHide:function(){m.Dialog.prototype.afterHide.call(this);this.onbuttonclick=m.Dialog.prototype.onbuttonclick}});return j},getTipBox:function(){var j=this.tipBox;if(!j)j=this.tipBox=p.use("Tip",{cs:"win-tips win-fixed",
contentHtml:"DialogContent",appendTo:t.body,title:"提示",timeoutHide:1200,dlgContentHtml:"MsgDlgContent",setContent:function(h){this.jq("#xwb_msgdlg_ct").html(h)},setIcon:function(h){var b=j.jq("#xwb_msgdlg_icon");b.attr("className",b.attr("className").replace(/icon\-\S+/i,"icon-"+h))},afterHide:function(){m.Tip.prototype.afterHide.call(this);if(this.onhide){this.onhide();this.onhide=false}}});return j},getAnchorDlg:function(){var j=this._anchorDlg;if(!j)j=this._anchorDlg=p.use("Dlg",{cs:"win-tips-ask",
mask:false,dlgContentHtml:"AnchorDlgContent",appendTo:t.body,defBtn:"ok",buttons:[{title:g("确&nbsp;定"),id:"ok"},{title:g("取&nbsp;消"),id:"cancel"}],setAnchor:function(h){this.anchorEl=h;return this},beforeShow:function(){m.Dialog.prototype.beforeShow.call(this);if(this.anchorEl){this.anchor(this.anchorEl,"tc",function(b){b[1]-=2});var h=this;this.slide("bc",true,function(){m.Dialog.prototype.afterShow.call(h)})}},afterShow:l.noop,beforeHide:function(){if(this.anchorEl){this.slide("cb",false);delete this.anchorEl;
return false}else m.Dialog.prototype.beforeHide.call(this)},afterHide:function(){m.Dialog.prototype.afterHide.call(this);this.onbuttonclick=m.Dialog.prototype.onbuttonclick}});return j},getAnchorTip:function(){var j=this._anchorTip;if(!j)j=this._anchorTip=p.use("Tip",{view:"Box",cs:"operate-success",contentHtml:"AnchorTipContent",appendTo:t.body,timeoutHide:1800,setAnchor:function(h){this.anchorEl=h;return this},beforeShow:function(){if(this.anchorEl){this.anchor(this.anchorEl,"tc",function(h){h[1]-=
8});this.slide("bc",true)}m.Tip.prototype.beforeShow.call(this)},beforeHide:function(){if(this.anchorEl){this.slide("cb",false);delete this.anchorEl;return false}else m.Tip.prototype.beforeHide.call(this)},afterHide:function(){m.Tip.prototype.afterHide.call(this);if(this.onhide){this.onhide();this.onhide=false}}});return j},tipError:function(j,h){this.tip(j,"error",h)},tipOk:function(j,h){this.tip(j,"success",h)},tipWarn:function(j,h){this.tip(j,"alert",h)},anchorTipOk:function(j,h,b){this.anchorTip(j,
h,"",b)},anchorConfirm:function(j,h,b){this.getAnchorDlg().setTitle(h).setHandler(b||l.noop).setAnchor(j).display(true)},tip:function(j,h,b){var d=this.getTipBox();d.setIcon(h||"alert");d.setContent(j||"");d.display(true);b&&(d.onhide=b)},anchorTip:function(j,h,b,d){b=this.getAnchorTip();b.setTitle(h).setAnchor(j).display(true);d&&(b.onhide=d)},alert:function(j,h,b,d,a,e){var k=this.getSysBox(),r=k.buttons;d||(e=d="ok");a||(a="alert");for(var c=0,i=r.length;c<i;c++)k.jq("#xwb_btn_"+r[c].id).cssDisplay(d.indexOf(r[c].id)>=
0);k.defBtn=e;j&&k.setTitle(j);h&&k.setContent(h);a&&k.setIcon(a);b&&(k.onbuttonclick=b);k.display(true);return k},confirm:function(j,h,b,d){this.alert(j||g("提示"),h,b,"ok|cancel","ask",d||"ok")},success:function(j,h,b,d,a){this.alert(j,h,b,d||"ok","success",a||"ok")},error:function(j,h,b,d,a){this.alert(j,h,b,d||"ok","error",a||"ok")}})})(Xwb,$);(function(p){p.ax.Eventable.apply(p);p.ax.PipeMgr={pages:{},instances:{},reg:function(u,t,o){if(!o&&this.pages[u])throw"Object existed exception.["+u+"]";this.pages[u]=t;return this},start:function(u){p.cfg=u;p.fireOnce("pipe.start",u,this)},load:function(u){p.fire("page.before",u,this);var t=this.pages[u.pagelet]||this.pages[u.data&&u.data.cls];t||(t=l);t=typeof t==="function"?new t:new (t.pipe||l)(t);this.instances[u.id]=t;t.load(u);p.fire("page.after",t,this)},end:function(){p.fireOnce("pipe.end",
this)},getPage:function(u){return this.instances[u]}};p.reg("pipeMgr",Xwb.ax.PipeMgr);var l=p.ax.Pagelet=p.util.create();l.prototype={htmlMode:1,init:function(u){u&&$.extend(this,u)},load:function(u){this.id=u.id;this.type=u.pagelet;if(u.data&&u.data.cls)this.cls=u.data&&u.data.cls;if(u.perch){this.applyHtml(this.createContent(u));this.ui&&this.getUI();this.onViewReady(u)}},createContent:function(u){return u.html||""},applyHtml:function(u){var t=this._getPlaceholder();if(this.htmlMode===1){u=$(u);
if(u.length>1){var o=p.ax.Cache.get("div");u.appendTo(o);u=$(o)}$(t).replaceWith(u);this.contentView=u[0]}else if(this.htmlMode===2){$(t).html(u).cssDisplay(true);this.contentView=t}},getUI:function(){var u=this.ui;if(!u||!u.cacheId){this.ui=u=new (u?u.cls||p.ui.Base:p.ui.Base)($.extend({view:this.contentView},u));u.getView()}return u},jq:function(){var u=this.getUI();return u.jq.apply(u,arguments)},_getPlaceholder:function(){return document.getElementById(this.id)},onViewReady:$.noop};if(__debug)l.prototype.toString=
function(){return"#"+this.id+"["+this.type+"]"}})(Xwb);(function(p,l){var u=p.ui,t=p.util,o=document,m=u.Base,g=p.ax.Tpl,j=p.request,h=p.use("msgbox"),b=p.getCfg,d=p.getUid,a=p.getWb,e=p.setWb,k=p.lang.getText;if(!p.mod)p.mod={};var r=p.mod;p.reg("emotion",function(){var c=p.use("Box",{contentHtml:"Loading",boxOutterHtml:"ArrowBoxBottom",cs:"win-emotion",appendTo:o.body,closeable:true,actName:"em",contextable:true,actionMgr:true,emotions:null,$categorySelected:null,$categoryShowed:null,cateMaps:{},onactiontrig:function(i){switch(i.data.e){case "em":if(this.onselect)if(this.onselect(this.findEmotionText(i),
i)===false)break;this.display(false);break;case "sc":this.emSwitch(i.data.idx,i.src)}},setHandler:function(i){this.onselect=i;return this},setSelectionHolder:function(i,q,s){this.setHandler(function(w){i.insertText(w);q&&q.call(s||this,i,w)});return this},showAt:function(i){i=l(i).offset();i.left-=24;i.top+=20;this.offset(i).display(true)},initEmotion:function(i){if(i.isOk()){i=i.getData();var q={},s=[],w=[],x=0,y={};l.each(i,function(C,A){if(A.type=="face"){var D=A.category?A.category:"默认";if(q[D])q[D].push(A);
else{q[D]=[A];y[x]=q[D];w.push(['<a href="#" rel="e:sc,idx:',x,'">',D,"</a>"].join(""));x++}A.is_hot&&s.push(['<a href="#" rel="e:em" title="',A.phrase,'"><img width="22px" height="22px" src="',A.url,'" /></a>'].join(""))}});var z=[],B=0;l.each(q["默认"],function(C,A){A.is_hot&&B++;if(!A.is_hot||B>15)z.push(['<a href="#" rel="e:em" title="',A.phrase,'"><img width="22px" height="22px" src="',A.url,'" /></a>'].join(""))});if(s.length>15)s=s.slice(0,15);i={category:w.join(""),faces:z.join(""),hotList:s.join("")};
i=l(g.parse("EmotionBoxContent",i));this.jq("#xweibo_loading").hide();this.jq("#xwb_dlg_ct").append(i);this.$categorySelected=this.jq("#cate>a:first").addClass("current");this.$categoryShowed=this.jq("#flist0");this.emotions=q;this.cateMaps=y}},createEmArea:function(i){var q=['<div class="e-list" id="flist'+i+'">'];l.each(this.cateMaps[i],function(s,w){q.push(['<a href="#" rel="e:em" title="',w.phrase,'"><img width="22px" height="22px" src="',w.url,'" /></a>'].join(""))});q.push("</div>");return l(q.join(""))},
emSwitch:function(i,q){var s=l(q);if(!s.hasClass("current")){this.$categorySelected.removeClass("current");this.$categorySelected=s.addClass("current");this.$categoryShowed.addClass("hidden");i>0?this.jq("#hotEm").addClass("hidden"):this.jq("#hotEm").removeClass("hidden");s=this.jq("#flist"+i);s.length||(s=this.createEmArea(i).appendTo(this.jq("#box")));this.$categoryShowed=s.removeClass("hidden")}},loadEmotion:function(){var i=this;j.getEmotion(function(q){i.initEmotion(q)})},onViewReady:function(){this.loadEmotion()},
findEmotionText:function(i){return i.src.title}});p.reg("emotion",c,true);return c});p.reg("forwardBox",function(){var c=p.use("Dlg",{cs:"win-forward",appendTo:o.body,autoCenter:true,dlgContentHtml:"ForwardDlgContentHtml",title:k("转发到我的微博"),defBtn:"forward",buttons:[{title:k("转 发"),id:"forward"},{title:k("取 消"),id:"cancel"}],checkText:function(){var i=l.trim(this.jqInputor.val()),q=t.calWbText(i);q>=0?this.jqWarn.html(k("您还可以输入{0}字",q)):this.jqWarn.html(k("已超出{0}字",Math.abs(q)));this.jqWarn.checkClass("out140",
q<0);return q>=0&&i},onViewReady:function(){this.jq("#xwb_face_trig").click(t.bind(this.onFaceTrig,this));this.jqInputor=this.jq("#xwb_fw_input");this.jqWarn=this.jq("#xwb_warn_tip");this.jqContent=this.jq("#xwb_forward_text");this.jqLabelCt=this.jq("#xwb_fw_lbl");this.jqInputor.bind("keyup",t.bind(this.onInputorKeyup,this));this.selectionHolder=p.use("SelectionHolder",{elem:this.jqInputor[0]});this.atWho=p.use("atWho",{appendTo:o.body,Inputor:this.jqInputor,autoRender:true})},onInputorKeyup:function(i){if(this.checkText())if(i.ctrlKey&&
(i.which==13||i.which==10))this.submit()},onFaceTrig:function(i){p.use("emotion").setSelectionHolder(this.selectionHolder,this.checkText,this).showAt(i.target);return false},setContent:function(i,q,s){this._predCfg={id:i,data:q,uid:s};this.jq();var w=[];s!==q.u.id&&w.push(g.parse("ForwardDlgLabel",{uid:i,nick:q.u.sn}));if(s=q.rt){i=s.tx;q="//@"+q.u.sn+":"+q.tx;w.push(g.parse("ForwardDlgLabel",{uid:s.id,nick:s.u.sn}))}else{i=q.tx;q=""}this.jqContent.text(t.escapeHtml(i));this.selectionHolder.setText(q);
this.checkText();this.jqLabelCt.html(w.join(""));return this},submit:function(){if(this.isLoading)return false;this.isLoading=true;var i=this.checkText();if(i==="")i=k("转发微博");else if(!i){this.jqInputor.focus();return this.isLoading=false}var q=[];this.jq('input[type="checkbox"]:checked').each(function(){q[q.length]=l(this).val()});var s=this._predCfg,w=l.extend({_route:p.getModule()},this.getParam());t.disable(this.getButton("forward"),true);j.repost(s.id,i,q.join(","),t.getBind(this,"onSubmitLoad"),
{data:w})},getParam:function(){return{}},onSubmitLoad:function(i){t.disable(this.getButton("forward"),false);this.close();i.isOk()?h.tipOk(k("转发成功")):h.tipWarn(i.getMsg(null,k("微博转发")));this.isLoading=false},onbuttonclick:function(i){if(i==="forward"){this.submit();return false}}});p.reg("forwardBox",c,true);return c});u.getFlash=function(c,i){var q=l.browser.msie;c=c||{};var s='<object width="'+c.width+'" height="'+c.height+(c.id?'" id="'+c.id:"")+(c.name?'" name="'+c.name:"")+'"';if(c.nocache)c.src+=
(c.src.indexOf("?")!=-1?"&":"?")+Math.random();s+=c.w3c||q?' data="'+c.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';s+=">";if(c.w3c||q)s+='<param name="movie" value="'+c.src+'" />';c.width=c.height=c.id=c.w3c=c.src=null;c.onFail=c.version=c.expressInstall=null;for(var w in c)if(c[w])s+='<param name="'+w+'" value="'+c[w]+'" />';q="";if(i){for(var x in i)if(i[x]){w=i[x];q+=x+"="+(/function|object/.test(typeof w)?f.asString(w):w)+"&"}q=q.slice(0,
-1);s+='<param name="flashvars" value=\''+q+"' />"}s+="</object>";return s};u.WbElement=p.reg("WbElement",t.create(m,{state:0,init:function(){m.prototype.init.apply(this,arguments);this.picLoadState=0;this.isFw=this.state?this.$wb.find(".forward").length?1:0:this.wbData.rt?1:0;this.$preview=this.$wb.find("div.preview-img")},playVideo:function(c){c.get("w");c=c.get("i");c=p.mod.shortlink.getUrls()[c];var i=this.$wb.find("div.feed-content").width()-35,q=parseInt(i/1.25);q=u.getFlash({src:c.flash,width:i,
height:q,w3c:1,id:"sinaVideo_"+ +new Date,quality:"high",allowScriptAccess:"always",wmode:"transparent",allowFullscreen:"true",flashvars:"playMovie=true&auto=1"});this.$video&&this.$video.remove();var s;if(this.isFw){i="div.forward>p";s="VideoBoxForward"}else{i="p.feed-main";s="VideoBox"}c=g.parse(s,{href:c.url,title:c.title,flash:q});this.$video=l(c).insertAfter(this.$wb.find(i));this.switchView("video",1)},closeVideo:function(){this.switchView("video",0)},picSrc:function(c){c=c||"bmiddle";if(this.state)c=
"http://ww"+Math.ceil(Math.random()*4)+".sinaimg.cn/"+c+"/"+this.psrc+".jpg";else{var i=this.wbData;c=(this.isFw?i.rt:i)[c=="thumbnail"?"mp":"op"]}return c},loadPic:function(){this.picLoadState=1;var c=this,i={org:this.picSrc("large"),img:this.picSrc("bmiddle")},q=this.$thumbImg=this.$wb.find("img.zoom-move");this.$loadEl=l('<div class="loading-img"></div>').appendTo(q.parent());this.$picBox=l(g.parse(this.isFw?"PictureBoxForward":"PictureBox",i));q=this.img=new Image;l(q).bind("load",function(){c.onPicLoaded()}).addClass("narrow-move").attr("rel",
"e:zo").attr("src",i.img)},onPicLoaded:function(){var c=this.$wb.find(this.isFw?"div.forward":"div.feed-content:first"),i=this.img,q=this.$picBox;c.css("visibility","hidden");var s=this.$wb.find("div.feed-content").width()-35;l(i).appendTo(q.find("div[name=img]"));c.children("div.preview-img").after(q);this.switchView("pic",1);if(i.width>s){if(l.browser.msie)i.height*=s/i.width;i.width=s}c.css("visibility","");this.$loadEl.remove();this.picLoadState=2},zoomIn:function(){if(this.picLoadState==0)this.loadPic();
else this.picLoadState==2&&this.switchView("pic",1)},zoomOut:function(){this.switchView("pic",0)},trun:function(c){l(this.img).imgRotate(c)},switchView:function(c,i){if(i){if(c=="pic"){this.$picBox.show();this.$video&&this.$video.remove();this.$video=null}else if(c=="video"){this.$video.show();this.$picBox&&this.$picBox.hide()}this.$preview.hide()}else{if(c=="pic")this.$picBox&&this.$picBox.hide();else if(c=="video"){this.$video&&this.$video.remove();this.$video=null}this.$preview.show()}}}));r.CmtBox=
p.reg("CmtBox",t.create(m,{actionMgr:true,view:"CmtBox",exceedCS:"over-limit",autoH:true,wbUid:null,headPicType:1,innerViewReady:function(c){this.wbUid=p.getUid();m.prototype.innerViewReady.call(this,c);this.jqExtra("inputor","warn","sync");this.selectionHolder=p.use("SelectionHolder",{elem:this.jqInputor[0]});var i=this;this.jqInputor.bind("keyup",function(q){i.onInputorKeyup(q)});this.atWho=p.use("atWho",{appendTo:o.body,Inputor:this.jqInputor,autoRender:true})},reset:function(){this.getView();
this.selectionHolder.setText("");this.jqSync.attr("checked",false);this.checkText()},checkText:function(){var c=this.jqInputor,i=l.trim(c.val()),q=t.calWbText(i,70),s=this.jqWarn;q>=0?s.html(k("您还可以输入{0}字",q)):s.html(k("已超出{0}字",Math.abs(q)));s.checkClass(this.exceedCS,q<0);this.autoH&&c.height()!==c[0].scrollHeight&&c.height(c[0].scrollHeight);return q>=0&&i},send:function(){if(!this.sending){var c=this.checkText();if(c){this.sndBtn&&t.disable(this.sndBtn,true);this.sending=true;var i=this.jqInputor.data("xwb_reply_cid"),
q=RegExp("^"+k("回复")+"@.*?:");i&&q.test(c)?j.reply(this.wbId,i,c,this.jqSync.attr("checked")?1:0,this.headPicType,t.getBind(this,"onSendLoad"),{data:{_route:p.getModule()}}):j.comment(this.wbId,c,this.jqSync.attr("checked")?1:0,this.headPicType,t.getBind(this,"onSendLoad"),{data:{_route:p.getModule()}})}else setTimeout(t.bind(function(){this.jqInputor.focus()},this),0)}},onSendLoad:function(c){if(c.isOk()){this.pCt.afterSend(c);this.reset();c=c.getData();c.html&&this.pCt.postWeibo(c.wb,c.html)}else{h.tipWarn(c.getMsg(null,
k("评论")));c.getCode()=="30000"&&this.reset()}this.pCt.afterNofocus||this.jqInputor.focus();this.sndBtn&&t.disable(this.sndBtn,false);this.sending=false},reply:function(c,i){var q=this.selectionHolder,s=this.jqInputor,w=RegExp("^"+k("回复")+"@.*?:");this.reset();q.setText(k("回复")+"@"+i+":"+s.val().replace(w,""));s.data("xwb_reply_cid",c);this.checkText();setTimeout(function(){q.focusEnd()},0)},onFaceTrig:function(c){p.use("emotion").setSelectionHolder(this.selectionHolder,this.checkText,this).showAt(c.src);
return false},onInputorKeyup:function(c){if(this.checkText())if(c.ctrlKey&&(c.which==13||c.which==10))this.send()},onactiontrig:function(c){switch(c.data.e){case "ic":this.onFaceTrig(c);break;case "sd":if(!this.sndBtn)this.sndBtn=c.src;this.send()}}}));r.CommentArea=p.reg("CmtArea",t.create(m,{view:"CommentArea",readSize:10,cmtType:1,hdPicSz:30,cmtCount:0,page:1,cmtPageSz:20,cmtBoxHtml:"CmtBox",commentHtml:"Comment",actionMgr:true,cmtBox:"CmtBox",initUI:function(){this.cmtUrl=j.mkUrl("show","","id="+
this.wbId);this.jqExtra("pre","first","next");m.prototype.initUI.call(this)},getFromUser:function(){if(!this.wbUid){var c=a(this.wbId);this.wbUid=c&&c.u.id}return this.wbUid},innerViewReady:function(c){m.prototype.innerViewReady.call(this,c);this.jqExtra("cmtCt","more","lefCnt");this.initCmtBox()},decorateLoading:function(){this.isLoading?l(g.get("Loading")).appendTo(this.getView().parentNode):l(this.getView().parentNode).find("#xweibo_loading").remove();this.display(!this.isLoading)},initCmtBox:function(){this.cmtBox=
p.use("CmtBox",{view:this.jq("#cmtBox")[0],wbId:this.wbId,pCt:this,headPicType:this.hdPicSz==30?1:2});this.cmtBox.getView()},load:function(c){this.getView();if(!this.isLoading){this.isLoading=true;this.decorateLoading();c&&(this.onload=c);j.getComments(this.wbId,this.page,this.cmtType,t.getBind(this,"onCmtsLoad"))}},postWeibo:function(){},afterSend:function(c){c=l(this.createCmtUI(c.getData().comment));this.jqCmtCt.prepend(c);this.jqCmtCt.cssDisplay(true);this.updateCmtCountUI(1,true);p.mod.shortlink.render(c,
function(i,q){q.title=i&&i.url||k("无效链接")})},onCmtsLoad:function(c){if(c.isOk()){this.createListUI(c);var i=c.getData().total;i&&this.updateCmtCountUI(i);this.updateCmtPageUI(c.getData())}this.isLoading=false;this.decorateLoading();this.onload&&this.onload(c)},createListUI:function(c){this.jqCmtCt.empty();var i=c.getData();i=i.total-Math.min(i.limit,i.total);var q=[];c.each(function(s){q[q.length]=this.createCmtUI(s)},this);if(q.length){this.jqCmtCt.html(q.join(""));if(i){this.jqMore.cssDisplay(true);
this.jqLefCnt.text(i)}else this.jqMore.cssDisplay(false);this.jqCmtCt.cssDisplay(true)}else{this.jqCmtCt.cssDisplay(false);this.jqMore.cssDisplay(false)}p.mod.shortlink.render(this.jqCmtCt,function(s,w){w.title=s&&s.url||k("无效链接")})},createCmtUI:function(c){var i=this.getFromUser(),q=d();c.verifiedHtml=c.user.verified_html;c.usrUrl=c.user.profileUrl;c.picSz=this.hdPicSz;c.time=c.create_at;if(i===q||c.uid===q)c.canDel=true;return g.parse(this.commentHtml,c)},updateCmtPageUI:function(c){if(this.jqPre.length){this.jqPre.cssDisplay(this.page!==
1);this.jqFirst.cssDisplay(this.page>=3);this.jqNext.cssDisplay(c.total>c.limit*this.page)}},updateCmtCountUI:function(c,i){if(this.trigEl){var q=k("评论");if(i===void 0){l(this.trigEl).text(q+"("+c+")");this.cmtCount=c}else{this.cmtCount+=c;l(this.trigEl).text(q+"("+this.cmtCount+")")}}},onactiontrig:function(c){switch(c.data.e){case "rp":this.onReplyTrig(c);break;case "dl":this.onDelTrig(c);break;case "nx":this.goPage(this.page+1);break;case "pr":this.goPage(this.page-1);break;case "fi":this.goPage(1)}},
onDelTrig:function(c){var i=this;h.anchorConfirm(c.src,k("确定要删除该评论吗？"),function(q){if(q==="ok"&&!i.deletingCmt){i.deletingCmt=true;j.delComment(c.get("c"),function(s){var w=c.getEl("c");if(s.isOk()){l(w).remove();i.updateCmtCountUI(-1,true);i.cmtCount==0&&i.cmtBox.jqInputor.focus()}else h.tipError(s.getMsg());i.deletingCmt=false})}})},onReplyTrig:function(c){var i=this.jq();this.offsetsTo(window)[1]<0&&i[0].scrollIntoView&&i[0].scrollIntoView();i=c.get("c");c=c.get("n");this.cmtBox.reply(i,c)},goPage:function(c){this.topCmtBox.getView().scrollIntoView&&
this.topCmtBox.getView().scrollIntoView();this.page=c;this.load()}}));r.MBlogCmtArea=p.reg("MBlogCmtArea",t.create(r.CommentArea,{commentHtml:"MBlogCmt",cmtType:2,hdPicSz:50,createListUI:function(c){this.jqCmtCt.empty();c.getData();var i=[],q=this.faceSize;c.each(function(s){if(q)s.profileImg=s.profileImg.replace("/30/","/"+q+"/");i[i.length]=this.createCmtUI(s)},this);if(this.cmtCount=i.length){this.jqCmtCt.html(i.join(""));this.jqCmtCt.cssDisplay(true)}else{this.jqCmtCt.cssDisplay(false);this.jqMore.cssDisplay(false)}p.mod.shortlink.render(this.jqCmtCt,
function(s,w){w.title=s&&s.url||k("无效链接")})},initCmtBox:function(){this.cmtBox=p.use("CmtBox",{wbId:this.wbId,pCt:this,view:"MBCmtBox",headPicType:this.hdPicSz==30?1:2});this.cmtBox.getView();this.topCmtBox=p.use("CmtBox",{wbId:this.wbId,pCt:this,autoH:false,view:this.topCmtBox,headPicType:this.hdPicSz==30?1:2});this.topCmtBox.getView()},updateCmtCountUI:l.noop,onReplyTrig:function(c){this.cmtBox.jq().insertAfter(c.jq("c").find("#trigs"));var i=c.get("c");c=c.get("n");this.cmtBox.display(true).reply(i,
c)},postWeibo:l.noop,afterSend:function(c){c=l(this.createCmtUI(c.getData().comment));this.jqCmtCt.prepend(c).cssDisplay(true);this.cmtBox.display(false);this.topCmtBox.jqInputor.focus();p.mod.shortlink.render(c,function(i,q){q.title=i&&i.url||k("无效链接")})},onload:function(){this.jq("#pager").cssDisplay(true);this.topCmtBox.jqInputor.focus()}}));p.reg("videoBox",function(){var c=p.use("Box",{cs:" win-insert",contentHtml:"MediaBoxContentHtml",boxOutterHtml:"ArrowBoxBottom",appendTo:o.body,actionMgr:true,
closeable:true,contextable:true,onViewReady:function(){this.jqInputor=this.jq("#xwb_inputor");this.jqTip=this.jq("#xwb_err_tip");this.selectionHolder=p.use("SelectionHolder",{elem:this.jqInputor[0]})},onactiontrig:function(i){switch(i.data.e){case "ok":if(i=this.checkText()){this.onselect&&this.onselect(i);this.close()}else this.jqInputor.focus();break;case "cc":this.close();break;case "nm":this.onselect&&this.onselect(l.trim(this.jqInputor.val()));this.close()}},checkText:function(){var i=this.jqInputor,
q=this.selectionHolder,s=l.trim(i.val());if(s==""||s=="http://"){setTimeout(function(){i.focus();q.setText("http://");i.select()});return false}else if(!this.checkUrl(s)){this.jqTip.cssDisplay(true);return false}return s},checkUrl:function(i){return i.indexOf("http://")===0},showAt:function(i,q){this.onselect=q;var s=l(i).offset();s.left-=140;s.top+=20;this.offset(s).display(true);var w=this;setTimeout(function(){w.selectionHolder.setText("http://");w.jqInputor.focus();w.jqInputor[0].select()},0);
this.jqTip.cssDisplay(false)}});p.reg("videoBox",c,true);return c});p.reg("musicBox",function(){var c=p.use("Box",{cs:" win-insert",contentHtml:"MusicBoxContentHtml",boxOutterHtml:"ArrowBoxBottom",appendTo:o.body,closeable:true,actionMgr:true,contextable:true,onViewReady:function(){this.jqInputor=this.jq("#xwb_inputor");this.jqTip=this.jq("#xwb_err_tip");this.selectionHolder=p.use("SelectionHolder",{elem:this.jqInputor[0]})},checkText:function(){var i=this.jqInputor,q=l.trim(i.val()),s=this.selectionHolder;
if(q==""||q=="http://"){setTimeout(function(){i.focus();s.setText("http://");i[0].select()});return false}else if(!this.checkUrl(q)){this.jqTip.cssDisplay(true);return false}return q},checkUrl:function(i){return i.indexOf("http://")===0},onactiontrig:function(i){switch(i.data.e){case "ok":if(i=this.checkText()){this.onselect&&this.onselect(i);this.close()}else this.jqInputor.focus();break;case "cc":this.onselect&&this.onselect();this.close();break;case "nm":this.onselect&&this.onselect(l.trim(this.jqInputor.val()));
this.close()}},showAt:function(i,q){this.onselect=q;var s=l(i).offset();s.left-=140;s.top+=20;this.offset(s).display(true);var w=this;setTimeout(function(){w.selectionHolder.setText("http://");w.jqInputor.focus();w.jqInputor[0].select()},0);this.jqTip.cssDisplay(false)}});p.reg("musicBox",c,true);return c});r.atWho=p.reg("atWho",t.create(u.Layer,{view:"atwho",now:0,length:0,key:"",atWhoShow:0,oldXhr:null,flagAt:null,useable:1,run:function(c){if(c===void 0)return this.useable;this.useable=c},onViewReady:function(){var c=
this;this.Inputor.bind("keyup",function(i){c.showWho(i)}).bind("keydown",function(i){return c.onkeydown(i)}).bind("focus",function(i){c.showWho(i)}).bind("click",function(i){c.showWho(i)}).bind("blur",function(){if(c.atWhoShow)this.TimeoutID=setTimeout(function(){c.display(false);c.atWhoShow=false},150)});this.jq("#mainUL").click(function(i){i.target.tagName=="LI"&&c.choose()});this.jq("#mainUL").mousemove(function(i){if(i.target.tagName=="LI"){l(this).find("li:eq("+c.now+")").removeClass("cur");
l(i.target).addClass("cur");c.now=l(this).find("li").index(i.target)}})},showWho:function(){if(this.run()){var c=this.getKey(this.Inputor[0]);__debug&&console.log(c);if(this.txtobj=c)c.text!=this.key&&this.reload(c.text);else{this.key="";this.length=0;this.display(false)}}},onkeydown:function(c){if(this.atWhoShow)switch(c.keyCode){case 38:if(this.now==0)return false;this.jq("#mainUL li:eq("+this.now+")").removeClass("cur").prev().addClass("cur");this.now--;return false;case 40:if(this.now+1==this.length)return false;
this.jq("#mainUL li:eq("+this.now+")").removeClass("cur").next().addClass("cur");this.now++;return false;case 13:if(this.length!=0){this.choose();this.display(false)}return false;default:return true}},choose:function(c){var i=this.Inputor,q=i.data("xwb_selholder");c=c||this.now;var s=this.cache(this.key);if(s&&s.length){c=this.format(s[c]);s=this.txtobj;this.run(0);if(q)q.replaceString(c,s.form,s.to);else{this.Inputor.val(t.stringReplace(i.val(),c,s.form,s.to));t.setCursor(i[0],s.form+c.length)}this.afterChoose();
this.run(1)}},afterChoose:l.noop,format:function(c){return c.nickname+" "},getKey:function(c,i){var q=t.getCursorPos(c);i=c.value;var s=i.substring(q-1,q),w="";if(this.noAt===true)if(i.length!==0){this.flagAt=0;return{text:i,form:0,to:i.length}}else return false;if(s==" "||s=="@")return false;for(s=q;s>0;s--){if(i.substring(s,s-1)==" ")break;if(i.substring(s,s-1)=="@"){w=i.substring(s,q);if(i.length>q)for(var x=q+1;x<=i.length;x++)if(i.substring(x,x-1)==" "||x==i.length){var y=i.substring(s,i.substring(x,
x-1)==" "?x-1:x);l(this.data).each(function(){if(y==this.nickname)q=x})}this.flagAt=s;if(w.length>20)break;return{text:w,form:s,to:q}}}return false},rePosition:function(){var c=t.getCursorOffset(this.Inputor,this.flagAt-1);if(c){var i=this.Inputor.offset(),q=this.Inputor.scrollTop(),s=parseInt(l(this.Inputor).css("lineHeight"));if(isNaN(s))s=20;q=s-q;this.jq().css({top:i.top+c.top+q,left:i.left+c.left})}return this},onResize:l.noop,beforeShow:function(){this.rePosition();u.Layer.prototype.beforeShow.apply(this,
arguments)},afterShow:function(){__debug&&console.log("atWho: listen resize event.");this.onResize=t.bind(this.rePosition,this);l(window).resize(this.onResize);u.Layer.prototype.beforeShow.apply(this,arguments);this.atWhoShow=1},afterHide:function(){__debug&&console.log("atWho: unlisten resize event.");l(window).unbind("resize",this.onResize);this.atWhoShow=0;u.Layer.prototype.afterHide.apply(this,arguments)},highlight:function(c,i){return c.replace(i,"<b>"+i+"</b>")},showUser:function(c){this.length=
c.length;this.data=c;if(!c||!c.length)return this.display(0);var i=[],q=this.highlight,s=this;l.each(c,function(w,x){var y=x.remark,z="<li>"+q(x.nickname,s.key);if(y)z=z+"("+q(y,s.key)+")";z+="</li>";i.push(z)});this.now=0;this.jq("#mainUL").html(i.join("")).find(":first-child").addClass("cur");this.display()&&this.rePosition();this.display(1)},loaded:function(c){if(c.isOk()){c=c.getData();this.cache(c.key,c.data);this.showUser(c.data)}},reload:function(c){this.key=c;var i=this.cache(this.key);__debug&&
console.log("seach:",c,"return:",i,"cache:",r.atWho.cache);if(i!==void 0)this.showUser(i);else{if(this.oldXhr&&(this.oldXhr.readyState!==4||this.oldXhr.status!==200))this.oldXhr.abort();this.oldXhr=j.q(j.apiUrl("action","getAtUsers"),{keyword:this.key,verifyhash:b("verifyhash")},t.getBind(this,"loaded"))}},cache:function(c,i){if(i===void 0)return r.atWho.cache[c];r.atWho.cache[c]=i}}));r.atWho.cache={};r.PostBase={actionMgr:true,defText:"",initEx:function(){var c=this.jqInputor=this.jq("#xwb_inputor"),
i=this.jqSendBtn=this.jq("#xwb_send_btn"),q=this.jq(this.focusEl||"#focusEl");this.jqWarn=this.jq("#xwb_word_cal");this.jqImgFile=this.jq("#xwb_img_file");this.jqBtnImg=this.jq("#xwb_btn_img");this.jqUploadTip=this.jq("#xwb_upload_tip");this.jqPhotoName=this.jq("#xwb_photo_name");this.jqForm=this.jq("#xwb_post_form");this.$uploadBtn=this.jq("#uploadBtn");this.selectionHolder=p.use("SelectionHolder",{elem:this.jqInputor[0]});var s=this;this.jqImgFile.change(function(w){s.onImgFileChange(w)});this.btnHoverCS&&
i.hover(function(){i.addClass(s.btnHoverCS)},function(){i.removeClass(s.btnHoverCS)});this.atWho=p.use("atWho",{appendTo:o.body,Inputor:c,autoRender:true});c.bind("keyup",function(w){s.onInputorKeyup(w)}).bind("focus",function(){q.addClass("post-focus");s.checkText()}).bind("blur",function(){q.removeClass("post-focus")})},getUploader:function(){if(!this.uploader)this.uploader=p.use("Uploader",{form:this.jqForm[0],action:j.mkUrl("api/weibo/action","upload_pic"),onload:t.getBind(this,"onUploadLoad")});
return this.uploader},reset:function(){this.jqUploadTip.cssDisplay(false);this.jqPhotoName.cssDisplay(false);this.$uploadBtn.cssDisplay(1);this.selectionHolder.setText(this.defText);this.jqForm[0].reset();this.uploadPic=false;this.checkText();this.sending=false;return this},onactiontrig:function(c){switch(c.data.e){case "sd":this.post();break;case "ic":p.use("emotion").setSelectionHolder(this.selectionHolder,this.checkText,this).showAt(c.src);break;case "vd":p.use("videoBox").showAt(c.src,t.getBind(this,
"onBoxTextReturn"));break;case "ms":p.use("musicBox").showAt(c.src,t.getBind(this,"onBoxTextReturn"));break;case "tp":this.insertTopic();break;case "dlp":this.uploadPic=false;this.$uploadBtn.cssDisplay(1);this.jqPhotoName.cssDisplay(false);this.jqInputor.focus()}},onBoxTextReturn:function(c){c&&this.selectionHolder.insertText(c);this.checkText()},checkText:function(){var c=l.trim(this.jqInputor.val()),i=t.calWbText(c);i>=0?this.jqWarn.html(k("您还可以输入{0}字","<span>"+i+"</span>")):this.jqWarn.html(k("已超出{0}字",
"<span>"+-i+"</span>"));this.jqWarn.checkClass("out140",i<0);return i>=0&&c},checkImg:function(c){c=c.split(".");return c.length&&l.inArray(c.pop().toLowerCase(),["jpg","png","gif","jpeg"])!==-1},onInputorKeyup:function(c){if(this.checkText())if(c.ctrlKey&&(c.which==13||c.which==10))this.post()},TOPIC_TIP:k("请在这里输入自定义话题"),insertTopic:function(c){if(!c)c=this.TOPIC_TIP;var i=this.jqInputor[0],q=RegExp("#"+this.TOPIC_TIP+"#").test(i.value),s=c,w=0,x=0;i.focus();if(document.selection){var y=document.selection.createRange();
s=y.text||c;if(s==c&&q){w=RegExp.leftContext.length+1;x=c.length}else if(s==c){y.text="#"+c+"#";w=i.value.indexOf("#"+c+"#")+1;x=c.length}else y.text="#"+s+"#";if(s==c){y=i.createTextRange();y.collapse();y.moveStart("character",w);y.moveEnd("character",x)}y.select()}else if(i.selectionStart||i.selectionStart=="0"){w=i.selectionStart;x=i.selectionEnd;if(w!=x)s=i.value.substring(w,x);if(q&&s==c){w=RegExp.leftContext.length+1;x=w+s.length}else if(s==c){i.value=i.value.substring(0,w)+"#"+s+"#"+i.value.substring(x,
i.value.length);w++;x=w+s.length}else{i.value=i.value.substring(0,w)+"#"+s+"#"+i.value.substring(x,i.value.length);x=w=w+s.length+2}i.selectionStart=w;i.selectionEnd=x}else i.value+="#"+s+"#";this.checkText();this.selectionHolder.saveSpot()},post:function(){var c=this.checkText();if(c)if(this.getUploader().isLoading())h.tipWarn(k("图片正在上传，请稍候.."));else if(this.sending)h.tipWarn(k("正在发布,请稍候.."));else{var i=l.extend({},this.getParam());if(this.beforeSend){var q=this.beforeSend(c,this.uploadPic,i);if(q===
false)return;c=q||c}this.sending=true;j.post(c,t.getBind(this,"onSendLoad"),this.uploadPic,{data:i})}else this.jqInputor.focus()},getParam:function(){var c=this.param;if(!c)c=this.param={};if(!c._route)c._route=p.getModule();return c},onImgFileChange:function(){var c=this.jqImgFile.val(),i=this;this.uploadPic=null;if(!c||!this.checkImg(c)){this.jqForm[0].reset();h.alert("",k("只支持{0}格式的图片。","jpg、png、gif"),function(){i.jqInputor.focus()})}else{this.jq("#xwb_upload_tip").cssDisplay(true);this.$uploadBtn.cssDisplay(0);
this.getUploader().upload()}},onUploadLoad:function(c){if(typeof c!="object")h.alert("提示","上传失败!");else if(c.isOk()){this.uploadPic=c.getData().msg;this.jqPhotoName.html(t.getFileName(this.jqImgFile.val(),10)+g.get("UploadImgBtn"));this.jqPhotoName.cssDisplay(true);!l.trim(this.jqInputor.val())&&this.selectionHolder.setText(k("分享图片"));this.checkText()}else{h.alert("",c.getMsg(k("图片发布")));this.$uploadBtn.cssDisplay(1)}this.jqUploadTip.cssDisplay(false);this.jqForm[0].reset();this.jqInputor.focus()},
onSendLoad:function(c,i){var q=this.jqInputor;if(c.isOk()||c.getCode()=="30000"){if(!this.jqMask){this.jqMask={succ:this.jq("#xwb_succ_mask"),veri:this.jq("#xwb_veri_mask")};this.jqMaskPt=this.jqMask.succ.parent()}var s=c.isOk()?this.jqMask.succ:this.jqMask.veri;s.cssDisplay(true).show().appendTo(this.jqMaskPt);q.focus();var w=this;w.reset();s.fadeOut(1800,function(){s.remove();s[0].style.filter=null;i&&i.call(w,c)})}else{h.alert("",c.getMsg(),function(){t.focusEnd(q[0])});this.sending=false}}};p.reg("postBox",
function(){var c=l.extend({},r.PostBase);l.extend(c,{title:k("发微博"),closeable:true,autoCenter:true,appendTo:o.body,mask:true,postTitle:"dd",cs:"win-post",contentHtml:"PostBoxContent",onViewReady:function(){this.initEx()},setPostTitle:function(i){this.jq("#postTitle").html(i)},onbuttonclick:function(i){if(i=="ok"){this.post();return false}},onSendLoad:function(i){r.PostBase.onSendLoad.call(this,i,function(q){if(q.isOk()||q.getCode()=="30000"){this.close();this.jqInputor[0].blur()}})}});c=p.use("Box",
c);p.reg("postBox",c,true);return c});r.WeiboList=p.reg("WeiboList",t.create(m,{ctNode:"#xwb_weibo_list_ct",innerViewReady:function(c){m.prototype.innerViewReady.call(this,c);this.jqCt=this.jq(this.ctNode);this.syncList&&p.on("api.update",this.onWbCreate,this)},onWbCreate:function(c){c=c.getData();var i=c.data,q;for(q in i){this.append(q,i[q],c.html);break}},append:function(c,i,q,s){this.item(c,i);s=s||{};if(q){q=l.trim(q);var w=l(q);s.append?w.appendTo(this.jqCt):w.prependTo(this.jqCt);if(s.noSlide){if(!s.cancelParseShortlink){q=
{};q[c]=i;p.mod.shortlink.from(q,function(x){p.mod.shortlink.renderWeiboShortlink(w,x[c],x[c].shortlinks)})}}else w.hide().fadeIn(1E3,function(){if(!s.cancelParseShortlink){var x={};x[c]=i;p.mod.shortlink.from(x,function(y){p.mod.shortlink.renderWeiboShortlink(w,y[c],y[c].shortlinks)})}});return w}},batchAppend:function(c,i,q){var s=[];q={noSlide:true,append:q,cancelParseShortlink:true};for(var w in c)s.push(w,this.append(w,c[w],i[w],q));p.mod.shortlink.from(c,function(x){for(var y=0,z=s.length;y<
z;y+=2){var B=s[y],C=s[y+1];C&&p.mod.shortlink.renderWeiboShortlink(C,x[B],x[B].shortlinks)}})},item:function(c,i){if(i===void 0)return a(c);e(c,i)}}));r.SearchEntry=p.reg("SearchEntry",t.create(m,{focusText:k("搜微博/找人"),focusCs:"search-box-focus",maxLen:30,innerViewReady:function(c){m.prototype.innerViewReady.call(this,c);c=this.jqInputor=this.jq("#xwb_inputor");var i=this;this.jq("#xwb_trig").click(function(){return i.submit()});c.keydown(function(q){q.keyCode===13&&i.submit()});this.focusText&&
c.focusText(this.focusText,this.focusCs,this.getView())},submit:function(){var c=l.trim(this.jqInputor.val());if(c==this.focusText)c="";if(c){c=encodeURIComponent(t.byteCut(c,this.maxLen));c=j.mkUrl("search","","k="+c);window.location.href=c}else this.jqInputor.focus()}}));r.shortlink=new p.ax.Shortlink({renderWeiboShortlink:function(c,i,q){i=c.find("a");var s=this,w,x,y,z=c.find("div.forward"),B=c.find("p.feed-main"),C;i.each(function(){if(w=s.is(this.href)){var A=l(this);if(x=q[w]){y=x[1];if(x=
x[0]){A.attr("title",x.url);switch(x.type){case "music":A.addClass("ico-music-url");break;case "video":A.addClass("ico-video-url");if(y){C=z.find(">div.preview-img");C.length||(C=l(g.parse("PreviewBox")).appendTo(z))}else{C=B.next("div.preview-img");C.length||(C=l(g.parse("PreviewBox")).insertAfter(B))}if(y||!y&&!z.length){A.attr("rel","e:pv,i:"+x.id);l(g.parse("VideoThumbHtml",{img:x.screen,id:x.id})).appendTo(c.find((y?"div.forward ":"")+"div.preview-img"))}}}else A.attr("title",k("无效链接"))}else{__debug&&
console.warn("未解析链接：@"+w+" From "+A.attr("href")+",请在Xwb.ax.Shortlink.from内添加解析区域");A.attr("title",A.attr("href")||"")}}})}});p.reg("myMsg",t.create(u.Box,{contentHtml:"PrivateMsgContent",cs:"win-mes",actionMgr:true,title:k("发私信"),autoCenter:true,closeable:true,mask:true,warpNode:"",onViewReady:function(){var c=this;this.jqExtra("word","warn","sender","content","warnPos","uid");this.jqContent.keyup(t.bind(this.checkText,this));this.jqSender.blur(function(){var i=l.trim(this.value);c.checkFans(i,1,
null,true)});this.selectionHolder=p.use("SelectionHolder",{elem:this.jqContent[0]});if(!this.dialogMode)this.atWho=p.use("atWho",{appendTo:o.body,Inputor:this.jqSender,autoRender:true,format:function(i){return i.nickname},afterChoose:function(){c.jqContent.focus()},noAt:true})},checkText:function(){var c=b("hasDirectMessages")?140:300,i=l.trim(this.jqContent.val());c=t.calWbText(i,c);this.jqWord.html(c>=0?k("您还可以输入{0}字",this.warp(c)):k("已超出{0}字",this.warp(Math.abs(c))));return c>=0&&i},warp:function(c){return this.warpNode?
"<"+this.warpNode+">"+c+"</"+this.warpNode+">":c},afterShow:function(){u.Base.prototype.afterShow.call(this);this.jqSender.val()===""?this.jqSender.focus():this.jqContent.focus()},onactiontrig:function(c){switch(c.data.e){case "sd":this.send();break;case "ic":p.use("emotion").setSelectionHolder(this.selectionHolder,this.checkText,this).showAt(c.src)}},send:function(){if(!this.sending){var c=this.validate(),i=t.getBind(this,"onSendLoad"),q=this.jqSendBtn;if(c){this.sending=true;this.checkFans(c.u,
c.t,function(){t.disable(q,true);j.msg(c.u,c.t,c.c,i)})}}},onSendLoad:function(c){if(c.isOk()){!this.dialogMode&&this.display(false);this.dialogCallBack&&this.dialogCallBack(c)}else{var i;switch(c.getCode()){case 20014:h.alert("",c.getMsg());break;case 1010005:h.alert(k("内容长度不能超过140个字。"));this.jqContent.focus();break;default:i=c.getMsg()}if(i&&this.display()){this.jqWarnPos.cssDisplay(true).text(i);this.dialogMode&&h.alert(i)}}this.sending=false;t.disable(this.jqSendBtn,false)},checkFans:function(c,
i,q,s){var w=this;if(c)if(b("hasDirectMessages"))j.followed(c,function(x){if(x.isOk())if(x.getData()){w.jqWarnPos.cssDisplay(false);q&&q.call(this,x)}else{w.jqWarnPos.cssDisplay(true).text(j.ERRORMAP["20016"]);!s&&w.jqSender.focus()}else{w.jqWarnPos.cssDisplay(true).text(x.getMsg());!s&&w.jqSender.focus()}},i);else{w.jqWarnPos.cssDisplay(false);q&&q.call(this)}else w.jqWarnPos.cssDisplay(true).text(k("请输入要发送的用户昵称。"))},reset:function(){this.jqSender.attr("disabled",false).val("");this.jqContent.val("");
this.jqUid.val("");this.jqWarnPos.cssDisplay(false);this.checkText();return this},validate:function(){var c=l.trim(this.jqSender.val()),i=this.checkText(),q=this.jqUid.val();if(c)if(i){if(q)return{u:q,c:i};return{u:c,c:i,t:1}}else{l.trim(this.jqContent.val()).length?h.tipWarn(k("内容长度不能超过140个字。")):h.tipWarn(k("请输入私信内容。"));this.jqContent.focus()}else this.jqSender.focus()},reply:function(c,i){this.getView();this.reset();this.display(true);this.jqSender.val(i).attr("disabled",true);this.jqUid.val(c);
this.jqContent.focus();this.checkText()}}));p.reg("notice",function(c){var i=p.use("Layer",function(q){return l.extend({view:"NoticeLayer2",hidden:true,closeable:true,actionMgr:true,remindType:1,clearOnClose:true,types:["wbs","refer","cmts","fans","msgs","notify"],wbsUrl:j.mkUrl("index"),referUrl:j.mkUrl("index","atme"),cmtsUrl:j.mkUrl("index","comments"),msgsUrl:j.mkUrl("index","messages"),fansUrl:j.mkUrl("index","fans"),notifyUrl:j.mkUrl("index","notices"),initUI:function(){if(this.remindType)this.view=
"NoticeLayer";q.initUI.call(this);this.getView();p.on("api.unread",t.bind(this.unreadLoad,this))},push:function(s,w){var x=this.jq("#"+s),y=x.find("#c"),z=parseInt(y.text());if(w!=z){y.text(w);x.cssDisplay(!!w)}if(w&&!this.display()){this.display(true);Xwb.util.ie6||this.keepTop()}},keepTop:function(){function s(){l(document).scrollTop()>30?w.css("top","0"):w.css("top","30px")}var w=this.jq();l(window).scroll(s);l(window).resize(function(){s(1)});s()},onclose:function(){this.clearOnClose&&this.clearUnread()},
clearUnread:function(){var s=this;l.each(this.types,function(){var w=s.jq("#"+this);w.cssDisplay(false);w.find("#c").text("0")});j.clearUnread("",l.noop)},unreadLoad:function(s){if(s.isOk()){s=s.getData().unread;for(var w=true,x=1,y=this.types.length;x<y;x++)if(s[x]){this.push(this.types[x],s[x]);w=false}w&&this.display(false)}}},c)});p.reg("notice",i,true);return i});p.reg("feedback",function(c){var i=p.use("Box",l.extend({view:l("#feedbackBox")[0],mask:true,closeable:true,onViewReady:function(){this.view.parentNode!==
o.body&&this.appendAt(o.body);var q=this.jq("#fbForm");this.validator=p.use("Validator",{form:q,trigger:this.jq("#trig"),validators:{radio:function(s,w,x,y){s=l(this.context.form).find('input[name="mail"]').val();w=l(this.context.form).find('input[name="tel"]').val();if(s==k("邮箱地址")&&w==k("联系电话")){x.m=k("至少填写一种联系方式");this.report(false,x)}else this.report(true,x);y()}},onsuccess:function(s,w){j.feedback(s,function(){});i.close();w();return false}})},afterShow:function(){p.ui.Box.prototype.afterShow.call(this);
this.reset()},reset:function(){this.jq("[name=content]").val("").focus();this.jq("[name=mail]").val(k("邮箱地址"));this.jq("[name=tel]").val(k("联系电话"));this.jq("#feedbackTip").cssDisplay(false)}},c));p.reg("feedback",i,true);return i});r.authLogin={open:function(c,i){var q=this.logWin;if(q&&!q.closed)q.focus();else{q=j.mkUrl("account","sinaLogin","popup=1&cb="+(c||""));if(i)q+="&loginCallBack="+encodeURIComponent(i);this.logWin=window.open(q,"logWin","resizable=1,location=0,status=0,scrollbars=0,width=570,height=380");
if(!window.loginCallback)window.loginCallback=t.bind(this.onPopupCallback,this)}},direct:function(c){var i=location.href;if(p.getModule()==="account.login")i=t.dequery(i).loginCallBack||i;this.open(c,i);return false},bind:function(c,i){var q=this;l(c).bind(i||"click",function(){q.direct()})},onPopupCallback:function(c){this.logWin.close();if(c)location.href=c;else{c=p.getModule();if(c.indexOf("pub")||c.indexOf("index"))location.href=j.mkUrl("pub");else location.reload()}}};r.loginBox=p.reg("loginBox",
function(){var c=p.use("Box",{contentHtml:"Login",cs:"win-bind-login win-fixed",appendTo:o.body,mask:true,closeable:true,onViewReady:function(){r.authLogin.bind(this.jq("#oauth"))},siteName:b("siteName"),siteLoginUrl:j.mkUrl("account","siteLogin"),regUrl:p.getCfg("siteReg"),sinaRegUrl:p.getCfg("sinaReg")});p.reg("loginBox",c,true);return c});r.FadeShow=p.reg("FadeBox",t.create(m,{curr:0,length:0,duration:300,delay:5E3,running:false,runTimer:null,onViewReady:function(){this.$list=l(this.view).children();
this.length=this.$list.length;var c=this;l(this.view).mouseover(function(){c.stop()}).mouseout(function(i){i=i.relatedTarget;if(!i||!l.contains(c.view,i))c.start()});this.start()},start:function(){if(!(this.length<=1))if(!this.runTimer){var c=this;this.runTimer=setTimeout(function(){c.fade()},this.delay);this.running=true}},stop:function(){if(this.runTimer){clearTimeout(this.runTimer);this.runTimer=null}this.running=false},fade:function(){var c=this.curr,i=++this.curr,q=this;if(i>=this.length)this.curr=
i=0;var s=l(this.$list[c]),w=l(this.$list[i]);s.animate({opacity:0},{duration:q.duration,complete:function(){s.addClass("next");w.removeClass("next").css({opacity:0}).animate({opacity:1},{duration:q.duration,complete:function(){q.runTimer=null;q.running&&q.start()}})}})}}));p.mod.HoverList=t.create(m,{innerViewReady:function(){m.prototype.innerViewReady.call(this);this.jq(this.itemSelector).hover(this.onMouseOver,this.onMouseOut)},onMouseOver:l.noop,onMouseOut:l.noop});p.reg("addFollow",function(c){c=
p.use("Box",l.extend({actionMgr:true,cs:"add-topic",boxOutterHtml:'<div class="arrow"></div>',closeable:true,contentHtml:"addFollowContent",onactiontrig:function(i){var q=this;switch(i.get("e")){case "cls":this.close();break;case "submit":if(t.byteLen(this.jq("#Content").val())<=20){i.lock(1);j.postReq(j.apiUrl("action","addSubject"),{text:this.jq("#Content").val()},function(s){if(s.isOk()){p.fire("subrefresh",{subject:q.jq("#Content").val(),type:"add"});q.close()}else{q.jq(".warn").prev("p").cssDisplay(0);
q.jq(".warn").cssDisplay(1).html(s.getError())}i.lock(0)})}else{q.jq(".warn").prev("p").cssDisplay(0);q.jq(".warn").cssDisplay(1).html(k("话题长度太长"))}}},beforeShow:function(){var i=this.jq("#Content").val("");setTimeout(function(){i.focus()},1)},onViewReady:function(){var i=this;this.jq("#Content").focus(function(){i.jq(".warn").cssDisplay(false);i.jq(".warn").prev("p").cssDisplay(true)})}},c));c.display(true);return c});p.reg("verifyBox",function(c){c=p.use("Box",l.extend({contentHtml:"verify",cs:"verify-tips",
closeable:true,autoCenter:true,hidden:false,setAnchor:function(i){this.anchorEl=i;return this},beforeShow:function(){u.Box.prototype.beforeShow.call(this);if(this.anchorEl){this.anchor(this.anchorEl,"tc",function(q){q[1]-=2});var i=this;this.slide("bc",true,function(){u.Box.prototype.afterShow.call(i)})}},afterShow:l.noop,beforeHide:function(){if(this.anchorEl){this.slide("cb",false);delete this.anchorEl;return false}else u.Box.prototype.beforeHide.call(this)},afterHide:function(){u.Box.prototype.afterHide.call(this);
this.onbuttonclick=u.Box.prototype.onbuttonclick}},c));p.reg("verifyBox",c,true);return c});p.reg("MoreList",function(c){c=p.use("Layer",l.extend({closeable:true,contextable:true,actionMgr:true,onactiontrig:function(i){var q=i.data,s=i.get("u");switch(q.e){case "abl":q.gender=k(q.gender=="f"?"她":"他");h.confirm(k("提示"),k("确定将{nick}加入到黑名单吗？<span>你和{gender}将自动解除关注关系，并且{gender}不能再关注你，给你发评论、私信和@你。</span>",q),function(w){w==="ok"&&j.blacklistAdd(s,"",function(x){x.isOk()&&window.location.reload()})})}}},
c));p.reg("MoreList",c,true);return c});p.report=function(){function c(){var y=l.cookie("x3w4b");if(!y){y=(y=void 0)||16;for(var z=["u"],B,C=0;C<y;C++){B=Math.ceil(Math.random()*62)-1;z.push("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".charAt(B))}y=z.join("");l.cookie("x3w4b",y,{expires:9E4})}return y}function i(y){if(!w.akey)w.akey=b("akey");if(!w.ver)w.ver=b("version");y.random=Math.random();y.c_id=c();y.p_id=b("page");var z=b("uid");if(z)y.uid=z;y=l.extend(y,w);var B=[];l.each(y,
function(C,A){B.push(C+"="+encodeURIComponent(A))});s.src=q+"?"+B.join("&")}var q="http://beacon.x.weibo.com/a.gif",s,w={pjt:"xwb",xt:"stay"},x=function(){function y(){if(!B){d();s=new Image;B=true}}function z(){var D=(new Date).getTime(),E={time:D-(A?A:C)};if(!A&&document.referrer)E.t_id=document.referrer;i(E);A=D}var B=false,C=(new Date).getTime(),A=0;return{start:function(){y();window.setInterval(z,18E5)},report:function(){!B&&y();z()}}}();return{start:function(){x.start()},report:function(){x.report()}}}();
p.mod.AdMgm={init:function(c){c=this.cfgs=c||{};for(var i=!!this.globalHandlers,q=this.handlers,s=0,w=c.length;s<w;s++){var x=c[s];i&&this.fireGlobal(x);q&&q[x.flag]&&q[x.flag](x,this)}this.inited=true},fireGlobal:function(c){var i=this.globalHandlers;if(i)for(var q=0,s=i.length;q<s;q++)i[q](c,this)},reg:function(c,i){if(i===void 0)if(this.globalHandlers)this.globalHandlers.push(c);else this.globalHandlers=[c];else{if(!this.handlers)this.handlers={};this.handlers[c]=i;this.inited&&this.cfgs[c]&&i(this.cfgs[c],
this)}},getAd:function(c){if(!c)return this.cfgs;if(this.cfgs)for(var i=0;i<this.cfgs.length;i++)if(this.cfgs[i].flag==c)return this.cfgs[i]}}})(Xwb,jQuery);(function(p,l){var u=p.request,t=p.ui.MsgBox,o=p.getCfg,m=p.getWb,g=document,j=p.lang.getText;p.use("action").addFilter(function(h,b){if(!(h.get("na")||b&&b.na)){var d=p.getUid(),a=p.getSiteUid(),e=o("loginCfg")||1;if(!d){if(h.get("e")=="lg")e=h.data.t||e;if(a)if(h.get("e")=="lg")p.mod.authLogin.direct("bind");else window.location=u.mkUrl("account","bind");else switch(parseInt(e,10)){case 3:p.use("loginBox").display(true);break;case 2:window.location=u.mkUrl("account","siteLogin");break;default:p.mod.authLogin.direct()}return false}}},
true).reg("sd",function(h){var b=p.use("postBox");b.checkText=function(){var a=l.trim(this.jqInputor.val()),e=Xwb.util.calWbText(a);this.jqWarn.html(j("<span>"+e+"</span>"));this.jqWarn.checkClass(this.exceedCS||"out140",e<0);return e>=0&&a};var d=h.get("m");(h=h.get("t"))&&h=="share"&&b.setPostTitle(j("分享给大家"));b.display(true).reset().selectionHolder.setText(d||"");d&&b.checkText()}).reg("fw",function(h){var b=h.get("w");(v=h.get("v"))?Xwb.use("verifyBox",{appendTo:g.body}).setAnchor(h.src).display(true):
Xwb.use("forwardBox").display(true).setContent(b,m(b),p.getUid()).selectionHolder.focusStart()}).reg("fl",function(h){var b=h.get("u");l(h.src);h.lock(1);u.follow(b,0,function(d){if(d.isOk()||d.getCode()=="1020805"){d=h.get("t");var a=l(h.src);switch(parseInt(d)){case 1:a.replaceWith('<span class="followed-btn">'+j("已关注")+"</span>");break;case 2:a.replaceWith("<em>"+j("已关注")+"</em>");break;case 3:a.replaceWith('<div class="operated-box"><span class="followed-btn">'+j("已关注")+'</span><em>|</em><a href="#" rel="e:ufl,t:3" class="cancel">'+
j("取消")+"</a></div>");break;default:location.reload()}}else d.getCode()=="1020806"?t.confirm("",j("你今天已经关注了足够多的人，先去看看他们在说些什么吧？"),function(e){if(e=="ok")location.href=Req.mkUrl("ta","","id="+b)}):t.tipWarn(d.getMsg());h.lock(0)})}).reg("ufl",function(h){t.anchorConfirm(h.src,j("确定要取消关注")+"？",function(b){if(b=="ok"){h.lock(1);b=h.get("u");var d=parseInt(h.get("t"));u.unfollow(b,"",function(a){if(a.isOk())switch(d){case 1:l(h.src).replaceWith('<a rel="e:fl,t:2" href="#">'+j("关注他")+"</a>");break;case 3:l(h.src).parent().replaceWith('<a class="btn-s4" rel="e:fl,t:3" href="#"><span><s class="plus">+</s>'+
j("关注他")+"</span></a>");break;default:window.location.reload()}else t.tipWarn(a.getMsg());h.lock(0)})}})}).reg("rs",function(h){var b=h.get("w");h=m(b);var d=Xwb.use("Box",{cs:"win-report",contentHtml:"SpanBoxContent",title:"举报不良信息",appendTo:document.body,closeable:true,mask:true,destroyOnClose:true,actionMgr:true,autoCenter:true,nick:h.u.sn,img:h.u.p,text:h.tx,onactiontrig:function(a){switch(a.data.e){case "ok":a=this.jq("#content").val();u.reportSpam(b,a,function(e){e.isOk()&&t.success("","您的举报已提交，我们将尽快处理，感谢您对我们工作的支持！");
d.close()});break;case "cancel":this.close()}}});d.display(true);d.jq("#content").focus()}).reg("blm",function(h){t.anchorConfirm(h.src,"确定要屏蔽该微博？",function(b){if(b=="ok"){b=h.get("w");h.lock(1);u.shieldBlog(b,function(d){if(d.isOk()){t.anchorTipOk(h.src,"屏蔽成功！");l(h.src).replaceWith("<span>已屏蔽</span>")}h.lock(0)})}})}).reg("rl",function(){location.reload()},{na:true}).reg("fr",function(h){var b=h.get("w");if(h.get("v"))Xwb.use("verifyBox",{appendTo:g.body}).setAnchor(h.src).display(true);else{h.lock(1);
u.fav(b,function(d){if(d.isOk()){t.anchorTipOk(h.src,"收藏成功！");l(h.src).replaceWith("<span>已收藏</span>")}else t.tipWarn(d.getMsg());h.lock(0)})}}).reg("ufr",function(h){t.anchorConfirm(h.src,"确定要删除该收藏？",function(b){if(b=="ok"){h.lock(1);b=h.get("w");u.delFav(b,function(d){if(d.isOk())if(h.data.t==1){var a=l(h.getEl("w"));a.slideUp(500,function(){a.remove();h.lock(0)})}else{l(h.src).replaceWith('<a rel="e:fr" href="#">收藏</a>');h.lock(0)}})}})}).reg("cm",function(h){var b=h.get("w"),d=l(h.getEl("w")),
a=d.data("xwb_cmt");if(h.get("v"))Xwb.use("verifyBox",{appendTo:g.body}).setAnchor(h.src).display(true);else{if(!a){var e=m(b);a=p.use("CmtArea",{wbId:b,wbUid:e&&e.u.id,appendTo:d.find(".feed-content"),trigEl:h.src});d.data("xwb_cmt",a)}if(a.display())a.display(false);else{a.display(true);a.load(function(){a.cmtBox.jqInputor.focus()})}}}).reg("tl",function(h){var b=l(h.getEl("w")),d=b.data("wbEle");if(!d){d=h.get("w");var a=h.get("v");d=p.use("WbElement",{$wb:b,psrc:h.get("p"),psrc:h.get("p"),wid:d,
state:a,wbData:m(d)});b.data("wbEle",d)}d.trun("left")},{na:true}).reg("tr",function(h){var b=l(h.getEl("w")),d=b.data("wbEle");if(!d){d=h.get("w");var a=h.get("v");d=p.use("WbElement",{$wb:b,psrc:h.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.trun("right")},{na:true}).reg("zo",function(h){var b=l(h.getEl("w")),d=b.data("wbEle");if(!d){d=h.get("w");var a=h.get("v");d=p.use("WbElement",{$wb:b,psrc:h.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}l(document).scrollTop()>b.find('div[name="img"]').offset().top&&
l(document).scrollTop(b.offset().top-21);d.zoomOut()},{na:true}).reg("zi",function(h){var b=l(h.getEl("w")),d=b.data("wbEle");if(!d){d=h.get("w");var a=h.get("v");d=p.use("WbElement",{$wb:b,psrc:h.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.zoomIn()},{na:true}).reg("pv",function(h){var b=l(h.getEl("w")),d=b.data("wbEle");if(!d){d=h.get("w");var a=h.get("v");d=p.use("WbElement",{$wb:b,psrc:h.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.playVideo(h)},{na:true}).reg("cv",function(h){var b=
l(h.getEl("w")),d=b.data("wbEle");if(!d){d=h.get("w");var a=h.get("v");d=p.use("WbElement",{$wb:b,psrc:h.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.closeVideo(h)},{na:true}).reg("dl",function(h){var b=h.get("w"),d=h.get("v");t.anchorConfirm(h.src,j("确定删除该微博吗？"),function(a){if(a==="ok"){h.lock(1);u.del(b,d,function(e){var k=l(h.getEl("w"));e.isOk()?k.slideUp("normal",function(){k.remove()}):t.tipWarn(e.getMsg());h.lock(0)})}})}).reg("clsevt",function(h){var b=h.get("id");b&&t.anchorConfirm(h.src,
j("确定要关闭此活动？"),function(d){if(d==="ok"){h.lock(1);u.eventClose(b,function(a){a.isOk()?location.reload():t.tipWarn(h.getMsg())})}})}).reg("delevt",function(h){var b=h.get("id");b&&t.anchorConfirm(h.src,j("确定要删除此活动？"),function(d){if(d==="ok"){h.lock(1);u.eventDelete(b,function(a){a.isOk()?location.reload():t.tipWarn(h.getMsg())})}})}).reg("mop",function(h){h=l(h.src);var b=h.data("morelayer");if(!b){b=p.use("MoreList",{view:l("#more_list")[0]});h.data("morelayer",b)}b.display(1)}).reg("sdm",function(h){var b=
p.use("myMsg",{appendTo:g.body});b.display(true).reset();var d=h.get("c");d&&b.selectionHolder.setText(d);(h=h.get("n"))&&b.jqSender.val(h);h?b.jqContent.focus():b.jqSender.focus()}).reg("rm",function(h){p.use("myMsg",{appendTo:g.body}).reply(h.get("u"),h.get("n"))}).reg("dm",function(h){t.anchorConfirm(h.src,j("确定要删除该私信？"),function(b){if(b=="ok"){h.lock(1);b=h.get("m");u.delMsg(b,function(d){d.isOk()?l(h.src).closest("li").slideUp(500,function(){l(h.src).remove();h.lock(0)}):h.lock(0)})}})}).reg("dum",
function(h){t.anchorConfirm(h.src,j("确定要删除该私信？"),function(b){if(b=="ok"){h.lock(1);b=h.get("u");u.act("deleteDirectMessageBatch",{uid:b},function(d){d.isOk()?l(h.src).closest("li").slideUp(500,function(){l(h.src).remove();h.lock(0)}):h.lock(0)})}})}).reg("dbl",function(h){function b(){h.lock(1);var a=h.get("u");u.blacklistDel(a,"",function(e){e.isOk()?location.reload():t.tipWarn(e.getMsg());h.lock(0)})}var d=h.data.m;d?t.confirm(j("提示"),d,function(a){a==="ok"&&b()}):b()}).reg("dfan",function(h){t.confirm(j("提示"),
j("移除之后将取消{0}对你的关注?",name),function(b){if(b=="ok"){b=h.get("u");var d=h.getEl("u");h.lock(1);u.removeFans(b,"",function(a){if(a.isOk())l(d).slideUp(500,function(){h.lock(0);l(d).remove()});else{t.tipWarn(h.getMsg());h.lock(0)}})}})}).reg("addSubject",function(h){var b=l(h.src);h.lock(1);u.postReq(u.apiUrl("action","addSubject"),{text:h.get("subject")},function(d){if(d.isOk()){b.parent().replaceWith("<span>"+j("已关注")+'(<a href="javascript:;" rel="e:delSubject">'+j("取消关注")+"</a>)</span>");p.fire("subrefresh",
{subject:h.get("subject"),type:"add"})}else t.alert(j("提示"),d.getError());h.lock(0)})}).reg("delSubject",function(h){var b=l(h.src);h.lock(1);u.postReq(u.apiUrl("action","deleteSubject"),{text:h.get("subject")},function(d){if(d.isOk()){b.parent().replaceWith('<span class="topic-follow"><a href="javascript:;" rel="e:addSubject">'+j("关注该话题")+"</a></span>");p.fire("subrefresh",{subject:h.get("subject"),type:"del"})}else t.alert(j("提示"),d.getError());h.lock(0)})})})(Xwb,$);(function(p,l){var u=p.lang.getText;Xwb.ax.ValidationMgr.prototype.reg("ft",function(t,o,m,g){if(arguments.length==2){var j=t.value||arguments[1].w;l(t).data("vrel_ft_text",j).focusText(j)}else{j=l(t).data("vrel_ft_text");o==j&&this.setValue("");this.report(true,m);g()}}).reg("ne",function(t,o,m,g){var j=o==="",h=l(t).data("vrel_ft_text")||m.w;if(!j&&h)(j=o==h)&&this.setValue("");if(j&&!m.m)m.m=u("该项不能为空");if(t.tagName==="INPUT"&&(t.type==="radio"||t.type==="checkbox"))j=!t.checked;this.report(!j,
m);g()}).reg("f",function(t,o){var m=this,g=t.tagName.toLowerCase();if(m.context.comForm&&(g=="input"||g=="textarea")){var j=m.context.focusCss;l(t).blur(function(){l(this).removeClass(j);o.ch||m.validate()}).focus(function(){l(this).removeClass(m.context.errCss);l(this).addClass(j)})}else l(t).blur(function(){m.validate()})}).reg("sz",function(t,o,m,g){if(o){t=m.ww?Xwb.util.byteLen(o):o.length;var j;o=m.max;var h=m.min;if(o!==undefined&&parseInt(o)<t)j=true;if(h!==undefined&&parseInt(h)>t)j=true;
this.report(!j,m)}else this.report(true,m);g()}).reg("dt",function(t,o,m,g){if(o){if(!m.m)m.m=u("不是有效的日期格式");t=Date.parse(o);this.report(!isNaN(t),m)}else this.report(true,m);g()}).reg("mail",function(t,o,m,g){if(o){t=/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(o);if(!m.m&&m.m!==0)m.m=u("请输入正确的邮箱格式");this.report(t,m)}else this.report(true,m);g()}).reg("int",function(t,o,m,g){if(o!==""){t=o&&/^\d+$/.test(o);if(!m.m&&m.m!==0)m.m=u("该项为数字格式");this.report(t,m)}else this.report(true,m);g()}).reg("bt",
function(t,o,m,g){if(o!==""){t=parseInt(m.min);var j=parseInt(m.max);o=parseInt(o);var h=0;if(o<t)h=1;if(!h&&o>j)h=2;this.report(!h,m)}else this.report(true,m);g()}).reg("sinan",function(t,o,m,g){if(o){if(!m.m)m.m=u('支持中英文、数字、"_"或减号');this.report(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/.test(o),m)}else this.report(true,m);g()})})(Xwb,$);(function(p,l){function u(m){var g=m.flag,j=m.page;l("#ad_"+g).find("#xwb_ad_cls").mousedown(function(){l("#ad_"+g).cssDisplay(false);l.cookie("ad_"+j+"_"+g+"_hide","1",{expires:1});return false})}function t(){if(!o){var m=l("#container"),g=l("#ad_global_left"),j=l("#ad_global_right"),h=function(){var b=m.offset().left;g.length&&g.css("left",b-g.width()-20);j.length&&j.css("left",b+m.width()+20)};l(window).resize(h);o=true;setTimeout(function(){g.css("visibility","hidden").removeClass("hidden");j.css("visibility",
"hidden").removeClass("hidden");h();g.css("visibility","");j.css("visibility","")},20)}}var o;p.mod.AdMgm.reg(function(m){u(m)});p.mod.AdMgm.handlers=l.extend(p.mod.AdMgm.handlers,{global_left:t,global_right:t})})(Xwb,$);(function(p,l){var u=p.getCfg,t=p.request,o=p.util,m=p.ui.MsgBox,g=p.ax.Pagelet,j=p.lang.getText;o.ns("Xwb.mod.pagelet",{});var h=p.mod.pagelet.WeiboList=o.create(g,{ui:{cls:p.mod.WeiboList},onViewReady:function(b){if(b=b.data){if(b=b.list){var d=p.cfg.wbList;if(!d)p.cfg.wbList=d={};for(var a in b)d[a]||(d[a]=b[a])}p.on("api.getCounts",o.getBind(this,"onUpdateCounter"))}},onUpdateCounter:function(b){if(b.isOk()){var d=this.getUI().jq("#xwb_weibo_list_ct>li"),a=p.cfg.wbList,e=b.getData(),k,r,c,i,q=
this;d.each(function(){k=l(this);r=o.parseKnV(k.attr("rel")).w;(i=e[r])&&q.renderWeiboCounter(k,i);if(c=a[r]){var s=c.rt;if(s&&(i=e[s.id])){k=k.find(".forward");q.renderInnerWeiboCounter(k,i)}}})}},renderWeiboCounter:function(b,d){d[0]&&b.find("#cm").text(j("评论")+"("+d[0]+")");d[1]&&b.find("#fw").text(j("转发")+"("+d[1]+")")},renderInnerWeiboCounter:function(b,d){d[0]&&b.find("#lk_cm").text(j("原文评论")+"("+d[0]+")");d[1]&&b.find("#lk_fw").text(j("原文转发")+"("+d[1]+")")}});p.use("pipeMgr").reg("common.userSkin",
function(){return new g({ui:{actionMgr:true,uploaded:false,skinSelectedCS:"current",colorSelectInit:false,colorSelectId:"csArea",isIE:l.browser.msie,ieStyleId:"customStyle",colorInput:"colorshow",colorHiddenId:"colorSelector",initIscustom:false,isClickCustom:false,customLinkId:"custom_css",address:"http://"+window.location.hostname+t.basePath,backCur:"cur",searchCssFile:["skin_define/skin.css","setting.getSkin","skin_set.css","base.css"],parseRel:Xwb.ax.ActionMgr.parseRel,onViewReady:function(){this.back_form=
this.jq("#xwb_back_form");this.jqForm=this.back_form[0];this.back_file=this.jq("#xwb_back_file");this.pwImg=this.jq("#previewImg");this.delImg=this.jq("#closeImg");var b=this;this.switcher="";this.initIscustom=this.custom=this.jq("#switcherItem #custom").hasClass("current");this.back_file.change(function(){b.change(this.value)});this.isSelectSkin(true);p.use("Switcher",{items:l("#switcherItem>span"),contents:l("#switcherCom>div"),selectedCS:"current",onselect:function(d){if(!b.initIscustom&&d.id==
"custom"&&!b.isClickCustom)b.isClickCustom=true;b.custom=d.id=="custom"?true:false;b.switchBackColor(b.custom?"set":"select")}});this.backInit();this.delImg.click(o.bind(this.closeUploadImg,this));this.initIscustom&&setTimeout(function(){b.initCustomStyle()},10)},initCustomStyle:function(){var b=this.setPhotoColor();b[0].push("html");b[1].push(this.getBackAttr());this.setPageStyle(b[0],b[1],"cover")},closeUploadImg:function(){if(this.pwImg.attr("rel")){var b=u("language");this.pwImg.attr({rel:"",
src:t.basePath+"img/"+(b=="zh_cn"?"/":b+"/")+"upload_pic.png"});this.delImg.cssDisplay(false);this.getBackPhoto(false,"")}},photoBackTile:function(b){var d=this.jq("#bg-repeat").attr("checked")?"repeat":"no-repeat";if(b)return["html",{backgroundRepeat:d}];this.setClassByName("html","backgroundRepeat",d)},photoBackStrong:function(b){var d=this.jq("#bg-fixed").attr("checked")?"fixed":"";if(b)return["html",{backgroundAttachment:d}];this.setClassByName("html","backgroundAttachment",d)},photoBackPlace:function(b){if(!this.jq("#align a.cur").attr("rel"))if(b)return["",
""];else return;var d=this.parseRel(this.jq("#align a.cur").attr("rel")).w;d=d=="1"?"left top":d=="2"?"center top":"right top";if(b)return["html",{backgroundPosition:d}];this.setClassByName("html","backgroundPosition",d)},getBackPhoto:function(b,d){if(b)return["html",{backgroundImage:"url("+d+")"}];this.setClassByName("html","backgroundImage","url("+d+")")},change:function(b){if(b&&!this.checkImg(b)){m.alert("",j("只支持{0}格式的图片。","jpg、png"));this.back_form[0].reset()}else this.getUploader().upload()},
checkImg:function(b){b=b.split(".");return b.length&&l.inArray(b.pop().toLowerCase(),["jpg","png"])!==-1},getUploader:function(){if(!this.uploader)this.uploader=p.use("Uploader",{form:this.jqForm,action:this.back_form.attr("action"),onload:o.getBind(this,"onUploadLoad")});return this.uploader},onUploadLoad:function(b){var d=t.parseProtocol(b);this.back_form[0].reset();if(typeof d!="object")m.alert(j("提示"),j("上传失败!"));else if(d.isOk()&&d.getRaw().raw.rst!==false){this.pwImg.attr({src:d.raw.raw.rst.url,
rel:"u:1"});this.delImg.cssDisplay(true);b=[];var a=[];d=this.getBackPhoto(true,d.raw.raw.rst.url);if(!this.uploaded){!this.jq("#align a.cur").attr("rel")&&this.jq("#align a").eq(0).addClass("cur");var e=this.photoBackTile(true);e=l.extend(e[1],this.photoBackPlace(true)[1])}l.extend(d[1],e);b.push("html");a.push(d[1]);this.setCssByObject(b,a);this.uploaded=true}else{b="";switch(d.raw.raw.errno){case 3040010:b=j("上传图片失败");break;case 3040012:b=j("上传背景图片的大小不能超过2M，请重新选择");break;case 610003:case 3040013:b=
j("上传图片类型不符合要求");break;default:b=j("上传图片失败")}m.alert(j("提示"),b)}},changeCss:function(b,d){function a(c,i){c=c?k.address+c:k.address+"css/default/"+b+e;var q=k.createCss(c,"");if(k.isIE)var s=document.styleSheets.length,w=setInterval(function(){try{if(document.styleSheets.length>s){clearInterval(w);l(i).remove();o.getClassByName("html").backgroundImage="url()";k.loadLanguageCss()}}catch(y){}},10);else var x=setInterval(function(){try{clearInterval(x);l(i).remove();o.getClassByName("html").backgroundImage=
"url()";k.loadLanguageCss()}catch(y){}},10);l("head").append(q)}var e=u("language")==="zh_tw"?"/skin_zh_tw.css":"/skin.css",k=this,r=false;l('link[href$="zh_tw.css"]').remove();l("link[rel=stylesheet]").each(function(){if(this.href.indexOf(e)!==-1&&this.id!=k.customLinkId){r=true;this.href.indexOf("/css/default/"+b+e)>0||a("/css/default/"+b+e,this)}});if(!r){k=this;if(this.isIE&&l.browser.version==6){k.cacheCss=k.getTempStyle();setTimeout(a,100)}else a()}this.switcher=d},createCss:function(b,d){var a=
document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("href",b);a.setAttribute("id",d);return a},loadLanguageCss:function(){u("language")==="zh_tw"&&l("head").append(this.createCss(this.address+"css/default/language/zh_tw.css",""))},decorateSelected:function(b){if(!this.jqPreSel)this.jqPreSel=this.jq("#switcherCom ."+this.skinSelectedCS);this.jqPreSel.removeClass(this.skinSelectedCS);this.jqPreSel.find(".bg-icon").removeClass("bg-icon");
this.jqPreSel=l(b);this.jqPreSel.addClass(this.skinSelectedCS);this.jqPreSel.find("span").addClass("bg-icon")},isSelectSkin:function(b){if(!this.jqPreSel)this.jqPreSel=this.jq("#switcherCom ."+this.skinSelectedCS);if(b){this.orgBackColor=l("html").css("backgroundColor");this.orgBackBg=l("body").css("backgroundImage")}},switchBackColor:function(b){if(b=="select"){if(!this.jqPreSel)this.jqPreSel=this.jq("#switcherCom ."+this.skinSelectedCS);if(this.jqPreSel.length){this.cacheCss=this.getTempStyle();
b=this.parseRel(this.jqPreSel.attr("rel"));this.changeCss(b.sk,b.id)}}else this.loadLink(this.address+"css/default/skin_define/skin.css.php",this.customLinkId)},loadLink:function(b){var d=u("language")==="zh_tw"?"/skin_zh_tw.css":"/skin.css",a=this,e=function(){l('link[href$="zh_tw.css"]').remove();l("link[rel=stylesheet]").each(function(){this.href.indexOf(d)!==-1&&this.id!=a.customLinkId&&l(this).remove()});if(a.cacheCss){a.addStyle("",a.cacheCss,"cathe");a.cacheCss=""}};if(!this.initIscustom&&
l("head #defaultStyle").length==0){b="css/default/skin_define/skin.css.php";l.get(this.address+b,{},function(k){e();var r=document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css");c.setAttribute("id","defaultStyle");r.appendChild(c);if(c.styleSheet)c.styleSheet.cssText=k;else c.innerHTML=k;a.loadLanguageCss()})}else{e();a.loadLanguageCss()}},getTempStyle:function(){var b=document.getElementById(this.ieStyleId);if(b)return b.styleSheet?b.styleSheet.cssText:
b.innerHTML;return""},setCustomClass:function(){var b=[],d=[],a="",e=this.pwImg.attr("rel");if(e)a=this.parseRel(e).u?this.pwImg.attr("src"):"";e=this.photoBackTile(true);b.push("html");var k=this.photoBackStrong(true);e=l.extend(e[1],k[1]);e=l.extend(e,this.photoBackPlace(true)[1]);(e=l.extend(e,{backgroundImage:"url("+a+")"}))&&d.push(e);b.push(".wrap-in");d.push({backgroundImage:""});b.push("#wrap");d.push({backgroundImage:""});a=this.jq("#color-area a");k=0;for(var r=a.length;k<r;k++){e=this.getChangeClass(k,
"#"+a.eq(k).attr("key"));b=l.merge(b,e[0]);d=l.merge(d,e[1])}return[b,d]},getCustomData:function(){var b={},d=this.jq("#color-area a");b.colors=[];for(var a=0,e=d.length;a<e;a++)b.colors.push(d.eq(a).attr("key"));b.colors=b.colors.join(",");d=this.pwImg.attr("rel");b.bg=d?this.parseRel(d).u?this.pwImg.attr("src"):"":"";b.tiled=this.jq("#bg-repeat").attr("checked")?1:0;b.fixed=this.jq("#bg-fixed").attr("checked")?1:0;d=this.jq("#align a.cur");b.align=d.length?this.parseRel(d.attr("rel")).w:2;d=this.jq("#scheme-select div.cur");
b.colorid=d.length?this.parseRel(d.attr("rel")).t:"";return b},isChangeColor:false,showColorSelect:function(b){var d=this,a=false;this.isChangeColor=false;if(!this.colorSelectInit){this.colorSelectInit=true;l("#"+this.colorHiddenId).ColorPicker({appendTo:"#"+d.colorSelectId,inputId:d.colorInput,color:d.curColor,cpBodyWidth:"212px",onShow:function(e){l("#"+l("#"+d.colorHiddenId).data("colorpickerId")).data("colorpicker").set(d.curColor);l("#"+d.colorSelectId+"#cltitle").html(b);l(e).show();l("#"+d.colorSelectId).css({position:"relative",
"z-index":10005,left:l("#skin_setcolorArea").offset().left-200+"px",top:"35px"}).fadeIn(500);return false},onHide:function(){l("#"+d.colorSelectId).hide();return false},onChange:function(e,k){d.setSelectBox(k,a);d.isChangeColor=true}})}l("#"+this.colorSelectId+" #cltitle").html(b);l("#"+this.colorHiddenId).click();a=true},setSelectBox:function(b){if(this.selectColorObj){l(this.selectColorObj).find("span").css("backgroundColor","#"+b).parent().attr("key",b);l("#"+this.colorSelectId).find("#cRealColor>span").css("backgroundColor",
"#"+b)}if(this.isChangeColor){this.jq("#scheme-select div."+this.backCur).removeClass(this.backCur);if(this.selectColorObj){var d=this.getChangeClass(this.selectColorType,"#"+b),a=this.getPhotoColor(this.selectColorType,"#"+b);b=l.merge(d[0],a[0]);d=l.merge(d[1],a[1]);b.push("html");d.push(this.getBackAttr());this.setPageStyle(b,d,"add")}}},setBackColor:function(b,d){d=l(d);if(!d.hasClass(this.backCur)){this.jq("#"+b+" ."+this.backCur).removeClass(this.backCur);d.addClass(this.backCur)}},reload:function(){window.location=
String(window.location.href).replace(/skinset[^A-Za-z0-9\/]{1}1/g,"")},backPage:1,allBackPage:2,curSelect:1,disableClsl:"arrow-l-s1-disabled",disableClsr:"arrow-r-s1-disabled",slidePx:300,minus:0,ulPx:0,ulId:"scheme-select",sliding:false,selectBox:["#000","#808080","#f66","#90c","#e7f2fb","#fff","#f00","#f60","#fc0","#090"],backInit:function(){var b=this.jq("#"+this.ulId);this.liNum=b.find("li").length;this.setSlideBtn(b.css("margin-left").replace("px",""))},getBackPhotoInfo:function(){var b="",d=
this.pwImg.attr("rel");if(d)b=this.parseRel(d).u?this.pwImg.attr("src"):"";return b},setPageStyle:function(b,d,a){this.mergeMatch(b,d);this.addStyle(b,d,a||"cover")},setCssByObject:function(b,d,a){this.addStyle(b,d,a||"change")},setClassByName:function(b,d,a,e){var k=[],r={};r[d]=a;if(d=="backgroundPosition"||d=="backgroundRepeat"||d=="backgroundAttachment")if(d=this.getBackPhotoInfo())r.backgroundImage="url("+d+")";else return;k.push(r);this.addStyle([b],k,e||"change")},splitArray:function(b,d){for(var a=
function(r,c){var i=c.length;b.splice(r,1,c[0]);for(var q=1;q<i;q++){b.splice(r+q,0,c[q]);d.splice(r+q,0,d[r])}},e=0;e<b.length;e++){var k=b[e].split(", ");if(k.length>1){a(e,k);e+=k.length-1}}},setPhotoColor:function(){for(var b=this.jq("#color-area a"),d=[],a=[],e=[],k=[],r=0,c=b.length;r<c;r++){var i="#"+b.eq(r).attr("key"),q=this.getChangeClass(r,i);i=this.getPhotoColor(r,i);d=l.merge(d,q[0]);a=l.merge(a,q[1]);e=l.merge(e,i[0]);k=l.merge(k,i[1])}d=l.merge(d,e);a=l.merge(a,k);if(b=this.getBackPhotoInfo()){d.push("html");
a.push({backgroundImage:"url("+b+")"})}return[d,a]},getPhotoColor:function(b,d){var a=[],e=[];switch(b){case 0:a.push(".pb-main .pb-list .pb-con .c2");a.push(".pb-aside .pb-block p");e.push({background:d});break;case 1:a.push(".pb-main .pb-list .pb-con");a.push(".pb-aside .pb-more");e.push({background:d});break;case 2:a.push(".skin-set .skin-setcolor .preview-box");break;case 3:a.push(".pb-aside .pb-user-info .ui1");a.push(".pb-aside .pb-block div");e.push({background:d});break;case 4:a.push(".pb-main .pb-list .pb-con .c1");
a.push(".pb-aside .pb-user-info .ui2");e.push({background:d})}e.push({background:d});return[a,e]},mergeMatch:function(b,d){for(var a=function(c){for(var i=c+1;i<b.length;i++)if(b[c]==b[i])return i;return""},e=function(c,i){b.splice(i,1);l.extend(d[c],d[i]);d.splice(i,1)},k=0;k<b.length;k++){var r=a(k);if(r){e(k,r);k--}if(k+1==b.length)break}return[b,d]},isDisable:function(b){return l(b).hasClass(this.disableClsl)||l(b).hasClass(this.disableClsr)},backSlide:function(b){var d=this.jq("#scheme-select"),
a=Number(d.css("margin-left").replace("px",""));this.ulPx=a;this.minus=b=="prev"?this.slidePx:-this.slidePx;this.setSlideBtn(this.minus+a);this.setBackSlide(d,b)},setBackSlide:function(b,d){if(d=="prev"){this.minus-=30;this.ulPx+=30}else{this.minus+=30;this.ulPx-=30}b.css("margin-left",this.ulPx+"px");if(this.minus!=0){var a=this;setTimeout(function(){a.setBackSlide.call(a,b,d)},1)}else this.sliding=false},setSlideBtn:function(b){var d=this.jq("#prev"),a=this.jq("#next"),e=this.jq("#slidePage"),k=
1,r=-(this.liNum-1)*this.slidePx;if(b==0){d.addClass(this.disableClsl);r<0?a.removeClass(this.disableClsr):a.addClass(this.disableClsr)}else{k=b/this.slidePx*-1+1;d.removeClass(this.disableClsl);b==r&&a.addClass(this.disableClsr);b>r&&a.removeClass(this.disableClsr)}e.html(k+"/"+this.liNum)},sixBoxColor:function(b){b=b.split("-");for(var d=this.jq("#color-area a"),a=[],e=[],k=[],r=[],c=0,i=d.length;c<i;c++){d.eq(c).attr("key",b[c].replace("#",""));d.eq(c).find("span").css("backgroundColor",b[c]);
var q=this.getChangeClass(c,b[c]),s=this.getPhotoColor(c,b[c]);a=l.merge(a,q[0]);e=l.merge(e,q[1]);k=l.merge(k,s[0]);r=l.merge(r,s[1])}a=l.merge(a,k);e=l.merge(e,r);a.push("html");e.push(this.getBackAttr());this.setPageStyle(a,e)},getChangeClass:function(b,d){var a=[],e=[];switch(b){case 0:var k="a, .feed-list .feed-filter a, .user-preview .user-total-box a, .user-preview .user-total-box a:hover, .gotop:hover";this.splitByChar(a,e,k,{color:d});if(p.getCfg("remind")=="0"){k=".menu .menu-custom, .menu .menu-over";
this.splitByChar(a,e,k,{background:d})}break;case 1:k=".sub-link, .feed-list .feed-info p a, .feed-list .feed-info span a, .feed-list .forward p span a, .gotop:link, .gotop:visited, .ft-con a, .icon-reply, .icon-del";this.splitByChar(a,e,k,{color:d});k="#home .home-current, #atme .atme-current, #comments .comment-current, #favs .favs-current, #systemnotice .systemnotice-current, #messages .messages-current, .nav-block .cur, .nav-block .cur:hover, .nav .defined-link a:hover, .nav .user-link a:hover, .tab-s4 a:hover, .tab-s4 .current, .tab-s4 .current:visited, .menu li, .menu .menu-bg, .menu .menu-bg .l-bg, .menu .menu-bg .r-bg";
this.splitByChar(a,e,k,{backgroundColor:d});break;case 2:k="html";this.splitByChar(a,e,k,{backgroundColor:d});k=".sub-menu a:hover, .sub-menu a.current";this.splitByChar(a,e,k,{color:d});a.push(".event-classify a:hover");e.push({color:d});k=".event-classify a.curr, .event-classify a.curr:hover";this.splitByChar(a,e,k,{color:d});a.push(".nav-block .cur");a.push(".nav-block .cur:hover");e.push({color:d});e.push({color:d});break;case 3:k=".user-sidebar .hd h3, .user-list-s1 .hd h3, .user-tag .tag-tit h3, .top10 .hd h3, .user-tag .hd h3, .user-preview .user-intro strong, .feed-list .feed-tit h3, .title-box h3, .column-title h3, .account-login h3, .recom-box .hd h3, .att-topic .hd h3, .events-title h3, .recent-event .hd h3, .tit-hd h3, .tit-s1 h3, .tab-s2 span a, .tab-s2 span a:visited, .tab-s3 span a, .tab-s3 span a:visited";
this.splitByChar(a,e,k,{color:d});break;case 4:a.push("body");e.push({color:d})}return[a,e]},splitByChar:function(b,d,a,e){b.push(a);d.push(e)},getBackAttr:function(){var b={},d=this.pwImg.attr("rel");b["background-image"]=d?"url("+(this.parseRel(d).u?this.pwImg.attr("src"):"")+")":'url("")';b["background-repeat"]=this.jq("#bg-repeat").attr("checked")?"repeat":"no-repeat";b["background-attachment"]=this.jq("#bg-fixed").attr("checked")?"fixed":"scroll";d="";if(d=this.jq("#align a.cur").attr("rel")){d=
this.parseRel(d).w;b["background-position"]=d=="1"?"left top":d=="2"?"center top":"right top"}return b},directSetRightBg:function(b){l("#container")[0].className=b[1];b=this.getPhotoColor(3,b[0]);this.setPageStyle(b[0],b[1])},setRightBackColor:function(){var b=this.getChangeClass(this.selectColorType,"#"+hex),d=this.getPhotoColor(this.selectColorType,"#"+hex),a=l.merge(b[0],d[0]);b=l.merge(b[1],d[1]);this.setPageStyle(a,b)},onactiontrig:function(b){switch(b.data.e){case "save":b={};if(this.custom)b=
this.getCustomData();else{if(this.switcher==""){m.alert("",j("请选择皮肤"));break}b={skin_id:this.switcher}}var d=this;t.saveSkin(b,function(a){if(a.isOk()){d.display(false);d.reload()}else m.alert("",a.getMsg())});break;case "cancel":this.reload();break;case "cs":this.custom=false;this.changeCss(b.get("sk"),b.get("id"));this.decorateSelected(b.src);break;case "bgLevel":this.photoBackTile(false);b.preventDefault(false);break;case "bgStrong":this.photoBackStrong(false);b.preventDefault(false);break;case "bgPlace":if(l(b.src).hasClass("cur"))break;
this.jq("#align .cur").removeClass("cur");b.src.className="cur";this.photoBackPlace(false);break;case "cls":this.selectColorObj=b.src;this.selectColorType=Number(b.get("t"));this.setBackColor("color-area",b.src);this.curColor=l(b.src).attr("key");this.showColorSelect(l(b.src).attr("title"));break;case "clbs":this.setBackColor("scheme-select",b.src);this.sixBoxColor(b.get("w"));break;case "slide":if(this.sliding||this.isDisable(b.src))break;this.sliding=true;this.backSlide(b.get("t"),b.src)}},addStyle:function(b,
d,a){var e=this.ieStyleId,k=document.getElementById(e);this.initIscustom||l("#"+this.customLinkId).remove();if(k==null){var r=document.getElementsByTagName("head")[0];k=document.createElement("style");k.setAttribute("type","text/css");k.setAttribute("id",e);r.appendChild(k);if(k.styleSheet)if(a&&a=="create")k.styleSheet.cssText=d;else{b=this.cssObjToString(b,d);k.styleSheet.cssText=b}else if(a&&a=="create")k.innerHTML=d;else{b=this.cssObjToString(b,d);k.innerHTML=b}}else if(k.styleSheet)if(a==="add"){b=
this.cssObjToString(b,d);k.styleSheet.cssText+=b}else if(a==="cover"){b=this.cssObjToString(b,d);k.styleSheet.cssText=b}else if(a==="cathe")k.styleSheet.cssText=d;else{a=k.styleSheet;k=a.rules;e=b.length;for(r=0;r<e;r++){var c=this.isMatchCss(k,b[r]);c>-1?this.setRulesAttr(k[c].style,d[r]):a.addRule(b[r],this.objectToString(d[r],false))}}else if(a==="add"){b=this.cssObjToString(b,d);k.innerHTML+=b}else if(a==="cover"){b=this.cssObjToString(b,d);k.innerHTML=b}else if(a==="cathe")k.innerHTML=d;else{a=
k.sheet.cssRules;e=a.length;for(r=0;r<e;r++){c=this.isMatchCss(a,b[r]);if(c>-1)this.setRulesAttr(a[c].style,d[r]);else(d=this.objectToString(d[r],false))&&k.sheet.insertRule(b[r],this.objectToString(d[r],false))}}},setRulesAttr:function(b,d){for(var a in d)b[a]=d[a]},isMatchName:function(b){var d=n.length;b=b.toLowerCase();for(var a=0;a<d;a++)if(b==n[a])return true;return false},isMatchCss:function(b,d){for(var a=0,e=b.length;a<e;a++)if(d==b[a].selectorText.toLowerCase())return a;return-1},cssObjToString:function(b,
d){for(var a=[],e=0,k=b.length;e<k;e++){var r=this.objectToString(d[e]);a.push(b[e]+"{"+r+"}")}return a.join("")},objectToString:function(b,d){var a="",e;for(e in b){var k=!d?this.getCssKey(e):e;a+=k+":"+b[e]+";"}return a.slice(0,-1)},getCssKey:function(b){switch(b){case "backgroundRepeat":return"background-repeat";case "backgroundAttachment":return"background-attachment";case "backgroundImage":return"background-image";case "backgroundPosition":return"background-position";case "backgroundColor":return"background-color";
default:return b}}}})});p.use("pipeMgr").reg("common.siteNav",{onViewReady:function(){var b=this.getUI(),d=[],a;p.on("api.unread",function(e){if(e.isOk()){if(!b.jqNewWb){b.jqExtra("referMe","myCmt","myMsg","myNotice");a={1:b.jqReferMe,2:b.jqMyCmt,4:b.jqMyMsg,5:b.jqMyNotice}}e=e.getData().unread;for(var k=0;k<e.length;k++)if(d[k]!==e[k]){var r=a[k];if(r){r.cssDisplay(e[k]);e[k]&&r.find("#t").text(e[k])}}d=e}})}}).reg("common.userPreview",{onViewReady:function(){var b=this;p.on("api.update",function(d){if(d.isOk()){d=
b.getUI().jq("#xwb_user_total_wb");d.text(parseInt(d.text())+1)}}).on("api.destroy",function(d){if(d.isOk()){d=b.getUI().jq("#xwb_user_total_wb");d.text(parseInt(d.text())-1)}})}}).reg("input",{ui:p.mod.PostBase,onViewReady:function(){this.getUI().initEx()}}).reg("wblist",h).reg("weibo.weiboList",function(){return new h({ui:{cls:p.mod.WeiboList,syncList:true}})}).reg("weibo.userTimelineList",function(){var b=u("page")=="index.profile";return new h({ui:{cls:p.mod.WeiboList,syncList:b}})}).reg("common.searchMod",
function(){return new g({onViewReady:function(){var b=document.getElementById("k");b&&o.focusEnd(b);l("#searchForm").bind("submit",function(){if(!l.trim(l("#k").val())){l("#searchTip").cssDisplay(true);l("#k").focus();return false}});l("#searchBtn").click(function(){if(p.util.byteCut(l.trim(l("#k").val()),30))l("#searchForm").submit();else{l("#searchTip").cssDisplay(true);l("#k").focus()}return false});var d=this.getUI();p.on("subrefresh",function(a){if(d.jq(".search-field").attr("rel").split(":")[1]==
a.subject){var e=d.jq(".search-field span:last a").attr("rel");if(e=="e:delSubject"||e=="e:addSubject")a.type=="add"?d.jq(".search-field span:last").replaceWith("<span>"+j("已关注")+'(<a href="javascript:;" rel="e:delSubject">'+j("取消关注")+"</a>)</span>"):d.jq(".search-field span:last").replaceWith('<span class="icon-follow"><a href="javascript:;" rel="e:addSubject">'+j("关注该话题")+"</a></span>")}})}})}).reg("user.fameList",function(){return new g({onViewReady:function(){this.getUI().jq().highlight(l("#k").val())}})}).reg("user.userSearchList",
function(){return new g({ui:{actionMgr:true,onactiontrig:function(b){switch(b.data.e){case "allTag":b.lock(1);t.postReq(t.apiUrl("action","getTags"),{uid:b.get("u")},function(d){if(d.isOk()){d=d.getData();var a=l(b.src);l(d).each(function(){var e,k;for(k in this)e=this[k];e!=l("#k").val()&&a.after('<a href="'+t.mkUrl("search","user&",{ut:"tags",k:e})+'">'+e+"</a>")});a.remove()}b.lock(0)});default:b.stopPropagation(false)}}},onViewReady:function(b){var d=l("#k").val(),a=this.getUI();switch(b.data.type){case "tags":a.jq("li p.tag").highlight(d);
break;case "sintro":a.jq("li div.u-info").highlight(d).highlight(d);break;case "nick":a.jq("li a.u-name").highlight(d).highlight(d)}}})}).reg("user.userSearchPreview",function(){return new g({onViewReady:function(){this.getUI().jq(".user-list-wrap").highlight(l("#k").val())}})}).reg("weibo.weiboOnly",function(){return new h({onViewReady:function(){h.prototype.onViewReady.apply(this,arguments);this.getUI().jq("#xwb_weibo_list_ct").highlight(l("#k").val())}})}).reg("user.followersList",function(){return new g({ui:{cls:p.mod.HoverList,
itemSelector:"ul li",onMouseOver:function(){l(this).find("#removeFans,#sendMsg").removeClass("hidden")},onMouseOut:function(){l(this).find("#removeFans,#sendMsg").addClass("hidden")},actionMgr:true,onactiontrig:function(b){switch(b.data.e){case "ufl":var d=b.get("u"),a=b.get("n");m.confirm(j("提示"),j("确定要取消关注")+a+"?",function(e){if(e==="ok"){b.lock(1);p.request.unfollow(d,"",function(k){if(k.isOk()){var r=b.jq("u");r.slideUp(500,function(){b.lock(0);r.remove()})}else{b.lock(0);m.tipWarn(k.getMsg())}})}});
break;default:b.stopPropagation(false)}}}})}).reg("weibo.detail",function(){return new h({onViewReady:function(){h.prototype.onViewReady.apply(this,arguments);var b=this.getUI().jq("#xwb_cmt_list"),d=b.attr("wbid"),a=p.cfg.wbList[d].u.id,e=this.getUI().jq("#topCmtBox");p.use("MBlogCmtArea",{view:b[0],wbId:d,wbUid:a,topCmtBox:e[0],faceSize:50}).display(true).load()}})}).reg("common.message",function(){return new g({onViewReady:function(){this.jq("#messageList li").hover(function(){l(this).find("#del").cssDisplay(true)},
function(){l(this).find("#del").cssDisplay(false)});p.on("api.sendDirectMessage",function(b){b.isOk()&&location.reload()})}})}).reg("weibo.comments",function(){return new g({ui:{cls:p.mod.MyCmt}})}).reg("user.fansList",function(){return new g({ui:{cls:p.mod.HoverList,itemSelector:"ul li",onMouseOver:function(){l(this).find("#removeFans,#sendMsg").removeClass("hidden")},onMouseOut:function(){l(this).find("#removeFans,#sendMsg").addClass("hidden")}}})}).reg("user.outputCelebUserBlock",function(){return new g({ui:{selectedCS:"current",
actionMgr:true,onactiontrig:function(b){switch(b.data.e){case "ck":var d=b.jq("u").find("#pic");d.hasClass(this.selectedCS)?d.removeClass(this.selectedCS):d.addClass(this.selectedCS);break;case "sa":var a=b.src.checked,e=this.selectedCS;this.jq("#pic").each(function(){l(this).checkClass(e,a)});b.preventDefault(false);break;case "submit":var k=[];e=this.selectedCS;var r;this.jq("#pic").each(function(){if(l(this).hasClass(e)){r=p.ax.ActionMgr.wrapRel(this);k.push(r.get("u"))}});k.length?t.follow(k.join(","),
0,function(c){c.isOk()?l(b.src).replaceWith('<span class="followed-btn">'+j("已关注")+"</span>"):m.tipWarn(c.getMsg());b.lock(0)}):m.tipWarn(j("请选择您要关注的人。"))}}}})}).reg("user.hotUser",function(){return new g({onViewReady:function(){var b=this,d,a;this.jq("#followall-btn").click(function(){if(a)return false;var e=[],k;b.jq("li").each(function(){d=p.ax.ActionMgr.wrapRel(this);(k=d.get("u"))&&e.push(k)});if(e.length){a=true;t.follow(e.join(","),0,function(r){(a=r.isOk())&&b.jq("a[name=follow]").replaceWith('<span class="followed-btn">'+
j("已关注")+"</span>")})}return false})}})}).reg("category_user",function(){return new g({onViewReady:function(){p.use("Switcher",{items:this.jq("div.tab-s4>a"),contents:this.jq("div.column-body"),selectedCS:"current"})}})}).reg("component/component_1.run",function(){return new g({onViewReady:function(){var b=this.getUI();p.on("pipe.end",function(){p.use("Switcher",{items:b.jq("div.tab-s2>span"),contents:b.jq("div.hot-mblog-body"),selectedCS:"current"})})}})}).reg("component/component_common.hotWB_getComment",
function(){return new h({renderWeiboCounter:function(b,d){h.prototype.renderWeiboCounter.apply(this,arguments);if(d[0]){var a=d[0];if(a>=1E5){var e=a/1E4>>0;if(e>0){a=a%1E4/1E4>>0;a=a>0?"."+a:"";a=""+e+a+"万"}}b.find("#hotNum").text(a)}}})}).reg("component/component_common.hotWB_getRepost",function(){return new h({renderWeiboCounter:function(b,d){h.prototype.renderWeiboCounter.apply(this,arguments);if(d[1]){var a=d[1];if(a>=1E5){var e=a/1E4>>0;if(e>0){a=a%1E5/1E4>>0;a=a>0?"."+a:"";a=""+e+a+j("万")}}b.find("#hotNum").text(a)}}})}).reg("component/component_8.run",
function(){return new h({onViewReady:function(b){h.prototype.onViewReady.apply(this,arguments);var d=b.data.currRoute,a=b.data.page_id,e=p.use("Layer",{closeable:true,contextable:true,view:this.jq("#win_city")[0],onViewReady:function(){t.getProvinces(o.bind(this.onDataLoaded,this));var k=this;this.jq("#citys").click(function(r){r.target.tagName=="A"&&k.close()})},onDataLoaded:function(k){if(k.isOk()){this.provinces=k.getData().provinces;var r=this;this.jq("#sel-area").change(function(){r.changeProvince(this.value)})}},
changeProvince:function(k){if(this.provinces){var r=this;l.each(this.provinces,function(c,i){if(i.id==k){var q=[];l.each(i.citys,function(s,w){var x,y;for(s in w){x=s;y=w[s]}x=t.mkUrl(d,"",o.queryString({page_id:a,province:k,city:x+"#city"}));q.push('<a href="'+x+'">'+y+"</a>")});r.jq("#citys").html(q.join(""));return false}})}}});this.jq("#cityBtn").click(function(){e.display(true);return false})}})}).reg("common.subjectFollowed",function(){return new g({onViewReady:function(){this.getUI();var b=
function(d){l(d).hover(function(){l(this).attr("class","li-hover");l(this).append('<div class="li-bg" id="BG"></div>');l(this).find("span").removeClass("hidden")},function(){l(this).removeClass("li-hover");l(this).find("span").addClass("hidden");l(this).find("#BG").remove()})};p.on("subrefresh",function(){t.postReq(t.apiUrl("action","getAllSubject"),{},function(d){if(d.isOk()){l("#subjectCount ul li").remove();for(var a=d.getData(),e=0,k=a.length;e<k;e++){var r=a[e].subject;l(' <li rel="subject:'+
r+'"><a href="'+a[e].href+'">'+r+'</a> <span class="close hidden" rel="e:deleteSubject" title="'+j("删除")+'">x</span> </li>').appendTo(l("#subjectCount ul"))}l("#subjectCount ul li").each(function(){b(this)});l("#subjectCount").prev("div.hd").find("h3 span").html("("+d.getData().length+")")}else m.alert(j("提示"),d.getError())})});p.on("pipe.end",function(){l("#subjectCount ul li").each(function(){b(this)});p.use("action").reg("deleteSubject",function(a){l(a.src);a.lock(1);t.postReq(t.apiUrl("action",
"deleteSubject"),{text:a.get("subject")},function(e){e.isOk()?p.fire("subrefresh",{subject:a.get("subject"),type:"del"}):m.alert(j("提示"),e.getError());a.lock(0)})});var d=null;l("#addSubject").click(function(){if(d)d.display(true);else d=p.use("addFollow",{appendTo:l("#subjectCount").parent()})})})}})}).reg("event.eventinfo",function(){return new g({ui:{actionMgr:true,onactiontrig:function(b){var d=function(a,e,k){var r=p.use("postBox");a=e||a.get("m");k&&k=="share"&&r.setPostTitle(j("分享给大家"));r.display(true).reset().selectionHolder.setText(a||
"");a&&r.checkText()};switch(b.get("e")){case "join":b.get("other")=="1"?t.eventJoin({eid:b.get("eid")},function(a){if(a.isOk()){m.tipOk(j("参加成功！"),function(){d(b)});l(b.src).replaceWith('<a class="has-join-btn" href="#">'+j("已参加")+"</a>")}else m.tipWarn(a.getError())}):p.use("Box",{contentHtml:"evevtApplicants",actionMgr:true,cs:"win-apply win-fixed",closeable:true,title:"报名申请",appendTo:document.body,mask:true,autoCenter:true,onViewReady:function(){var a=this;this.jq("#contact,#note").keydown(function(){a.jq("#tips").removeClass("hidden");
a.jq("#wrong").addClass("hidden")})},onactiontrig:function(a){switch(a.data.e){case "sd":a=this.jq("#tips");var e=this.jq("#wrong");if(this.jq("#contact").val()==""){a.addClass("hidden");e.removeClass("hidden").html(j("请输入联系方式！"));break}if(l.trim(this.jq("#note").val())==""){a.addClass("hidden");e.removeClass("hidden").html(j("请填写备注"));break}if(o.calWbText(this.jq("#note").val(),100)<0){a.addClass("hidden");e.removeClass("hidden").html(j("备注长度超过100！"));break}var k=this;t.eventJoin({eid:b.get("eid"),
other:"2",contact:this.jq("#contact").val(),note:this.jq("#note").val()},function(r){if(r.isOk()){m.tipOk(j("参加成功！"),function(){d(b);k.close()});l(b.src).replaceWith('<a class="join-btn-disabled" href="#">'+j("已参加")+"</a>")}else m.tipWarn(r.getError())})}}}).display(true);break;case "sd":d(b,b.get("m1"),b.get("t"));break;default:b.stopPropagation(false)}}}})}).reg("event.eventinput",function(){return new g({ui:{actionMgr:true,exceedCS:"over-limit",onactiontrig:function(b){switch(b.data.e){case "sd":this.send(b.get("eid"),
b.get("a"),b);break;case "ic":p.use("emotion").setSelectionHolder(this.selectionHolder,this.checkText,this).showAt(b.src)}},onViewReady:function(){this.jqExtra("inputor","warn");var b=this;this.jqInputor.bind("keyup",function(){b.checkText()});this.selectionHolder=p.use("SelectionHolder",{elem:this.jqInputor[0]});this.checkText()},send:function(b,d,a){var e=this;a.lock(1);if(this.checkText())t.postReq(t.apiUrl("action","update"),{"extra_params[event_id]":b,doAction:d,text:this.jqInputor.val()},function(k){k.isOk()?
m.tipOk(j("发布成功"),function(){window.location.reload()}):m.tipWarn(k.getMsg(),function(){k.getCode()=="30000"&&e.jqInputor.val("#"+e.jq("p.title a").html()+"#")});a.lock(0)});else{a.lock(0);this.jqInputor.focus()}},checkText:function(){var b=l.trim(this.jqInputor.val()),d=o.calWbText(b);d>=0?this.jqWarn.html(j("您还可以输入{0}字",d)).removeClass(this.exceedCS):this.jqWarn.html(j("已超出{0}字",Math.abs(d))).addClass(this.exceedCS);return d>=0&&b}}})}).reg("localpm.dialog",{onViewReady:function(b){var d=this.getUI();
p.use("myMsg",{view:d.jq("#xwb_myMsg")[0],autoCenter:false,dialogMode:true,mask:false,warpNode:"span",dialogCallBack:function(a){a.isOk()&&location.reload()},innerViewReady:function(a){a=l(a);a.find("#content").focusText("","post-focus",a.find(".post-textarea"))}}).reply(b.data.user.sina_uid,b.data.user.nickname)}})})(Xwb,$);(function(p,l){var u=p.getCfg,t=p.request,o=p.util,m=this;p.on("pipe.start",function(g){o.ie6&&l("#logo").length&&l("#logo").fixPng();g||(g={});p.cfg=l.extend({},m.__gloCfg||{},g);p.use("action").bind(document.body);g.basePath&&t.init(g.basePath);if(p.getUid()){var j=g.remind,h=j?document.body:l("#xwbInnerNav")[0];h&&p.use("notice",{appendTo:h,remindType:j})}p.mod.shortlink.local=g.shortLink}).on("pipe.end",function(){if(p.cfg.wbList){var g=p.cfg.wbList,j=[],h;if(u("uid")){for(var b in g){j.push(b);
h=g[b];h.rt&&j.push(h.rt.id)}t.counts(j.join(","),l.noop);j=null}var d=p.ax.ActionMgr;p.mod.shortlink.from(g,function(){l(".feed-list ul>li").each(function(){var i=l(this),q=d.getRel(this,"w",this);if(q)if(q=g[q]){var s=q.shortlinks;s&&s.length&&p.mod.shortlink.renderWeiboShortlink(i,q,s)}})})}l("#xwb_search_form").each(function(){p.use("SearchEntry",{view:this}).display(true)});p.report.start();j=function(){p.report.report()};if(window.addEventListener)window.addEventListener("unload",j,false);else window.attachEvent&&
window.attachEvent("onunload",j);u("ads")&&p.mod.AdMgm.init(u("ads"));if(u("page")!=="ta"){var a=l("#new_wb_tips");a.length&&p.on("api.unread",function(i){if(i.isOk()){i=i.getData().unread[0];a.cssDisplay(!!i)}})}if(p.getUid()){var e=false,k=u("maxid"),r=function(){e=false;setTimeout(c,3E4)},c=function(){if(!e){e=true;t.unread(k,r)}};c()}l(".main-menu>li").slideMenu(">ul","menu-over");l("#gotop").each(function(){var i=l(document),q=l(this);l("#container");var s=true,w;q.css("bottom","95px");l(window).scroll(function(){if(i.scrollTop()==
0){if(!s){q.cssDisplay(false);s=true}w=false}else if(!w)if(s){q.cssDisplay(true);s=false}});q.click(function(){w=true;l("html,body").animate({scrollTop:0},150);return false})})});l(function(){l("#focus_index").each(function(){p.use("base",{actionMgr:true,view:this,onactiontrig:function(g){var j=g.data;switch(j.e){case "cls":l.cookie(g.get("cn"),1);this.display(0);break;case "do":g=j.op;if(g==1){g=p.use("postBox");p.use("postBox").display(true);g&&g.selectionHolder.insertText("#"+j.tp+"# ")}else g==
2&&j.ln&&window.open(decodeURIComponent(j.ln.replace(/\+/g,"%20")))}}}).display(true)});l("#xwb_today_topic").each(function(){l(this).find("p.feedback").substrText(80,1);l(this).find("div.column-item:first").removeClass("next");p.use("FadeBox",{view:this}).display(1)})});window.xwbPipe=p.ax.PipeMgr})(Xwb,$);
