(function(){var O,B=window.NTES=window.$=function($,_){if(null==$||$.$)return $;var C;if("string"===typeof $){_=_||(this.alert?document:this);C=U.query($,_)}else C=$;if(C&&!C.$)if(C.nodeType){if("unknown"!==typeof C.getAttribute)C=E(C,B.element)}else C=E(A(C),B.element);return C};B.version="1.0.0 RC2 Build 090723";var U={SPACE:/\s*([\s>~+,])\s*/g,ISSIMPLE:/^#?([\w\u00c0-\uFFFF_-]+)$/,IMPLIEDALL:/([>\s~\+,]|^)([#\.\[:])/g,ATTRALUES:/=(["'])([^'"]*)\1]/g,ATTR:/\[\s*([\w\u00c0-\uFFFF_-]+)\s*(?:(\S?\=)\s*(.*?))?\s*\]/g,BEGINIDAPART:/^(?:\*#([\w\u00c0-\uFFFF_-]+))/,STANDARD:/^[>\s~\+:]/,STREAM:/[#\.>\s\[\]:~\+]+|[^#\.>\s\[\]:~\+]+/g,ISINT:/^\d+$/,tempAttrValues:[],tempAttrs:[],idName:"uniqueidforntes",id:0,query:function($,I){var _,G,D,C,B,J,K,E,H,L;$=$.trim();if(""===$)return;if(this.ISSIMPLE.test($))if(0===$.indexOf("#")&&typeof I.getElementById!=="undefined")return this.getElemById(I,$.substr(1));else if(typeof I.getElementsByTagName!=="undefined")return A(I.getElementsByTagName($));if(!T(I))I=I.nodeType?[I]:A(I);G=$.replace(this.SPACE,"$1").replace(this.ATTRALUES,this.analyzeAttrValues).replace(this.ATTR,this.analyzeAttrs).replace(this.IMPLIEDALL,"$1*$2").split(",");D=G.length;C=-1;_=[];while(++C<D){J=I;$=G[C];if(this.BEGINIDAPART.test($))if(typeof I[0].getElementById!=="undefined"){J=[this.getElemById(I[0],RegExp.$1)];if(!J[0])continue;$=RegExp.rightContext}else $=G[C];if($!==""){if(!this.STANDARD.test($))$=" "+$;K=$.match(this.STREAM)||[];E=K.length;B=0;while(B<E){H=K[B++];L=K[B++];J=this.operators[H]?this.operators[H](J,L):[];if(0===J.length)break}}F(_,J)}this.tempAttrValues.length=this.tempAttrs.length=0;return _.length>1?this.unique(_):_},analyzeAttrs:function(_,B,A,$){return"[]"+(U.tempAttrs.push([B,A,$])-1)},analyzeAttrValues:function($,A,_){return"="+(U.tempAttrValues.push(_)-1)+"]"},generateId:function(_){var B=this.idName,$;try{$=_[B]=_[B]||++this.id}catch(A){$=_.getAttribute(B);if(!$){$=++this.id;_.setAttribute(B,$)}}return $},unique:function(C){var A=[],D=0,B={},_,$;while(_=C[D++])if(1===_.nodeType){$=this.generateId(_);if(!B[$]){B[$]=true;A.push(_)}}return A},attrMap:{"class":"className","for":"htmlFor"},getAttribute:function($,A){var _=this.attrMap[A]||A,B=$[_];if("string"!==typeof B)if("undefined"!==typeof $.getAttributeNode){B=$.getAttributeNode(A);B=O==B?B:B.value}else if($.attributes)B=String($.attributes[A]);return null==B?"":B},getElemById:function(A,$){var _=A.getElementById($);if(_&&_.id!==$&&A.all){_=A.all[$];if(_){for(var B=0;B<_.length;B++)if(this.getAttribute(_[B],"id")===$)return _[B];_=null}}return _},getElemsByTagName:function(F,H,E,D,_){var A=[],I=-1,G=F.length,$,C,B;_=_||Number.MAX_VALUE;if(D!=="*")B=D.toUpperCase();while(++I<G){$=F[I][H];C=0;while($&&C<_){if($.nodeName===B||$.nodeName===D||(!B&&1===$.nodeType)){A.push($);C++}$=$[E]}}return A},getElemsByAttribute:function(B,D){var _=[],$,E=0,A=this.attrOperators[D[1]||""],C="~="===D[1]?" "+D[2]+" ":D[2];while($=B[E++])A(this.getAttribute($,D[0]),C)&&_.push($);return _},operators:{"#":function(_,$){return U.getElemsByAttribute(_,["id","=",$])}," ":function(A,_){var B=A.length;if(1===B)return A[0].getElementsByTagName(_);else{var $=[],C=-1;while(++C<B)F($,A[C].getElementsByTagName(_))}return $},".":function($,_){return U.getElemsByAttribute($,["class","~=",_])},">":function(_,$){return U.getElemsByTagName(_,"firstChild","nextSibling",$)},"[]":function($,_){_=U.tempAttrs[_];if(_){if(U.ISINT.test(_[2]))_[2]=U.tempAttrValues[_[2]];return U.getElemsByAttribute($,_)}else return $}},attrOperators:{"":function($){return $!==""},"=":function(_,$){return $===_},"~=":function(_,$){return(" "+_+" ").indexOf($)>=0},"!=":function(_,$){return $!==_}}};B.element={$:function($,_){return B.call(this,$,_)},addCss:function($){return B.style.addCss(this,$)},removeCss:function($){return B.style.removeCss(this,$)},addEvent:function(_,A,$){return B.event.addEvent(this,_,A,$)}};window.addEvent=document.addEvent=B.element.addEvent;var G={};B.util={isArray:function($){return Object.prototype.toString.call($)==="[object Array]"},toArray:function($){if(T($))return $;else if($.toArray)return $.toArray();else{var _=[],A=$.length;while(A)_[--A]=$[A];return _}},merge:function(_,$){var B=$.length,A=_.length;while(--B>=0)_[A+B]=$[B];return _},parseTpl:function(B,$,A){var C=G[B];$=null==$?{}:$;if(!C){var _="var _=[],print=function(){_.push.apply(_,arguments);};with(obj){_.push('"+B.replace(/[\r\t\n]/g," ").replace(/'(?=[^#]*#>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,"',$1,'").split("<#").join("');").split("#>").join("_.push('")+"');}return _.join('');";C=new Function("obj",_);if(null==A||true===A)G[B]=C}return C($)},extend:function($,A){for(var _ in A)$[_]=A[_];return $}};B.dom={eachNode:function(_,A,$){if(!_)return;if(_.nodeType||_.alert)A.apply(_,$);else{var C=-1,B=_.length;while(++C<B)A.apply(_[C],$)}return _}};var T=B.util.isArray,A=B.util.toArray,F=B.util.merge,E=B.util.extend,Q=document.documentElement,$=document.body,S=document.getElementsByTagName("head")[0],J=document.createElement("div"),N=/\-([a-z])/gi,M=/(^|:|;)float(?=:|;|$)/gi,H=J.style.styleFloat!==O?"styleFloat":"cssFloat",_=/([^:;]+)/g,K=/\s+/,D=/\s*([:;\s])\s*/g,I=/([^:;]+)(?=:)/g;function P($,_){return _.toUpperCase()}function R($,A,_){return A+H+_}B.style={parse:function(B){B=B.replace(D,"$1");var A=B.indexOf(";")>=0,$=B.indexOf(":")>=0;if(A||$){B=B.replace($?I:_,function($,_){return _.replace(N,P)});B=B.replace(M,R).match(_);B.styleType="style";if($&&B.length%2!==0)throw"invalid inline style"}else{B=B.split(K);B.styleType="class"}return B},addCss:function($,_){_=this.parse(_);return B.dom.eachNode($,"class"===_.styleType?function($,A){var _=" "+this.className+" ";for(var B=0;B<A;B++)if(-1===_.indexOf(" "+$[B]+" "))_+=($[B]+" ");this.className=_.trim()}:function($,_){var A=0;while(A<_)this.style[$[A++]]=$[A++].replace(/^NULL$/i,"")},[_,_.length])},removeCss:function($,_){_=this.parse(_);return B.dom.eachNode($,"class"===_.styleType?function($,A){var _=" "+this.className+" ";for(var B=0;B<A;B++)_=_.replace(" "+$[B]+" "," ");this.className=_.trim()}:function($,_){for(var A=0;A<_;A++)if(this.style[$[A]]!==O)this.style[$[A]]=""},[_,_.length])}};B.event={idName:"eventIdForNTES",eventsWrapper:"eventsForNTES",eventId:0,addEvent:function(A,_,C,$){return B.dom.eachNode(A,function(_,A){A=B.event.delegate(this,_,A,$);if(this.attachEvent)this.attachEvent("on"+_,A);else if(this.addEventListener)this.addEventListener(_,A,false)},[_,C])},delegate:function(_,D,F,C){var A=_[this.eventsWrapper]=_[this.eventsWrapper]||{},$=F[this.idName]=F[this.idName]||++this.eventId;A[D]=A[D]||{};var E=A[D][$];if(!E){E=function($){$=B.event.fix($);false===F.call(_,$,C||{})&&$.preventDefault()};A[D][$]=E}return E},fix:function(_){_.preventDefault=_.preventDefault||function(){_.returnValue=false};if(O===_.pageX&&O!==_.clientX){_.pageX=_.clientX+(Q.scrollLeft||$.scrollLeft||0)-(Q.clientLeft||0);_.pageY=_.clientY+(Q.scrollTop||$.scrollTop||0)-(Q.clientTop||0)}return _}};var C=navigator.userAgent.toLowerCase();B.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};B.ajax={createXhr:function(){var _;try{_=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()}catch($){}if(!_)throw"failed to create an XMLHttpRequest object";return _},send:function(F,C,B,G,A){A=A||this.createXhr();var D;C=C.toUpperCase();C=C!=="GET"&&C!=="POST"?"GET":C;G=G||{};G.async="boolean"===typeof G.async?G.async:true;var _;if(B){_=[];for(var $ in B)_.push($+"="+encodeURIComponent(B[$]));_=_.join("&").replace(/%20/g,"+")}if(G.async&&!isNaN(G.timeout)&&G.timeout>0)setTimeout(function(){if(!D){A.abort();if(G.onTimeout)G.onTimeout(A)}},G.timeout);A.onreadystatechange=function(){if(4==A.readyState){D=true;var $=200==A.status?"onSuccess":"onError";G[$]&&G[$](A)}};if(_&&"GET"===C){F+=("?"+_);_=null}A.open(C,F,G.async,G.username,G.password);if(G.headers)for(var E in G.headers)A.setRequestHeader(E,G.headers[E]);"POST"===C&&A.setRequestHeader("Content-Type","application/x-www-form-urlencoded");A.send(_);return A},importJs:function(B,$,_){var A=document.createElement("script");A.src=B;A.language="javascript";A.type="text/javascript";if(_)A.charset=_;A.onload=A.onreadystatechange=function(){if(!this.readyState||this.readyState=="loaded"||this.readyState=="complete"){$&&$(this);A.onload=A.onreadystatechange=null;this.parentNode.removeChild(A)}};S.appendChild(A)}};B.cookie={encoder:window.encodeURIComponent,decoder:window.decodeURIComponent,get:function(A){A=B.cookie.encoder(A)+"=";var $=document.cookie,_=$.indexOf(A),C;if(-1===_)return"";_+=A.length;C=$.indexOf(";",_);if(C===-1)C=$.length;return B.cookie.decoder($.substring(_,C))},set:function(A,F,$,E,D,C){var _=[B.cookie.encoder(A)+"="+B.cookie.encoder(F)];if($){var G;if(!isNaN($)){G=new Date();G.setTime(G.getTime()+$*60*1000)}else G=$;_.push("expires="+G.toUTCString())}D!=null&&D!==""&&_.push("path="+D);E&&_.push("domain="+E);C&&_.push("secure");document.cookie=_.join(";")},del:function($,A,_){document.cookie=B.cookie.encoder($)+"="+(_!=null&&_!==""?";path="+_:"")+(A?";domain="+A:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};B.ui={};var L=function(_,$){return(_+1)%$};B.ui.Slide=function(_,C,F,E,A){if(!arguments.length)return;var $=this;$.total=C.length;if(_&&$.total!==_.length)throw"can not match ctrls("+_.length+") and contents("+$.total+")";$.constructor=arguments.callee;$._curIndex=-1;$._ctrls=_;$._contents=C;$._css=F;$._eventName=E;$.interval=A;$.playMode=L;if($._ctrls&&$._ctrls.length&&$._eventName){var D=function(_,$){this.show($);_.preventDefault()}.bind($);for(var G=$.total-1;G>=0;G--)B.event.addEvent($._ctrls[G],E,D,new Number(G))}$.interval&&$.play()};B.ui.Slide.prototype={show:function(_){var A=this;_=_<0?0:_>=A.total?A.total-1:_;var C=A._ctrls?A._ctrls[_]:null,$=A._contents[_];if(-1===A._curIndex)A._curIndex=0;B.style.removeCss(A._ctrls,A._css);B.style.removeCss(A._contents,A._css);B.style.addCss(C,A._css);B.style.addCss($,A._css);A.onShow&&A.onShow(_,C,$);A._curIndex=_},showNext:function(){this.show(this.playMode(this._curIndex,this.total))},play:function(A){var _=this;if(!isNaN(A))_.interval=parseInt(A);if(O===_._timerId){if(!_._hasEvent){var $=_.pause.bind(_),C=_.play.bind(_);B.event.addEvent(_._ctrls,"mouseover",$);B.event.addEvent(_._ctrls,"mouseout",C);B.event.addEvent(_._contents,"mouseover",$);B.event.addEvent(_._contents,"mouseout",C);_._hasEvent=1}_._timerId=setInterval(_.showNext.bind(_),_.interval)}},pause:function(){var _=this;if(_._timerId!==O){clearInterval(_._timerId);_._timerId=O;if(_.onStop){var $=_._curIndex;_.onStop($,_._ctrls[$],_._contents[$])}}}};String.prototype.trim=function($){return this.replace(null==$?/^\s+|\s+$/g:new RegExp("^"+$+"+|"+$+"+$","g"),"")};String.format=function($){var _=arguments,A=new RegExp("%([1-"+_.length+"])","g");return String($).replace(A,function($,A){return _[A]})};Array.prototype.indexOf=Array.prototype.indexOf||function($,_){var B=isNaN(_)||_<0?-1:_-1,A=this.length;while(++B<A)if(this[B]===$)return B;return-1};Function.prototype.bind=function(){if(!arguments.length)return this;var _=this,$=Array.prototype.slice.call(arguments),A=$.shift();return function(){return _.apply(A,$.concat(Array.prototype.slice.call(arguments)))}}})()