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 h=p.util={templ:function(a,e,k,s){return a.replace(/\{([\w_$]+)\}/g,function(c,g){var q=e[g];if(s&&typeof q==="string")q=argument.callee(q,e,k,s);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 s in e)if(a[s]===void 0||k)a[s]=e[s];return a},trim:function(a){return a.replace(t,"")},queryString:function(a){if(!a)return"";var e=[],k;for(k in a){var s=a[k];k=encodeURIComponent(k);var c=typeof s;if(c==="undefined")e.push(k,"=&");else if(c!="function"&&c!="object")e.push(k,"=",encodeURIComponent(s),"&");else if(s instanceof Array)if(s.length){c=0;for(var g=s.length;c<g;c++)e.push(k,"=",encodeURIComponent(s[c]===void 0?"":s[c]),"&")}else e.push(k,"=&");else if(c==="object")for(var q in s)e.push(k,
"[",q,"]","=",encodeURIComponent(s[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(s){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}if(e){a.method=a.method?a.method.toUpperCase():"GET";var g=a.data,q=!a.cache;if(g||q){var r=k.indexOf("?")>=0;if(q)k=r?k+"&_="+ +new Date:k+"?_="+ +new Date;
if(g){if(typeof g==="object")g=h.queryString(g);if(a.method==="GET"){if(!r&&!q)k+="?";k=k+"&"+g}}}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?g:void 0);return e}},jsonp:function(a){function e(){if(!r){try{delete window[k];g.parentNode.removeChild(g);g=null}catch(w){}r=true}}var k="jsonp_"+ +new Date,s=a.doc||document,c=a.url,g=s.createElement("script");s=s.getElementsByTagName("head")[0];var q;if(typeof a=="function"){q=a;a={}}else q=a.success;g.type="text/javascript";a.charset&&(g.charset=a.charset);a.deffer&&(g.deffer=a.deffer);c+=c.indexOf("?")>=
0?"&"+(a.jsonp||"jsonp")+"="+k:"?"+(a.jsonp||"jsonp")+"="+k;if(a.data)c+="&"+h.queryString(a.data);if(a.script){h.extend(g,a.script);delete a.script}g.src=c;var r=false;window[k]=function(){e();if(q)q.apply(a.scope||this,arguments)};g.onreadystatechange=g.onload=function(){var w=this.readyState;if(!r&&(!w||w==="loaded"||w==="complete")){e();if(a.failure)a.failure.call(a.scope||this)}};s.appendChild(g);return g},arrayRemove:function(a,e){a.splice(e,1)},arrayIndexOf:function(a,e){for(var k=0,s=a.length;k<
s;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,s,c=l.makeArray(arguments);if(typeof c[0]==="string"){s=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(s){e.type=s;h.ns(s,a)}s=0;for(var g=c.length;s<g;s++)e=l.extend(e,typeof c[s]==="function"?c[s](k):c[s]);return e.constructor=a},domUp:function(a,e,k){k=k||u.body;for(var s=typeof e===
"string";a;){if(s){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("."),s=window,c,g=0,q=k.length-1;g<q;g++){c=k[g];s[c]||(s[c]={});s=s[c]}s[k[g]]=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(h.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,s){return a.substring(0,k)+e+a.substring(s)},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,s=u.body.createTextRange();s.moveToElementText(a);
try{for(k=0;s.compareEndPoints("StartToStart",e)<0;k++)s.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 s=k.duplicate();s.moveToElementText(a);s.setEndPoint("EndToEnd",k);a.selectionStart=s.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),s=this.getSelectionText(a).length,c=a.value;s=s===0?k:k+s;a.value=h.stringReplace(c,e,k,s);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,s=a[k];s||(s=a[k]=h.bind(a[e],a));return s},uniqueId:function(){return++o},formQuery:function(a){var e="",k="";a=l(a)[0];for(var s=a.elements,c=s.length,g=0;g<c;g++){k=s[g];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,s=a.length;k<s;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 s,c=[],g=[];k||(k="\\");for(var q=0,r=a.length;q<r;q++){s=a.charAt(q);if(s===e){c.push(g.join(""));
g.length=0}else{if(s===k&&a.charAt(q+1)===e){s=e;q++}g[g.length]=s}}g.length&&c.push(g.join(""));return c},parseKnV:function(a){var e={},k,s=this.split(a||"",",");try{for(var c=0,g=s.length;c<g;c++)if(s[c].indexOf(":")===-1)e[s[c]]=true;else{k=h.split(s[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 s=u.body;e!=s&&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},s=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={},g=0;g<document.styleSheets.length;g++){var q;if(e)if(!document.styleSheets[g].href||
!s(document.styleSheets[g].href))continue;q=document.styleSheets[g].cssRules?document.styleSheets[g].cssRules:document.styleSheets[g].rules;if(typeof a=="string")for(var r=0;r<q.length;r++){if(q[r].selectorText&&q[r].selectorText.toLowerCase()==a)c=q[r].style}else{r=0;for(var w=q.length;r<w;r++){var x=q[r].selectorText&&q[r].selectorText.toLowerCase()||"";if(x&&k(x))c[x]=q[r].style}}}return c},setClassAttr:function(a,e,k){a.slice(0);if(k=this.getClassByName(a,k))if(typeof a=="string")for(var s in e)k[s]=
e[s];else for(var c=0,g=a.length;c<g;c++)if(k[a[c]])for(s in e[c])k[a[c]][s]=e[c][s]},getCursorOffset:function(){function a(s){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 s.replace(/<|>|\'|\"|&|\\|\r\n|\n| /gi,function(g){return c[g]})}function e(s){this.ele=s;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 s=this.$p=l("<div></div>"),c={opacity:0,position:"absolute",left:0,top:0,zIndex:2E4},g=this.ele;l.each(this.css,function(q,r){c[r]=g.css(r)});s.css(c);l("body").append(s)},setContent:function(s,c,g){var q=this.$p;
q.html("<span>"+a(s)+"</span>");this.$f=s=l("<span>"+a(c)+"</span>");q.append(s);q.append("<span>"+a(g)+"</span>")},getPos:function(){return this.$f.position()}};return function(s,c){var g=l(s);g.data("mirror")||g.data("mirror",new e(g));var q=g.data("mirror");if(!q)return{};var r=g.val();g=r.substring(0,c);var w=r.charAt(c);r=r.substring(c+1);q.setContent(g,w,r);return q.getPos()}}()};if(window.__debug){if(!window.console)window.console={};h.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"){h.ie6=true;u.execCommand("BackgroundImageCache",false,true)}p.ax={};var j=/\[\?(!?)\.([\w_$]+?)\?([\S\s]*?)\?\]/g,i=/\{(\.?[\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(s,c,g,q){if(c==="!")return!e[g]?q:"";return e[g]===void 0?"":q});return a.replace(i,function(s,c){var g=c.charAt(0)==="."?e[c.substr(1)]:
b.tpls[c];if(g===void 0||g===null)return"";if(g.toString().charAt(0)==="<")return b.parse(g,e);if(b.tpls[g])return b.parse(b.tpls[g],e);return g})},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 s=k[0];s||(k[0]=s=[this.MAX_ITEM_SIZE]);s.length-1>=s[0]||s.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_"+h.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(s){window[k]=null;delete e.jsonpFn;s=p.request.parseProtocol(s);(a||e.onload).call(e,s);delete e.jsonpFn};this.formEl.action=h.appendParam(this.action,{callback:"parent."+k,
_:h.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 h.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(h){this.basePath=h;return this},direct:function(h){h||(h={});var j=h.success;h.success=function(b,d){var a=new (h.responseDefinition||o.DefaultResponseDefinition)(b,h,d);__debug&&console.log("req e:",a);h.scope?j.call(h.scope,a):j(a)};var i=h.url.match(u);return!i||i[1]==l?t.ajax(h):t.jsonp(h)},postReq:function(h,j,i,b){!b&&(b={});b.method="POST";return this.q(h,j,i,b)},q:function(h,j,
i,b){!b&&(b={});b.url=h;if(b.data)t.extend(b.data,j);else b.data=j;b.success=i;return this.direct(b)},basePath:"/",act:function(h,j,i,b){var d=this.apiUrl("action",h);if(j)j.verifyhash=p.getCfg("verifyhash");else j={verifyhash:p.getCfg("verifyhash")};return this.postReq(d,j,function(){i&&i.apply(this,arguments);for(var a=["api."+h],e=0,k=arguments.length;e<k;e++)a.push(arguments[e]);p.fire.apply(p,a)},b)},mkUrl:function(h,j,i,b){h=(b||"index.php")+"?m="+h;if(j)h+="."+j;if(i){h+="&";typeof i==="string"?
h+=i:h+=t.queryString(i)}return this.basePath+h},apiUrl:function(h,j,i){return this.mkUrl("api/weibo/"+h,j,i)},parseProtocol:function(h){return new o.DefaultResponseDefinition(h)},event:function(h,j,i,b){this.postReq(this.mkUrl("event",h),j,i,b)},post:function(h,j,i,b){h={text:h};if(i)h.pic=i;o.act("update",h,j,b)},postImgText:function(h,j,i,b){o.act("upload",{text:h,pic:j},i,b)},repost:function(h,j,i,b,d){o.act("repost",{id:h,text:j,rtids:i},b,d)},getEmotion:function(h){o.act("emotions",null,h)},
del:function(h,j,i,b){o.act("destroy",{id:h,v:j},i,b)},comment:function(h,j,i,b,d,a){o.act("comment",{id:h,text:j,forward:i,type:b},d,a)},delComment:function(h,j,i){o.act("comment_destroy",{id:h},j,i)},reply:function(h,j,i,b,d,a,e){o.act("reply",{id:h,cid:j,text:i,forward:b,type:d},a,e)},follow:function(h,j,i,b){o.act("createFriendship",{uid:h,type:j},i,b)},unfollow:function(h,j,i,b){o.act("deleteFriendship",{id:h,name:j,is_follower:0},i,b)},removeFans:function(h,j,i,b){o.act("deleteFriendship",{id:h,
name:j,is_follower:1},i,b)},fav:function(h,j,i){o.act("createFavorite",{id:h},j,i)},delFav:function(h,j,i){o.act("deleteFavorite",{id:h},j,i)},updateHeadPic:function(h,j,i){o.act("updateProfileImage",{image:h},j,i)},setProfile:function(h,j,i){o.act("saveProfile",h,j,i)},unread:function(h,j,i){o.act("unread",{id:h},j,i)},clearUnread:function(h,j,i){o.act("clearTip",{type:h},j,i)},getComments:function(h,j,i,b,d){o.act("getComments",{id:h,page:j,type:i||1},b,d)},msg:function(h,j,i,b,d){o.act("sendDirectMessage",
{id:j?"":h,name:j?h:"",text:i},b,d)},delMsg:function(h,j,i){o.act("deleteDirectMessage",{id:h},j,i)},followed:function(h,j,i,b,d,a){var e={};if(i)e.t_name=h;else e.t_id=h;if(b)if(d)e.s_name=b;else e.s_id=b;o.act("friendShip",e,j,a)},setting:function(h,j,i){o.act("setting",{type:h},j,i)},shieldBlog:function(h,j,i){o.postReq(o.mkUrl("show","disabled"),{id:h},j,i)},reportSpam:function(h,j,i,b){o.postReq(o.mkUrl("show","reportSpam"),{cid:h,content:j},i,b)},createTags:function(h,j,i){o.act("createTags",
{tagName:h},j,i)},delTag:function(h,j,i){o.act("deleteTags",{tag_id:h},j,i)},updateShowProfile:function(h,j,i){o.act("saveShow",h,j,i)},updateNoticeProfile:function(h,j,i){o.act("saveNotice",h,j,i)},saveLocalpmSet:function(h,j,i){o.act("saveLocalpmSet",h,j,i)},notice:function(h,j,i,b,d,a){o.postReq(o.apiUrl("action","sendNotice"),{available_time:b,uid:h,title:j,content:i},d,a)},saveSkin:function(h,j,i){o.postReq(o.mkUrl("setting","setSkin"),h,j,i)},saveMgrSkin:function(h,j,i){o.postReq(o.mkUrl("mgr/setting",
"setSkin"),h,j,i)},counts:function(h,j,i){o.act("getCounts",{ids:h},j,i)},blacklistAdd:function(h,j,i,b){o.act("createBlocks",{id:h,name:j},i,b)},blacklistDel:function(h,j,i,b){o.act("deleteBlocks",{id:h,name:j},i,b)},getProvinces:function(h){o.act("getProvinces",null,h)},feedback:function(h,j,i){this.postReq(this.mkUrl("feedback","save"),h,j,i)},sinaurl:function(h,j){o.act("sinaurl",{id:h},j)},eventSave:function(h,j){o.event("saveEvent",h,j)},eventJoin:function(h,j){h=$.extend({},h,{action:"join"});
o.event("joinEvent",h,j)},eventClose:function(h,j){o.event("closeEvent",{eid:h},j)},eventDelete:function(h,j){o.event("deleteEvent",{eid:h},j)},eventExit:function(h,j,i){o.event("doAction",{action:"exit",eid:h},j,i)}};o.DefaultResponseDefinition=function(h,j,i){this.raw=h;this.reqCfg=j;if(i)this.connector=i};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(h,j){var i=this.getCode(),b=i+"_def";b=m[j?i:b]||m[i];if(__debug)b||console.warn("未定义错误码消息："+i,"@",this.getRaw());i=b||h;return(j?t.templ(i,$.isArray(j)||typeof j=="object"?j:[j]):i)||p.lang.getText("系统不给力，请稍后再试试吧。")},each:function(h,j){var i=0,b=this.getData(),d;for(d in b)if(!isNaN(d)){if(j){if(h.call(j,b[d],i)===false)break}else if(h(b[d],i)===false)break;
i++}}};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(h){h=h.el;this.width=h.offsetWidth;this.height=h.offsetHeight;var j=this.browserVer=parseInt(l.browser.version);if(l.browser.msie&&(document.documentMode||j)<9){h.style.filter="progid:DXImageTransform.Microsoft.Matrix()";h.filters.item("DXImageTransform.Microsoft.Matrix").SizingMethod=
"auto expand";l(h).addClass("narrow-move")}else{this.canvas=l("<canvas></canvas>").attr({height:this.height,width:this.width}).addClass("narrow-move").attr("rel","e:zo").insertBefore(h)[0];if(this.canvas.getContext){l(h).hide();this.canvas.getContext("2d")}}j=h.parentNode;this._clientWidth=j.clientWidth;this._clientHeight=j.clientHeight;this.element=h},rotate:function(h){if(this.element){if(h==="right"){h=this.curAngle+90;this.curAngle=h>=360?0:h}else if(h==="left"){h=this.curAngle-90;this.curAngle=
h<0?360+h:h}var j,i;h=this.width;var b=this.height;this.width=b;this.height=h;if(b>this.maxWidth){h=t(this.maxWidth*h/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:h});d.clearRect(0,0,b,h);switch(this.curAngle){case 0:k=e=0;j=b;i=h;break;case 90:e=b;k=0;j=h;i=b;break;case 180:e=b;k=h;j=b;i=h;break;case 270:e=0;j=k=h;i=b}d.save();d.translate(e,k);d.rotate(this.curAngle*Math.PI/180);d.drawImage(a,0,0,j,i);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;i=h;break;case 90:case 270:j=h;i=b}a.width=j;a.height=i;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(h,j){this.each(function(){var i,b=l(this),d=b.offset(),a=b.text();j=isNaN(j)?2:j;isNaN(+a)||(a=+a+(h||1));b.text(a);i=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"));i.animate({"font-size":a,top:d.top-b.height()/4,left:d.left-b.width()/2,opacity:0.1},{duration:300,complete:function(){i.remove()}})});
return this},imgRotate:function(h){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(h)});return this},focusText:function(h,j,i,b){this.each(function(){l(this).focus(function(){if(this.value===h){var d=l(this).data("xwb_selholder");if(d)d.setText("");else this.value=""}if(j)b?l(i||this).removeClass(j):l(i||this).addClass(j)}).blur(function(){if(l.trim(this.value)===
""){var d=l(this).data("xwb_selholder");if(d)d.setText(h);else this.value=h}if(j)b?l(i||this).addClass(j):l(i||this).removeClass(j)})})},cssDisplay:function(h){var j=this.length;if(j)if(j===1)if(h===undefined)return!this.hasClass("hidden");else h?this.removeClass("hidden"):this.addClass("hidden");else this.each(function(){h?l(this).removeClass("hidden"):l(this).addClass("hidden")});return this},checkClass:function(h,j){h&&this.each(function(){var i=l(this),b=i.hasClass(h);if(j)b||i.addClass(h);else b&&
i.removeClass(h)});return this},switchClass:function(h,j){this.each(function(){var i=l(this);i.removeClass(h);i.addClass(j)});return this},absolutePos:function(){var h=this.offset(),j=l(document),i=j.scrollTop();j=j.scrollLeft();h.left-=j;h.top-=i;return h},slideMenu:function(h,j){this.each(function(){(function(i){function b(){a.show().cssDisplay(true);j&&i.addClass(j)}function d(){j&&i.removeClass(j);a.cssDisplay(false)}var a=i.find(h),e,k;i.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(h,j){var i=RegExp("(?:<a.*?>.*?<\\/a>)|(?:<img.*?>)|.","gi");this.each(function(){var b=b||"...",d=this.innerHTML;d=d.match(i);h=h||10;if(d&&d.length>h){d=d.slice(0,h).join("");d=j?d:d.replace(/<img.*?title=\"(.*?)\".*?>/gi,"[$1]");l(this).html(d+b)}});return this},fixPng:function(){if(o){var h=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)h.call(this);else this.onload=h})}return this},makeScroll:function(h){function j(){if(h.ldisabledCs){var x=k.scrollWidth>k.offsetWidth;q.cssDisplay(x);g.cssDisplay(x);q.checkClass(h.ldisabledCs,k.scrollLeft==0);g.checkClass(h.rdisabledCs,k.scrollLeft+k.offsetWidth===k.scrollWidth)}}function i(){var x=
k.scrollLeft+h.pace*c;if(x<0)x=0;if(x>k.scrollWidth)x=k.scrollWidth;k.scrollLeft=x;j();s=setTimeout(arguments.callee,h.interval||20)}function b(){r=false;i()}function d(){r=true;c=-1;mid=setTimeout(b,200);return false}function a(){r=true;c=1;mid=setTimeout(b,200);return false}function e(){if(r){var x=k.scrollLeft+h.pace*c*4;if(x<0)x=0;if(x>k.scrollWidth)x=k.scrollWidth;l(k).animate({scrollLeft:x},"fast",function(){j()})}clearTimeout(s);clearTimeout(mid)}var k=this[0],s,c=1,g=l(h.nextBtn),q=l(h.prevBtn);
h.pace=h.pace||25;var r;h.nextBtn&&l(h.nextBtn).mousedown(a).mouseup(e).click(function(){return false});h.prevBtn&&l(h.prevBtn).mousedown(d).mouseup(e).click(function(){return false});if(h.moveScorll){g.hover(a,e);q.hover(d,e)}var w=0;if(h.items){l(k).find(h.items).each(function(){w+=l(this).outerWidth(true)});l(k).find(h.ct||":first-child").css("width",w)}j();return h},scrollView:function(){function h(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,i=j.children(),b;if(i.length){var d=0;l.each(i,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(h,4E3))});b||(b=window.setInterval(h,4E3))}}},scrollMass:function(h,j,i){function b(){a.animate({marginLeft:-s},i?i:1E3,function(){if(k!=0){a.css("marginLeft",0);a.append(a.children(":lt("+
h+")"))}c||d()})}function d(){k=window.setTimeout(b,j)}var a=this,e=a.children().length,k;j=j;var s=a.children()[0].offsetWidth*h,c=false;if(e<=h)return this;this.hover(function(){c=true;clearTimeout(k)},function(){c=false;d()});d();return this}});(function(){function h(){d=/INPUT|IMG|SCRIPT|STYLE|HEAD|MAP|AREA|TEXTAREA|SELECT|META|OBJECT|IFRAME/i;a=/^\s+$/;e=/(\.|\\|\/|\*|\?|\+|\[|\(|\)|\]|\{|\}|\^|\$|\|)/g;k=/</g;s=/>/g;c=u}function j(g,q){if(g){c||h();if(typeof g==="string")g=l.trim(g).split(a);
for(var r=[],w=0,x=g.length;w<x;w++)if(g[w]&&!a.test(g[w]))r[r.length]=g[w].replace(k,"&lt;").replace(s,"&gt;").replace(e,"\\$1");var y=RegExp("("+r.join("|")+")","gi"),z='<span class="'+(q||j.cls)+'">$1</span>',B=document.createElement("DIV");this.each(function(){i(this,y,z,B)});return this}}function i(g,q,r,w){var x=g.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=r,D=w,E=x.data;if(!a.test(E)){E=
E.replace(k,"&lt;").replace(s,"&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,r,w)}}function b(g,q){var r=g.childNodes,w=[],x,y,z;x=0;for(y=r.length;x<y;x++)d.test(r[x].tagName)||w.push(r[x]);x=0;for(y=w.length;x<y;x++){r=w[x];z=r.nodeType;if(z!==3)if(z===
1&&r.tagName==="SPAN"&&r.className===q){z=r.childNodes[0];var B=r.parentNode,C=r.previousSibling,A=r.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,r)}else arguments.callee(r,q)}}var d,a,e,k,s,c;l.fn.highlight=j;l.fn.clearHighlight=function(g){c||h();g=g||j.cls;this.each(function(){b(this,g)})};j.cls="search-txt"})();l.cookie=function(h,j,i){if(typeof j!="undefined"){i=i||{};if(j===null){j="";i.expires=
-1}var b="";if(i.expires&&(typeof i.expires=="number"||i.expires.toUTCString)){if(typeof i.expires=="number"){b=new Date;b.setTime(b.getTime()+i.expires*24*60*60*1E3)}else b=i.expires;b="; expires="+b.toUTCString()}var d=i.path?"; path="+i.path:"",a=i.domain?"; domain="+i.domain:"";i=i.secure?"; secure":"";document.cookie=[h,"=",encodeURIComponent(j),b,d,a,i].join("")}else{j=null;if(document.cookie&&document.cookie!=""){i=document.cookie.split(";");for(b=0;b<i.length;b++){d=jQuery.trim(i[b]);if(d.substring(0,
h.length+1)==h+"="){j=decodeURIComponent(d.substring(h.length+1));break}}}return j}};l.easing.cubicOut=function(h,j,i,b,d){return b*((j=j/d-1)*j*j+1)+i}})(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 h=l.makeArray(arguments),j,i,b,d,a;h.shift();j=h.length;m._evtLocked=true;b=0;for(d=m.length;b<d;b++){a=m[b];if(!a.removed){if(a.args)h[j]=a.args;i=a.ds?a.cb.apply(a.ds,h):a.cb.apply(this,h);if(i===false)break}}m._evtLocked=false}}return i},on:function(o,m,h,j){if(!o||
!m){__debug&&console.trace();throw"eid or callback can not be null";}if(!this.events)this.events={};var i=this.events[o];i||(i=this.events[o]=[]);i[i.length]={cb:m,ds:h,args:j};return this},un:function(o,m){if(!this.events)return this;if(m===undefined){delete this.events[o];return this}var h=this.events[o];if(h){if(h._evtLocked)h=this.events[o]=h.slice(0);for(var j=0;j<h.length;j++){var i=h[j];if(i.cb==m){u(h,j);i.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 h=this.getRel(m);return h&&h.data&&h.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,h,j){var i=j?this.getRel(j):this;j=u(i.src);var b=j.data("xwb_rel");if(b)b=b[m]=
h;else{b=p.ax.ActionMgr.parseRel(j.attr("rel"));b[m]=h}i.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,h){var j=u(this.getEl(m));if(h)j=j.find(h);return j},getRel:function(m){for(var h=this.q,j=this.idx,i=this.end;j<=i;j++)if(h[j].data[m]!==void 0)return h[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,h){var j="xwb_e_"+this.data.e;if(h)j+="_"+h;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,h,j){var i,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){i||(i=[]);i[i.length]=b}},h);return i};p.ax.ActionMgr.wrapRel=function(m,h,j){m=this.collectRels(m,h,j);m=new t(m);m._next();return m};p.ax.ActionMgr.getRel=function(m,h,j){return this.wrapRel(m,
j).get(h)};p.ax.ActionMgr.prototype={trigEvent:"click",cacheNodeData:true,reg:function(m,h,j){h={n:m,h:h};j&&u.extend(h,j);this.actions[m]=h;return this},get:function(m){return this.actions[m]},addFilter:function(m,h){h?o.push(m):this.filters.push(m);return this},bind:function(m,h){var j=this;u(m).bind(h||this.trigEvent,function(i){var b=p.ax.ActionMgr.collectRels(i.target,this,this.cacheNodeData);b&&j.fireRels(b,i)});return this},doAct:function(m,h,j){m=p.ax.ActionMgr.collectRels(m,h,j);return!(m&&
this.fireRels(m))},fireRels:function(m,h){var j=new t(m);j.evt=h;__debug&&console.log("act e:",j);for(var i,b,d=o.length,a=this.filters.length,e,k,s;i=j._next();){b=i.data;if(b.e){j.src=i.src;j.data=b;if(j.lock()){__debug&&console.warn("action e:"+j.data.e+" has been locked for resubmiting");k=s=e=true;break}else{i=this.actions[b.e];if(d){e=true;if(this._fireArray(o,j,i)===false){s=j.stopPropagationed;k=j.prevented;break}}if(a){e=true;if(this._fireArray(this.filters,j,i)===false)break}s=j.stopPropagationed;
k=j.prevented;if(i){var c=j.clone();c.src=j.src;c.data=b;c.evt=h;__debug&&console.log("act e:",c);e||(e=true);if(i.h.call(this,c)===false){if(c.stopPropagationed!==void 0)s=c.stopPropagationed;if(c.prevented!==void 0)k=c.prevented;break}if(c.stopPropagationed!==void 0)s=c.stopPropagationed;if(c.prevented!==void 0)k=c.prevented}}}}if(h&&e){if(k===void 0)k=true;if(s===void 0)s=true;k&&h.preventDefault();s&&h.stopPropagation()}},_fireArray:function(m,h,j){for(var i=0,b=m.length;i<b;i++)if(m[i].call(this,
h,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,h;(h=o.nextValidatorData(m++,this.elem))&&h.isPreCmd;)if(typeof h[0]==="string"){var j=o.getValidator(h[0]);if(!j)throw"ValidationException:Undefined validator '"+h[0]+"' in element "+this.elem.name;j.call(this,this.elem,h[1])}else h[0].call(this,this.elem,h[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 h=this.elem;this.context.report(o,m,h,this);if(!o){__debug&&console.log("onerror",h,m);this.context.onerror(h,m,this)}}};var t;l.ax.ValidationMgr=function(o){$.extend(this,o);this.init()};l.ax.ValidationMgr.prototype={nextValidatorData:function(o,m){var h=this._getBindingValidators(m);return h&&h[o]},getValidator:function(o){var m=this.validators,h;if(m)h=m[o];if(!h&&t)h=t[o];return h},report:function(o,m,h,j){if(!o)if(j.multival){this.error++;
if(this.error===1&&this.autoFocus)try{h.focus()}catch(i){}}},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 h=0,j=o.length;h<j;h++)this.reg.apply(this,o[h]);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,h){if($(o).attr("vrel")){o=new p(this,o);if(h){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,h=$(o);if(this.useCache)if(h.data("xwb_vd_cmds"))m=h.data("xwb_vd_cmds");else{m=this.parseCmd(h.attr("vrel"));this._mergeExtraValidators(m,o);h.data("xwb_vd_cmds",m)}else{m=this.parseCmd(h.attr("vrel"));h.data("xwb_vd_cmds",m);this._mergeExtraValidators(m,o)}return m},
_mergeExtraValidators:function(o,m){var h=this.extraValidators;if(h&&h[m.name||m.id])$.merge(o,h[m.name||m.id])},parseCmd:function(o){if(!o)return[];var m=[];o=u.split(o,"|");for(var h,j=0,i=o.length;j<i;j++){if(o[j].indexOf("=")===-1)h=[o[j],{}];else{h=u.split(o[j],"=");h[1]=u.parseKnV(h[1])}if(h[0].charAt(0)==="_"){h.isPreCmd=true;h[0]=h[0].substr(1)}m[m.length]=h}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,h){var j=true;h.addError(m.m);if(m=$(o).attr(this.errTipName)){m=this.getWarnTip(o,m);if(this.isGlobalVal&&h.error==1){var i=m.data("vrel_previd"),b=m.data("vrel_errors")||0;if(this.uniqueId!=i){m.data("vrel_previd",this.uniqueId);m.data("vrel_errors",0);b=0}else j=b==0;m.data("vrel_errors",++b)}}if(j){h=h.getErrors();if(this.warnType===1){if(h.length!=0)h=h[0]}else h=h.join("，");this.tipWarn(o,h)}},getWarnTip:function(o,m){var h=
$(o).find(m);h.length||(h=$(m));return h},onpass:function(o){var m=$(o).attr(this.errTipName),h=true;if(m){m=this.getWarnTip(o,m);if(this.isGlobalVal){var j=m.data("vrel_previd"),i=m.data("vrel_errors")||0;if(this.uniqueId!=j){m.data("vrel_previd",this.uniqueId);m.data("vrel_errors",0)}else h=i==0}}h&&this.tipPass(o)},tipWarn:function(o,m){var h=$(o).attr(this.errTipName);if(h){h=this.getWarnTip(o,h);var j=h.cssDisplay(true).find(this.tipTextNode);j.length||(j=h);this.tipTextType==="text"?j.text(m):
j.html(m);return h}if(h=$(o).attr(this.okTip))this.haveSpace?$(h).css("visibility","hidden"):$(h).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={},h=[],j,i,b,d,a,e;for(e in t){a=t[e].shortlinks=[];j=this.search(t[e].tx);i=0;for(b=j.length;i<b;i++){d=j[i];if(!m[d]){m[d]=true;h.push(d)}a.push([d])}if(t[e].rt){j=this.search(t[e].rt.tx);i=0;for(b=j.length;i<b;i++){d=j[i];if(!m[d]){m[d]=true;h.push(d)}a.push([d,true])}}if(t[e].s){j=
this.search(t[e].s);i=0;for(b=j.length;i<b;i++){d=j[i];if(!m[d]){m[d]=true;h.push(d)}a.push([d])}}}this.info(h,function(k){for(var s in t)for(var c=t[s].shortlinks,g,q=0,r=c.length;q<r;q++){g=c[q][0];if(k[g]){c[q][0]=k[g];k[g].id=g}else c[q][0]=null;c[g]=c[q]}o(t)})},info:function(t,o){for(var m=this._c,h=t.length-1;h>=0;h--)m[t[h]]&&l.arrayRemove(t,h);t.length?p.request.sinaurl(t.join(","),function(j){if(j.isOk()){u.each(j.raw.data,function(i,b){m[i]||(m[i]=b)});o(m)}}):o(m)},render:function(t,o){var m=
this,h=[],j=[];u(t).find("a").each(function(){if(sl=m.is(this.href)){h.push([sl,this]);j.push(sl)}});this.info(j,function(i){for(var b=0,d=h.length;b<d;b++)o(i[h[b][0]],h[b][1])})}}})(Xwb,Xwb.util,$);(function(p,l){function u(){return this.view}var t=p.util,o=p.ax.Tpl,m=document,h=l(window),j=l(m),i=p.ui={Base:t.create()},b=i.Base;i.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],s=this.jq("#"+k);if(s){k=k.charAt(0).toUpperCase()+k.substring(1);this["jq"+k]=s}}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,s=function(c){k.contexted||p.use("contextMgr").releaseAll(c);return a.apply(k,arguments)};if(!this._mousedownFns)this._mousedownFns={};this._mousedownFns[a]=s;this.jq(e).bind(d,s)}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 s=k+e;a=a.clientHeight;var c=d+a;if(e>a||k<d)return k;else if(s>c){s-=a;if(d!=s)return s}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 s=k+e,
c=d+a;if(e>a||k<d)return k;else if(s>c){s-=a;if(s!=d)return s}return false},anchor:function(d,a,e,k){var s=l(d);d=this.jq();var c=s.offset(),g=s.width(),q=s.height();s=d.width();var r=d.height(),w=a.charAt(0),x=a.charAt(1);a=c.left;c=c.top;switch(w){case "t":c-=r;break;case "b":c+=q;break;case "c":c+=Math.floor((q-r)/2)}switch(x){case "c":a+=Math.floor((g-s)/2);break;case "r":a+=g-s}if(e){g=g=[a,c];e(g,s,r);a=g[0];c=g[1]}if(k){if(c<0)c=0;else{e=h.height();if(c+r-j.scrollTop()>e)c=e-r+j.scrollTop()}if(a<
0)a=0;else{e=h.width();if(a+s-j.scrollLeft()>e)a=e-s+j.scrollLeft()}}d.css("left",a+"px").css("top",c+"px")},center:function(){var d=this.jq(),a=[h.width(),h.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,s=e.offset();d.css(b.CLIP_WRAPPER_CSS).css(s).css("width",e.width()+"px").css("height",e.height()+"px").css("z-index",e.css("z-index")).append(a);s=this._tmpClipedCss={};for(var c in b.CLIPPER_CSS)s[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,s;for(s in b.CLIP_WRAPPER_CSS)a[s]="";this.jqClipWrapper.css("overflow","").css("width","").css("height","");a=this._tmpClipedCss;for(s in a)k[s]=a[s];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,s,c){var g=this.jq(),q=g.width(),r=g.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-r;break;case "b":x=0+r}switch(d){case "l":y=0-q;break;case "r":y=0+q;break;case "t":z=0-r;break;case "b":z=0+r}g.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&&g.css("visibility","");var C=this;g.animate(k,s||"fast",c,function(){if(!a){C.display(false);g.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 h=o.target;for(var j=m.length-1;j>=0;j--)if(!h||!m[j].ancestorOf(h))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 h=this.q;if(h){var j=h.length-1;if(j!==
-1&&h[j]!==o)for(;j>=0;j--){if(h[j]===o)break;this.release(h[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,h=p.ui,j=10001,i=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=h.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=i.height();if(a){l(e).height(k).appendTo(o.body);this.frameMask&&l(this.getFrameMask()).height(k).appendTo(o.body);i.bind("resize",u.getBind(this,"onMaskWinResize"))}else{l(e).remove();this.frameMask&&l(this.getFrameMask()).remove();i.unbind("resize",u.getBind(this,"onMaskWinResize"))}},onMaskWinResize:function(){var a=
this.mask,e=i.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);h.Switcher=function(a){a&&l.extend(this,a);this.initUI()};p.reg("Switcher",h.Switcher);h.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,s=a.length;k<s;k++)this.add(a[k],e[k]);else{k=0;for(s=a.length;k<s;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(g){c.mouseoverTimer&&c.clearTimeout(0);if(c.trigMode==="hover"){if(this!==c.selectedItem&&c.mouseoutTimerFn){c.mouseoutTimerFn();c.mouseoutTimerFn=NULL}g=g.target;if(c.autoRecover&&(g===this||u.ancestorOf(this,g)))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})}}};h.Box=p.reg("Box",u.create(h.Layer,{view:"Box"}));h.Tip=p.reg("Tip",u.create(h.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,h=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 i=[],b=0,d=this.buttons,a=d.length;b<a;b++)i.push(o.parse(this.buttonTpl||"Button",d[b]));this.buttonHtml=i.join("")}j.initUI.call(this)},onClsBtnClick:function(){this.onbuttonclick("cancel")!==false&&this.close();
return false},setFocus:function(i){if(i||this.defBtn)this.jq("#xwb_btn_"+(i||this.defBtn)).focus().addClass(this.focusBtnCs)},afterShow:function(){j.afterShow.call(this);this.defBtn&&this.setFocus()},onbuttonclick:function(i){__debug&&console.log(i+" clicked")},setHandler:function(i){this.onbuttonclick=i;return this},getButton:function(i){return this.jq("#xwb_btn_"+i)},innerViewReady:function(i){j.innerViewReady.call(this,i);var b=this;l(i).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:h("提示"),dlgContentHtml:"MsgDlgContent",mask:true,buttons:[{title:h("确&nbsp;定"),id:"ok"},{title:h("取&nbsp;消"),
id:"cancel"},{title:h("&nbsp;是&nbsp;"),id:"yes"},{title:h("&nbsp;否&nbsp;"),id:"no"},{title:h("关&nbsp;闭"),id:"close"}],setContent:function(i){this.jq("#xwb_msgdlg_ct").html(i)},setIcon:function(i){var b=j.jq("#xwb_msgdlg_icon");b.attr("className",b.attr("className").replace(/icon\-\S+/i,"icon-"+i))},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(i){this.jq("#xwb_msgdlg_ct").html(i)},setIcon:function(i){var b=j.jq("#xwb_msgdlg_icon");b.attr("className",b.attr("className").replace(/icon\-\S+/i,"icon-"+i))},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:h("确&nbsp;定"),id:"ok"},{title:h("取&nbsp;消"),id:"cancel"}],setAnchor:function(i){this.anchorEl=i;return this},beforeShow:function(){m.Dialog.prototype.beforeShow.call(this);if(this.anchorEl){this.anchor(this.anchorEl,"tc",function(b){b[1]-=2});var i=this;this.slide("bc",true,function(){m.Dialog.prototype.afterShow.call(i)})}},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(i){this.anchorEl=i;return this},beforeShow:function(){if(this.anchorEl){this.anchor(this.anchorEl,"tc",function(i){i[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,i){this.tip(j,"error",i)},tipOk:function(j,i){this.tip(j,"success",i)},tipWarn:function(j,i){this.tip(j,"alert",i)},anchorTipOk:function(j,i,b){this.anchorTip(j,
i,"",b)},anchorConfirm:function(j,i,b){this.getAnchorDlg().setTitle(i).setHandler(b||l.noop).setAnchor(j).display(true)},tip:function(j,i,b){var d=this.getTipBox();d.setIcon(i||"alert");d.setContent(j||"");d.display(true);b&&(d.onhide=b)},anchorTip:function(j,i,b,d){b=this.getAnchorTip();b.setTitle(i).setAnchor(j).display(true);d&&(b.onhide=d)},alert:function(j,i,b,d,a,e){var k=this.getSysBox(),s=k.buttons;d||(e=d="ok");a||(a="alert");for(var c=0,g=s.length;c<g;c++)k.jq("#xwb_btn_"+s[c].id).cssDisplay(d.indexOf(s[c].id)>=
0);k.defBtn=e;j&&k.setTitle(j);i&&k.setContent(i);a&&k.setIcon(a);b&&(k.onbuttonclick=b);k.display(true);return k},confirm:function(j,i,b,d){this.alert(j||h("提示"),i,b,"ok|cancel","ask",d||"ok")},success:function(j,i,b,d,a){this.alert(j,i,b,d||"ok","success",a||"ok")},error:function(j,i,b,d,a){this.alert(j,i,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,h=p.ax.Tpl,j=p.request,i=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 s=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(g){switch(g.data.e){case "em":if(this.onselect)if(this.onselect(this.findEmotionText(g),
g)===false)break;this.display(false);break;case "sc":this.emSwitch(g.data.idx,g.src)}},setHandler:function(g){this.onselect=g;return this},setSelectionHolder:function(g,q,r){this.setHandler(function(w){g.insertText(w);q&&q.call(r||this,g,w)});return this},showAt:function(g){g=l(g).offset();g.left-=24;g.top+=20;this.offset(g).display(true)},initEmotion:function(g){if(g.isOk()){g=g.getData();var q={},r=[],w=[],x=0,y={};l.each(g,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&&r.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(r.length>15)r=r.slice(0,15);g={category:w.join(""),faces:z.join(""),hotList:r.join("")};
g=l(h.parse("EmotionBoxContent",g));this.jq("#xweibo_loading").hide();this.jq("#xwb_dlg_ct").append(g);this.$categorySelected=this.jq("#cate>a:first").addClass("current");this.$categoryShowed=this.jq("#flist0");this.emotions=q;this.cateMaps=y}},createEmArea:function(g){var q=['<div class="e-list" id="flist'+g+'">'];l.each(this.cateMaps[g],function(r,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(g,q){var r=l(q);if(!r.hasClass("current")){this.$categorySelected.removeClass("current");this.$categorySelected=r.addClass("current");this.$categoryShowed.addClass("hidden");g>0?this.jq("#hotEm").addClass("hidden"):this.jq("#hotEm").removeClass("hidden");r=this.jq("#flist"+g);r.length||(r=this.createEmArea(g).appendTo(this.jq("#box")));this.$categoryShowed=r.removeClass("hidden")}},loadEmotion:function(){var g=this;j.getEmotion(function(q){g.initEmotion(q)})},onViewReady:function(){this.loadEmotion()},
findEmotionText:function(g){return g.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 g=l.trim(this.jqInputor.val()),q=t.calWbText(g);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&&g},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(g){if(this.checkText())if(g.ctrlKey&&
(g.which==13||g.which==10))this.submit()},onFaceTrig:function(g){p.use("emotion").setSelectionHolder(this.selectionHolder,this.checkText,this).showAt(g.target);return false},setContent:function(g,q,r){this._predCfg={id:g,data:q,uid:r};this.jq();var w=[];r!==q.u.id&&w.push(h.parse("ForwardDlgLabel",{uid:g,nick:q.u.sn}));if(r=q.rt){g=r.tx;q="//@"+q.u.sn+":"+q.tx;w.push(h.parse("ForwardDlgLabel",{uid:r.id,nick:r.u.sn}))}else{g=q.tx;q=""}this.jqContent.text(t.escapeHtml(g));this.selectionHolder.setText(q);
this.checkText();this.jqLabelCt.html(w.join(""));return this},submit:function(){if(this.isLoading)return false;this.isLoading=true;var g=this.checkText();if(g==="")g=k("转发微博");else if(!g){this.jqInputor.focus();return this.isLoading=false}var q=[];this.jq('input[type="checkbox"]:checked').each(function(){q[q.length]=l(this).val()});var r=this._predCfg,w=l.extend({_route:p.getModule()},this.getParam());t.disable(this.getButton("forward"),true);j.repost(r.id,g,q.join(","),t.getBind(this,"onSubmitLoad"),
{data:w})},getParam:function(){return{}},onSubmitLoad:function(g){t.disable(this.getButton("forward"),false);this.close();g.isOk()?i.tipOk(k("转发成功")):i.tipWarn(g.getMsg(null,k("微博转发")));this.isLoading=false},onbuttonclick:function(g){if(g==="forward"){this.submit();return false}}});p.reg("forwardBox",c,true);return c});u.getFlash=function(c,g){var q=l.browser.msie;c=c||{};var r='<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();r+=c.w3c||q?' data="'+c.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';r+=">";if(c.w3c||q)r+='<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])r+='<param name="'+w+'" value="'+c[w]+'" />';q="";if(g){for(var x in g)if(g[x]){w=g[x];q+=x+"="+(/function|object/.test(typeof w)?f.asString(w):w)+"&"}q=q.slice(0,
-1);r+='<param name="flashvars" value=\''+q+"' />"}r+="</object>";return r};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 g=this.$wb.find("div.feed-content").width()-35,q=parseInt(g/1.25);q=u.getFlash({src:c.flash,width:g,
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 r;if(this.isFw){g="div.forward>p";r="VideoBoxForward"}else{g="p.feed-main";r="VideoBox"}c=h.parse(r,{href:c.url,title:c.title,flash:q});this.$video=l(c).insertAfter(this.$wb.find(g));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 g=this.wbData;c=(this.isFw?g.rt:g)[c=="thumbnail"?"mp":"op"]}return c},loadPic:function(){this.picLoadState=1;var c=this,g={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(h.parse(this.isFw?"PictureBoxForward":"PictureBox",g));q=this.img=new Image;l(q).bind("load",function(){c.onPicLoaded()}).addClass("narrow-move").attr("rel",
"e:zo").attr("src",g.img)},onPicLoaded:function(){var c=this.$wb.find(this.isFw?"div.forward":"div.feed-content:first"),g=this.img,q=this.$picBox;c.css("visibility","hidden");var r=this.$wb.find("div.feed-content").width()-35;l(g).appendTo(q.find("div[name=img]"));c.children("div.preview-img").after(q);this.switchView("pic",1);if(g.width>r){if(l.browser.msie)g.height*=r/g.width;g.width=r}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,g){if(g){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()}}}));s.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 g=this;this.jqInputor.bind("keyup",function(q){g.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,g=l.trim(c.val()),q=t.calWbText(g,70),r=this.jqWarn;q>=0?r.html(k("您还可以输入{0}字",q)):r.html(k("已超出{0}字",Math.abs(q)));r.checkClass(this.exceedCS,q<0);this.autoH&&c.height()!==c[0].scrollHeight&&c.height(c[0].scrollHeight);return q>=0&&g},send:function(){if(!this.sending){var c=this.checkText();if(c){this.sndBtn&&t.disable(this.sndBtn,true);this.sending=true;var g=this.jqInputor.data("xwb_reply_cid"),
q=RegExp("^"+k("回复")+"@.*?:");g&&q.test(c)?j.reply(this.wbId,g,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{i.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,g){var q=this.selectionHolder,r=this.jqInputor,w=RegExp("^"+k("回复")+"@.*?:");this.reset();q.setText(k("回复")+"@"+g+":"+r.val().replace(w,""));r.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()}}}));s.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(h.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(g,q){q.title=g&&g.url||k("无效链接")})},onCmtsLoad:function(c){if(c.isOk()){this.createListUI(c);var g=c.getData().total;g&&this.updateCmtCountUI(g);this.updateCmtPageUI(c.getData())}this.isLoading=false;this.decorateLoading();this.onload&&this.onload(c)},createListUI:function(c){this.jqCmtCt.empty();var g=c.getData();g=g.total-Math.min(g.limit,g.total);var q=[];c.each(function(r){q[q.length]=this.createCmtUI(r)},this);if(q.length){this.jqCmtCt.html(q.join(""));if(g){this.jqMore.cssDisplay(true);
this.jqLefCnt.text(g)}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(r,w){w.title=r&&r.url||k("无效链接")})},createCmtUI:function(c){var g=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(g===q||c.uid===q)c.canDel=true;return h.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,g){if(this.trigEl){var q=k("评论");if(g===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 g=this;i.anchorConfirm(c.src,k("确定要删除该评论吗？"),function(q){if(q==="ok"&&!g.deletingCmt){g.deletingCmt=true;j.delComment(c.get("c"),function(r){var w=c.getEl("c");if(r.isOk()){l(w).remove();g.updateCmtCountUI(-1,true);g.cmtCount==0&&g.cmtBox.jqInputor.focus()}else i.tipError(r.getMsg());g.deletingCmt=false})}})},onReplyTrig:function(c){var g=this.jq();this.offsetsTo(window)[1]<0&&g[0].scrollIntoView&&g[0].scrollIntoView();g=c.get("c");c=c.get("n");this.cmtBox.reply(g,c)},goPage:function(c){this.topCmtBox.getView().scrollIntoView&&
this.topCmtBox.getView().scrollIntoView();this.page=c;this.load()}}));s.MBlogCmtArea=p.reg("MBlogCmtArea",t.create(s.CommentArea,{commentHtml:"MBlogCmt",cmtType:2,hdPicSz:50,createListUI:function(c){this.jqCmtCt.empty();c.getData();var g=[],q=this.faceSize;c.each(function(r){if(q)r.profileImg=r.profileImg.replace("/30/","/"+q+"/");g[g.length]=this.createCmtUI(r)},this);if(this.cmtCount=g.length){this.jqCmtCt.html(g.join(""));this.jqCmtCt.cssDisplay(true)}else{this.jqCmtCt.cssDisplay(false);this.jqMore.cssDisplay(false)}p.mod.shortlink.render(this.jqCmtCt,
function(r,w){w.title=r&&r.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 g=c.get("c");c=c.get("n");this.cmtBox.display(true).reply(g,
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(g,q){q.title=g&&g.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(g){switch(g.data.e){case "ok":if(g=this.checkText()){this.onselect&&this.onselect(g);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 g=this.jqInputor,
q=this.selectionHolder,r=l.trim(g.val());if(r==""||r=="http://"){setTimeout(function(){g.focus();q.setText("http://");g.select()});return false}else if(!this.checkUrl(r)){this.jqTip.cssDisplay(true);return false}return r},checkUrl:function(g){return g.indexOf("http://")===0},showAt:function(g,q){this.onselect=q;var r=l(g).offset();r.left-=140;r.top+=20;this.offset(r).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 g=this.jqInputor,q=l.trim(g.val()),r=this.selectionHolder;
if(q==""||q=="http://"){setTimeout(function(){g.focus();r.setText("http://");g[0].select()});return false}else if(!this.checkUrl(q)){this.jqTip.cssDisplay(true);return false}return q},checkUrl:function(g){return g.indexOf("http://")===0},onactiontrig:function(g){switch(g.data.e){case "ok":if(g=this.checkText()){this.onselect&&this.onselect(g);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(g,q){this.onselect=q;var r=l(g).offset();r.left-=140;r.top+=20;this.offset(r).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});s.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(g){c.showWho(g)}).bind("keydown",function(g){return c.onkeydown(g)}).bind("focus",function(g){c.showWho(g)}).bind("click",function(g){c.showWho(g)}).bind("blur",function(){if(c.atWhoShow)this.TimeoutID=setTimeout(function(){c.display(false);c.atWhoShow=false},150)});this.jq("#mainUL").click(function(g){g.target.tagName=="LI"&&c.choose()});this.jq("#mainUL").mousemove(function(g){if(g.target.tagName=="LI"){l(this).find("li:eq("+c.now+")").removeClass("cur");
l(g.target).addClass("cur");c.now=l(this).find("li").index(g.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 g=this.Inputor,q=g.data("xwb_selholder");c=c||this.now;var r=this.cache(this.key);if(r&&r.length){c=this.format(r[c]);r=this.txtobj;this.run(0);if(q)q.replaceString(c,r.form,r.to);else{this.Inputor.val(t.stringReplace(g.val(),c,r.form,r.to));t.setCursor(g[0],r.form+c.length)}this.afterChoose();
this.run(1)}},afterChoose:l.noop,format:function(c){return c.nickname+" "},getKey:function(c,g){var q=t.getCursorPos(c);g=c.value;var r=g.substring(q-1,q),w="";if(this.noAt===true)if(g.length!==0){this.flagAt=0;return{text:g,form:0,to:g.length}}else return false;if(r==" "||r=="@")return false;for(r=q;r>0;r--){if(g.substring(r,r-1)==" ")break;if(g.substring(r,r-1)=="@"){w=g.substring(r,q);if(g.length>q)for(var x=q+1;x<=g.length;x++)if(g.substring(x,x-1)==" "||x==g.length){var y=g.substring(r,g.substring(x,
x-1)==" "?x-1:x);l(this.data).each(function(){if(y==this.nickname)q=x})}this.flagAt=r;if(w.length>20)break;return{text:w,form:r,to:q}}}return false},rePosition:function(){var c=t.getCursorOffset(this.Inputor,this.flagAt-1);if(c){var g=this.Inputor.offset(),q=this.Inputor.scrollTop(),r=parseInt(l(this.Inputor).css("lineHeight"));if(isNaN(r))r=20;q=r-q;this.jq().css({top:g.top+c.top+q,left:g.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,g){return c.replace(g,"<b>"+g+"</b>")},showUser:function(c){this.length=
c.length;this.data=c;if(!c||!c.length)return this.display(0);var g=[],q=this.highlight,r=this;l.each(c,function(w,x){var y=x.remark,z="<li>"+q(x.nickname,r.key);if(y)z=z+"("+q(y,r.key)+")";z+="</li>";g.push(z)});this.now=0;this.jq("#mainUL").html(g.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 g=this.cache(this.key);__debug&&
console.log("seach:",c,"return:",g,"cache:",s.atWho.cache);if(g!==void 0)this.showUser(g);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,g){if(g===void 0)return s.atWho.cache[c];s.atWho.cache[c]=g}}));s.atWho.cache={};s.PostBase={actionMgr:true,defText:"",nullPic:false,initEx:function(){var c=this.jqInputor=this.jq("#xwb_inputor"),
g=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 r=this;this.jqImgFile.change(function(){r.nullPic=true;r.jqPhotoName.html(t.getFileName(this.value,
10)+h.get("UploadImgBtn"));r.jqPhotoName.cssDisplay(true);!l.trim(r.jqInputor.val())&&r.selectionHolder.setText(k("分享图片"));r.checkText()});this.btnHoverCS&&g.hover(function(){g.addClass(r.btnHoverCS)},function(){g.removeClass(r.btnHoverCS)});this.atWho=p.use("atWho",{appendTo:o.body,Inputor:c,autoRender:true});c.bind("keyup",function(w){r.onInputorKeyup(w)}).bind("focus",function(){q.addClass("post-focus");r.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()),
g=t.calWbText(c);g>=0?this.jqWarn.html(k("您还可以输入{0}字","<span>"+g+"</span>")):this.jqWarn.html(k("已超出{0}字","<span>"+-g+"</span>"));this.jqWarn.checkClass("out140",g<0);return g>=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 g=this.jqInputor[0],
q=RegExp("#"+this.TOPIC_TIP+"#").test(g.value),r=c,w=0,x=0;g.focus();if(document.selection){var y=document.selection.createRange();r=y.text||c;if(r==c&&q){w=RegExp.leftContext.length+1;x=c.length}else if(r==c){y.text="#"+c+"#";w=g.value.indexOf("#"+c+"#")+1;x=c.length}else y.text="#"+r+"#";if(r==c){y=g.createTextRange();y.collapse();y.moveStart("character",w);y.moveEnd("character",x)}y.select()}else if(g.selectionStart||g.selectionStart=="0"){w=g.selectionStart;x=g.selectionEnd;if(w!=x)r=g.value.substring(w,
x);if(q&&r==c){w=RegExp.leftContext.length+1;x=w+r.length}else if(r==c){g.value=g.value.substring(0,w)+"#"+r+"#"+g.value.substring(x,g.value.length);w++;x=w+r.length}else{g.value=g.value.substring(0,w)+"#"+r+"#"+g.value.substring(x,g.value.length);x=w=w+r.length+2}g.selectionStart=w;g.selectionEnd=x}else g.value+="#"+r+"#";this.checkText();this.selectionHolder.saveSpot()},post:function(){var c=this.checkText();if(c)if(this.getUploader().isLoading())i.tipWarn(k("图片正在上传，请稍候.."));else if(this.sending)i.tipWarn(k("正在发布,请稍候.."));
else{var g=l.extend({},this.getParam());if(this.beforeSend){var q=this.beforeSend(c,this.uploadPic,g);if(q===false)return;c=q||c}if(this.nullPic)this.createPostForm(l.extend({text:c},g));else{this.sending=true;j.post(c,t.getBind(this,"onSendLoad"),"",{data:g})}}else this.jqInputor.focus()},createPostForm:function(c){var g=this.formEl=l(this.jqForm[0])[0];if(!this.postForm){var q="xwb_postform_frame_"+t.uniqueId();this.postForm=h.forNode('<iframe src="about:blank" style="display:none;" id="'+q+'" name="'+
q+'"></iframe>');l(this.postForm).appendTo(o.body);g.target=q}var r=this,w=[];l.each(c,function(y){var z=r.jqForm.find('input[name="'+y+'"]');z.length?z.val(c[y]):w.push('<input type="text" name="'+y+'" value="'+c[y]+'"/>')});w.length&&this.jqForm.append(w.join(""));this.sending=true;var x=this.jsonpFn="jsonp"+(new Date).getTime();window[x]=function(y){window[x]=null;delete r.jsonpFn;y=j.parseProtocol(y);r.onSendLoad.call(r,y);delete r.jsonpFn};g.action=t.appendParam(j.apiUrl("action","update"),{callback:"parent."+
x,_:t.uniqueId(),verifyhash:p.getCfg("verifyhash")});g.submit()},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(),g=this;this.uploadPic=null;if(!c||!this.checkImg(c)){this.jqForm[0].reset();i.alert("",k("只支持{0}格式的图片。","jpg、png、gif"),function(){g.jqInputor.focus()})}else{this.jq("#xwb_upload_tip").cssDisplay(true);this.$uploadBtn.cssDisplay(0);this.getUploader().upload()}},onUploadLoad:function(c){if(typeof c!=
"object")i.alert("提示","上传失败!");else if(c.isOk()){this.uploadPic=c.getData().msg;this.jqPhotoName.html(t.getFileName(this.jqImgFile.val(),10)+h.get("UploadImgBtn"));this.jqPhotoName.cssDisplay(true);!l.trim(this.jqInputor.val())&&this.selectionHolder.setText(k("分享图片"));this.checkText()}else{i.alert("",c.getMsg(k("图片发布")));this.$uploadBtn.cssDisplay(1)}this.jqUploadTip.cssDisplay(false);this.jqForm[0].reset();this.jqInputor.focus()},onSendLoad:function(c,g){if(this.nullPic){p.fire("api.update",c);this.nullPic=
false;this.jqForm[0].reset()}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 r=c.isOk()?this.jqMask.succ:this.jqMask.veri;r.cssDisplay(true).show().appendTo(this.jqMaskPt);q.focus();var w=this;w.reset();r.fadeOut(1800,function(){r.remove();r[0].style.filter=null;g&&g.call(w,c)})}else{i.alert("",c.getMsg(),function(){t.focusEnd(q[0])});this.sending=false}}};
p.reg("postBox",function(){var c=l.extend({},s.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(g){this.jq("#postTitle").html(g)},onbuttonclick:function(g){if(g=="ok"){this.post();return false}},onSendLoad:function(g){s.PostBase.onSendLoad.call(this,g,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});s.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 g=c.data,q;for(q in g){this.append(q,g[q],c.html);break}},append:function(c,g,q,r){this.item(c,g);r=r||{};if(q){q=l.trim(q);var w=l(q);r.append?w.appendTo(this.jqCt):w.prependTo(this.jqCt);
if(r.noSlide){if(!r.cancelParseShortlink){q={};q[c]=g;p.mod.shortlink.from(q,function(x){p.mod.shortlink.renderWeiboShortlink(w,x[c],x[c].shortlinks)})}}else w.hide().fadeIn(1E3,function(){if(!r.cancelParseShortlink){var x={};x[c]=g;p.mod.shortlink.from(x,function(y){p.mod.shortlink.renderWeiboShortlink(w,y[c],y[c].shortlinks)})}});return w}},batchAppend:function(c,g,q){var r=[];q={noSlide:true,append:q,cancelParseShortlink:true};for(var w in c)r.push(w,this.append(w,c[w],g[w],q));p.mod.shortlink.from(c,
function(x){for(var y=0,z=r.length;y<z;y+=2){var B=r[y],C=r[y+1];C&&p.mod.shortlink.renderWeiboShortlink(C,x[B],x[B].shortlinks)}})},item:function(c,g){if(g===void 0)return a(c);e(c,g)}}));s.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 g=this;this.jq("#xwb_trig").click(function(){return g.submit()});c.keydown(function(q){q.keyCode===
13&&g.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()}}));s.shortlink=new p.ax.Shortlink({renderWeiboShortlink:function(c,g,q){g=c.find("a");var r=this,w,x,y,z=c.find("div.forward"),B=c.find("p.feed-main"),C;g.each(function(){if(w=r.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(h.parse("PreviewBox")).appendTo(z))}else{C=B.next("div.preview-img");C.length||(C=l(h.parse("PreviewBox")).insertAfter(B))}if(y||!y&&!z.length){A.attr("rel","e:pv,i:"+x.id);l(h.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 g=l.trim(this.value);
c.checkFans(g,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(g){return g.nickname},afterChoose:function(){c.jqContent.focus()},noAt:true})},checkText:function(){var c=b("hasDirectMessages")?140:300,g=l.trim(this.jqContent.val());c=t.calWbText(g,c);this.jqWord.html(c>=0?k("您还可以输入{0}字",this.warp(c)):k("已超出{0}字",this.warp(Math.abs(c))));return c>=
0&&g},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(),g=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,g)})}}},onSendLoad:function(c){if(c.isOk()){!this.dialogMode&&this.display(false);this.dialogCallBack&&this.dialogCallBack(c)}else{var g;switch(c.getCode()){case 20014:i.alert("",c.getMsg());break;case 1010005:i.alert(k("内容长度不能超过140个字。"));this.jqContent.focus();break;default:g=c.getMsg()}if(g&&this.display()){this.jqWarnPos.cssDisplay(true).text(g);this.dialogMode&&i.alert(g)}}this.sending=false;t.disable(this.jqSendBtn,
false)},checkFans:function(c,g,q,r){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"]);!r&&w.jqSender.focus()}else{w.jqWarnPos.cssDisplay(true).text(x.getMsg());!r&&w.jqSender.focus()}},g);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()),g=this.checkText(),q=this.jqUid.val();if(c)if(g){if(q)return{u:q,c:g};return{u:c,c:g,t:1}}else{l.trim(this.jqContent.val()).length?i.tipWarn(k("内容长度不能超过140个字。")):i.tipWarn(k("请输入私信内容。"));this.jqContent.focus()}else this.jqSender.focus()},reply:function(c,g){this.getView();this.reset();this.display(true);this.jqSender.val(g).attr("disabled",
true);this.jqUid.val(c);this.jqContent.focus();this.checkText()}}));p.reg("notice",function(c){var g=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(r,w){var x=this.jq("#"+r),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 r(){l(document).scrollTop()>30?w.css("top","0"):w.css("top","30px")}var w=this.jq();l(window).scroll(r);l(window).resize(function(){r(1)});r()},onclose:function(){this.clearOnClose&&this.clearUnread()},
clearUnread:function(){var r=this;l.each(this.types,function(){var w=r.jq("#"+this);w.cssDisplay(false);w.find("#c").text("0")});j.clearUnread("",l.noop)},unreadLoad:function(r){if(r.isOk()){r=r.getData().unread;for(var w=true,x=1,y=this.types.length;x<y;x++)if(r[x]){this.push(this.types[x],r[x]);w=false}w&&this.display(false)}}},c)});p.reg("notice",g,true);return g});p.reg("feedback",function(c){var g=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(r,w,x,y){r=l(this.context.form).find('input[name="mail"]').val();w=l(this.context.form).find('input[name="tel"]').val();if(r==k("邮箱地址")&&w==k("联系电话")){x.m=k("至少填写一种联系方式");this.report(false,x)}else this.report(true,x);y()}},onsuccess:function(r,w){j.feedback(r,function(){});g.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",g,true);return g});s.authLogin={open:function(c,g){var q=this.logWin;if(q&&!q.closed)q.focus();else{q=j.mkUrl("account","sinaLogin","popup=1&cb="+(c||""));if(g)q+="&loginCallBack="+encodeURIComponent(g);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 g=location.href;if(p.getModule()==="account.login")g=t.dequery(g).loginCallBack||g;this.open(c,g);return false},bind:function(c,g){var q=this;l(c).bind(g||"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()}}};s.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(){s.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});s.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(g){g=g.relatedTarget;if(!g||!l.contains(c.view,g))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,g=++this.curr,q=this;if(g>=this.length)this.curr=
g=0;var r=l(this.$list[c]),w=l(this.$list[g]);r.animate({opacity:0},{duration:q.duration,complete:function(){r.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(g){var q=this;switch(g.get("e")){case "cls":this.close();break;case "submit":if(t.byteLen(this.jq("#Content").val())<=20){g.lock(1);j.postReq(j.apiUrl("action","addSubject"),{text:this.jq("#Content").val()},function(r){if(r.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(r.getError())}g.lock(0)})}else{q.jq(".warn").prev("p").cssDisplay(0);q.jq(".warn").cssDisplay(1).html(k("话题长度太长"))}}},beforeShow:function(){var g=this.jq("#Content").val("");setTimeout(function(){g.focus()},1)},onViewReady:function(){var g=this;this.jq("#Content").focus(function(){g.jq(".warn").cssDisplay(false);g.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(g){this.anchorEl=g;return this},beforeShow:function(){u.Box.prototype.beforeShow.call(this);if(this.anchorEl){this.anchor(this.anchorEl,"tc",function(q){q[1]-=2});var g=this;this.slide("bc",true,function(){u.Box.prototype.afterShow.call(g)})}},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(g){var q=g.data,r=g.get("u");switch(q.e){case "abl":q.gender=k(q.gender=="f"?"她":"他");i.confirm(k("提示"),k("确定将{nick}加入到黑名单吗？<span>你和{gender}将自动解除关注关系，并且{gender}不能再关注你，给你发评论、私信和@你。</span>",q),function(w){w==="ok"&&j.blacklistAdd(r,"",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 g(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))});r.src=q+"?"+B.join("&")}var q="http://beacon.x.weibo.com/a.gif",r,w={pjt:"xwb",xt:"stay"},x=function(){function y(){if(!B){d();r=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;g(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 g=!!this.globalHandlers,q=this.handlers,r=0,w=c.length;r<w;r++){var x=c[r];g&&this.fireGlobal(x);q&&q[x.flag]&&q[x.flag](x,this)}this.inited=true},fireGlobal:function(c){var g=this.globalHandlers;if(g)for(var q=0,r=g.length;q<r;q++)g[q](c,this)},reg:function(c,g){if(g===void 0)if(this.globalHandlers)this.globalHandlers.push(c);else this.globalHandlers=[c];else{if(!this.handlers)this.handlers={};this.handlers[c]=g;this.inited&&this.cfgs[c]&&g(this.cfgs[c],
this)}},getAd:function(c){if(!c)return this.cfgs;if(this.cfgs)for(var g=0;g<this.cfgs.length;g++)if(this.cfgs[g].flag==c)return this.cfgs[g]}}})(Xwb,jQuery);(function(p,l){var u=p.request,t=p.ui.MsgBox,o=p.getCfg,m=p.getWb,h=document,j=p.lang.getText;p.use("action").addFilter(function(i,b){if(!(i.get("na")||b&&b.na)){var d=p.getUid(),a=p.getSiteUid(),e=o("loginCfg")||1;if(!d){if(i.get("e")=="lg")e=i.data.t||e;if(a)if(i.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(i){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=i.get("m");(i=i.get("t"))&&i=="share"&&b.setPostTitle(j("分享给大家"));b.display(true).reset().selectionHolder.setText(d||"");d&&b.checkText()}).reg("fw",function(i){var b=i.get("w");(v=i.get("v"))?Xwb.use("verifyBox",{appendTo:h.body}).setAnchor(i.src).display(true):
Xwb.use("forwardBox").display(true).setContent(b,m(b),p.getUid()).selectionHolder.focusStart()}).reg("fl",function(i){var b=i.get("u");l(i.src);i.lock(1);u.follow(b,0,function(d){if(d.isOk()||d.getCode()=="1020805"){d=i.get("t");var a=l(i.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());i.lock(0)})}).reg("ufl",function(i){t.anchorConfirm(i.src,j("确定要取消关注")+"？",function(b){if(b=="ok"){i.lock(1);b=i.get("u");var d=parseInt(i.get("t"));u.unfollow(b,"",function(a){if(a.isOk())switch(d){case 1:l(i.src).replaceWith('<a rel="e:fl,t:2" href="#">'+j("关注他")+"</a>");break;case 3:l(i.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());i.lock(0)})}})}).reg("rs",function(i){var b=i.get("w");i=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:i.u.sn,img:i.u.p,text:i.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(i){t.anchorConfirm(i.src,"确定要屏蔽该微博？",function(b){if(b=="ok"){b=i.get("w");i.lock(1);u.shieldBlog(b,function(d){if(d.isOk()){t.anchorTipOk(i.src,"屏蔽成功！");l(i.src).replaceWith("<span>已屏蔽</span>")}i.lock(0)})}})}).reg("rl",function(){location.reload()},{na:true}).reg("fr",function(i){var b=i.get("w");if(i.get("v"))Xwb.use("verifyBox",{appendTo:h.body}).setAnchor(i.src).display(true);else{i.lock(1);
u.fav(b,function(d){if(d.isOk()){t.anchorTipOk(i.src,"收藏成功！");l(i.src).replaceWith("<span>已收藏</span>")}else t.tipWarn(d.getMsg());i.lock(0)})}}).reg("ufr",function(i){t.anchorConfirm(i.src,"确定要删除该收藏？",function(b){if(b=="ok"){i.lock(1);b=i.get("w");u.delFav(b,function(d){if(d.isOk())if(i.data.t==1){var a=l(i.getEl("w"));a.slideUp(500,function(){a.remove();i.lock(0)})}else{l(i.src).replaceWith('<a rel="e:fr" href="#">收藏</a>');i.lock(0)}})}})}).reg("cm",function(i){var b=i.get("w"),d=l(i.getEl("w")),
a=d.data("xwb_cmt");if(i.get("v"))Xwb.use("verifyBox",{appendTo:h.body}).setAnchor(i.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:i.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(i){var b=l(i.getEl("w")),d=b.data("wbEle");if(!d){d=i.get("w");var a=i.get("v");d=p.use("WbElement",{$wb:b,psrc:i.get("p"),psrc:i.get("p"),wid:d,
state:a,wbData:m(d)});b.data("wbEle",d)}d.trun("left")},{na:true}).reg("tr",function(i){var b=l(i.getEl("w")),d=b.data("wbEle");if(!d){d=i.get("w");var a=i.get("v");d=p.use("WbElement",{$wb:b,psrc:i.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.trun("right")},{na:true}).reg("zo",function(i){var b=l(i.getEl("w")),d=b.data("wbEle");if(!d){d=i.get("w");var a=i.get("v");d=p.use("WbElement",{$wb:b,psrc:i.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(i){var b=l(i.getEl("w")),d=b.data("wbEle");if(!d){d=i.get("w");var a=i.get("v");d=p.use("WbElement",{$wb:b,psrc:i.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.zoomIn()},{na:true}).reg("pv",function(i){var b=l(i.getEl("w")),d=b.data("wbEle");if(!d){d=i.get("w");var a=i.get("v");d=p.use("WbElement",{$wb:b,psrc:i.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.playVideo(i)},{na:true}).reg("cv",function(i){var b=
l(i.getEl("w")),d=b.data("wbEle");if(!d){d=i.get("w");var a=i.get("v");d=p.use("WbElement",{$wb:b,psrc:i.get("p"),wid:d,state:a,wbData:m(d)});b.data("wbEle",d)}d.closeVideo(i)},{na:true}).reg("dl",function(i){var b=i.get("w"),d=i.get("v");t.anchorConfirm(i.src,j("确定删除该微博吗？"),function(a){if(a==="ok"){i.lock(1);u.del(b,d,function(e){var k=l(i.getEl("w"));e.isOk()?k.slideUp("normal",function(){k.remove()}):t.tipWarn(e.getMsg());i.lock(0)})}})}).reg("clsevt",function(i){var b=i.get("id");b&&t.anchorConfirm(i.src,
j("确定要关闭此活动？"),function(d){if(d==="ok"){i.lock(1);u.eventClose(b,function(a){a.isOk()?location.reload():t.tipWarn(i.getMsg())})}})}).reg("delevt",function(i){var b=i.get("id");b&&t.anchorConfirm(i.src,j("确定要删除此活动？"),function(d){if(d==="ok"){i.lock(1);u.eventDelete(b,function(a){a.isOk()?location.reload():t.tipWarn(i.getMsg())})}})}).reg("mop",function(i){i=l(i.src);var b=i.data("morelayer");if(!b){b=p.use("MoreList",{view:l("#more_list")[0]});i.data("morelayer",b)}b.display(1)}).reg("sdm",function(i){var b=
p.use("myMsg",{appendTo:h.body});b.display(true).reset();var d=i.get("c");d&&b.selectionHolder.setText(d);(i=i.get("n"))&&b.jqSender.val(i);i?b.jqContent.focus():b.jqSender.focus()}).reg("rm",function(i){p.use("myMsg",{appendTo:h.body}).reply(i.get("u"),i.get("n"))}).reg("dm",function(i){t.anchorConfirm(i.src,j("确定要删除该私信？"),function(b){if(b=="ok"){i.lock(1);b=i.get("m");u.delMsg(b,function(d){d.isOk()?l(i.src).closest("li").slideUp(500,function(){l(i.src).remove();i.lock(0)}):i.lock(0)})}})}).reg("dum",
function(i){t.anchorConfirm(i.src,j("确定要删除该私信？"),function(b){if(b=="ok"){i.lock(1);b=i.get("u");u.act("deleteDirectMessageBatch",{uid:b},function(d){d.isOk()?l(i.src).closest("li").slideUp(500,function(){l(i.src).remove();i.lock(0)}):i.lock(0)})}})}).reg("dbl",function(i){function b(){i.lock(1);var a=i.get("u");u.blacklistDel(a,"",function(e){e.isOk()?location.reload():t.tipWarn(e.getMsg());i.lock(0)})}var d=i.data.m;d?t.confirm(j("提示"),d,function(a){a==="ok"&&b()}):b()}).reg("dfan",function(i){t.confirm(j("提示"),
j("移除之后将取消{0}对你的关注?",name),function(b){if(b=="ok"){b=i.get("u");var d=i.getEl("u");i.lock(1);u.removeFans(b,"",function(a){if(a.isOk())l(d).slideUp(500,function(){i.lock(0);l(d).remove()});else{t.tipWarn(i.getMsg());i.lock(0)}})}})}).reg("addSubject",function(i){var b=l(i.src);i.lock(1);u.postReq(u.apiUrl("action","addSubject"),{text:i.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:i.get("subject"),type:"add"})}else t.alert(j("提示"),d.getError());i.lock(0)})}).reg("delSubject",function(i){var b=l(i.src);i.lock(1);u.postReq(u.apiUrl("action","deleteSubject"),{text:i.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:i.get("subject"),type:"del"})}else t.alert(j("提示"),d.getError());i.lock(0)})})})(Xwb,$);(function(p,l){var u=p.lang.getText;Xwb.ax.ValidationMgr.prototype.reg("ft",function(t,o,m,h){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);h()}}).reg("ne",function(t,o,m,h){var j=o==="",i=l(t).data("vrel_ft_text")||m.w;if(!j&&i)(j=o==i)&&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);h()}).reg("f",function(t,o){var m=this,h=t.tagName.toLowerCase();if(m.context.comForm&&(h=="input"||h=="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,h){if(o){t=m.ww?Xwb.util.byteLen(o):o.length;var j;o=m.max;var i=m.min;if(o!==undefined&&parseInt(o)<t)j=true;if(i!==undefined&&parseInt(i)>t)j=true;
this.report(!j,m)}else this.report(true,m);h()}).reg("dt",function(t,o,m,h){if(o){if(!m.m)m.m=u("不是有效的日期格式");t=Date.parse(o);this.report(!isNaN(t),m)}else this.report(true,m);h()}).reg("mail",function(t,o,m,h){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);h()}).reg("int",function(t,o,m,h){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);h()}).reg("bt",
function(t,o,m,h){if(o!==""){t=parseInt(m.min);var j=parseInt(m.max);o=parseInt(o);var i=0;if(o<t)i=1;if(!i&&o>j)i=2;this.report(!i,m)}else this.report(true,m);h()}).reg("sinan",function(t,o,m,h){if(o){if(!m.m)m.m=u('支持中英文、数字、"_"或减号');this.report(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/.test(o),m)}else this.report(true,m);h()})})(Xwb,$);(function(p,l){function u(m){var h=m.flag,j=m.page;l("#ad_"+h).find("#xwb_ad_cls").mousedown(function(){l("#ad_"+h).cssDisplay(false);l.cookie("ad_"+j+"_"+h+"_hide","1",{expires:1});return false})}function t(){if(!o){var m=l("#container"),h=l("#ad_global_left"),j=l("#ad_global_right"),i=function(){var b=m.offset().left;h.length&&h.css("left",b-h.width()-20);j.length&&j.css("left",b+m.width()+20)};l(window).resize(i);o=true;setTimeout(function(){h.css("visibility","hidden").removeClass("hidden");j.css("visibility",
"hidden").removeClass("hidden");i();h.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,h=p.ax.Pagelet,j=p.lang.getText;o.ns("Xwb.mod.pagelet",{});var i=p.mod.pagelet.WeiboList=o.create(h,{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,s,c,g,q=
this;d.each(function(){k=l(this);s=o.parseKnV(k.attr("rel")).w;(g=e[s])&&q.renderWeiboCounter(k,g);if(c=a[s]){var r=c.rt;if(r&&(g=e[r.id])){k=k.find(".forward");q.renderInnerWeiboCounter(k,g)}}})}},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 h({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,g){c=c?k.address+c:k.address+"css/default/"+b+e;var q=k.createCss(c,"");if(k.isIE)var r=document.styleSheets.length,w=setInterval(function(){try{if(document.styleSheets.length>r){clearInterval(w);l(g).remove();o.getClassByName("html").backgroundImage="url()";k.loadLanguageCss()}}catch(y){}},10);else var x=setInterval(function(){try{clearInterval(x);l(g).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,s=false;l('link[href$="zh_tw.css"]').remove();l("link[rel=stylesheet]").each(function(){if(this.href.indexOf(e)!==-1&&this.id!=k.customLinkId){s=true;this.href.indexOf("/css/default/"+b+e)>0||a("/css/default/"+b+e,this)}});if(!s){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 s=document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css");c.setAttribute("id","defaultStyle");s.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 s=a.length;k<s;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=[],s={};s[d]=a;if(d=="backgroundPosition"||d=="backgroundRepeat"||d=="backgroundAttachment")if(d=this.getBackPhotoInfo())s.backgroundImage="url("+d+")";else return;k.push(s);this.addStyle([b],k,e||"change")},splitArray:function(b,d){for(var a=
function(s,c){var g=c.length;b.splice(s,1,c[0]);for(var q=1;q<g;q++){b.splice(s+q,0,c[q]);d.splice(s+q,0,d[s])}},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=[],s=0,c=b.length;s<c;s++){var g="#"+b.eq(s).attr("key"),q=this.getChangeClass(s,g);g=this.getPhotoColor(s,g);d=l.merge(d,q[0]);a=l.merge(a,q[1]);e=l.merge(e,g[0]);k=l.merge(k,g[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 g=c+1;g<b.length;g++)if(b[c]==b[g])return g;return""},e=function(c,g){b.splice(g,1);l.extend(d[c],d[g]);d.splice(g,1)},k=0;k<b.length;k++){var s=a(k);if(s){e(k,s);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,s=-(this.liNum-1)*this.slidePx;if(b==0){d.addClass(this.disableClsl);s<0?a.removeClass(this.disableClsr):a.addClass(this.disableClsr)}else{k=b/this.slidePx*-1+1;d.removeClass(this.disableClsl);b==s&&a.addClass(this.disableClsr);b>s&&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=[],s=[],c=0,g=d.length;c<g;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]),r=this.getPhotoColor(c,b[c]);a=l.merge(a,q[0]);e=l.merge(e,q[1]);k=l.merge(k,r[0]);s=l.merge(s,r[1])}a=l.merge(a,k);e=l.merge(e,s);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 s=document.getElementsByTagName("head")[0];k=document.createElement("style");k.setAttribute("type","text/css");k.setAttribute("id",e);s.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(s=0;s<e;s++){var c=this.isMatchCss(k,b[s]);c>-1?this.setRulesAttr(k[c].style,d[s]):a.addRule(b[s],this.objectToString(d[s],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(s=0;s<e;s++){c=this.isMatchCss(a,b[s]);if(c>-1)this.setRulesAttr(a[c].style,d[s]);else(d=this.objectToString(d[s],false))&&k.sheet.insertRule(b[s],this.objectToString(d[s],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 s=this.objectToString(d[e]);a.push(b[e]+"{"+s+"}")}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 s=a[k];if(s){s.cssDisplay(e[k]);e[k]&&s.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",i).reg("weibo.weiboList",function(){return new i({ui:{cls:p.mod.WeiboList,syncList:true}})}).reg("weibo.userTimelineList",function(){var b=u("page")=="index.profile";return new i({ui:{cls:p.mod.WeiboList,syncList:b}})}).reg("common.searchMod",
function(){return new h({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 h({onViewReady:function(){this.getUI().jq().highlight(l("#k").val())}})}).reg("user.userSearchList",
function(){return new h({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 h({onViewReady:function(){this.getUI().jq(".user-list-wrap").highlight(l("#k").val())}})}).reg("weibo.weiboOnly",function(){return new i({onViewReady:function(){i.prototype.onViewReady.apply(this,arguments);this.getUI().jq("#xwb_weibo_list_ct").highlight(l("#k").val())}})}).reg("user.followersList",function(){return new h({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 s=b.jq("u");s.slideUp(500,function(){b.lock(0);s.remove()})}else{b.lock(0);m.tipWarn(k.getMsg())}})}});
break;default:b.stopPropagation(false)}}}})}).reg("weibo.detail",function(){return new i({onViewReady:function(){i.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 h({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 h({ui:{cls:p.mod.MyCmt}})}).reg("user.fansList",function(){return new h({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 h({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 s;this.jq("#pic").each(function(){if(l(this).hasClass(e)){s=p.ax.ActionMgr.wrapRel(this);k.push(s.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 h({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(s){(a=s.isOk())&&b.jq("a[name=follow]").replaceWith('<span class="followed-btn">'+
j("已关注")+"</span>")})}return false})}})}).reg("category_user",function(){return new h({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 h({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 i({renderWeiboCounter:function(b,d){i.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 i({renderWeiboCounter:function(b,d){i.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 i({onViewReady:function(b){i.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(s){s.target.tagName=="A"&&k.close()})},onDataLoaded:function(k){if(k.isOk()){this.provinces=k.getData().provinces;var s=this;this.jq("#sel-area").change(function(){s.changeProvince(this.value)})}},
changeProvince:function(k){if(this.provinces){var s=this;l.each(this.provinces,function(c,g){if(g.id==k){var q=[];l.each(g.citys,function(r,w){var x,y;for(r in w){x=r;y=w[r]}x=t.mkUrl(d,"",o.queryString({page_id:a,province:k,city:x+"#city"}));q.push('<a href="'+x+'">'+y+"</a>")});s.jq("#citys").html(q.join(""));return false}})}}});this.jq("#cityBtn").click(function(){e.display(true);return false})}})}).reg("common.subjectFollowed",function(){return new h({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 s=a[e].subject;l(' <li rel="subject:'+
s+'"><a href="'+a[e].href+'">'+s+'</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 h({ui:{actionMgr:true,onactiontrig:function(b){var d=function(a,e,k){var s=p.use("postBox");a=e||a.get("m");k&&k=="share"&&s.setPostTitle(j("分享给大家"));s.display(true).reset().selectionHolder.setText(a||
"");a&&s.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(s){if(s.isOk()){m.tipOk(j("参加成功！"),function(){d(b);k.close()});l(b.src).replaceWith('<a class="join-btn-disabled" href="#">'+j("已参加")+"</a>")}else m.tipWarn(s.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 h({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(h){o.ie6&&l("#logo").length&&l("#logo").fixPng();h||(h={});p.cfg=l.extend({},m.__gloCfg||{},h);p.use("action").bind(document.body);h.basePath&&t.init(h.basePath);if(p.getUid()){var j=h.remind,i=j?document.body:l("#xwbInnerNav")[0];i&&p.use("notice",{appendTo:i,remindType:j})}p.mod.shortlink.local=h.shortLink}).on("pipe.end",function(){if(p.cfg.wbList){var h=p.cfg.wbList,j=[],i;if(u("uid")){for(var b in h){j.push(b);
i=h[b];i.rt&&j.push(i.rt.id)}t.counts(j.join(","),l.noop);j=null}var d=p.ax.ActionMgr;p.mod.shortlink.from(h,function(){l(".feed-list ul>li").each(function(){var g=l(this),q=d.getRel(this,"w",this);if(q)if(q=h[q]){var r=q.shortlinks;r&&r.length&&p.mod.shortlink.renderWeiboShortlink(g,q,r)}})})}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(g){if(g.isOk()){g=g.getData().unread[0];a.cssDisplay(!!g)}})}if(p.getUid()){var e=false,k=u("maxid"),s=function(){e=false;setTimeout(c,3E4)},c=function(){if(!e){e=true;t.unread(k,s)}};c()}l(".main-menu>li").slideMenu(">ul","menu-over");l("#gotop").each(function(){var g=l(document),q=l(this);l("#container");var r=true,w;q.css("bottom","95px");l(window).scroll(function(){if(g.scrollTop()==
0){if(!r){q.cssDisplay(false);r=true}w=false}else if(!w)if(r){q.cssDisplay(true);r=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(h){var j=h.data;switch(j.e){case "cls":l.cookie(h.get("cn"),1);this.display(0);break;case "do":h=j.op;if(h==1){h=p.use("postBox");p.use("postBox").display(true);h&&h.selectionHolder.insertText("#"+j.tp+"# ")}else h==
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,$);
