(function(){var count=0;var $E=function(id){if(typeof id==="string"){return document.getElementById(id)}else{return id}};function trim(str){if(typeof str!=="string"){throw"trim need a string as parameter"}if(typeof str.trim==="function"){return str.trim()}else{return str.replace(/^(\u3000|\s|\t|\u00A0)*|(\u3000|\s|\t|\u00A0)*$/g,"")}}function addEvent(sNode,sEventType,oFunc){var oElement=$E(sNode);if(oElement==null){return false}sEventType=sEventType||"click";if((typeof oFunc).toLowerCase()!="function"){return}if(oElement.attachEvent){oElement.attachEvent("on"+sEventType,oFunc)}else{if(oElement.addEventListener){oElement.addEventListener(sEventType,oFunc,false)}else{oElement["on"+sEventType]=oFunc}}return true}function jsonToQuery(JSON,isEncode){var _fdata=function(data,isEncode){data=data==null?"":data;data=trim(data.toString());if(isEncode){return encodeURIComponent(data)}else{return data}};var _Qstring=[];if(typeof JSON=="object"){for(var k in JSON){if(JSON[k] instanceof Array){for(var i=0,len=JSON[k].length;i<len;i++){_Qstring.push(k+"="+_fdata(JSON[k][i],isEncode))}}else{if(typeof JSON[k]!="function"){_Qstring.push(k+"="+_fdata(JSON[k],isEncode))}}}}if(_Qstring.length){return _Qstring.join("&")}else{return""}}var sendMessage=function(oArgs){var data=jsonToQuery(oArgs);data=escape(data);if(window.postMessage){parent.postMessage(data,"*")}else{window.parent.name=(new Date()).getTime()+(count++)+"^"+document.domain+"&"+window.escape(data)}};var sendIframeSize=function(){var size={width:document.body.clientWidth,height:document.body.clientHeight+40};sendMessage(size)};var init=function(){addEvent(window,"load",sendIframeSize);addEvent(document.body,"DOMSubtreeModified",sendIframeSize);addEvent(document.body,"DOMNodeInserted",sendIframeSize);addEvent(document.body,"DOMNodeRemoved",sendIframeSize)};init()})();if(typeof $CONFIG=="undefined"||!$CONFIG){$CONFIG={}}var scope=$CONFIG;Function.prototype.bind2=function(object){var __method=this;return function(){return __method.apply(object,arguments)}};scope.isWeiboHost=false;scope.$VERSION="t35";scope.$BASEHOST="http://timg.sjs.sinajs.cn/";scope.$BASEIMG=scope.$BASECSS=scope.$BASEHOST="http://timg.sjs.sinajs.cn/"+scope.$VERSION+"/";scope.$OPENTIMG=scope.$BASEHOST+"/appstyle/opent/";scope.$BASESTYLE=scope.$BASEHOST+"style/";scope.$BLANKIMG=scope.$BASESTYLE+"images/common/transparent.gif";scope.$BASEJS="http://tjs.sjs.sinajs.cn/"+scope.$VERSION+"/";scope.$BASESTATIC="http://tjs.sjs.sinajs.cn/"+scope.$VERSION+"/";scope.$BASEHOST=/weibo.com/.test(location.hostname)?"weibo.com":"t.sina.com.cn";scope._ua=navigator.userAgent.toLowerCase();scope.$IE=/msie/.test(scope._ua);scope.$OPERA=/opera/.test(scope._ua);scope.$MOZ=/gecko/.test(scope._ua);scope.$IE5=/msie 5 /.test(scope._ua);scope.$IE55=/msie 5.5/.test(scope._ua);scope.$IE6=/msie 6/.test(scope._ua);scope.$IE7=/msie 7/.test(scope._ua);scope.$SAFARI=/safari/.test(scope._ua);scope.$winXP=/windows nt 5.1/.test(scope._ua);scope.$winVista=/windows nt 6.0/.test(scope._ua);var $IE=scope.$IE,$MOZ=scope.$MOZ,$IE6=scope.$IE6;function $Import(url){}var Boot={};Boot.addDOMLoadEvent=function(func){if(!window.__load_events){var init=function(){if(arguments.callee.done){return}arguments.callee.done=true;if(window.__load_timer){clearInterval(window.__load_timer);window.__load_timer=null}for(var i=0;i<window.__load_events.length;i++){window.__load_events[i]()}window.__load_events=null};if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,false)}if(/WebKit/i.test(navigator.userAgent)){window.__load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}if(window.ActiveXObject){window.__load_timer=setInterval(function(){try{document.body.doScroll("left");init()}catch(ex){}},10)}window.onload=init;window.__load_events=[]}window.__load_events.push(func)};Boot.getJsVersion=function(){var ver=false;if($CONFIG){ver=$CONFIG.js?$CONFIG.js:""}if(ver){return"?v="+ver}else{return""}};try{Boot.addDOMLoadEvent(main)}catch(e){}var $Debug=(function(){var contentList=[];function add_to_content(sText,oOpts,sCMD){var key;var text=sText!=null?sText:"";var opts={color:null,bgcolor:null,html:null};var cmd=sCMD!=null?sCMD:"log";oOpts=oOpts!=null?oOpts:{};for(key in opts){if(oOpts[key]!=null){opts[key]=oOpts[key]}}contentList.push({label:text,cmd:cmd,opts:opts,time:new Date()})}function debug_proto(sText,oOpts){add_to_content(sText,oOpts,"log")}debug_proto.fatal=function(sText,oOpts){add_to_content(sText,oOpts,"fatal")};debug_proto.error=function(sText,oOpts){add_to_content(sText,oOpts,"error")};debug_proto.warning=function(sText,oOpts){add_to_content(sText,oOpts,"warning")};debug_proto.info=function(sText,oOpts){add_to_content(sText,oOpts,"info")};debug_proto.log=function(sText,oOpts){add_to_content(sText,oOpts,"log")};debug_proto.clear=function(){contentList=[]};debug_proto.contentList=contentList;return debug_proto})();if(typeof trace=="undefined"){trace=traceError=$Debug}if(typeof Sina=="undefined"){Sina={}}Sina.pkg=function(ns){if(!ns||!ns.length){return null}var levels=ns.split(".");var nsobj=Sina;for(var i=(levels[0]=="Sina")?1:0;i<levels.length;++i){nsobj[levels[i]]=nsobj[levels[i]]||{};nsobj=nsobj[levels[i]]}return nsobj};function $E(oID){var node=typeof oID=="string"?document.getElementById(oID):oID;if(node!=null){return node}else{}return null}function $C(tagName){return document.createElement(tagName)}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}if(typeof Jobs=="undefined"){var Jobs={}}(function(){var isReady=false;var readyList=[];var timer;var ready=function(fn,jobName){var fun=function(){setTimeout(function(){var startTime=new Date();try{fn.call(document)}catch(e){$Debug.fatal("<b>Job ["+jobName+"] 执行失败!</b><br/>&nbsp;"+e.name+"<br/>&nbsp;"+(e.message||e.description)+(e.fileName?"<br/>&nbsp;"+e.fileName:"")+(e.lineNumber?"<br/>&nbsp;"+e.lineNumber:""),{html:true})}finally{$Debug.info("<b>Job ["+jobName+"] 执行("+(new Date()-startTime)+"毫秒)</b>",{html:true})}},10)};if(isReady){fun()}else{readyList.push(fun)}return this};var onDOMReady=function(){for(var i=0;i<readyList.length;i++){readyList[i]()}readyList=null};var bindReady=function(evt){if(isReady){return}isReady=true;onDOMReady.call(window);if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",bindReady,false)}else{if(document.attachEvent){document.detachEvent("onreadystatechange",bindReady);if(window==window.top){clearInterval(timer);timer=null}}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",bindReady,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if((/loaded|complete/).test(document.readyState)){bindReady()}});if(window==window.top){timer=setInterval(function(){try{isReady||document.documentElement.doScroll("left")}catch(e){return}bindReady()},500)}}}Jobs.regist=function(sJobName,oJobFunc){ready(oJobFunc,sJobName)}})();if(typeof App=="undefined"){var App={}}Sina.pkg("Core");if(typeof Core=="undefined"){Core=Sina.Core}Sina.pkg("Core.Events");Core.Events.addEvent=function(elm,func,evType,useCapture){var _el=$E(elm);if(_el==null){$Debug("addEvent 找不到对象："+elm);return}if(typeof useCapture=="undefined"){useCapture=false}if(typeof evType=="undefined"){evType="click"}if(_el.addEventListener){_el.addEventListener(evType,func,useCapture);return true}else{if(_el.attachEvent){var r=_el.attachEvent("on"+evType,func);return true}else{_el["on"+evType]=func}}};Sina.pkg("Core.System");Core.System.winSize=function(_target){var w,h;if(_target){target=_target.document}else{target=document}if(self.innerHeight){if(_target){target=_target.self}else{target=self}w=target.innerWidth;h=target.innerHeight}else{if(target.documentElement&&target.documentElement.clientHeight){w=target.documentElement.clientWidth;h=target.documentElement.clientHeight}else{if(target.body){w=target.body.clientWidth;h=target.body.clientHeight}}}return{width:w,height:h}};Core.System.pageSize=function(_target){if(_target){target=_target.document}else{target=document}var _rootEl=(target.compatMode=="CSS1Compat"?target.documentElement:target.body);var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=_rootEl.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY}else{if(_rootEl.scrollHeight>_rootEl.offsetHeight){xScroll=_rootEl.scrollWidth;yScroll=_rootEl.scrollHeight}else{xScroll=_rootEl.offsetWidth;yScroll=_rootEl.offsetHeight}}var win_s=Core.System.winSize(_target);if(yScroll<win_s.height){pageHeight=win_s.height}else{pageHeight=yScroll}if(xScroll<win_s.width){pageWidth=win_s.width}else{pageWidth=xScroll}return[pageWidth,pageHeight,win_s.width,win_s.height]};(function(){var _addEvent=Core.Events.addEvent;App.AuthDialog={init:function(options){options=options||{};var src="https://api.weibo.com/oauth2/authorize?response_type=token&client_id="+options.client_id+"&redirect_uri="+encodeURIComponent(options.redirect_uri);var _width="561",_heght="314";var _html="<iframe frameBorder='0' scrolling='no' width='"+_width+"' height='"+_heght+"' allowtransparency='true' src='"+src+"' ></iframe>";var _authDiv=document.createElement("div");_authDiv.id="authDiv";_authDiv.style.width=_width+"px";_authDiv.style.height=_heght+"px";_authDiv.style.position="relative";_authDiv.style.overflow="hidden";_authDiv.style.textAlign="center";_authDiv.innerHTML=_html;_authDiv.style.display="none";document.body.appendChild(_authDiv);this.authDiv=_authDiv},show:function(options){options=options||{height:120,client_id:"",redirect_uri:""};if(options.client_id==""||typeof options.client_id=="undefined"||options.redirect_uri==""||typeof options.redirect_uri=="undefined"){throw new Error("no client_id or redirect_uri found.")}if(this.authDiv==null){this.init({client_id:options.client_id,redirect_uri:options.redirect_uri})}this.authDiv.style.display="";var ow=this.authDiv.offsetWidth;var oh=this.authDiv.offsetHeight;var winSize=Core.System.winSize();var tx=(winSize.width-ow)/2;var ty=(winSize.height-oh)/2;this.authDiv.style.left=tx+"px";this.authDiv.style.top=(options.height||ty)+"px"}}})();
