(function(){var A=window.NTES=window.$=function($,B){if(null==$||$.$)return $;var C;if("string"===typeof $){if(!B&&!this.alert)B=this;B=B||document;C=F.query($,B)}else C=$;if(C&&!C.$)if(C.nodeType&&"unknown"!==typeof C.getAttribute)C=A.Util.extend(C,A.Element);else C=A.Util.extend(_(C),A.Element);return C};A.version="0.9.6";var F={SPACE:/\s*([\s>~+,])\s*/g,ISSIMPLE:/^#?([\w\u00c0-\uFFFF_-]+)$/,IMPLIEDALL:/([>\s~\+,]|^)([#\.\[:])/g,ATTVALUES:/=(["'])([^'"]*)\1]/g,ATTS:/\[\s*([\w\u00c0-\uFFFF_-]+)\s*(?:(\S?\=)\s*(.*?))?\s*\]/g,BEGINIDAPART:/^(?:\*#([\w\u00c0-\uFFFF_-]+))/,STANDARD:/^[>\s~\+:]/,STREAM:/[#\.>\s\[\]:~\+]+|[^#\.>\s\[\]:~\+]+/g,ISINT:/^\d+$/,tempAttValues:[],tempAtts:[],query:function($,I){var A,G,D,C,B,J,K,F,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 _(I.getElementsByTagName($));if(!E(I))I=typeof I.nodeType!=="undefined"?[I]:_(I);G=$.replace(this.SPACE,"$1").replace(this.ATTVALUES,this.analyzeAttValues).replace(this.ATTS,this.analyzeAtts).replace(this.IMPLIEDALL,"$1*$2").split(",");D=G.length;C=-1;A=[];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)||[];F=K.length;B=0;while(B<F){H=K[B++];L=K[B++];J=this.operators[H]?this.operators[H](J,L):[];if(0===J.length)break}}A=A.merge(J)}this.tempAttValues.length=this.tempAtts.length=0;return A},analyzeAtts:function(_,B,A,$){return"[]"+(F.tempAtts.push([B,A,$])-1)},analyzeAttValues:function($,A,_){return"="+(F.tempAttValues.push(_)-1)+"]"},getAttribute:function($,_){var A;if(typeof $.getAttributeNode!=="undefined"){A=$.getAttributeNode(_);A=null==A?A:A.value}else if($.attributes!=null)A=String($.attributes[_]);return null==A?"":A},getElemById:function(A,$){var _=A.getElementById($);if(_&&this.getAttribute(_,"id")!==$&&A.all){_=A.all[$];for(var B=0;B<_.length;B++)if(this.getAttribute(_[B],"id")===$)return _[B];_=null}return _},getElemsByTagName:function(C,F,A){var _=[],$,G=-1,E=C.length,B=0,D;if("*"===A)D=true;else A=A.toUpperCase();while(++G<E){$=C[G][F];while($){if($.nodeName===A||(D&&!this.isBlank($)))_[B++]=$;$=$.nextSibling}}return _},getElemsByAttribute:function(B,F){var _=[],G=-1,C=B.length,A=0,E=F[1],$,D;if(null==E)E="";while(++G<C){$=B[G];D=this.getAttribute($,F[0]);if(this.attOperators[E]&&this.attOperators[E](D,F[2]))_[A++]=$}return _},isBlank:function($){switch($.nodeType){case 3:if(!/\S/.test($.nodeValue))return true;break;case 8:return true;case 10:return true}},operators:{"#":function(_,$){return F.getElemsByAttribute(_,["id","=",$])}," ":function(C,A){var _=[],I=-1,H,G=C.length,E,$,B=0,D="*"===A;while(++I<G){$=C[I].getElementsByTagName(A);E=$.length;H=-1;while(++H<E)if(!D||(D&&!F.isBlank($[H])))_[B++]=$[H]}return _},".":function($,_){return F.getElemsByAttribute($,["class","~=",_])},">":function(_,$){return F.getElemsByTagName(_,"firstChild",$)},"[]":function($,_){_=F.tempAtts[_];if(_){if(F.ISINT.test(_[2]))_[2]=F.tempAttValues[_[2]];return F.getElemsByAttribute($,_)}else return $}},attOperators:{"":function($){return $!==""},"=":function(_,$){return $===_},"~=":function(_,$){return(" "+_+" ").indexOf(" "+$+" ")!==-1},"!=":function(_,$){return $!==_}}};A.Element={$:function($,_){return window.$.call(this,$,_)},addCss:function(D){D=$.parse(D);var A=this.toArray(),C=D.length,E=-1,B,_=A.length;switch(D.type){case"class":while(++E<C){B=-1;while(++B<_)if(!A[B].className.has(D[E]," "))A[B].className=""===A[B].className?D[E]:A[B].className+" "+D[E]}break;case"style":while(++E<_){B=0;while(B<C)if(A[E].style[D[B]]!=null)A[E].style[D[B++]]=D[B++].replace(/^NULL$/i,"");else B+=2}break}return this},removeCss:function(E){E=$.parse(E);var B=this.toArray(),D=E.length,F=-1,C,A=B.length;if("class"===E.type){var _;while(++F<D){C=-1;_=" "+E[F]+" ";while(++C<A)B[C].className=(" "+B[C].className+" ").replace(_," ").trim()}}else while(++F<A){C=D;while(--C>=0)if(B[F].style[E[C]]!=null)B[F].style[E[C]]=""}return this},addEvent:function($,B){var _=this.toArray(),A=_.length;if(window.attachEvent){while(--A>=0)_[A].attachEvent("on"+$,B)}else if(window.addEventListener)while(--A>=0)_[A].addEventListener($,B,false);return this},toArray:function(){if(E(this))return this;else return[this]}};var $={JSSTYLENAME:/\-([a-z])/gi,SPLITER:/[^:;]+/g,SPACE:/\s+([:;\s])\s+/,parse:function(A){var _=A.indexOf(";")!==-1,$=A.indexOf(":")!==-1;if(_||$){A=A.replace(this.JSSTYLENAME,function($,_){return _.toUpperCase()}).replace(this.SPACE,"$1").match(this.SPLITER);if($){A.type="style";if(A.length%2!==0)throw new Error("invalid inline style")}else A.type="stylename"}else{A=A.split(/\s/);A.type="class"}return A}},E=function($){return Object.prototype.toString.call($)==="[object Array]"},D=/#@(\w+)#/g;A.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 $}};var _=A.Util.toArray,C=navigator.userAgent.toLowerCase();A.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)};A.Ajax={createXhr:function(){var _;try{_=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()}catch($){}if(!_)throw new Error("failed to create an XMLHttpRequest object");return _},send:function(E,C,B,F,A){A=A||this.createXhr(),hasCompleted=false;C=C.toUpperCase();C=C!=="GET"&&C!=="POST"?"GET":C;F=F||{};F.async="boolean"===typeof F.async?F.async:true;var _;if(B){_=[];for(var $ in B)_.push($+"="+encodeURIComponent(B[$]));_=_.join("&").replace(/%20/g,"+")}if(F.async&&!isNaN(F.timeout)&&F.timeout>0)setTimeout(function(){if(!hasCompleted){A.abort();if(F.onTimeout)F.onTimeout(A)}},F.timeout);A.onreadystatechange=function(){if(4==A.readyState){hasCompleted=true;var $=200==A.status?"onSuccess":"onError";if(F[$])F[$](A)}};if(_&&"GET"===C){E+=("?"+_);_=null}A.open(C,E,F.async,F.username,F.password);if(F.headers)for(var D in F.headers)A.setRequestHeader(D,F.headers[D]);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)}};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"}};A.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 B=function(_,$){return(_+1)%$};A.UI={Slide:function(O,D,S,P,C){var $=D.length;if(O&&$!==O.length)throw new Error("can not match ctrls("+O.length+") and contents("+$+")");var K=-1,_,G,Q,F=B,R,I,H,N;O=A(O||[]);D=A(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==_){if(!R){O.addEvent("mouseover",N);O.addEvent("mouseout",H);D.addEvent("mouseover",N);D.addEvent("mouseout",H);R=true}_=setInterval(G,C)}};N=this.pause=function(){if(_!=null){clearInterval(_);_=null}};var E=function(_){I(this);var $=A.Event.fix(_);$.preventDefault();$.cancelBubble=true};for(var J,M,L=D.length-1;L>=0;L--){J=O[L];D[L]=A(D[L]);if(J){O[L]=A(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(_+$+_)!=-1:this.indexOf($)!=-1};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};Array.prototype.merge=function($){var A=-1,_=$.length;while(++A<_)if(-1===this.indexOf($[A]))this.push($[A]);return this};window.toArray=document.toArray=function(){return[this]};window.addEvent=document.addEvent=A.Element.addEvent})();