(function(e,d){var j=e.Event,a=e.DOM,h=e.UA,b=e.app("Street");var g="placeholder",c="",i="none",f="block";b.add("star-rating",function(s){var p="star-light",k="star-half",u="star-none",q="init",r="click",m="toggle",o="draw",t="moveout",n="reset";var l=function(x,w){var v=this;w=e.merge(l.Config,w);v.elem=e.get(x);v.config=w;v.init()};l.Config={level:5,operate:true,showLabel:true,desc:["","1.0(\u5f88\u5dee)","2.0(\u8f83\u5dee)","3.0(\u8fd8\u884c)","4.0(\u63a8\u8350)","5.0(\u529b\u8350)"]};e.augment(l,e.EventTarget,{init:function(){var v=this;v.stars=v.__padding(v.config.level);v.draw(v.getValue());if(!v.config.operate){return}j.on(v.elem,"mouseover",function(y){var x=y.target,w;if(x.tagName=="A"){w=v.__getIndex(x);v.__toggle(w)}});j.on(v.elem,"mouseout",function(w){v.__moveout()});j.on(v.elem,"click",function(y){var x=y.target,w;y.halt();if(x.tagName=="A"){w=v.__getIndex(x);v.show(w);v.fire(r,{value:v.getValue()})}})},__padding:function(B){var y="<a class='star-none'></a>",A=[],w=this,v,z;z=document.createElement("span");for(var x=0;x<B;x++){A.push(y)}z.innerHTML=A.join("");w.elem.appendChild(z);return z.childNodes},__getIndex:function(x){var v=this,w=v.stars.length;for(;w>0;w--){if(x===v.stars[w]){break}}return w+1},draw:function(v){var w=this;v=v*1;e.each(w.stars,function(y,x){if(x<v){y.className=p}else{y.className=u}});if((v+"").indexOf(".")!=-1){w.stars[parseInt(v,10)].className=k}w.config.showLabel&&w.__desc(v);w.fire(o)},__desc:function(v){var w=this,x;x=document.createElement("span");x.className="caption";w.elem.appendChild(x);w.caption=e.Node(x);w.__desc=function(y){w.caption.html(w.config.desc[parseInt(y,10)||0])};w.__desc(v)},__toggle:function(w){var v=this;v.draw(w);v.fire(m)},__moveout:function(){var v=this;v.draw(v.getValue());v.fire(t)},setValue:function(v){a.attr(this.elem,"data-value",v)},getValue:function(){return a.attr(this.elem,"data-value")||""},show:function(w){var v=this;v.setValue(w);v.draw(w)},reset:function(){var v=this;v.setValue(c);v.draw();v.fire(n,{value:c})}});l.render=function(x,w){var v=[];e.query(x).each(function(y){v.push(new l(y,w))});return v};s.StarRating=l},{requires:["core"]});b.add("counter",function(m){var n=1,k=2,l="over";var o=function(r,q){var p=this;q=e.merge(o.Config,q);p.config=q;p.elem=r;p.maxLength=a.attr(r,"maxLength")||q.maxLength;p.minLength=a.attr(r,"minLength")||q.minLength;q.autoRun&&p.init()};e.augment(o,e.EventTarget,{init:function(){var p=this,q=e.get(p.elem);p.elem=q;p.__buildCounter();j.on(q,"keyup focus blur",function(r){p.flush()});p.on(l,function(r){if(p.config.type==n){e.log("deal width the overrun content: "+r.value)}e.log("other things")});p.flush();a.data(q,"counter",p)},__buildCounter:function(){var p=this,q=a.create('<span class="counter">\u4f60\u8fd8\u53ef\u4ee5\u8f93\u5165<em>'+(p.maxLength?p.maxLength:"")+"</em>\u5b57</span>");a.insertBefore(q,p.elem);p.curLength=0;p.pad=q},__getCounter:function(){var p=this,q=e.get("em",p.pad);p.__getCounter=function(){return q};return q},__getContent:function(){var p=this,q=p.elem;if(q.value==a.attr(q,"placeholder")){return""}else{return p.config.trim?e.trim(q.value):q.value}},__count:function(){var p=this,q=p.__getContent();return p.config.strictCount?p.__strictCount(q):q.length},getLength:function(){return this.__count()},__strictCount:function(s){var q=0;for(var r=0,p=s.length;r<p;r++){if(s.charCodeAt(r)>255){q+=2}else{q++}}return Math.ceil(q/2)},flush:function(){var p=this,q=p.__getCounter(),r=p.__count();if(p.maxLength&&r>p.maxLength){p.fire(l,{value:p.__getContent()})}setTimeout(function(){q.innerHTML=140-r},0)},reset:function(){this.__getCounter().innerHTML="0"}});o.Config={autoRun:true,strictCount:true,maxLength:140,trim:false};o.render=function(r,q){var p=[];e.each(e.query(r),function(t,s){p[s]=new o(t,q)});return p};m.Counter=o});b.add("ajax",function(l){var k="success",n="fail";var m=function(p){var o=this;p=e.merge(m.Config,p);o.config=p;o.init()};e.augment(m,e.EventTarget,{init:function(){var o=this,t=o.__getXHR(),r=o.__getType(),s=o.config.url;o.config.data.t=(new Date()).getTime();var u=e.param(o.config.data),q="?";if(s.indexOf(q)!==-1){q="&"}var p=s+(r==="GET"?q+u:"");if(o.config.charset){p+=(p.indexOf("?")==-1?"?":"&")+"_input_charset="+o.config.charset}t.onreadystatechange=function(){if(t.readyState===4){if(t.status===200){var v=t.responseText;o.fire(k,{text:v})}else{o.fire(n)}}};t.open(r,p,true);r=="POST"&&t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.send(r==="GET"?null:u)},__getType:function(){var o=this,p=o.config.type.toUpperCase();o.__getType=function(){return p};return p},__getXHR:function(){var o=this,p;try{p=new XMLHttpRequest()}catch(s){try{p=new ActiveXObject("Msxml2.XMLHTTP")}catch(r){try{p=new ActiveXObject("Microsoft.XMLHTTP")}catch(q){p=null}}}o.__getXHR=function(){return p};return p}});m.Config={url:"",type:"GET",data:{},charset:"utf-8"};l.Ajax=m});b.add("placeholder",function(m){if(g in document.createElement("input")){return}var o="",q="placeholder",n="pholder";var p={init:function(){var r=this.target;e.each(r,function(s){var t=a.attr(s,q);j.on(s,"focus",function(u){k(s,t)});j.on(s,"blur",function(u){l(s,t)});l(s,t)})},setValue:function(r){r=e.makeArray(r);e.each(this.target,function(t,s){var u=r[s];if(u&&u!==o){a.removeClass(t,n);t.value=u}})},getValue:function(){var s=this.target,r=[];e.each(s,function(u,t){if(u.value==a.attr(u,q)){r[t]=o}else{r[t]=u.value}});return r},reset:function(){var r=this.target;e.each(r,function(s){s.value=o;l(s,a.attr(s,q))})}};function k(s,r){if(s.value==r){s.value=o;a.removeClass(s,n)}}function l(s,r){if(s.value==o||s.value==r){s.value=r||o;a.addClass(s,n)}else{a.removeClass(s,n)}}m.placeholder=p});b.add("fix-hover",function(k){var l=function(n,m){if(e.UA.ie!==6){l=function(){};return}n=e.query(n);j.on(n,"mouseenter",function(p){var o=p.target;a.addClass(o,m)});j.on(n,"mouseleave",function(p){var o=p.target;a.removeClass(o,m)})};k.fixHover=l});b.add("ValiForm",function(t){var C="init",y="VALIMENT";var s=Array.prototype,z=s.every?function(F,H,G){return s.every.call(F,H,G||window)}:function(F,I,H){var G=0;len=F.length;for(;G<len;G++){if(!I.call(H||window,F[G],G,F)){return false}}return true},m=s.some?function(F,H,G){return s.some.call(F,H,G||window)}:function(F,I,H){var G=0;len=F.length;for(;G<len;G++){if(I.call(H||window,F[G],G,F)){return true}}return false};var B=function(H,G){var F=this;F.target=e.query(H);if(F.target.length==0){return}F.nodeName=y;F.form=F.target[0].form;F.properties=G;F=e.mix(F,F.properties);F.init()};e.augment(B,e.EventTarget,{init:function(){},setValue:function(F){F=e.makeArray(F);e.each(this.target,function(H,G){H.value=F[G]||c})},setRealValue:function(F){F=e.makeArray(F);e.each(this.target,function(H,G){H.value=F[G]})},getValue:function(){var F=[];e.each(this.target,function(H,G){F[G]=H.value});return F},reset:function(){e.each(this.target,function(F){F.value=F.defaultValue})}});t.Valiment=B;var u=1,w=-1,n="async",p="success",o="fail";var q="valiform-tip ",x="form-tip-error",A="form-tip-success",E="form-tip-valing",D="valid-related-tip",l="\u6b63\u5728\u6821\u9a8c\uff0c\u8bf7\u7a0d\u5019...",r="submit";var k=function(H,G){var F=this;G=e.merge(k.Config,G);H=e.get(H);if(H.nodeName!="FORM"&&H.form){H=H.form}if(H.nodeName=="FORM"){F.form=H}else{F.button=H}F.config=G;F.isAsync=false;F.isValing=false;F.valistate=u;F.tips=[];F.elements=[];F.isTrigger=false;G.autoRun&&F.init()};e.augment(k,e.EventTarget,{init:function(){var F=this,H=F.form||F.button,G=F.form?"submit":"click";if(F.config.tip){F.tips.push(F.config.tip)}j.on(H,G,function(J){J.halt();return I()});function I(){if(F.isValing||F.isAsync){return false}F.isAsync=false;F.isValing=false;F.valistate=u;F.submit()}},add:function(J,L,G){if(J.nodeName!==y){J=new B(J)}G=G||{};var F=this,K=G.tip,M=K,I=J.target[J.target.length-1];J.cds=e.makeArray(L);if(K&&!a.data(I,D)){if(e.isFunction(M)){K=M()}else{if(e.isString(M)){K=e.get(M)}}a.data(I,D,K);this.tips.push(K)}this.elements.push(J);if(G.trigger){var H=G.trigger.el.target||e.get(G.trigger.el);j.on(H,G.trigger.type,function(){F.isTrigger=true;e.each(J.cds,function(N){if(!F.__valid(J,N)){F.showTip(I,N.msg,x);return false}});if(F.isAsync){return}F.isTrigger=false})}},reset:function(){var F=this;e.each(this.elements,function(G){G.reset()});F.__hideTips()},showFormTip:function(I,G){var F=this,H=F.config.tip||a.data(F.form,D);if(!H){H=a.create("<span></span>");a.insertBefore(H,a.children(F.form)[0]);a.data(F.form,D,H);F.tips.push(H)}H.className=q+(G||"");H.innerHTML=I;a.show(H)},hideFormTip:function(){a.hide(a.data(self.form,D))},submit:function(){var F=this;F.isValing=true;F.__hideTips();e.each(F.elements,function(G){if(!G.cds){return}e.each(G.cds,function(J){if(!F.__valid(G,J)){F.valistate=w;var I=J.msg,H=G.target[G.target.length-1];F.showTip(H,I,x);return false}})});F.isValing=false;if(F.valistate==u){F.__confirm()}},__valid:function(H,J){var G=this,I=J.pattern,F=true;if(e.isString(I)){if(I==n){F=G._asyncValid(H,J)}else{F=G._typeValid(H,J)}}else{if(e.isFunction(I)){F=G._fnValid(H,J)}else{if(I instanceof RegExp){F=G._regValid(H,J)}}}return F},some:function(F,G){return m(F,G)},_regValid:function(F,G){return this.some(e.makeArray(F.getValue()),function(I,H){return G.pattern.test(I)})},_typeValid:function(G,H){var F=this;return F.some(e.makeArray(G.getValue()),function(I){var J=k.Type[H.pattern];return J?J.call(G,(F.config.trim?e.trim(I):I),H):false})},_fnValid:function(F,G){return this.some(e.makeArray(F.getValue()),function(H){return G.pattern.call(F,H,G)})},_asyncValid:function(G,H){var F=this;F.isAsync=true,it=G.target[G.target.length-1];H.async(function(I){F.isAsync=false;if(F.isTrigger){F.showTip(it,I,A);F.isTrigger=false;return}if(F.isValing==false&&F.valistate==u){F.fire(r);F.hideFormTip();if(!F.config.stopEvent){F.__confirm()}}},function(I){F.isAsync=false;if(F.isTrigger){F.isTrigger=false}F.valistate=w;F.showTip(it,I,x);return false});return true},showTip:function(H,J,G){var F=this,I=a.data(H,D);if(!I){I=a.create("<span></span>");H.parentNode.appendChild(I);a.data(H,D,I);F.tips.push(I)}I.className=q+G;I.innerHTML=J;a.show(I)},__hideTips:function(){var F=this;e.each(F.tips,function(G){a.hide(G)})},__confirm:function(){var F=this;e.log("isAsync:"+F.isAsync+", valistate:"+F.valistate);if(F.isAsync){return}if(F.valistate==w){return}F.__setValues();F.fire(r);F.hideFormTip();if(!F.config.stopEvent){F.form.submit()}},__setValues:function(){e.each(this.elements,function(F){F.setRealValue(F.getValue())})}});k.Config={autoRun:true,stopEvent:false,trim:false};function v(H){var F=0;for(var I=0,G=H.length;I<G;I++){if(H.charCodeAt(I)>255){F+=2}else{F++}}return Math.ceil(F/2)}k.Type={maxLength:function(F,G){if(v(F)>G.size){return false}return true},minLength:function(F,G){if(v(F)<(G.size)){return false}return true},nonEmpty:function(F,G){if(v(F)==0){return false}return true}};t.ValiForm=k});b.add("limit-input",function(l){var k=function(o,n){var m=this;n=e.merge(k.Config,n);m.config=n;m.inputs=e.query(o);n.autoRun&&m.init()};e.augment(k,e.EventTarget,{init:function(){var m=this;j.on(m.inputs,"keyup",function(n){if(!m.__valid(this)){n.halt();return false}})},__valid:function(p){var o=this,t=o.config.pattern,n=p.value;if(t=="number"){if(!/^\d*$/g.test(n)){p.value=n.replace(/[^\d]/g,c);return false}}else{if(t=="length"){var q=0,s=0;for(var r=0,m=n.length;r<m;r++){if(n.charCodeAt(r)>255){q+=2;s++}else{q++;s+=0.5}if(Math.ceil(q/2)>o.config.size){p.value=n.substring(0,r);break}}return false}else{return true}}}});k.Config={autoRun:true,pattern:"length"};k.Pattern=function(){}();l.LimitInput=k});b.add("popupNav",function(l){var k=function(m,q,p){var r;var o="n-hover",s=300;function n(){a.removeClass(q,o)}j.on(q,"mouseenter mouseleave",function(u){var t=this;r&&r.cancel();r=e.later(function(){n();if(u.type=="mouseenter"){a.addClass(t,o);if(p=="indexMenu"){var v=a.children(a.children(t,"dl"),".c-detailed");var x=134;var w=555;if(a.offset(t).top<150){a.css(v,{top:(a.offset(t).top-x)+"px"})}else{if(a.offset(t).top<420){if(a.height(v)+a.offset(t).top>w){a.css(v,{top:(w-x-a.height(v))+"px"})}else{a.css(v,{top:(a.offset(t).top-x-26)+"px"})}}}}}},s)});j.on(m,"mouseleave",function(t){n()})};l.popupNav=k});b.add("imgLoad",function(k){k.imgLoad=function(){window.imgLoadError=function(m){var l=KISSY.DOM.attr(m,"data-src");KISSY.DOM.attr(m,"src",l)}}});b.add("leftMenu",function(k){k.leftMenu=function(){var n=a.get("#nav-menu");var v=a.get("#nav-menu-ul");var l=a.get("#nav-menu .j_prve");var s=a.get("#nav-menu .j_next");var m=a.get("#nav-menu ul");var p="nav-menu-tms";var t=-319;var u=r("lMenuPage");var o=r("lMenuLable");function r(A){var z=window.location.search;var w=A.length;var y=z.indexOf(A);if(y==-1){return""}y+=w+1;var x=z.indexOf("&",y);if(x==-1){return z.substring(y)}return z.substring(y,x)}if(n){if(a.hasClass(n,p)){t=348-a.height(v)}if(o){a.css(".cat"+o,{color:"#FFF","background-color":"#FEAB4F","font-weight":"bold"});if(!u){a.toggleClass(l,".select-prve");a.toggleClass(s,".select-next");a.css(m,{top:t+"px"})}}if(screen.width<=1024){a.css(n,{display:"none"})}function q(w){a.toggleClass(l,".select-prve");a.toggleClass(s,".select-next");var x=new e.Anim(m,{top:w+"px"},0.1);x.run()}j.on(l,"click",function(w){if(!a.hasClass(this,"select-prve")){q(0)}});j.on(s,"click",function(w){if(!a.hasClass(this,"select-next")){q(t)}})}}});b.add("paginationCenter",function(k){k.PaginationCenter=function(l,m){childWidth=a.width(m);a.css(m,{"margin-right":(l-childWidth)/2})}})})(KISSY);Street.imgLoad();KISSY.ready(function(c){var e=c.DOM,d=c.Event;Street.popupNav("#navigation ul","#navigation li");Street.leftMenu();var b=c.get("#J_FavLink"),g=document.title,a=location.href,f="\u5bf9\u4e0d\u8d77\uff0c\u6682\u65f6\u4e0d\u652f\u6301\u60a8\u7684\u6d4f\u89c8\u5668\uff0c\u8bf7\u6309\u4f4fCtrl+D\u6765\u6dfb\u52a0\u5230\u6536\u85cf\u5939\u3002";if(b){d.on(b,"click",function(h){h.halt();if(window.sidebar){window.sidebar.addPanel(g,a,"")}else{if(document.all){try{window.external.toString();alert(f)}catch(h){window.external.AddFavorite(a,g)}}else{alert(f);return false}}})}});

