(function(){var _=window.NTES=window.$=function(A,B){if(null==A||A.$)return A;var C;if("string"===typeof A){if(!B&&!this.alert)B=this;B=B||document;C=F.query(A,B)}else C=A;if(C&&!C.$)if(C.nodeType&&"unknown"!==typeof C.getAttribute)C=_.Util.extend(C,_.Element);else C=_.Util.extend($(C),_.Element);return C};_.version="0.9.6.2";var F={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,PSEUDOSEQ:/\(([^\(\)]*)\)$/g,BEGINIDAPART:/^(?:\*#([\w\u00c0-\uFFFF_-]+))/,STANDARD:/^[>\s~\+:]/,STREAM:/[#\.>\s\[\]:~\+]+|[^#\.>\s\[\]:~\+]+/g,ISINT:/^\d+$/,tempAttrValues:[],tempAttrs:[],idName:"uniqueIdForNTES",id:1,query:function(_,J){var A,H,F,D,B,K,L,G,I,M;_=_.trim();if(""===_)return;if(this.ISSIMPLE.test(_))if(0===_.indexOf("#")&&typeof J.getElementById!=="undefined")return this.getElemById(J,_.substr(1));else if(typeof J.getElementsByTagName!=="undefined")return $(J.getElementsByTagName(_));if(!E(J))J=J.nodeType?[J]:$(J);H=_.replace(this.SPACE,"$1").replace(this.ATTRALUES,this.analyzeAttrValues).replace(this.ATTR,this.analyzeAttrs).replace(this.IMPLIEDALL,"$1*$2").split(",");F=H.length;D=-1;A=[];while(++D<F){K=J;_=H[D];if(this.BEGINIDAPART.test(_))if(typeof J[0].getElementById!=="undefined"){K=[this.getElemById(J[0],RegExp.$1)];if(!K[0])continue;_=RegExp.rightContext}else _=H[D];if(_!==""){if(!this.STANDARD.test(_))_=" "+_;L=_.match(this.STREAM)||[];G=L.length;B=0;while(B<G){I=L[B++];M=L[B++];K=this.operators[I]?this.operators[I](K,M):[];if(0===K.length)break}}C(A,K)}this.tempAttrValues.length=this.tempAttrs.length=0;return this.unique(A)},analyzeAttrs:function(_,B,A,$){return"[]"+(F.tempAttrs.push([B,A,$])-1)},analyzeAttrValues:function($,A,_){return"="+(F.tempAttrValues.push(_)-1)+"]"},generateId:function(_){var $=_.getAttribute(this.idName);if(!$){$=this.id++;_.setAttribute(this.idName,$)}return $},unique:function(D){var A=[],E=0,C=D.length,B={},_,$;while(_=D[E++])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(typeof $.getAttributeNode!=="undefined"){B=$.getAttributeNode(A);B=null==B?B:B.value}else if($.attributes!=null)B=String($.attributes[A]);return null==B?"":B},getElemById:function(A,$){var _=A.getElementById($);if(_&&_.id!==$&&A.all){_=A.all[$];for(var B=0;B<_.length;B++)if(this.getAttribute(_[B],"id")===$)return _[B];_=null}return _},getElemsByTagName:function(B,E,A){var _=[],$,F=-1,D=B.length,C=false;if("*"===A)C=true;else A=A.toUpperCase();while(++F<D){$=B[F][E];while($){if($.nodeName===A||C)_.push($);$=$.nextSibling}}return _},getElemsByAttribute:function(B,D){var _=[],$,E=0,A=this.attrOperators[D[1]||""],C="~="===D[1]?" "+D[2]+" ":D[2];while($=B[E++])if(A(this.getAttribute($,D[0]),C))_.push($);return _},operators:{"#":function(_,$){return F.getElemsByAttribute(_,["id","=",$])}," ":function(A,_){var B=A.length;if(1===B)return A[0].getElementsByTagName(_);else{var $=[],D=-1;while(++D<B)C($,A[D].getElementsByTagName(_))}return $},".":function($,_){return F.getElemsByAttribute($,["class","~=",_])},">":function(_,$){return F.getElemsByTagName(_,"firstChild",$)},"[]":function($,_){_=F.tempAttrs[_];if(_){if(F.ISINT.test(_[2]))_[2]=F.tempAttrValues[_[2]];return F.getElemsByAttribute($,_)}else return $}},attrOperators:{"":function($){return $!==""},"=":function(_,$){return $===_},"~=":function(_,$){return(" "+_+" ").indexOf($)>=0},"!=":function(_,$){return $!==_}}};_.Element={$:function($,_){return window.$.call(this,$,_)},addCss:function($){$=G.parse($);return this.each("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($){$=G.parse($);return this.each("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]]!=null)this.style[$[A]]=""},[$,$.length])},addEvent:function(A,B){var _,$;if(window.attachEvent){_=function($,_){this.attachEvent($,_)};$=["on"+A,B]}else if(window.addEventListener){_=function($,_){this.addEventListener($,_,false)};$=arguments}return this.each(_,$)},each:function(_,$){if(E(this)){var B=-1,A=this.length;while(++B<A)_.apply(this[B],$)}else _.apply(this,$);return this},toArray:function(){if(E(this))return this;else return[this]}};var G={NAMETOFIX:/\-([a-z])/gi,FIXFLOAT:/(^|:|;)float(?=:|;|$)/gi,FLOATNAME:document.createElement("div").style["styleFloat"]!=null?"styleFloat":"cssFloat",SPLITER:/[^:;]+/g,SPACE:/\s*([:;\s])\s*/g,STYLENAME:/([^:;]+)(?=:)/g,parse:function(A){A=A.replace(this.SPACE,"$1");var _=A.indexOf(";")>=0,$=A.indexOf(":")>=0;if(_||$){if($){A=A.replace(this.STYLENAME,function($,_){return _.replace(G.NAMETOFIX,G.fixName)}).replace(this.FIXFLOAT,this.fixFloat).match(this.SPLITER);if(A.length%2!==0)throw"invalid inline style"}else A=A.match(this.SPLITER);A.styleType="Style"}else{A=A.split(/\s/);A.styleType="Class"}return A},fixName:function($,_){return _.toUpperCase()},fixFloat:function($,A,_){return A+G.FLOATNAME+_}},E=function($){return Object.prototype.toString.call($)==="[object Array]"},D=/#@(\w+)#/g;_.Util={toArray:function($){if(E($))return $;else if($.toArray)return $.toArray();else{var _=[],A=$.length;while(A)_[--A]=$[A];return _}},parseTpl:function(_,$,A){return $?String(_).replace(A||D,function(_,A){return $[A]!=null?$[A]:_}):_},extend:function($,A){for(var _ in A)$[_]=A[_];return $},merge:function(A,_){var C=0,$,B=A.length;while(($=_[C++])!=null)A[B++]=$;return A}};var $=_.Util.toArray,C=_.Util.merge,B=navigator.userAgent.toLowerCase();_.Browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(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=false;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";if(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]);if("POST"===C)A.setRequestHeader("Content-Type","application/x-www-form-urlencoded");A.send(_);return A},importJs:function(C,$,_){var B=document.getElementsByTagName("head")[0],A=document.createElement("script");A.src=C;A.language="javascript";A.type="text/javascript";if(_)A.charset=_;A.onload=A.onreadystatechange=function(){if(!this.readyState||this.readyState=="loaded"||this.readyState=="complete"){if($)$(this);this.parentNode.removeChild(A)}};B.appendChild(A)}};_.Cookie={encoder:escape,decoder:unescape,get:function(A){A=this.encoder(A)+"=";var $=document.cookie,_=$.indexOf(A);if(-1===_)return"";_+=A.length;var B=$.indexOf(";",_);if(B===-1)B=$.length;return this.decoder($.substring(_,B))},set:function(A,E,$,D,C,B){var _=[this.encoder(A)+"="+this.encoder(E)];if($){var F;if(!isNaN($)){F=new Date();F.setTime(F.getTime()+$*60*1000)}else F=$;_.push("expires="+F.toUTCString())}if(C!=null&&C!=="")_.push("path="+C);if(D)_.push("domain="+D);if(B)_.push("secure");document.cookie=_.join(";")},del:function($,A,_){document.cookie=this.encoder($)+"="+(_!=null&&_!==""?";path="+_:"")+(A?";domain="+A:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};_.Event={fix:function(_){_.preventDefault=_.preventDefault||function(){_.returnValue=false};if(null==_.pageX&&null!=_.clientX){var A=document.documentElement,$=document.body;_.pageX=_.clientX+(A.scrollLeft||$.scrollLeft||0)-(A.clientLeft||0);_.pageY=_.clientY+(A.scrollTop||$.scrollTop||0)-(A.clientTop||0)}return _}};var A=function(_,$){return(_+1)%$};_.UI={Slide:function(O,D,S,P,C){var $=D.length;if(O&&$!==O.length)throw"can not match ctrls("+O.length+") and contents("+$+")";var K=-1,B,G,Q,F=A,R,I,H,N;O=_(O||[]);D=_(D);this.setPlayMode=function($){F=$};this.setOnShow=function($){Q=$};I=this.show=function(A){if(A>=0&&A<$&&A!=K){var B=O[A],_=D[A];O.removeCss(S);D.removeCss(S);if(B)B.addCss(S);_.addCss(S);K=A;if(Q)Q(A,B,_)}};G=this.showNext=function(){if(-1==K)K=0;I(F(K,$))};H=this.play=function($){if(!isNaN($))C=$;if(null==B){if(!R){O.addEvent("mouseover",N);O.addEvent("mouseout",H);D.addEvent("mouseover",N);D.addEvent("mouseout",H);R=true}B=setInterval(G,C)}};N=this.pause=function(){if(B!=null){clearInterval(B);B=null}};var E=function(A){I(this);var $=_.Event.fix(A);$.preventDefault();$.cancelBubble=true};for(var J,M,L=D.length-1;L>=0;L--){J=O[L];D[L]=_(D[L]);if(J){O[L]=_(J);if(P)J.addEvent(P,E.bind(new Number(L)))}}if(C>0)H()}};String.prototype.trim=function($){switch(typeof $){case"undefined":return this.replace(/^\s+|\s+$/g,"");case"string":return this.replace(new RegExp("^"+$+"+|"+$+"+$","g"),"");default:return this}};String.prototype.has=function($,_){return"string"===typeof _?(_+this+_).indexOf(_+$+_)>=0:this.indexOf($)>=0};String.format=function($){var _=arguments,A=new RegExp("%([1-"+_.length+"])","g");return String($).replace(A,function($,A){return _[A]})};Function.prototype.bind=function(){if(!arguments.length||null==arguments[0])return this;var _=this,$=Array.prototype.slice.call(arguments),A=$.shift();return function(){return _.apply(A,$.concat(Array.prototype.slice.call(arguments)))}};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};window.toArray=document.toArray=function(){return[this]};window.each=document.each=function(_,$){_.apply(this,$);return this};window.addEvent=document.addEvent=_.Element.addEvent})();