STK.register("common.listener",function(b){var c={};var a={};a.define=function(e,f){if(c[e]!=null){throw"common.listener.define: 频道已被占用"}c[e]=f;var d={};d.register=function(h,g){if(c[e]==null){throw"common.listener.define: 频道未定义"}b.listener.register(e,h,g)};d.fire=function(g,h){if(c[e]==null){throw"commonlistener.define: 频道未定义"}b.listener.fire(e,g,h)};d.remove=function(h,g){b.listener.remove(e,h,g)};d.cache=function(g){return b.listener.cache(e,g)};return d};return a});STK.register("common.channel.relation",function(b){var a=["follow","unFollow","removeFans","block","unBlock","addFriends","removeFriends","updateRemark"];return b.common.listener.define("common.channel.relation",a)});STK.register("kit.extra.merge",function(a){return function(d,c){var f={};for(var e in d){f[e]=d[e]}for(var e in c){f[e]=c[e]}return f}});STK.register("kit.io.ajax",function(a){return function(i){var h,f,e,g,j,b,c;b=function(l){j=false;i.onComplete(l,h.args);setTimeout(k,0)};c=function(l){j=false;i.onFail(l,h.args);setTimeout(k,0)};e=[];g=null;j=false;h=a.parseParam({url:"",method:"get",responseType:"json",timeout:30*1000,onTraning:a.funcEmpty,isEncode:true},i);h.onComplete=b;h.onFail=c;var k=function(){if(!e.length){return}if(j===true){return}j=true;h.args=e.shift();g=a.ajax(h)};var d=function(m){while(e.length){e.shift()}j=false;if(g){try{g.abort()}catch(l){}}g=null};f={};f.request=function(l){if(!l){l={}}if(i.noQueue){d()}if(!i.uniqueRequest||!g){e.push(l);l._t=0;k()}};f.abort=d;return f}});STK.register("kit.io.jsonp",function(a){return function(d){var c,f,b,h,e;c=a.parseParam({url:"",method:"get",responseType:"json",varkey:"_v",timeout:30*1000,onComplete:a.funcEmpty,onTraning:a.funcEmpty,onFail:a.funcEmpty,isEncode:true},d);b=[];h={};e=false;var g=function(){if(!b.length){return}if(e===true){return}e=true;h.args=b.shift();h.onComplete=function(i){e=false;c.onComplete(i,h.args);setTimeout(g,0)};h.onFail=function(i){e=false;c.onFail(i);setTimeout(g,0)};a.jsonp(a.kit.extra.merge(c,{args:h.args,onComplete:function(i){h.onComplete(i)},onFail:function(i){try{h.onFail(i)}catch(j){}}}))};f={};f.request=function(i){if(!i){i={}}b.push(i);i._t=1;g()};f.abort=function(i){while(b.length){b.shift()}e=false;h=null};return f}});STK.register("kit.io.inter",function(a){return function(){var b,d,c;b={};d={};c={};b.register=function(f,e){if(d[f]!==undefined){throw f+" interface has been registered"}d[f]=e;c[f]={}};b.hookComplete=function(e,g){var f=a.core.util.getUniqueKey();c[e][f]=g;return f};b.removeHook=function(e,f){if(c[e]&&c[e][f]){delete c[e][f]}};b.getTrans=function(g,e){var f=a.kit.extra.merge(d[g],e);f.onComplete=function(i,l){try{e.onComplete(i,l)}catch(j){}if(i.code==="A00006"||i.code==="100000"){try{e.onSuccess(i,l)}catch(j){}}else{try{e.onError(i,l)}catch(j){}}for(var h in c[g]){try{c[g][h](i,l)}catch(j){}}};if(d[g]["requestMode"]==="jsonp"){return a.kit.io.jsonp(f)}else{if(d[g]["requestMode"]==="ijax"){return a.kit.io.ijax(f)}else{return a.kit.io.ajax(f)}}};b.request=function(h,e,g){var f=a.core.json.merge(d[h],e);f.onComplete=function(j,m){try{e.onComplete(j,m)}catch(l){}if(j.code==="A00006"){try{e.onSuccess(j,m)}catch(l){}}else{try{if(j.code==="100002"){window.location.href=j.data;return}e.onError(j,m)}catch(l){}}for(var i in c[h]){try{c[h][i](j,m)}catch(l){}}};f=a.core.obj.cut(f,["noqueue"]);f.args=g;if(d[h]["requestMode"]==="jsonp"){return a.jsonp(f)}else{if(d[h]["requestMode"]==="ijax"){return a.ijax(f)}else{return a.ajax(f)}}};return b}});STK.register("common.proxyUrl",function(c){var a="/interface/weibo/proxy.php?method=";var b="http://"+location.hostname;return function(e,d){if(d){return b+e}else{e=(e+"").indexOf("/")===0?e.substr(1):e;e=e.replace("?","&");return a+e}}});STK.register("common.trans.relation",function(d){var b=d.kit.io.inter();var c=b.register;var a=d.common.proxyUrl;c("mayinterested",{url:a("/aj/user/interest/list"),method:"get"});c("uninterested",{url:a("/aj/user/interest/uninterested"),method:"post"});c("userCard",{url:"/interface/user/card.php",method:"get"});c("follow",{url:"/interface/weibo/friendships.php?act=follow",method:"post"});c("unFollow",{url:"/interface/weibo/friendships.php?act=unfollow",method:"post"});c("medal",{url:"/interface/user/badge.ph",method:"get"});c("recommendusers",{url:a("/aj/f/recommendusers"),method:"get"});c("block",{url:a("/aj3/blacklist/addblacklist_v4.php"),method:"post"});c("unBlock",{url:a("/aj3/blacklist/delblacklist_v4.php"),method:"post"});c("removeFans",{url:a("/aj/f/remove"),method:"post"});c("requestFollow",{url:a("/ajax/relation/requestfollow"),method:"post"});c("questions",{url:"/interface/weibo/friendships.php?act=invite_limit",method:"get"});c("answer",{url:"/interface/weibo/friendships.php?act=invite_send",method:"post"});c("setRemark",{url:"/interface/weibo/friendships.php?act=remark_update",method:"post"});c("recommendAttUsers",{url:a("/aj/f/getrecommendusers"),method:"get"});return b});STK.register("kit.extra.language",function(a){window.$LANG||(window.$LANG={});return function(b,c){var d=a.core.util.language(b,$LANG);d=d.replace(/\\}/ig,"}");if(c){d=a.templet(d,c)}return d}});STK.register("kit.extra.reuse",function(a){return function(e,j){var i,h,b;i=a.parseParam({},j);b=[];var f=function(){var k=e();b.push({store:k,used:true});return k};var g=function(k){a.foreach(b,function(m,l){if(k===m.store){m.used=true;return false}})};var d=function(k){a.foreach(b,function(m,l){if(k===m.store){m.used=false;return false}})};var c=function(){for(var l=0,k=b.length;l"+m.tagName.toLowerCase()+"["+a+'="'+n+'"]'}var f={getNode:function(){return k},show:function(n,m){if(j){n=e.core.obj.parseParam({opacity:0.3,background:"#000000"},n);k.style.background=n.background;g(k,"opacity",n.opacity);k.style.display="";b.setAlign("lt");m&&m()}else{d();f.show(n,m)}return f},hide:function(){k.style.display="none";nowIndex=undefined;c=[];return f},showUnderNode:function(n,m){if(e.isNode(n)){f.show(m,function(){g(k,"zIndex",i(n,"zIndex"));var p=l(n);var o=e.core.arr.indexOf(c,p);if(o!=-1){c.splice(o,1)}c.push(p);e.core.dom.insertElement(n,k,"beforebegin")})}return f},back:function(){if(c.length<1){return f}var n,m;c.pop();if(c.length<1){f.hide()}else{if((m=c[c.length-1])&&(n=e.sizzle(m,document.body)[0])){g(k,"zIndex",i(n,"zIndex"));e.core.dom.insertElement(n,k,"beforebegin")}else{f.back()}}return f},destroy:function(){h.remove(b);k.style.display="none";lastNode=undefined;_cache={}}};return f});STK.register("kit.dom.drag",function(a){return function(d,p){var h,g,n,l,c,k,e,i;var q=function(){f();j()};var f=function(){h=a.parseParam({moveDom:d,perchStyle:"border:solid #999999 2px;",dragtype:"perch",actObj:{},pagePadding:5},p);n=h.moveDom;g={};l={};c=a.drag(d,{actObj:h.actObj});if(h.dragtype==="perch"){k=a.C("div");e=false;i=false;n=k}d.style.cursor="move"};var j=function(){a.custEvent.add(h.actObj,"dragStart",m);a.custEvent.add(h.actObj,"dragEnd",b);a.custEvent.add(h.actObj,"draging",o)};var m=function(r,u){document.body.style.cursor="move";var t=a.core.util.pageSize()["page"];l=a.core.dom.position(h.moveDom);l.pageX=u.pageX;l.pageY=u.pageY;l.height=h.moveDom.offsetHeight;l.width=h.moveDom.offsetWidth;l.pageHeight=t.height;l.pageWidth=t.width;if(h.dragtype==="perch"){var s=[];s.push(h.perchStyle);s.push("position:absolute");s.push("z-index:"+(h.moveDom.style.zIndex+10));s.push("width:"+h.moveDom.offsetWidth+"px");s.push("height:"+h.moveDom.offsetHeight+"px");s.push("left:"+l.l+"px");s.push("top:"+l.t+"px");k.style.cssText=s.join(";");i=true;setTimeout(function(){if(i){document.body.appendChild(k);e=true}},100)}if(d.setCapture!==undefined){d.setCapture()}};var b=function(r,s){document.body.style.cursor="auto";if(d.setCapture!==undefined){d.releaseCapture()}if(h.dragtype==="perch"){i=false;h.moveDom.style.top=k.style.top;h.moveDom.style.left=k.style.left;if(e){document.body.removeChild(k);e=false}}};var o=function(t,A){var z=l.t+(A.pageY-l.pageY);var s=l.l+(A.pageX-l.pageX);var u=z+l.height;var v=s+l.width;var r=l.pageHeight-h.pagePadding;var w=l.pageWidth-h.pagePadding;if(u0){n.style.top=z+"px"}else{if(z<0){n.style.top="0px"}if(u>=r){n.style.top=r-l.height+"px"}}if(v0){n.style.left=s+"px"}else{if(s<0){n.style.left="0px"}if(v>=w){n.style.left=w-l.width+"px"}}};q();g.destroy=function(){document.body.style.cursor="auto";if(typeof n.setCapture==="function"){n.releaseCapture()}if(h.dragtype==="perch"){i=false;if(e){document.body.removeChild(k);e=false}}a.custEvent.remove(h.actObj,"dragStart",m);a.custEvent.remove(h.actObj,"dragEnd",b);a.custEvent.remove(h.actObj,"draging",o);if(c.destroy){c.destroy()}h=null;n=null;l=null;c=null;k=null;e=null;i=null};g.getActObj=function(){return h.actObj};return g}});STK.register("ui.dialog",function(d){var c='';var e=d.kit.extra.language;var b=null;var a=function(){var g=d.module.dialog(e(c));d.custEvent.add(g,"show",function(){d.module.mask.showUnderNode(g.getOuter())});d.custEvent.add(g,"hide",function(){d.module.mask.back();g.setMiddle()});d.kit.dom.drag(g.getDom("title"),{actObj:g,moveDom:g.getOuter()});g.destroy=function(){f(g);try{g.hide(true)}catch(h){}};return g};var f=function(g){g.setTitle("").clearContent();b.setUnused(g)};return function(g){var h=d.parseParam({isHold:false},g);var j=h.isHold;h=d.core.obj.cut(h,["isHold"]);if(!b){b=d.kit.extra.reuse(a)}var i=b.getOne();if(!j){d.custEvent.add(i,"hide",function(){d.custEvent.remove(i,"hide",arguments.callee);f(i)})}return i}});STK.register("ui.alert",function(d){var c='

';var f={success:"icon_succB",error:"icon_errorB",warn:"icon_warnB","delete":"icon_delB",question:"icon_questionB"};var e=d.kit.extra.language;var b=null;var a=function(h,g){h.getDom("icon").className=g.icon;h.getDom("textLarge").innerHTML=g.textLarge;h.getDom("textSmall").innerHTML=g.textSmall;h.getDom("OK").innerHTML=""+g.OKText+""};return function(m,h){var j,k,l,n,g;j=d.parseParam({title:e("#L{提示}"),icon:"warn",textLarge:m,textSmall:"",OK:d.funcEmpty,OKText:e("#L{确定}"),timeout:0},h);j.icon=f[j.icon];k={};if(!b){b=d.kit.extra.reuse(function(){var o=d.module.layer(e(c));return o})}l=b.getOne();n=d.ui.dialog();n.setContent(l.getOuter());n.setTitle(j.title);a(l,j);var i=function(){d.removeEvent(l.getDom("OK"),"click",arguments.callee);clearTimeout(g);n.hide();return false};d.addEvent(l.getDom("OK"),"click",i);d.custEvent.add(n,"hide",function(){d.custEvent.remove(n,"hide",arguments.callee);d.removeEvent(l.getDom("OK"),"click",i);b.setUnused(l);clearTimeout(g);j.OK()});if(j.timeout){g=setTimeout(function(){n.hide()},j.timeout)}n.show().setMiddle();k.alt=l;k.dia=n;return k}});STK.register("common.trans.validateCode",function(d){var b=d.kit.io.inter();var c=b.register;var a=d.common.proxyUrl;c("checkValidate",{url:a("/aj/pincode/verified"),method:"post"});return b});STK.register("kit.io.cssLoader",function(d){var b=$CONFIG.version||"";var a=$CONFIG.imgPath;if(typeof $CONFIG!="undefined"){a=$CONFIG.cssPath||a}var c={};return function(f,k,h,i){i=i||b;h=h||function(){};var n=function(r,p){var q=c[r]||(c[r]={loaded:false,list:[]});if(q.loaded){p(r);return false}q.list.push(p);if(q.list.length>1){return false}return true};var j=function(q){var p=c[q].list;for(var r=0;r0){setTimeout(g,10)}else{d.log(f+"timeout!");d.core.util.hideContainer.removeChild(e);delete c[f]}};setTimeout(g,50)}});STK.register("common.dialog.validateCode",function(g){var b=window.$LANG,e=g.kit.extra.language;var h="/aj/pincode/pin?type=rule&lang="+$CONFIG.lang+"&ts=";var c={dialog_html:'

#L{换另一组题目}

#L{请输入上面问题的答案}:

#L{确定}#L{取消}

'};var f,d,a;return function(){if(f){return f}var q={};var t={};var w;var k;var v;var s;var p=function(){t.yzm_error.innerHTML="";t.yzm_error.parentNode.style.display="none"};var l=function(A){t.yzm_error.innerHTML=A;t.yzm_error.parentNode.style.display=""};var o=function(){if(!w){x()}p();t.input_text.value="";w.show();i.changesrc();w.setMiddle();g.hotKey.add(document.documentElement,["esc"],i.closeDialog,{type:"keyup",disableInInput:true})};var x=function(){w=g.ui.dialog({isHold:true});w.setTitle(e("#L{请输入验证码}"));w.setContent(e(c.dialog_html));c=null;var A=w.getOuter();j(A);j=null;m();m=null};var n=g.common.trans.validateCode.getTrans("checkValidate",{onError:function(){l(e("#L{验证码错误}"));i.changesrc();v=false},onFail:function(){l(e("#L{验证码错误}"));i.changesrc();v=false},onSuccess:function(C,E){var A=C.data.retcode;p();t.input_text.value="";w.hide();var B=k.requestAjax;var D=g.kit.extra.merge(k.param,{retcode:A});B.request(D);v=false}});var y=function(){};var u=function(){};var j=function(A){t.vImg=g.core.dom.sizzle("img.yzm_img",A)[0];t.yzm_change=g.core.dom.sizzle("a.yzm_change",A)[0];t.yzm_submit=g.core.dom.sizzle("a.yzm_submit",A)[0];t.yzm_cancel=g.core.dom.sizzle("a.yzm_cancel",A)[0];t.input_text=g.core.dom.sizzle("input.yzm_input",A)[0];t.yzm_error=g.core.dom.sizzle("div.yzm_error span.txt",A)[0];t.close_icon=w.getDom("close")};var i={changesrc:function(){var B=h+g.getUniqueKey();t.vImg.setAttribute("src",B);try{t.yzm_change.blur()}catch(A){}},checkValidateCode:function(){p();var A=g.core.str.trim(t.input_text.value);if(!A){l(e("#L{请输入验证码}"))}else{if(!v){v=true;n.request({secode:A})}}try{t.yzm_submit.blur()}catch(B){}},closeDialog:function(B){if(typeof B=="object"&&B.el){w.hide()}if(typeof k=="object"&&k.onRelease&&typeof k.onRelease=="function"){k.onRelease()}g.hotKey.remove(document.documentElement,["esc"],i.closeDialog,{type:"keyup"});try{g.preventDefault()}catch(A){}},onFocus:function(B){B=g.core.evt.getEvent();var A=B.target||B.srcElement;var C=A.value;if(!C){p()}}};var m=function(){var A=w.getOuter();s=g.core.evt.delegatedEvent(A);s.add("yzm_change","click",function(){i.changesrc();g.preventDefault()});s.add("yzm_submit","click",function(){i.checkValidateCode();g.preventDefault()});s.add("yzm_cancel","click",i.closeDialog);g.core.evt.addEvent(t.close_icon,"click",i.closeDialog);g.core.evt.addEvent(t.input_text,"focus",i.onFocus);g.core.evt.addEvent(t.input_text,"blur",i.onFocus)};var z=function(){if(d){return}if(w){s.destroy();g.core.evt.removeEvent(t.close_icon,"click",i.closeDialog);g.core.evt.removeEvent(t.input_text,"focus",i.onFocus);g.core.evt.removeEvent(t.input_text,"blur",i.onFocus);w&&w.destroy&&w.destroy()}d=true};var r=function(C,E,B){if(C.code=="100027"){k=B;o()}else{if(C.code==="A00006"||C.code==="100000"){try{var A=B.onSuccess;A&&A(C,E)}catch(D){}}else{try{if(C.code==="100002"){window.location.href=C.data;return}var A=B.onError;A&&A(C,E)}catch(D){}}}};u();u=null;q.destroy=z;q.validateIntercept=r;q.addUnloadEvent=function(){if(a){return}if(w){g.core.evt.addEvent(window,"unload",z)}a=true};f=q;return q}});STK.register("common.relation.followPrototype",function(g){var i={},a=g.common.trans.relation,l=g.common.channel.relation,j=g.kit.extra.merge;var k=g.common.dialog.validateCode();var e=function(n,o){g.ui.alert(n.msg,{timeout:1000})};var h=function(q,o){var p=g.parseParam({uid:"",f:0,extra:"",oid:$CONFIG.oid,b:0},o||{});if(q==="follow"){var n=a.getTrans(q,{onComplete:function(r,t){var s={onSuccess:function(v,x){var w=j(o,v.data);l.fire(q,w);var u=o.onSuccessCb;typeof u==="function"&&u(w)},onError:function(u,w){var v=o.onErrorCb||e;v(u,w)},requestAjax:n,param:t,onRelease:function(){}};k.validateIntercept(r,t,s)}});n.request(p)}else{g.common.trans.relation.request(q,{onSuccess:function(s,u){var t=j(o,s.data);l.fire(q,t);var r=o.onSuccessCb;typeof r==="function"&&r(t)},onError:function(r,t){var s=o.onErrorCb||e;s(r,t)}},p)}};var c=function(n){h("follow",n)};var m=function(n){h("unFollow",n)};var f=function(n){h("block",n)};var d=function(n){h("unBlock",n)};var b=function(n){h("removeFans",n)};i.follow=c;i.unFollow=m;i.block=f;i.unBlock=d;i.removeFans=b;return i});STK.register("ui.tipPrototype",function(a){var b=10003;return function(d){var e,i,h,g,c;var f='
';e=a.parseParam({direct:"up",showCallback:a.core.func.empty,hideCallback:a.core.func.empty},d);i=a.module.layer(f,e);h=i.getOuter();g=i.getInner();i.setTipWH=function(){c=this.getSize(true);this.tipWidth=c.w;this.tipHeight=c.h;return this};i.setTipWH();i.setContent=function(j){if(typeof j=="string"){g.innerHTML=j}else{g.appendChild(j)}this.setTipWH();return this};i.setLayerXY=function(p,o){if(!p){throw"ui.tipPrototype need pNode as first parameter to set tip position"}var m=STK.core.dom.position(p);var r=m.l;var q=p.offsetWidth;var n=p.offsetHeight;var k;if(o&&o=="namecard"){k=r}else{k=r+(q-this.tipWidth)/2}var j=m.t;if(e.direct==="down"){j+=n}var l=[";"];l.push("z-index:",(b++),";");l.push("width:",this.tipWidth,"px;");l.push("height:",this.tipHeight,"px;");l.push("top:",j,"px;");l.push("left:",k,"px;");h.style.cssText+=l.join("")};i.aniShow=function(){var k=this.getOuter();k.style.height="0px";k.style.display="";var j=a.core.ani.tween(k,{end:e.showCallback,duration:250,animationType:"easeoutcubic"});if(e.direct==="down"){j.play({height:this.tipHeight},{staticStyle:"overflow:hidden;position:absolute;"})}else{var l=(parseInt(k.style.top,10)-this.tipHeight);j.play({height:this.tipHeight,top:l},{staticStyle:"overflow:hidden;position:absolute;"})}};i.anihide=function(){var k=this.getOuter();var m=this;var j=a.core.ani.tween(k,{end:function(){k.style.display="none";k.style.height=m.tipHeight+"px";e.hideCallback()},duration:300,animationType:"easeoutcubic"});if(e.direct==="down"){j.play({height:0},{staticStyle:"overflow:hidden;position:absolute;"})}else{var l=(parseInt(k.style.top,10)+this.tipHeight);j.play({height:0,top:l},{staticStyle:"overflow:hidden;position:absolute;"})}};document.body.appendChild(h);i.destroy=function(){document.body.removeChild(h);i=null};return i}});STK.register("ui.tipConfirm",function(a){return function(j){j=j||{};var g=a.ui.tipPrototype(j);var e=g.getInner();var l=g.getOuter();l.className="W_layer";e.className="bg";j.info=j.info||"确认要删除这条微博吗?";j.icon=j.icon||"icon_del";var i=j.template||'

'+j.info+'

确定取消

';var c=a.builder(i);g.setContent(c.box);if(!c.list.ok){return g}var h=c.list.ok[0];var k=c.list.cancel[0];g.setIcon=function(m){c.list.info.className=m;g.setTipWH()};g.setInfo=function(m){c.list.info[0].innerHTML=''+m;g.setTipWH()};g.cancelCallback=function(){if(a.getType(j.cancelCallback)=="function"){j.cancelCallback()}};g.okCallback=function(){if(a.getType(j.okCallback)=="function"){j.okCallback()}};var f=function(){g.anihide();g.cancelCallback();return false};var b=function(){g.anihide();g.okCallback();return false};a.addEvent(k,"click",f);a.addEvent(h,"click",b);var d=g.destroy;g.destroy=function(){a.removeEvent(k,"click",f);a.removeEvent(h,"click",b);d();g=null};return g}});STK.register("kit.dom.parseDOM",function(a){return function(c){for(var b in c){if(c[b]&&(c[b].length==1)){c[b]=c[b][0]}}return c}});STK.register("common.trans.group",function(d){var b=d.common.proxyUrl;var a=d.kit.io.inter();var c=a.register;c("add",{url:"/interface/weibo/friendships.php?act=creategroup",method:"post"});c("set",{url:"/interface/weibo/friendships.php?act=setgroup",method:"post"});c("batchSet",{url:b("/aj3/attention/aj_group_batchupdate_v4.php"),method:"post"});c("list",{url:"/interface/weibo/friendships.php?act=getgroup",method:"get"});c("order",{url:b("/aj/f/group/order"),method:"post"});return a});STK.register("common.dialog.setGroup",function(b){var a=16;return function(){var p={},y=b.kit.extra.language,E=b.ui.dialog({isHold:true}),g=b.ui.alert,G={groupBox:'
#L{备注名称:}
#L{为什么要设置分组?}
#L{正在加载,请稍候...}
    ',checkBox:''},l={title:"#L{关注成功}",gEmpty:"#L{分组名不能为空}",rEmpty:"#L{备注名不能为空}",gMaxLen:"#L{请不要超过16个字符}",gDefVal:"#L{新分组}",okLabel:"#L{设置成功}",rDefVal:"#L{设置备注}",message:"#L{为“#{nickName\\}”选择分组}",repeat:"#L{此分组名已存在}"},A=false,q=[],z,j,f,m,e,i,B,F;var J=function(){z.remarkInput.value=y(l.rDefVal);z.groupInput.value=y(l.gDefVal);z.loading.style.display="";z.groupList.innerHTML="";z.showBtnBox.style.display="";z.addGroupBox.style.display="none"};var I=function(L){J();var K=b.parseParam({uid:"",fnick:"",hasRemark:true,groupList:[],title:y(l.title),successCb:function(){},cancelCb:function(){}},L);B=K.successCb;F=K.cancelCb;z.uid.value=K.uid;if(K.hasRemark){z.remarkInput.removeAttribute("disabled");z.remarkPanel.style.display=""}else{z.remarkInput.setAttribute("disabled","disabled");z.remarkPanel.style.display="none"}K.groupList.length?x(K.groupList):n.request({uid:K.uid});z.message.innerHTML=y(l.message,{nickName:K.fnick});E.setTitle(K.title);E.appendChild(z.group_panel);E.show().setMiddle()};var v=function(){E.hide()};var o={defVal:y(l.gDefVal),check:function(L){var K="";if(L===""||L===this.defVal){K=l.gEmpty}else{if(b.core.str.bLength(L)>16){K=l.gMaxLen}}return y(K)},checkRepeat:function(L){var K="";for(var M=q.length;M--;){if(L===q[M]["gname"]){K=l.repeat;break}}return y(K)},showError:function(K){z.errorTips.innerHTML=''+K;z.errorTips.style.display=""},hideError:function(){z.errorTips.style.display="none"}};var d={defVal:y(l.rDefVal),check:function(L){var K="";if(L===""){K=l.rEmpty}else{if(b.core.str.bLength(L)>16){K=l.gMaxLen}}return y(K)},showError:function(K){},hideError:function(){}};var D=function(M){var K=b.C("li");var L=G.checkBox.replace(/\{value\}/g,M.gid).replace(/\{groupId\}/g,M.gid).replace(/\{name\}/g,M.gname).replace(/\{checked\}/g,M.belong?"checked":"");K.innerHTML=L;return K};var x=function(O){q=O;z.addGroupPanel.style.display=(O.length>=20)?"none":"";var M=document.createDocumentFragment();for(var N=0,L=O.length;N=20)?"none":"";for(var M=N.length;M--;){if(N[M].belong===1){O=N[M];break}}O&&q.push(O);var K=D(O);z.groupList.appendChild(K);c.hideAddPanel();z.groupInput.value=y(l.gDefVal)}};var n=b.common.trans.group.getTrans("list",{onSuccess:w.getGroupSuccess,onError:w.errorCd});var u=b.common.trans.group.getTrans("set",{onSuccess:w.setGroupSuccess,onError:w.errorCd});var t=b.common.trans.group.getTrans("batchSet",{onSuccess:w.setGroupSuccess,onError:w.errorCd});var h=b.common.trans.group.getTrans("add",{onSuccess:w.addGroupSuccess,onError:w.errorCd});var c={showAddPanel:function(){z.showBtnBox.style.display="none";z.addGroupBox.style.display="";z.groupInput.focus()},hideAddPanel:function(){z.showBtnBox.style.display="";z.addGroupBox.style.display="none";o.hideError();z.groupInput.value=o.defVal},addGroup:function(){var K=b.trim(z.groupInput.value),L=o.check(K)||o.checkRepeat(K);if(L){o.showError(L)}else{o.hideError();h.request({name:K})}},submit:function(){var M=b.trim(z.groupInput.value),N=o.checkRepeat(M);if(N){o.showError(N);return}A=true;o.hideError();var L=b.htmlToJson(z.group_panel);var K=[];L.gid=K.concat(L.gid).join(",");o.check(M)||(L.newgroup=M);if(L.remark===y(l.rDefVal)){L.remark=""}u.request(L)},cancel:function(){A=false;v()},inputFocus:function(K){return function(L){var L=b.fixEvent(L),M=L.target,N=M.value;K.hideError();(N===K.defVal)&&(M.value="")}},inputBlur:function(K){return function(L){var L=b.fixEvent(L),M=L.target,N=b.trim(M.value);N||(M.value=K.defVal)}},inputMaxLen:function(L){var L=b.fixEvent(L),M=L.target,N=M.value,K=b.core.str.bLength(N);(K>16)&&(M.value=b.core.str.leftB(N,a))},showGroupTips:function(){z.groupTips.style.display=""},hideGroupTips:function(){z.groupTips.style.display="none"}};var C=function(){k();r();s()};var r=function(){j=b.core.evt.delegatedEvent(z.group_panel);f=c.inputFocus(o);m=c.inputBlur(o);e=c.inputFocus(d);i=c.inputBlur(d);b.addEvent(z.remarkInput,"focus",e);b.addEvent(z.remarkInput,"blur",i);b.addEvent(z.groupInput,"focus",f);b.addEvent(z.groupInput,"blur",m);b.addEvent(z.remarkInput,"keyup",c.inputMaxLen);b.addEvent(z.groupInput,"keyup",c.inputMaxLen);j.add("showBtn","click",c.showAddPanel);j.add("hideBtn","click",c.hideAddPanel);j.add("addGroup","click",c.addGroup);j.add("submit","click",c.submit);j.add("cancel","click",c.cancel);j.add("tipsLayer","mouseover",c.showGroupTips);j.add("tipsLayer","mouseout",c.hideGroupTips)};var s=function(){b.custEvent.add(E,"hide",function(){A||F()})};var k=function(){var K=b.core.dom.builder(y(G.groupBox));z=b.kit.dom.parseDOM(K.list)};var H=function(){b.removeEvent(z.remarkInput,"focus",e);b.removeEvent(z.remarkInput,"blur",i);b.removeEvent(z.groupInput,"focus",f);b.removeEvent(z.groupInput,"blur",m);b.removeEvent(z.remarkInput,"keyup",c.inputMaxLen);b.removeEvent(z.groupInput,"keyup",c.inputMaxLen);f=null;m=null;e=null;i=null;j&&j.destroy()};C();p.show=I;p.hide=v;p.destroy=H;return p}});STK.register("ui.confirm",function(c){var b='

    ';var e={success:"icon_succB",error:"icon_errorB",warn:"icon_warnB","delete":"icon_delB",question:"icon_questionB"};var d=c.kit.extra.language;var a=null;return function(g,n){var m,l,i,o,k,f;m=c.parseParam({title:d("#L{提示}"),icon:"question",textLarge:g,textComplex:"",textSmall:"",OK:c.funcEmpty,OKText:d("#L{确定}"),cancel:c.funcEmpty,cancelText:d("#L{取消}")},n);m.icon=e[m.icon];l={};if(!a){a=c.kit.extra.reuse(function(){var p=c.module.layer(b);return p})}i=a.getOne();o=c.ui.dialog();o.setContent(i.getOuter());i.getDom("icon").className=m.icon;i.getDom("textLarge").innerHTML=m.textLarge;i.getDom("textComplex").innerHTML=m.textComplex;i.getDom("textSmall").innerHTML=m.textSmall;i.getDom("OK").innerHTML=""+m.OKText+"";i.getDom("cancel").innerHTML=""+m.cancelText+"";o.setTitle(m.title);var j=function(){k=true;f=c.htmlToJson(i.getDom("textComplex"));o.hide()};var h=function(){o.hide();return false};c.addEvent(i.getDom("OK"),"click",j);c.addEvent(i.getDom("cancel"),"click",h);c.custEvent.add(o,"hide",function(){c.custEvent.remove(o,"hide",arguments.callee);c.removeEvent(i.getDom("OK"),"click",j);c.removeEvent(i.getDom("cancel"),"click",h);a.setUnused(i);if(k){m.OK(f)}else{m.cancel(f)}});o.show().setMiddle();l.cfm=i;l.dia=o;return l}});STK.register("common.relation.baseFollow",function(c){var b=window.$CONFIG||{};var a="http://img2.app.wcdn.cn/ops/vgirl/style/images/common/transparent.gif";return function(q){var i={},m=c.common.channel.relation,f=c.core.evt.delegatedEvent(q),t=c.common.relation.followPrototype,h=c.kit.extra.merge,o=c.kit.extra.language,s=c.common.dialog.setGroup(),g={unFollowTips:o("#L{确认取消关注吗?}"),bothFollow:o("#L{互相关注}"),singleFollow:o("#L{已关注}")},x=c.ui.tipConfirm({info:g.unFollowTips}),w={follow:o('
    {focDoc}|#L{取消}
    '),unFollow:o('{followMe}#L{加关注}'),block:o('
    #L{已加入黑名单}|#L{解除}
    '),loading:o('#L{加关注}'),followMe:o('')};var e=function(B,y){y=y||{};var A=B;for(var z in y){A=A.replace("{"+z+"}",y[z])}return A};var n=function(z){var y=c.core.dom.sizzle("a[action-data*=uid="+z+"]",q)[0],B;if(!y){return}do{var A=y.getAttribute("node-type");if(A==="followBtnBox"){B=y;break}y=y.parentNode}while(y&&y.tagName.toLowerCase()!=="body");return B};var u={followed:function(z){var B=n(z.uid);if(!B){return}var D="addbtn_d",E=g.singleFollow,A="unFollow",C=z.relation||{};if(C.following&&C.follow_me){D="addbtn_c";E=g.bothFollow;A="unFollow"}var y=e(w.follow,{className:D,focDoc:E,actionType:A,uid:z.uid,fnick:z.fnick});B.innerHTML=y||""},unFollow:function(y){var z=n(y.uid);if(!z){return}var A=y.relation||{};temp=e(w.unFollow,{followMe:A.follow_me?w.followMe:"",uid:y.uid,fnick:y.fnick});z.innerHTML=temp},blocked:function(z){var A=n(z.uid);if(!A){return}var y=e(w.block,{uid:z.uid,fnick:z.fnick});A.innerHTML=y}};var l={followListener:function(y){u.followed(y)},unFollowListener:function(y){u.unFollow(y)},blockListener:function(y){u.blocked(y)},unBlockListener:function(y){u.unFollow(y)},removeFansListener:function(y){var z=y.relation||{};if(z.following){u.followed(y)}else{u.unFollow(y)}}};var d={follow:function(y){var A=c.sizzle("span",y.el)[0];A.innerHTML=w.loading;var z=c.kit.extra.merge({onSuccessCb:function(B){s.show({uid:B.uid,fnick:B.fnick,groupList:B.group,hasRemark:true})}},y.data||{});t.follow(z)},unFollow:function(y){x.setLayerXY(y.el);x.aniShow();x.okCallback=function(){t.unFollow(y.data)}},unBlock:function(y){c.ui.confirm(o("#L{确认将此用户从你的黑名单中解除吗?}"),{OK:function(){t.unBlock(y.data)}})}};var r=function(){j();k()};var j=function(){m.register("block",l.blockListener);m.register("follow",l.followListener);m.register("unBlock",l.unBlockListener);m.register("unFollow",l.unFollowListener);m.register("removeFans",l.removeFansListener)};var k=function(){f.add("follow","click",d.follow);f.add("unBlock","click",d.unBlock);f.add("unFollow","click",d.unFollow)};var p=function(y){if(!c.core.dom.isNode(y)){throw"[STK.common.relation.baseFollow]:node is not a Node!"}};var v=function(){f.destroy();s.destroy();m.remove("block",l.blockListener);m.remove("follow",l.followListener);m.remove("unBlock",l.unBlockListener);m.remove("unFollow",l.unFollowListener);m.remove("removeFans",l.removeFansListener);l=null};r();i.destroy=v;return i}});STK.register("comp.liftingWindow",function(i){var m=i.core.ani.tween;var n=i.core.io.ajax;var e="";var j=0;var k=100000;var c=function(){if(j==0){n({url:"http://vgirl.weibo.com/interface/msg.php?act=send",args:{uid:i.E("vg_w_Thanks").getAttribute("pvalue"),type:i.E("vg_w_Thanks").getAttribute("ptype")},method:"post",onComplete:function(o){if(o.code=="A00006"){i.E("vg_w_Thanks").innerHTML="已答谢";i.core.dom.addClassName(i.E("vg_w_Thanks"),"layer_window_click")}}});j=1}};var f=function(){if(i.E("msg_id")){e=i.E("msg_id").getAttribute("pvalue")}n({url:"/interface/msg.php?act=get&t="+Math.random()*100,args:{id:e},onComplete:function(o){if(o.code=="A00006"){j=0;l();if(o.type=="bbs"){i.E("lifting_mes").innerHTML="今日社区推荐"}else{i.E("lifting_mes").innerHTML="信息提示"}i.E("mes_box").innerHTML=o.data;if(i.E("vg_w_Thanks")){i.core.evt.addEvent(i.E("vg_w_Thanks"),"click",c)}}},onFail:function(){},method:"post"})};var b=setInterval(f,k);var a=function(){f()};setTimeout(a,15000);var h=0;var d=0;var g=0;var l=function(){i.core.dom.removeNode(i.E("vg_big_box"));var o=document.createElement("div");o.setAttribute("id","vg_big_box");document.body.appendChild(o);var t='
    信息提示
    ';o.innerHTML=t;var s={};var q=i.E("zoomout");var x=i.E("vg_mes_box");var w=i.E("skin_tit");var v=function(){function B(){i.core.dom.removeClassName(w,"skin_css_style")}function A(){i.core.dom.addClassName(w,"skin_css_style")}function z(){i.core.dom.removeClassName(w,"skin_css_style")}function y(){i.core.dom.addClassName(w,"skin_css_style")}setTimeout(B,100);setTimeout(A,200);setTimeout(z,400);setTimeout(y,600)};s.up=function(){m(x).play({bottom:0,duration:1000})};if(h==1||d==1){if(g==0){}else{i.core.dom.addClassName(w,"layer_window_cur");i.core.dom.addClassName(q,"layer_big_down");v();x.style.bottom=-137+"px";g=1}}else{s.up()}var r=function(z){function y(A){if(A&&A.stopPropagation){A.stopPropagation()}else{window.event.cancelBubble=true}}y(z);if(g==0){window.clearInterval(b);b=setInterval(f,k);i.core.dom.addClassName(w,"layer_window_cur");i.core.dom.addClassName(q,"layer_big_down");q.setAttribute("title","展开");g=1;m(x).play({bottom:-137,duration:1000});if(h==0){h=1;d=1}else{if(d==0){h=1;d=1}}return false}else{window.clearInterval(b);b=setInterval(f,k);i.core.dom.removeClassName(q,"layer_big_down");i.core.dom.removeClassName(w,"skin_css_style");q.setAttribute("title","缩小");m(x).play({bottom:0,duration:1000});if(d==1){d=0;h=0}g=0;return false}};var p=i.sizzle('[node-type="follow_layer"]')[0];if(p){i.common.relation.baseFollow(p)}var u=function(){if(g==0){g=1}else{window.clearInterval(b);b=setInterval(f,k);i.core.dom.removeClassName(w,"layer_window_cur");i.core.dom.removeClassName(w,"skin_css_style");i.core.dom.removeClassName(q,"layer_big_down");q.setAttribute("title","缩小");m(x).play({bottom:0,duration:1000});g=0;d=0;h=0}};i.core.evt.addEvent(w,"click",u);i.core.evt.addEvent(q,"click",r)}});STK.register("comp.defaultPage.nav",function(f){var a=f.sizzle("[data-type='nav']");var j=f.sizzle("[data-type='nav'] > ul > li");var d=f.E("active");var g=function(k){for(var i in k){return false}return true};if(g(a)){return}var c=function(){for(var i=0;i0?" ":"")+"hover";if(d.E("closetip")){d.E("closetip").style.display="none"}};q[p].onmouseout=function(){this.className=this.className.replace(new RegExp("( ?|^)hover\\b"),"");if(d.E("closetip")){d.E("closetip").style.display="block"}}}}}c();function b(){c()}var a;a=setInterval(b,30000)}});STK.pageletM.register("pl.content.noticeList",function(a){});STK.pageletM.start();