/*
Copyright 2012, KISSY UI Library v1.20
MIT Licensed
build time: Jun 13 20:27
*/
(function(b,c){var j=this,f={mix:function(b,a,g,m,i){if(!a||!b)return b;g===c&&(g=!0);var f,j,o;if(m&&(o=m.length))for(f=0;f<o;f++)j=m[f],j in a&&h(j,b,a,g,i);else for(j in a)h(j,b,a,g,i);return b}},h=function(d,a,g,m,i){if(m||!(d in a)){var f=a[d],h=g[d];f!==h&&(i&&h&&(b.isArray(h)||b.isPlainObject(h))?(g=f&&(b.isArray(f)||b.isPlainObject(f))?f:b.isArray(h)?[]:{},a[d]=b.mix(g,h,m,c,!0)):h!==c&&(a[d]=g[d]))}},a=j&&j[b]||{},i=0,j=a.__HOST||(a.__HOST=j||{}),b=j[b]=f.mix(a,f);b.mix(b,{configs:{},__APP_MEMBERS:["namespace"],
__APP_INIT_METHODS:["__init"],version:"1.20",buildTime:"20120613202636",merge:function(){var d={},a,c=arguments.length;for(a=0;a<c;a++)b.mix(d,arguments[a]);return d},augment:function(){var d=b.makeArray(arguments),a=d.length-2,g=d[0],i=d[a],h=d[a+1],f=1;b.isArray(h)||(i=h,h=c,a++);b.isBoolean(i)||(i=c,a++);for(;f<a;f++)b.mix(g.prototype,d[f].prototype||d[f],i,h);return g},extend:function(d,a,c,i){if(!a||!d)return d;var h=Object.create?function(b,a){return Object.create(b,{constructor:{value:a}})}:
function(b,a){function d(){}d.prototype=b;var c=new d;c.constructor=a;return c},f=a.prototype,j;j=h(f,d);d.prototype=b.mix(j,d.prototype);d.superclass=h(f,a);c&&b.mix(j,c);i&&b.mix(d,i);return d},__init:function(){this.Config=this.Config||{};this.Env=this.Env||{};this.Config.debug=""},namespace:function(){var a=b.makeArray(arguments),c=a.length,g=null,i,h,f,n=!0===a[c-1]&&c--;for(i=0;i<c;i++){f=(""+a[i]).split(".");g=n?j:this;for(h=j[f[0]]===g?1:0;h<f.length;++h)g=g[f[h]]=g[f[h]]||{}}return g},
app:function(a,c){var g=b.isString(a),i=g?j[a]||{}:a,h=0,f=b.__APP_INIT_METHODS.length;for(b.mix(i,this,!0,b.__APP_MEMBERS);h<f;h++)b[b.__APP_INIT_METHODS[h]].call(i);b.mix(i,b.isFunction(c)?c():c);g&&(j[a]=i);return i},config:function(b){var a,c,i,h;for(h in b)if(b.hasOwnProperty(h)&&(a=this.configs)&&(c=a[h]))i=c(b[h]);return i},log:function(a,e,g){if(b.Config.debug&&(g&&(a=g+": "+a),j.console!==c&&console.log))console[e&&console[e]?e:"log"](a)},error:function(a){if(b.Config.debug)throw a;},guid:function(b){return(b||
"")+i++}});b.__init();return b})("KISSY",void 0);
(function(b,c){function j(){if(A)return A;var a=r;b.each(F,function(b){a+=b+"|"});a=a.slice(0,-1);return A=RegExp(a,"g")}function f(){if(C)return C;var a=r;b.each(B,function(b){a+=b+"|"});a+="&#(\\d{1,5});";return C=RegExp(a,"g")}function h(b){var c=typeof b;return a(b)||"object"!==c&&"function"!==c}function a(a){return b.isNull(a)||b.isUndefined(a)}function i(a,c,d){var g=a,e,h,f,k;if(!a)return g;if(a[u])return d[a[u]].destination;if("object"===typeof a){k=a.constructor;if(b.inArray(k,[Boolean,String,
Number,Date,RegExp]))g=new k(a.valueOf());else if(e=b.isArray(a))g=c?b.filter(a,c):a.concat();else if(h=b.isPlainObject(a))g={};a[u]=k=b.guid();d[k]={destination:g,input:a}}if(e)for(a=0;a<g.length;a++)g[a]=i(g[a],c,d);else if(h)for(f in a)if(a.hasOwnProperty(f)&&f!==u&&(!c||c.call(a,a[f],f,a)!==m))g[f]=i(a[f],c,d);return g}function d(a,d,e,i){if(a[x]===d&&d[x]===a)return g;a[x]=d;d[x]=a;var h=function(b,a){return null!==b&&b!==c&&b[a]!==c},f;for(f in d)d.hasOwnProperty(f)&&!h(a,f)&&h(d,f)&&e.push("expected has key '"+
f+"', but missing from actual.");for(f in a)a.hasOwnProperty(f)&&!h(d,f)&&h(a,f)&&e.push("expected missing key '"+f+"', but present in actual.");for(f in d)d.hasOwnProperty(f)&&f!=x&&(b.equals(a[f],d[f],e,i)||i.push("'"+f+"' was '"+(d[f]?d[f].toString():d[f])+"' in expected, but was '"+(a[f]?a[f].toString():a[f])+"' in actual."));b.isArray(a)&&b.isArray(d)&&a.length!=d.length&&i.push("arrays were not the same length");delete a[x];delete d[x];return 0===e.length&&0===i.length}var e=b.__HOST,g=!0,m=
!1,k=Object.prototype,l=k.toString,n=k.hasOwnProperty,k=Array.prototype,o=k.indexOf,p=k.lastIndexOf,t=k.filter,q=k.every,v=k.some,w=String.prototype.trim,s=k.map,r="",u="__~ks_cloned",x="__~ks_compared",y=/^[\s\xa0]+|[\s\xa0]+$/g,z=encodeURIComponent,D=decodeURIComponent,I={},F={"&amp;":"&","&gt;":">","&lt;":"<","&#x60;":"`","&#x2F;":"/","&quot;":'"',"&#x27;":"'"},B={},A,C,E=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;(function(){for(var b in F)F.hasOwnProperty(b)&&(B[F[b]]=b)})();b.mix(b,{stamp:function(a,d,g){if(!a)return a;
var g=g||"__~ks_stamped",e=a[g];if(!e&&!d)try{e=a[g]=b.guid(g)}catch(i){e=c}return e},noop:function(){},type:function(b){return a(b)?""+b:I[l.call(b)]||"object"},isNullOrUndefined:a,isNull:function(b){return null===b},isUndefined:function(b){return b===c},isEmptyObject:function(b){for(var a in b)if(a!==c)return m;return g},isPlainObject:function(b){return b&&"[object Object]"===l.call(b)&&"isPrototypeOf"in b},equals:function(e,i,f,h){f=f||[];h=h||[];return e===i?g:e===c||null===e||i===c||null===i?
a(e)&&a(i):e instanceof Date&&i instanceof Date?e.getTime()==i.getTime():b.isString(e)&&b.isString(i)||b.isNumber(e)&&b.isNumber(i)?e==i:"object"===typeof e&&"object"===typeof i?d(e,i,f,h):e===i},clone:function(a,d){var e={},g=i(a,d,e);b.each(e,function(a){a=a.input;if(a[u])try{delete a[u]}catch(d){b.log("delete CLONE_MARKER error : "),a[u]=c}});e=null;return g},trim:w?function(b){return a(b)?r:w.call(b)}:function(b){return a(b)?r:b.toString().replace(y,r)},substitute:function(a,d,e){return!b.isString(a)||
!b.isPlainObject(d)?a:a.replace(e||/\\?\{([^{}]+)\}/g,function(b,a){return"\\"===b.charAt(0)?b.slice(1):d[a]===c?r:d[a]})},each:function(a,d,g){if(a){var i,f=0,h=a&&a.length,k=h===c||"function"===b.type(a),g=g||e;if(k)for(i in a){if(d.call(g,a[i],i,a)===m)break}else for(i=a[0];f<h&&d.call(g,i,f,a)!==m;i=a[++f]);}return a},indexOf:o?function(b,a){return o.call(a,b)}:function(b,a){for(var d=0,c=a.length;d<c;++d)if(a[d]===b)return d;return-1},lastIndexOf:p?function(b,a){return p.call(a,b)}:function(b,
a){for(var d=a.length-1;0<=d&&a[d]!==b;d--);return d},unique:function(a,d){var c=a.slice();d&&c.reverse();for(var e=0,g,i;e<c.length;){for(i=c[e];(g=b.lastIndexOf(i,c))!==e;)c.splice(g,1);e+=1}d&&c.reverse();return c},inArray:function(a,d){return-1<b.indexOf(a,d)},filter:t?function(b,a,d){return t.call(b,a,d||this)}:function(a,d,c){var e=[];b.each(a,function(b,a,g){d.call(c||this,b,a,g)&&e.push(b)});return e},map:s?function(b,a,d){return s.call(b,a,d||this)}:function(a,d,c){for(var e=a.length,g=Array(e),
i=0;i<e;i++){var f=b.isString(a)?a.charAt(i):a[i];if(f||i in a)g[i]=d.call(c||this,f,i,a)}return g},reduce:function(b,a,d){var e=b.length;if("function"!==typeof a)throw new TypeError("callback is not function!");if(0===e&&2==arguments.length)throw new TypeError("arguments invalid");var i=0,f;if(3<=arguments.length)f=arguments[2];else{do{if(i in b){f=b[i++];break}i+=1;if(i>=e)throw new TypeError;}while(g)}for(;i<e;)i in b&&(f=a.call(c,f,b[i],i,b)),i++;return f},every:q?function(b,a,d){return q.call(b,
a,d||this)}:function(b,a,d){for(var c=b&&b.length||0,e=0;e<c;e++)if(e in b&&!a.call(d,b[e],e,b))return m;return g},some:v?function(b,a,d){return v.call(b,a,d||this)}:function(b,a,d){for(var c=b&&b.length||0,e=0;e<c;e++)if(e in b&&a.call(d,b[e],e,b))return g;return m},bind:function(b,a){var d=[].slice,c=d.call(arguments,2),e=function(){},g=function(){return b.apply(this instanceof e?this:a,c.concat(d.call(arguments)))};e.prototype=b.prototype;g.prototype=new e;return g},now:Date.now||function(){return+new Date},
fromUnicode:function(b){return b.replace(/\\u([a-f\d]{4})/ig,function(b,a){return String.fromCharCode(parseInt(a,16))})},escapeHTML:function(b){return b.replace(j(),function(b){return B[b]})},escapeRegExp:function(b){return b.replace(E,"\\$&")},unEscapeHTML:function(b){return b.replace(f(),function(b,a){return F[b]||String.fromCharCode(+a)})},makeArray:function(d){if(a(d))return[];if(b.isArray(d))return d;if("number"!==typeof d.length||b.isString(d)||b.isFunction(d))return[d];for(var c=[],e=0,g=d.length;e<
g;e++)c[e]=d[e];return c},param:function(a,d,c,e){if(!b.isPlainObject(a))return r;d=d||"&";c=c||"=";b.isUndefined(e)&&(e=g);var i=[],f,m;for(f in a)if(a.hasOwnProperty(f))if(m=a[f],f=z(f),h(m))i.push(f,c,z(m+r),d);else if(b.isArray(m)&&m.length)for(var k=0,j=m.length;k<j;++k)h(m[k])&&i.push(f,e?z("[]"):r,c,z(m[k]+r),d);i.pop();return i.join(r)},unparam:function(a,d,c){if("string"!==typeof a||0===(a=b.trim(a)).length)return{};for(var c=c||"=",e={},a=a.split(d||"&"),g,i,f=0,h=a.length;f<h;++f){d=a[f].split(c);
g=D(d[0]);try{i=D(d[1]||r)}catch(m){b.log(m+"decodeURIComponent error : "+d[1],"error"),i=d[1]||r}b.endsWith(g,"[]")&&(g=g.substring(0,g.length-2));n.call(e,g)?b.isArray(e[g])?e[g].push(i):e[g]=[e[g],i]:e[g]=i}return e},later:function(a,d,c,e,g){var d=d||0,i=a,f=b.makeArray(g),h;b.isString(a)&&(i=e[a]);i||b.error("method undefined");a=function(){i.apply(e,f)};h=c?setInterval(a,d):setTimeout(a,d);return{id:h,interval:c,cancel:function(){this.interval?clearInterval(h):clearTimeout(h)}}},startsWith:function(b,
a){return 0===b.lastIndexOf(a,0)},endsWith:function(b,a){var d=b.length-a.length;return 0<=d&&b.indexOf(a,d)==d},throttle:function(a,d,c){d=d||150;if(-1===d)return function(){a.apply(c||this,arguments)};var e=b.now();return function(){var g=b.now();g-e>d&&(e=g,a.apply(c||this,arguments))}},buffer:function(a,d,c){function e(){e.stop();g=b.later(a,d,m,c||this,arguments)}d=d||150;if(-1===d)return function(){a.apply(c||this,arguments)};var g=null;e.stop=function(){g&&(g.cancel(),g=0)};return e}});b.mix(b,
{isBoolean:h,isNumber:h,isString:h,isFunction:h,isArray:h,isDate:h,isRegExp:h,isObject:h});b.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(a,d){I["[object "+a+"]"]=d=a.toLowerCase();b["is"+a]=function(a){return b.type(a)==d}})})(KISSY,void 0);(function(b){"require"in this||(b.__loader={},b.__loaderUtils={},b.__loaderData={})})(KISSY);
(function(b,c){"require"in this||(b.configs.map=function(c){b.Config.mappedRules=(b.Config.mappedRules||[]).concat(c)},b.mix(c,{__getMappedPath:function(c){for(var f=b.Config.mappedRules||[],h=0;h<f.length;h++){var a=f[h];if(c.match(a[0]))return c.replace(a[0],a[1])}return c}}))})(KISSY,KISSY.__loader);
(function(b,c){if(!("require"in this)){var j;j=b.configs.combines=function(c,h){var a;if(b.isObject(c))b.each(c,function(a,d){b.each(a,function(a){j(a,d)})});else if(a=b.Config.combines=b.Config.combines||{},h)a[c]=h;else return a[c]||c};b.mix(c,{__getCombinedMod:function(c){return(b.Config.combines=b.Config.combines||{})[c]||c}})}})(KISSY,KISSY.__loader);(function(b,c){"require"in this||b.mix(c,{INIT:0,LOADING:1,LOADED:2,ERROR:3,ATTACHED:4})})(KISSY,KISSY.__loaderData);
(function(b,c,j){if(!("require"in this)){var f=navigator.userAgent,h=document;b.mix(j,{docHead:function(){return h.getElementsByTagName("head")[0]||h.documentElement},isWebKit:!!f.match(/AppleWebKit/),IE:!!f.match(/MSIE/),isCss:function(a){return/\.css(?:\?|$)/i.test(a)},isLinkNode:function(a){return"link"==a.nodeName.toLowerCase()},normalizePath:function(a){for(var a=a.split("/"),b=[],c,i=0;i<a.length;i++)c=a[i],"."!=c&&(".."==c?b.pop():b.push(c));return b.join("/")},normalDepModuleName:function e(c,
f){if(!f)return f;if(b.isArray(f)){for(var h=0;h<f.length;h++)f[h]=e(c,f[h]);return f}if(a(f,"../")||a(f,"./")){var h="",j;if(-1!=(j=c.lastIndexOf("/")))h=c.substring(0,j+1);return i(h+f)}return-1!=f.indexOf("./")||-1!=f.indexOf("../")?i(f):f},removePostfix:function(a){return a.replace(/(-min)?\.js[^/]*$/i,"")},normalBasePath:function(e){(e=b.trim(e))&&"/"!=e.charAt(e.length-1)&&(e+="/");!e.match(/^(http(s)?)|(file):/i)&&!a(e,"/")&&(e=c.__pagePath+e);return i(e)},absoluteFilePath:function(a){a=j.normalBasePath(a);
return a.substring(0,a.length-1)},indexMapping:function(a){for(var b=0;b<a.length;b++)a[b].match(/\/$/)&&(a[b]+="index");return a}});var a=b.startsWith,i=j.normalizePath}})(KISSY,KISSY.__loader,KISSY.__loaderUtils);
(function(b,c){function j(){for(var i in a){var d=a[i],e=d.node,g=0;if(c.isWebKit)e.sheet&&(b.log("webkit loaded : "+i),g=1);else if(e.sheet)try{e.sheet.cssRules&&(b.log("firefox loaded : "+i),g=1)}catch(m){var k=m.name;b.log("firefox getStyle : "+k+" "+m.code+" "+i);if("NS_ERROR_DOM_SECURITY_ERR"==k||"SecurityError"==k)b.log("firefox loaded : "+i),g=1}if(g){for(g=0;g<d.length;g++)d[g].call(e);delete a[i]}}b.isEmptyObject(a)?(h=0,b.log("end css polling")):h=setTimeout(j,f)}if(!("require"in this)){var f=
30,h=0,a={};b.mix(c,{scriptOnload:document.addEventListener?function(a,b){if(c.isLinkNode(a))return c.styleOnload(a,b);a.addEventListener("load",b,!1)}:function(a,b){if(c.isLinkNode(a))return c.styleOnload(a,b);var e=a.onreadystatechange;a.onreadystatechange=function(){/loaded|complete/i.test(a.readyState)&&(a.onreadystatechange=null,e&&e(),b.call(this))}},styleOnload:window.attachEvent||window.opera?function(a,d){function c(){a.detachEvent("onload",c);b.log("ie/opera loaded : "+a.href);d.call(a)}
a.attachEvent("onload",c)}:function(c,d){var e=c.href,e=a[e]=a[e]||[];e.node=c;e.push(d);h||(b.log("start css polling"),j())}})}})(KISSY,KISSY.__loaderUtils);
(function(b,c){if(!("require"in this)){var j=c.scriptOnload;b.mix(b,{getStyle:function(f,h,a){var i=document,d=c.docHead(),i=i.createElement("link"),e=h;b.isPlainObject(e)&&(h=e.success,a=e.charset);i.href=f;i.rel="stylesheet";a&&(i.charset=a);h&&c.scriptOnload(i,h);d.appendChild(i);return i},getScript:function(f,h,a){function i(){n&&(n.cancel(),n=void 0)}if(c.isCss(f))return b.getStyle(f,h,a);var d=document,e=d.head||d.getElementsByTagName("head")[0],g=d.createElement("script"),m=h,k,l,n;b.isPlainObject(m)&&
(h=m.success,k=m.error,l=m.timeout,a=m.charset);g.src=f;g.async=!0;a&&(g.charset=a);if(h||k)j(g,function(){i();b.isFunction(h)&&h.call(g)}),b.isFunction(k)&&(d.addEventListener&&g.addEventListener("error",function(){i();k.call(g)},!1),n=b.later(function(){n=void 0;k()},1E3*(l||this.Config.timeout)));e.insertBefore(g,e.firstChild);return g}})}})(KISSY,KISSY.__loaderUtils);
(function(b,c,j,f){if(!("require"in this)){var h=j.IE,a=f.ATTACHED,i=b.mix;i(c,{add:function(c,e,g){var f=this.Env.mods,k;b.isString(c)&&!g&&b.isPlainObject(e)&&(k={},k[c]=e,c=k);if(b.isPlainObject(c))return b.each(c,function(a,b){a.name=b;f[b]&&i(a,f[b],false)}),i(f,c),this;if(b.isString(c)){var l;if(g&&(l=g.host)){c=f[l];if(!c)return b.log("module "+l+" can not be found !","error"),this;this.__isAttached(l)?e.call(this,this):(c.fns=c.fns||[],c.fns.push(e));return this}this.__registerModule(c,e,
g);if(g&&!1===g.attach)return this;e=f[c];c=j.normalDepModuleName(c,e.requires);if(this.__isAttached(c))this.__attachMod(e);else if(this.Config.debug&&!e)for(c=(l=b.makeArray(c)).length-1;0<=c;c--)g=l[c],(f[g]||{}).status!==a&&b.log(e.name+" not attached when added : depends "+g);return this}if(b.isFunction(c))return g=e,e=c,h?(c=this.__findModuleNameByInteractive(),b.log("old_ie get modname by interactive : "+c),this.__registerModule(c,e,g),this.__startLoadModuleName=null,this.__startLoadTime=0):
this.__currentModule={def:e,config:g},this;b.log("invalid format for KISSY.add !","error");return this}})}})(KISSY,KISSY.__loader,KISSY.__loaderUtils,KISSY.__loaderData);
(function(b,c,j,f){"require"in this||b.mix(c,{__buildPath:function(b,a){function c(g,i){b[g+"__builded"]||(b[g+"__builded"]=1,!b[g]&&b[i]&&(b[i]=j.normalDepModuleName(b.name,b[i]),b[g]=a+b[i]),b[g]&&e.debug&&(b[g]=b[g].replace(/-min/ig,"")),b[g]&&!b[g].match(/\?t=/)&&b.tag&&(b[g]+="?t="+b.tag),b[g]&&(b[g]=d.__getMappedPath(b[g])))}var d=this,e=d.Config,a=a||e.base;c("fullpath","path");b.cssfullpath!==f.LOADED&&c("cssfullpath","csspath")}})})(KISSY,KISSY.__loader,KISSY.__loaderUtils,KISSY.__loaderData);
(function(b,c){"require"in this||b.mix(c,{__mixMod:function(c,f){var h=this.Env.mods,a=f.Env.mods,i=h[c]||{},d=i.status;a[c]&&(b.mix(i,b.clone(a[c])),d&&(i.status=d));this.__buildPath(i,f.Config.base);h[c]=i}})})(KISSY,KISSY.__loader);
(function(b,c,j){"require"in this||b.mix(c,{__findModuleNameByInteractive:function(){for(var c=document.getElementsByTagName("script"),h,a,i=0;i<c.length;i++)if(a=c[i],"interactive"==a.readyState){h=a;break}if(!h)return b.log("can not find interactive script,time diff : "+(+new Date-this.__startLoadTime),"error"),b.log("old_ie get modname from cache : "+this.__startLoadModuleName),this.__startLoadModuleName;c=j.absoluteFilePath(h.src);this.Config.base=j.normalBasePath(this.Config.base);if(0===c.lastIndexOf(this.Config.base,
0))return j.removePostfix(c.substring(this.Config.base.length));h=this.Config.packages;var d;a=-1;for(var e in h)h.hasOwnProperty(e)&&(i=h[e].path,h.hasOwnProperty(e)&&0===c.lastIndexOf(i,0)&&i.length>a&&(a=i.length,d=i));if(d)return j.removePostfix(c.substring(d.length));b.log("interactive script does not have package config \uff1a"+c,"error")}})})(KISSY,KISSY.__loader,KISSY.__loaderUtils);
(function(b,c,j,f){if(!("require"in this)){var h=j.IE,a=f.LOADING,i=f.LOADED,d=f.ERROR,e=f.ATTACHED;b.mix(c,{__load:function(c,f,k){function l(){b.log(c.name+" is not loaded! can not find module in path : "+c.fullpath,"error");c.status=d}function n(){k.global&&p.__mixMod(c.name,k.global)}function o(){v[t]=i;c.status!==d&&(c.status!==e&&(c.status=i),f())}var p=this,t=c.fullpath,q=j.isCss(t),v=b.Env._loadQueue,w=v[t],s=w;c.status=c.status||0;c.status<a&&w&&(c.status=w===i?i:a);b.isString(c.cssfullpath)&&
(b.getScript(c.cssfullpath),c.cssfullpath=c.csspath=i);c.status<a&&t?(c.status=a,h&&!q&&(p.__startLoadModuleName=c.name,p.__startLoadTime=Number(+new Date)),s=b.getScript(t,{success:function(){if(!q){if(p.__currentModule){b.log("standard browser get modname after load : "+c.name);p.__registerModule(c.name,p.__currentModule.def,p.__currentModule.config);p.__currentModule=null}n();c.fns&&c.fns.length>0||l()}c.status!=d&&b.log(c.name+" is loaded.","info");o()},error:function(){l();o()},charset:c.charset}),
v[t]=s):c.status===a?j.scriptOnload(s,function(){n();o()}):(n(),f())}})}})(KISSY,KISSY.__loader,KISSY.__loaderUtils,KISSY.__loaderData);(function(b,c,j){if(!("require"in this)){var f=j.ATTACHED,j=b.mix;j(c,{__pagePath:location.href.replace(location.hash,"").replace(/[^/]*$/i,""),__currentModule:null,__startLoadTime:0,__startLoadModuleName:null,__isAttached:function(c){var a=this.Env.mods,i=!0;b.each(c,function(b){b=a[b];if(!b||b.status!==f)return i=!1});return i}})}})(KISSY,KISSY.__loader,KISSY.__loaderData);
(function(b,c,j){"require"in this||(b.configs.packages=function(c){var h;h=b.Config.packages=b.Config.packages||{};b.each(c,function(a){h[a.name]=a;a.path=a.path&&j.normalBasePath(a.path);a.tag=a.tag&&encodeURIComponent(a.tag)})},b.mix(c,{__getPackagePath:function(c){if(c.packagepath)return c.packagepath;var h=b.__getCombinedMod(c.name),a=this.Config.packages||{},i="",d;for(d in a)a.hasOwnProperty(d)&&b.startsWith(h,d)&&d.length>i.length&&(i=d);h=a[i];c.charset=h&&h.charset||c.charset;c.tag=h?h.tag:
encodeURIComponent(b.Config.tag||b.buildTime);return c.packagepath=h&&h.path||this.Config.base}}))})(KISSY,KISSY.__loader,KISSY.__loaderUtils);(function(b,c,j){if(!("require"in this)){var f=j.LOADED,h=b.mix;h(c,{__registerModule:function(a,c,d){var d=d||{},e=this.Env.mods,g=e[a]||{};h(g,{name:a,status:f});g.fns&&g.fns.length&&b.log(a+" is defined more than once");g.fns=g.fns||[];g.fns.push(c);h(e[a]=g,d)}})}})(KISSY,KISSY.__loader,KISSY.__loaderData);
(function(b,c,j,f){if(!("require"in this)){var h=f.LOADED,a=f.ATTACHED;b.mix(c,{use:function(a,c,e){a=a.replace(/\s+/g,"").split(",");j.indexMapping(a);var e=e||{},g=this,f;if(g.__isAttached(a)){var h=g.__getModules(a);c&&c.apply(g,h)}else return b.each(a,function(b){g.__attachModByName(b,function(){if(!f&&g.__isAttached(a)){f=!0;var b=g.__getModules(a);c&&c.apply(g,b)}},e)}),g},__getModules:function(a){var c=this,e=[c];b.each(a,function(a){j.isCss(a)||e.push(c.require(a))});return e},require:function(a){var a=
this.Env.mods[a],b=this.onRequire&&this.onRequire(a);return void 0!==b?b:a&&a.value},__attachModByName:function(c,d,e){var g=this.Env.mods,f=g[c];f||(f={path:(this.Config.componentJsName||function(a){var b="js",c;if(c=a.match(/(.+)\.(js|css)$/i))b=c[2],a=c[1];return a+"-min."+b})(b.__getCombinedMod(c)),charset:"utf-8"},g[c]=f);f.name=c;f&&f.status===a||(e.global&&this.__mixMod(c,e.global),this.__attach(f,d,e))},__attach:function(c,d,e){function g(){var a,d=c.name,e,g,f,h,m=c.requires;a=c.__allRequires=
c.__allRequires||{};for(var k=0;k<m.length;k++)if(e=m[k],f=t[e],a[e]=1,f&&(h=f.__allRequires))for(g in h)h.hasOwnProperty(g)&&(a[g]=1);if(a[d]){g=[];for(e in a)a.hasOwnProperty(e)&&g.push(e);b.error("find cyclic dependency by mod "+d+" between mods : "+g.join(","))}}function f(){!p&&k.__isAttached(c.requires)&&(c.status===h&&k.__attachMod(c),c.status===a&&(p=1,d()))}var k=this,l,n,o,p=0,t=k.Env.mods,q=(c.requires||[]).concat();c.requires=q;b.Config.debug&&g();for(o=0;o<q.length;o++)l=q[o]=j.normalDepModuleName(c.name,
q[o]),(n=t[l])&&n.status===a||k.__attachModByName(l,f,e);k.__buildPath(c,k.__getPackagePath(c));k.__load(c,function(){c.requires=c.requires||[];var d=c.requires,g=[];for(o=0;o<d.length;o++){l=d[o]=j.normalDepModuleName(c.name,d[o]);var h=t[l],n=b.inArray(l,q);h&&h.status===a||n||g.push(l)}if(g.length)for(o=0;o<g.length;o++)k.__attachModByName(g[o],f,e);else f()},e)},__attachMod:function(c){var d=this,e=c.fns;e&&b.each(e,function(a){a=b.isFunction(a)?a.apply(d,d.__getModules(c.requires)):a;c.value=
c.value||a});c.status=a}})}})(KISSY,KISSY.__loader,KISSY.__loaderUtils,KISSY.__loaderData);
(function(b,c,j){function f(c){var d=j.absoluteFilePath(c.src),e=c.getAttribute("data-combo-prefix")||"??",c=c.getAttribute("data-combo-sep")||",",c=d.split(c),g,f=c[0],e=f.indexOf(e);-1==e?g=d.replace(h,"$1"):(g=f.substring(0,e),d=f.substring(e+2,f.length),d.match(a)?g+=d.replace(h,"$1"):b.each(c,function(b){if(b.match(a)){g=g+b.replace(h,"$1");return false}}));return g}if(!("require"in this)){b.mix(b,c);var h=/^(.*)(seed|kissy)(-aio)?(-min)?\.js[^/]*/i,a=/(seed|kissy)(-aio)?(-min)?\.js/i;b.__initLoader=
function(){this.Env.mods=this.Env.mods||{}};b.Env._loadQueue={};b.__initLoader();(function(){var a=document.getElementsByTagName("script"),a=f(a[a.length-1]);b.Config.base=j.normalBasePath(a);b.Config.timeout=10})();b.mix(b.configs,{base:function(a){b.Config.base=j.normalBasePath(a)},timeout:function(a){b.Config.timeout=a},debug:function(a){b.Config.debug=a}});b.each(c,function(a,c){b.__APP_MEMBERS.push(c)});b.__APP_INIT_METHODS.push("__initLoader")}})(KISSY,KISSY.__loader,KISSY.__loaderUtils);
(function(b,c){function j(){if(!i&&(i=!0,d)){for(var a,c=0;a=d[c++];)a.call(f,b);d=null}}var f=b.__HOST,h=f.document,a=h.documentElement,i=!1,d=[],e=/^#?([\w-]+)$/,g=/\S/;b.mix(b,{isWindow:function(a){return"object"===b.type(a)&&"setInterval"in a&&"document"in a&&9==a.document.nodeType},parseXML:function(a){var d;try{window.DOMParser?d=(new DOMParser).parseFromString(a,"text/xml"):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(a))}catch(e){b.log("parseXML error : "),b.log(e),d=
c}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&b.error("Invalid XML: "+a);return d},globalEval:function(a){a&&g.test(a)&&(window.execScript||function(a){window.eval.call(window,a)})(a)},ready:function(a){i?a.call(f,this):d.push(a);return this},available:function(a,c){if((a=(a+"").match(e)[1])&&b.isFunction(c))var d=1,g,f=b.later(function(){((g=h.getElementById(a))&&(c(g)||1)||500<++d)&&f.cancel()},40,!0)}});if(location&&-1!==(location.search||"").indexOf("ks-debug"))b.Config.debug=
!0;(function(){var c=a.doScroll,d=c?"onreadystatechange":"DOMContentLoaded",e=function(){j()};if("complete"===h.readyState)j();else{if(h.addEventListener){var g=function(){h.removeEventListener(d,g,!1);j()};h.addEventListener(d,g,!1);f.addEventListener("load",e,!1)}else{var i=function(){"complete"===h.readyState&&(h.detachEvent(d,i),j())};h.attachEvent(d,i);f.attachEvent("onload",e);e=!1;try{e=null===f.frameElement}catch(p){b.log("frameElement error : "),b.log(p)}if(c&&e){var t=function(){try{c("left"),
j()}catch(a){setTimeout(t,40)}};t()}}return 0}})()})(KISSY,void 0);(function(b){b.config({combines:{core:"dom,ua,event,node,json,ajax,anim,base,cookie".split(",")}})})(KISSY);
KISSY.add("ua/base",function(){var b=navigator.userAgent,c="",j="",f,h=[6,9],a=document.createElement("div"),i,d={},e=function(a){var b=0;return parseFloat(a.replace(/\./g,function(){return 0===b++?".":""}))};a.innerHTML="<\!--[if IE {{version}}]><s></s><![endif]--\>".replace("{{version}}","");i=a.getElementsByTagName("s");if(0<i.length){j="ie";d[c="trident"]=0.1;if((f=b.match(/Trident\/([\d.]*)/))&&f[1])d[c]=e(f[1]);b=h[0];for(h=h[1];b<=h;b++)if(a.innerHTML="<\!--[if IE {{version}}]><s></s><![endif]--\>".replace("{{version}}",
b),0<i.length){d[j]=b;break}}else if((f=b.match(/AppleWebKit\/([\d.]*)/))&&f[1]){d[c="webkit"]=e(f[1]);if((f=b.match(/Chrome\/([\d.]*)/))&&f[1])d[j="chrome"]=e(f[1]);else if((f=b.match(/\/([\d.]*) Safari/))&&f[1])d[j="safari"]=e(f[1]);if(/ Mobile\//.test(b))d.mobile="apple";else if(f=b.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))d.mobile=f[0].toLowerCase()}else if((f=b.match(/Presto\/([\d.]*)/))&&f[1]){if(d[c="presto"]=e(f[1]),(f=b.match(/Opera\/([\d.]*)/))&&f[1]){d[j="opera"]=e(f[1]);if((f=
b.match(/Opera\/.* Version\/([\d.]*)/))&&f[1])d[j]=e(f[1]);if((f=b.match(/Opera Mini[^;]*/))&&f)d.mobile=f[0].toLowerCase();else if((f=b.match(/Opera Mobi[^;]*/))&&f)d.mobile=f[0]}}else if((f=b.match(/MSIE\s([^;]*)/))&&f[1]){if(d[c="trident"]=0.1,d[j="ie"]=e(f[1]),(f=b.match(/Trident\/([\d.]*)/))&&f[1])d[c]=e(f[1])}else if(f=b.match(/Gecko/)){d[c="gecko"]=0.1;if((f=b.match(/rv:([\d.]*)/))&&f[1])d[c]=e(f[1]);if((f=b.match(/Firefox\/([\d.]*)/))&&f[1])d[j="firefox"]=e(f[1])}d.core=c;d.shell=j;d._numberify=
e;return d});KISSY.add("ua/extra",function(b,c){var j=navigator.userAgent,f,h,a={},i=c._numberify;if(j.match(/360SE/))a[h="se360"]=3;else if(j.match(/Maxthon/)&&(f=window.external)){h="maxthon";try{a[h]=i(f.max_version)}catch(d){a[h]=0.1}}else if(f=j.match(/TencentTraveler\s([\d.]*)/))a[h="tt"]=f[1]?i(f[1]):0.1;else if(j.match(/TheWorld/))a[h="theworld"]=3;else if(f=j.match(/SE\s([\d.]*)/))a[h="sougou"]=f[1]?i(f[1]):0.1;h&&(a.shell=h);b.mix(c,a);return c},{requires:["ua/base"]});
KISSY.add("ua",function(b,c){return c},{requires:["ua/extra"]});
KISSY.add("dom/base",function(b,c,j){function f(a,b){return a&&a.nodeType===b}var h={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},a={_isCustomDomain:function(a){var a=a||window,b=a.document.domain,a=a.location.hostname;return b!=a&&b!="["+a+"]"},_genEmptyIframeSrc:function(b){b=b||window;if(c.ie&&a._isCustomDomain(b))return"javascript:void(function(){"+
encodeURIComponent("document.open();document.domain='"+b.document.domain+"';document.close();")+"}())"},_NODE_TYPE:h,_isElementNode:function(b){return f(b,a.ELEMENT_NODE)},_getWin:function(b){return b&&"scrollTo"in b&&b.document?b:f(b,a.DOCUMENT_NODE)?b.defaultView||b.parentWindow:b===j||null===b?window:!1},_nodeTypeIs:f,_isNodeList:function(a){return a&&!a.nodeType&&a.item&&!a.setTimeout},_nodeName:function(a,b){return a&&a.nodeName.toLowerCase()===b.toLowerCase()}};b.mix(a,h);return a},{requires:["ua"]});
KISSY.add("dom/attr",function(b,c,j,f){function h(a,b){var b=q[b]||b,c=w[b];return c&&c.get?c.get(a,b):a[b]}var j=document.documentElement,a=!j.hasAttribute,i=j.textContent===f?"innerText":"textContent",d=c._nodeName,e=c._isElementNode,g=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,m=/^(?:button|input|object|select|textarea)$/i,k=/^a(?:rea)?$/i,l=/:|^on/,n=/\r/g,o={},p={val:1,css:1,html:1,text:1,data:1,width:1,height:1,
offset:1,scrollTop:1,scrollLeft:1},t={tabindex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):m.test(a.nodeName)||k.test(a.nodeName)&&a.href?0:f}},style:{get:function(a){return a.style.cssText},set:function(a,b){a.style.cssText=b}}},q={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",
contenteditable:"contentEditable"},v={get:function(a,b){return c.prop(a,b)?b.toLowerCase():f},set:function(a,b,d){!1===b?c.removeAttr(a,d):(b=q[d]||d,b in a&&(a[b]=!0),a.setAttribute(d,d.toLowerCase()));return d}},w={},s={},r={option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b=a.selectedIndex,d=a.options;if(0>b)return null;if("select-one"===a.type)return c.val(d[b]);for(var a=[],b=0,e=d.length;b<e;++b)d[b].selected&&a.push(c.val(d[b]));
return a},set:function(a,d){var e=b.makeArray(d);b.each(a.options,function(a){a.selected=b.inArray(c.val(a),e)});e.length||(a.selectedIndex=-1);return e}}};a&&(s={get:function(a,b){var c;return(c=a.getAttributeNode(b))&&""!==c.nodeValue?c.nodeValue:f},set:function(a,b,c){var d=a.getAttributeNode(c);if(d)d.nodeValue=b;else try{var e=a.ownerDocument.createAttribute(c);e.value=b;a.setAttributeNode(e)}catch(g){return a.setAttribute(c,b,0)}}},o=q,t.tabIndex=t.tabindex,b.each("href,src,width,height,colSpan,rowSpan".split(","),
function(a){t[a]={get:function(b){b=b.getAttribute(a,2);return b===null?f:b}}}),r.button=t.value=s);b.each(["radio","checkbox"],function(a){r[a]={get:function(a){return a.getAttribute("value")===null?"on":a.value},set:function(a,d){if(b.isArray(d))return a.checked=b.inArray(c.val(a),d)}}});b.mix(c,{prop:function(a,d,e){if(b.isPlainObject(d))for(var g in d)c.prop(a,g,d[g]);else{var a=c.query(a),d=q[d]||d,i=w[d];if(e!==f)a.each(function(a){i&&i.set?i.set(a,e,d):a[d]=e});else if(a.length)return h(a[0],
d)}},hasProp:function(a,b){for(var d=c.query(a),e=0;e<d.length;e++)if(h(d[e],b)!==f)return true;return false},removeProp:function(a,d){d=q[d]||d;c.query(a).each(function(a){try{a[d]=f;delete a[d]}catch(c){b.log("delete el property error : ");b.log(c)}})},attr:function(a,d,e,g){if(b.isPlainObject(d)){var g=e,h;for(h in d)c.attr(a,h,d[h],g)}else if(d=b.trim(d)){if(g&&p[d])return c[d](a,e);d=d.toLowerCase();if(g&&p[d])return c[d](a,e);a=c.query(a);if(e===f)return c.__attr(a[0],d);a.each(function(a){c.__attr(a,
d,e)})}},__attr:function(a,b,c){if(e(a)){var b=o[b]||b,h;h=d(a,"form")?s:g.test(b)?v:l.test(b)?s:t[b];if(c===f){if(h&&h.get)return h.get(a,b);a=a.getAttribute(b);return a===null?f:a}h&&h.set?h.set(a,c,b):a.setAttribute(b,""+c)}},removeAttr:function(a,b){b=b.toLowerCase();b=o[b]||b;c.query(a).each(function(a){if(e(a)){var c;a.removeAttribute(b);if(g.test(b)&&(c=q[b]||b)in a)a[c]=false}})},hasAttr:a?function(a,b){for(var b=b.toLowerCase(),d=c.query(a),e=0;e<d.length;e++){var g=d[e].getAttributeNode(b);
if(g&&g.specified)return true}return false}:function(a,b){for(var d=c.query(a),e=0;e<d.length;e++)if(d[e].hasAttribute(b))return true;return false},val:function(a,d){var e,g;if(d===f){var h=c.get(a);if(h){if((e=r[h.nodeName.toLowerCase()]||r[h.type])&&"get"in e&&(g=e.get(h,"value"))!==f)return g;g=h.value;return typeof g==="string"?g.replace(n,""):b.isNullOrUndefined(g)?"":g}}else c.query(a).each(function(a){if(a.nodeType===1){var c=d;b.isNullOrUndefined(c)?c="":typeof c==="number"?c=c+"":b.isArray(c)&&
(c=b.map(c,function(a){return b.isNullOrUndefined(c)?"":a+""}));e=r[a.nodeName.toLowerCase()]||r[a.type];if(!e||!("set"in e)||e.set(a,c,"value")===f)a.value=c}})},text:function(a,b){if(b===f){var d=c.get(a);return e(d)?d[i]||"":c._nodeTypeIs(d,c.TEXT_NODE)?d.nodeValue:f}c.query(a).each(function(a){if(e(a))a[i]=b;else if(c._nodeTypeIs(a,c.TEXT_NODE))a.nodeValue=b})}});return c},{requires:["./base","ua"]});
KISSY.add("dom/class",function(b,c,j){function f(b){return(a+b+a).replace(d,a)}function h(a,d,f,h){if(!(d=b.trim(d)))return h?!1:j;for(var a=c.query(a),l=a.length,n=d.split(i),d=[],o=0;o<n.length;o++){var p=b.trim(n[o]);p&&d.push(p)}for(o=0;o<l;o++)if(n=a[o],c._isElementNode(n)&&(n=f(n,d,d.length),n!==j))return n;return h?!1:j}var a=" ",i=/[\.\s]\s*\.?/,d=/[\n\t]/g;b.mix(c,{__hasClass:function(b,c){var d=b.className;return d?(d=f(d),-1<d.indexOf(a+c+a)):!1},hasClass:function(b,c){return h(b,c,function(b,
c,d){if(b=b.className){for(var b=f(b),e=0,g=!0;e<d;e++)if(0>b.indexOf(a+c[e]+a)){g=!1;break}if(g)return!0}},!0)},addClass:function(c,d){h(c,d,function(c,e,h){var i=c.className;if(i){for(var j=f(i),p=0;p<h;p++)0>j.indexOf(a+e[p]+a)&&(i+=a+e[p]);c.className=b.trim(i)}else c.className=d},j)},removeClass:function(c,d){h(c,d,function(c,d,e){var g=c.className;if(g)if(e){for(var g=f(g),h=0,i;h<e;h++)for(i=a+d[h]+a;0<=g.indexOf(i);)g=g.replace(i,a);c.className=b.trim(g)}else c.className=""},j)},replaceClass:function(a,
b,d){c.removeClass(a,b);c.addClass(a,d)},toggleClass:function(a,d,f){var i=b.isBoolean(f),l;h(a,d,function(a,b,d){for(var e=0,g;e<d;e++)g=b[e],l=i?!f:c.hasClass(a,g),c[l?"removeClass":"addClass"](a,g)},j)}});return c},{requires:["dom/base"]});
KISSY.add("dom/create",function(b,c,j,f){function h(a){var d=b.require("event");d&&d.detach(a);c.removeData(a)}function a(b,d,e){if(m(d,c.DOCUMENT_FRAGMENT_NODE))for(var d=d.childNodes,e=e.childNodes,g=0;d[g];)e[g]&&a(b,d[g],e[g]),g++;else if(k(d)){d=d.getElementsByTagName("*");e=e.getElementsByTagName("*");for(g=0;d[g];)e[g]&&b(d[g],e[g]),g++}}function i(a,d){var e=b.require("event");if(!k(d)||c.hasData(a)){var g=c.data(a),f;for(f in g)c.data(d,f,g[f]);e&&(e._removeData(d),e._clone(a,d))}}function d(a,
b){b.clearAttributes&&b.clearAttributes();b.mergeAttributes&&b.mergeAttributes(a);var d=b.nodeName.toLowerCase(),e=a.childNodes;if("object"===d&&!b.childNodes.length)for(d=0;d<e.length;d++)b.appendChild(e[d].cloneNode(!0));else if("input"===d&&("checkbox"===a.type||"radio"===a.type)){if(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value)b.value=a.value}else if("option"===d)b.selected=a.defaultSelected;else if("input"===d||"textarea"===d)b.defaultValue=a.defaultValue;b.removeAttribute(c.__EXPANDO)}
function e(a,c){var d=null,e,g;if(a&&(a.push||a.item)&&a[0]){c=c||a[0].ownerDocument;d=c.createDocumentFragment();a=b.makeArray(a);e=0;for(g=a.length;e<g;e++)d.appendChild(a[e])}else b.log("Unable to convert "+a+" to fragment.");return d}var g=document,j=j.ie,m=c._nodeTypeIs,k=c._isElementNode,l=b.isString,n=g.createElement("div"),o=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,p=/<([\w:]+)/,t=/^\s+/,q=j&&9>j,v=/<|&#?\w+;/,w=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;b.mix(c,{create:function(a,
d,h,i){if(k(a)||m(a,c.TEXT_NODE))return c.clone(a);var j=null;if(!l(a))return j;i===f&&(i=!0);i&&(a=b.trim(a));if(!a)return j;var i=c._creators,n,y,h=h||g,s,x="div";if(v.test(a))if(s=w.exec(a))j=h.createElement(s[1]);else{a=a.replace(o,"<$1></$2>");if((s=p.exec(a))&&(n=s[1]))x=n.toLowerCase();n=(i[x]||i.div)(a,h);q&&(y=a.match(t))&&n.insertBefore(h.createTextNode(y[0]),n.firstChild);y=n.childNodes;1===y.length?j=y[0].parentNode.removeChild(y[0]):y.length?j=e(y,h):b.error(a+" : create node error")}else j=
h.createTextNode(a);a=j;b.isPlainObject(d)&&(k(a)?c.attr(a,d,!0):m(a,c.DOCUMENT_FRAGMENT_NODE)&&c.attr(a.childNodes,d,!0));return a},_creators:{div:function(a,b){var c=b&&b!=g?b.createElement("div"):n;c.innerHTML="m<div>"+a+"</div>";return c.lastChild}},html:function(a,b,d,e){var a=c.query(a),g=a[0];if(g){if(b===f)return k(g)?g.innerHTML:null;var i=!1,b=b+"";if(!b.match(/<(?:script|style)/i)&&(!q||!b.match(t))&&!x[(b.match(p)||["",""])[1].toLowerCase()])try{a.each(function(a){k(a)&&(h(a.getElementsByTagName("*")),
a.innerHTML=b)}),i=!0}catch(j){}i||(b=c.create(b,0,g.ownerDocument,!1),a.each(function(a){k(a)&&(c.empty(a),c.append(b,a,d))}));e&&e()}},remove:function(a,b){c.query(a).each(function(a){if(!b&&k(a)){var c=a.getElementsByTagName("*");h(c);h(a)}a.parentNode&&a.parentNode.removeChild(a)})},clone:function(b,e,g,f){b=c.get(b);if(!b)return null;var h=b.cloneNode(e);if(k(b)||m(b,c.DOCUMENT_FRAGMENT_NODE))k(b)&&d(b,h),e&&a(d,b,h);g&&(i(b,h),e&&f&&a(i,b,h));return h},empty:function(a){c.query(a).each(function(a){c.remove(a.childNodes)})},
_nl2frag:e});var s=c._creators,r=c.create,u=/(?:\/(?:thead|tfoot|caption|col|colgroup)>)+\s*<tbody/,x={option:"select",optgroup:"select",area:"map",thead:"table",td:"tr",th:"tr",tr:"tbody",tbody:"table",tfoot:"table",caption:"table",colgroup:"table",col:"colgroup",legend:"fieldset"},y;for(y in x)(function(a){s[y]=function(b,c){return r("<"+a+">"+b+"</"+a+">",null,c)}})(x[y]);8>j&&(s.tbody=function(a,b){var c=r("<table>"+a+"</table>",null,b),d=c.children.tags("tbody")[0];1<c.children.length&&d&&!u.test(a)&&
d.parentNode.removeChild(d);return c});b.mix(s,{thead:s.tbody,tfoot:s.tbody,caption:s.tbody,colgroup:s.tbody});return c},{requires:["./base","ua"]});
KISSY.add("dom/data",function(b,c,j){var f=window,h="_ks_data_"+b.now(),a={},i={},d={applet:1,object:1,embed:1},e={hasData:function(a,c){if(a)if(c!==j){if(c in a)return!0}else if(!b.isEmptyObject(a))return!0;return!1}},g={hasData:function(a,b){return a==f?g.hasData(i,b):e.hasData(a[h],b)},data:function(a,b,c){if(a==f)return g.data(i,b,c);var d=a[h];if(c!==j)d=a[h]=a[h]||{},d[b]=c;else return b!==j?d&&d[b]:d=a[h]=a[h]||{}},removeData:function(a,c){if(a==f)return g.removeData(i,c);var d=a[h];if(c!==
j)delete d[c],b.isEmptyObject(d)&&g.removeData(a);else try{delete a[h]}catch(e){a[h]=j}}},m={hasData:function(b,c){var d=b[h];return!d?!1:e.hasData(a[d],c)},data:function(c,e,g){if(d[c.nodeName.toLowerCase()])return j;var f=c[h];if(!f){if(e!==j&&g===j)return j;f=c[h]=b.guid()}c=a[f];if(g!==j)c=a[f]=a[f]||{},c[e]=g;else return e!==j?c&&c[e]:c=a[f]=a[f]||{}},removeData:function(c,d){var e=c[h],g;if(e)if(g=a[e],d!==j)delete g[d],b.isEmptyObject(g)&&m.removeData(c);else{delete a[e];try{delete c[h]}catch(f){c[h]=
j}c.removeAttribute&&c.removeAttribute(h)}}};b.mix(c,{__EXPANDO:h,hasData:function(a,b){for(var d=!1,e=c.query(a),f=0;f<e.length&&!(d=(d=e[f])&&d.nodeType?m.hasData(d,b):g.hasData(d,b));f++);return d},data:function(a,d,e){if(b.isPlainObject(d)){for(var f in d)c.data(a,f,d[f]);return j}if(e===j){if((a=c.get(a))&&a.nodeType)return m.data(a,d,e);if(a)return g.data(a,d,e)}else c.query(a).each(function(a){a&&a.nodeType?m.data(a,d,e):g.data(a,d,e)});return j},removeData:function(a,b){c.query(a).each(function(a){a&&
a.nodeType?m.removeData(a,b):g.removeData(a,b)})}});return c},{requires:["./base"]});
KISSY.add("dom/insertion",function(b,c,j){function f(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.nodeType==j.DOCUMENT_FRAGMENT_NODE)f(c.childNodes);else if(e(c,"input")){if("checkbox"===c.type||"radio"===c.type)c.defaultChecked=c.checked}else if(m(c))for(var c=c.getElementsByTagName("input"),d=0;d<c.length;d++)f(c[d])}}function h(a,b){var c=[],e,f,i;for(e=0;a[e];e++)if(f=a[e],i=f.nodeName.toLowerCase(),f.nodeType==j.DOCUMENT_FRAGMENT_NODE)c.push.apply(c,h(g(f.childNodes),b));else if("script"===
i&&(!f.type||k.test(f.type)))f.parentNode&&f.parentNode.removeChild(f),b&&b.push(f);else{if(m(f)&&!d.test(i)){i=[];var n,l,u=f.getElementsByTagName("script");for(l=0;l<u.length;l++)n=u[l],(!n.type||k.test(n.type))&&i.push(n);a.splice.apply(a,[e+1,0].concat(i))}c.push(f)}return c}function a(a){a.src?b.getScript(a.src):(a=b.trim(a.text||a.textContent||a.innerHTML||""))&&b.globalEval(a)}function i(d,e,g,i){d=j.query(d);i&&(i=[]);d=h(d,i);8>c.ie&&f(d);var e=j.query(e),m=d.length,k=e.length;if((m||i&&
i.length)&&k){var d=j._nl2frag(d),n;1<k&&(n=j.clone(d,!0));for(var l=0;l<k;l++){var u=e[l];if(m){var x=0<l?j.clone(n,!0):d;g(x,u)}i&&i.length&&b.each(i,a)}}}var d=/^(?:button|input|object|select|textarea)$/i,e=j._nodeName,g=b.makeArray,m=j._isElementNode,k=/\/(java|ecma)script/i;b.mix(j,{insertBefore:function(a,b,c){i(a,b,function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b)},c)},insertAfter:function(a,b,c){i(a,b,function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)},c)},appendTo:function(a,
b,c){i(a,b,function(a,b){b.appendChild(a)},c)},prependTo:function(a,b,c){i(a,b,function(a,b){b.insertBefore(a,b.firstChild)},c)}});var l={prepend:"prependTo",append:"appendTo",before:"insertBefore",after:"insertAfter"},n;for(n in l)j[n]=j[l[n]];return j},{requires:["ua","./create"]});
KISSY.add("dom/offset",function(b,c,j,f){function h(a){var b,f=0;b=0;var h=d.body,i=l(a[t]);a[u]&&(b=a[u](),f=b[q],b=b[v],a=e&&9!=d.documentMode&&(n?g.clientTop:h.clientTop)||0,f-=e&&9!=d.documentMode&&(n?g.clientLeft:h.clientLeft)||0,b-=a,"apple"==j.mobile&&(f-=c[s](i),b-=c[r](i)));return{left:f,top:b}}function a(a,b){var d={left:0,top:0},e=l(a[t]),g=a,b=b||e;do{var f;if(e==b){var i=g;f=h(i);i=l(i[t]);f.left+=c[s](i);f.top+=c[r](i)}else f=h(g);d.left+=f.left;d.top+=f.top}while(e&&e!=b&&(g=e.frameElement)&&
(e=e.parent));return d}var i=window,d=document,e=j.ie,g=d.documentElement,m=c._isElementNode,k=c._nodeTypeIs,l=c._getWin,n="CSS1Compat"===d.compatMode,o=Math.max,p=parseInt,t="ownerDocument",q="left",v="top",w=b.isNumber,s="scrollLeft",r="scrollTop",u="getBoundingClientRect";b.mix(c,{offset:function(b,d,e){if(d===f){var b=c.get(b),g;b&&(g=a(b,e));return g}c.query(b).each(function(b){"static"===c.css(b,"position")&&(b.style.position="relative");var e=a(b),g={},f,h;for(h in d)f=p(c.css(b,h),10)||0,
g[h]=f+d[h]-e[h];c.css(b,g)})},scrollIntoView:function(a,b,d,e,g){var h,i;if(a=c.get(a)){b&&(b=c.get(b));b||(b=a.ownerDocument);!0!==g&&(e=e===f?!0:!!e,d=d===f?!0:!!d);k(b,c.DOCUMENT_NODE)&&(b=l(b));i=!!l(b);var g=c.offset(a),j=c.outerHeight(a);h=c.outerWidth(a);var m,n,o,s;i?(a=b,m=c.height(a),n=c.width(a),s={left:c.scrollLeft(a),top:c.scrollTop(a)},a=g[q]-s[q],i=g[v]-s[v],h=g[q]+h-(s[q]+n),g=g[v]+j-(s[v]+m)):(m=c.offset(b),n=b.clientHeight,o=b.clientWidth,s={left:c.scrollLeft(b),top:c.scrollTop(b)},
a=g[q]-m[q]-(p(c.css(b,"borderLeftWidth"))||0),i=g[v]-m[v]-(p(c.css(b,"borderTopWidth"))||0),h=g[q]+h-(m[q]+o+(p(c.css(b,"borderRightWidth"))||0)),g=g[v]+j-(m[v]+n+(p(c.css(b,"borderBottomWidth"))||0)));if(0>i||0<g)!0===d?c.scrollTop(b,s.top+i):!1===d?c.scrollTop(b,s.top+g):0>i?c.scrollTop(b,s.top+i):c.scrollTop(b,s.top+g);if(e&&(0>a||0<h))!0===d?c.scrollLeft(b,s.left+a):!1===d?c.scrollLeft(b,s.left+h):0>a?c.scrollLeft(b,s.left+a):c.scrollLeft(b,s.left+h)}},docWidth:0,docHeight:0,viewportHeight:0,
viewportWidth:0});b.each(["Left","Top"],function(a,b){var d="scroll"+a;c[d]=function(e,g){if(w(e))return arguments.callee(i,e);var e=c.get(e),h,j=l(e);if(j)if(g!==f){var g=parseFloat(g),k="Left"==a?g:c.scrollLeft(j),n="Top"==a?g:c.scrollTop(j);j.scrollTo(k,n)}else h=j["page"+(b?"Y":"X")+"Offset"],w(h)||(j=j.document,h=j.documentElement[d],w(h)||(h=j.body[d]));else m(e)&&(g!==f?e[d]=parseFloat(g):h=e[d]);return h}});b.each(["Width","Height"],function(a){c["doc"+a]=function(b){b=c.get(b);b=l(b).document;
return o(b.documentElement["scroll"+a],b.body["scroll"+a],c["viewport"+a](b))};c["viewport"+a]=function(b){var b=c.get(b),d="client"+a,b=l(b).document,e=b.body,g=b.documentElement[d];return"CSS1Compat"===b.compatMode&&g||e&&e[d]||g}});return c},{requires:["./base","ua"]});
KISSY.add("dom/style",function(b,c,j,f){function h(a){return a.replace(q,v)}function a(a,b,c){var d={},e;for(e in b)d[e]=a[k][e],a[k][e]=b[e];c.call(a);for(e in b)a[k][e]=d[e]}function i(a,c,d){var e;if(3===a.nodeType||8===a.nodeType||!(e=a[k]))return f;var c=h(c),g,i=u[c],c=x[c]||c;if(d!==f){null===d||d===s?d=s:!isNaN(Number(d))&&!t[c]&&(d+=r);i&&i.set&&(d=i.set(a,d));if(d!==f)try{a[k][c]=d}catch(j){b.log("css set error :"+j)}return f}if(!i||!("get"in i&&(g=i.get(a,!1))!==f))g=e[c];return g===f?
"":g}function d(a,d,e){if(b.isWindow(a))return d==l?c.viewportWidth(a):c.viewportHeight(a);if(9==a.nodeType)return d==l?c.docWidth(a):c.docHeight(a);var g=d===l?["Left","Right"]:["Top","Bottom"],f=d===l?a.offsetWidth:a.offsetHeight;if(0<f)return"border"!==e&&b.each(g,function(b){e||(f-=parseFloat(c.css(a,"padding"+b))||0);f="margin"===e?f+(parseFloat(c.css(a,e+b))||0):f-(parseFloat(c.css(a,"border"+b+"Width"))||0)}),f;f=c._getComputedStyle(a,d);if(0>f||b.isNullOrUndefined(f))f=a.style[d]||0;f=parseFloat(f)||
0;e&&b.each(g,function(b){f+=parseFloat(c.css(a,"padding"+b))||0;"padding"!==e&&(f+=parseFloat(c.css(a,"border"+b+"Width"))||0);"margin"===e&&(f+=parseFloat(c.css(a,e+b))||0)});return f}var e=document,g=e.documentElement,m=j.ie,k="style",l="width",n="display"+b.now(),o=parseInt,p=/^-?\d+(?:px)?$/i,t={fillOpacity:1,fontWeight:1,lineHeight:1,opacity:1,orphans:1,widows:1,zIndex:1,zoom:1},q=/-([a-z])/ig,v=function(a,b){return b.toUpperCase()},w=/([A-Z]|^ms)/g,s="",r="px",u={},x={},y={};g[k].cssFloat!==
f?x["float"]="cssFloat":g[k].styleFloat!==f&&(x["float"]="styleFloat");var z,D;b.mix(c,{_camelCase:h,_cssNumber:t,_CUSTOM_STYLES:u,_cssProps:x,_getComputedStyle:function(a,b){var d="",e={},g=a.ownerDocument,b=b.replace(w,"-$1").toLowerCase();if(e=g.defaultView.getComputedStyle(a,null))d=e.getPropertyValue(b)||e[b];""==d&&!c.__contains(g.documentElement,a)&&(b=x[b]||b,d=a[k][b]);return d},style:function(a,d,e){if(b.isPlainObject(d))for(var g in d)c.style(a,g,d[g]);else{if(e===f)return a=c.get(a),g=
"",a&&(g=i(a,d,e)),g;c.query(a).each(function(a){i(a,d,e)})}},css:function(a,d,e){if(b.isPlainObject(d))for(var g in d)c.css(a,g,d[g]);else{d=h(d);g=u[d];if(e===f){a=c.get(a);e="";if(a&&(!g||!("get"in g&&(e=g.get(a,!0))!==f)))e=c._getComputedStyle(a,d);return e===f?"":e}c.style(a,d,e)}},show:function(a){c.query(a).each(function(a){a[k].display=c.data(a,n)||s;if("none"===c.css(a,"display")){var b;a:{b=a.tagName.toLowerCase();var d,g;if(!y[b]){d=e.body||e.documentElement;g=e.createElement(b);c.prepend(g,
d);var f=c.css(g,"display");d.removeChild(g);if("none"===f||""===f){if(z)c.prepend(z,d);else if(z=e.createElement("iframe"),z.frameBorder=z.width=z.height=0,c.prepend(z,d),g=c._genEmptyIframeSrc())z.src=g;if(!D||!z.createElement)try{D=z.contentWindow.document,D.write(("CSS1Compat"===e.compatMode?"<!doctype html>":"")+"<html><head>"+(j.ie&&c._isCustomDomain()?"<script>document.domain = '"+e.domain+"';<\/script>":"")+"</head><body>"),D.close()}catch(h){b="block";break a}g=D.createElement(b);D.body.appendChild(g);
f=c.css(g,"display");d.removeChild(z)}y[b]=f}b=y[b]}c.data(a,n,b);a[k].display=b}})},hide:function(a){c.query(a).each(function(a){var b=a[k],d=b.display;"none"!==d&&(d&&c.data(a,n,d),b.display="none")})},toggle:function(a){c.query(a).each(function(a){"none"===c.css(a,"display")?c.show(a):c.hide(a)})},addStyleSheet:function(a,d,e){b.isString(a)&&(e=d,d=a,a=window);var a=c.get(a),a=c._getWin(a).document,g;if(e&&(e=e.replace("#",s)))g=c.get("#"+e,a);g||(g=c.create("<style>",{id:e},a),c.get("head",a).appendChild(g),
g.styleSheet?g.styleSheet.cssText=d:g.appendChild(a.createTextNode(d)))},unselectable:function(a){c.query(a).each(function(a){if(j.gecko)a[k].MozUserSelect="none";else if(j.webkit)a[k].KhtmlUserSelect="none";else if(j.ie||j.opera){var b=0,c=a.getElementsByTagName("*");for(a.setAttribute("unselectable","on");a=c[b++];)switch(a.tagName.toLowerCase()){case "iframe":case "textarea":case "input":case "select":break;default:a.setAttribute("unselectable","on")}}})},innerWidth:0,innerHeight:0,outerWidth:0,
outerHeight:0,width:0,height:0});b.each([l,"height"],function(a){c["inner"+(a.charAt(0).toUpperCase()+a.substring(1))]=function(b){return(b=c.get(b))?d(b,a,"padding"):null};c["outer"+(a.charAt(0).toUpperCase()+a.substring(1))]=function(b,e){var g=c.get(b);return g?d(g,a,e?"margin":"border"):null};c[a]=function(b,d){var e=c.css(b,a,d);e&&(e=parseFloat(e));return e}});var I={position:"absolute",visibility:"hidden",display:"block"};b.each(["height","width"],function(b){u[b]={get:function(c,e){var g;
if(e)return 0!==c.offsetWidth?g=d(c,b):a(c,I,function(){g=d(c,b)}),g+"px"},set:function(a,b){if(p.test(b)){if(b=parseFloat(b),0<=b)return b+"px"}else return b}}});b.each(["left","top"],function(a){u[a]={get:function(d,e){if(e){var g=c._getComputedStyle(d,a);if("auto"===g){g=0;if(b.inArray(c.css(d,"position"),["absolute","fixed"])){g=d["left"===a?"offsetLeft":"offsetTop"];if(m&&9!=document.documentMode||j.opera)g-=d.offsetParent&&d.offsetParent["client"+("left"==a?"Left":"Top")]||0;g-=o(c.css(d,"margin-"+
a))||0}g+="px"}return g}}}});return c},{requires:["dom/base","ua"]});
KISSY.add("dom/selector",function(b,c,j){function f(b,c){var d,e,g="string"===typeof b,i=c===j?[k]:c===j?[k]:f(c,j);g&&(b=s(b),1==i.length&&b&&(d=a(b,i[0])));if(!d&&(d=[],b)){for(e=0;e<i.length;e++)q.apply(d,h(b,i[e]));1<d.length&&(1<i.length||g&&-1<b.indexOf(w))&&y(d)}d.each=function(a){var b,c;for(c=0;c<this.length;c++){b=this[c];if(a(b,c)===false)break}};return d}function h(a,c){var d="string"===typeof a;if(d&&a.match(x)||!d)d=i(a,c);else if(d&&-1<a.indexOf(w)){var d=[],e,g=a.split(/\s*,\s*/);
for(e=0;e<g.length;e++)q.apply(d,h(g[e],c))}else d=[],(e=b.require("sizzle"))?e(a,c,d):m(a);return d}function a(a,b){var d,f,h,i;if(u.test(a))d=(f=e(a.slice(1),b))?[f]:[];else if(h=x.exec(a)){f=h[1];i=h[2];h=h[3];if(b=f?e(f,b):b)h?!f||-1!=a.indexOf(v)?d=[].concat(z(h,i,b)):(f=e(f,b))&&c.__hasClass(f,h)&&(d=[f]):i&&(d=g(i,b));d=d||[]}return d}function i(b,c){var e;"string"===typeof b?e=a(b,c)||[]:b&&(n(b)||p(b))?e=l(b,function(a){return d(a,c)}):b&&d(b,c)&&(e=[b]);return e}function d(a,b){return!a?
!1:b==k?!0:c.__contains(b,a)}function e(a,b){var e=b;b.nodeType!==c.DOCUMENT_NODE&&(e=b.ownerDocument);(e=e.getElementById(a))&&e.id===a||(e&&e.parentNode?c.__attr(e,"id")!==a?e=c.filter(r,"#"+a,b)[0]||null:d(e,b)||(e=null):e=null);return e}function g(a,b){return b&&o(b.getElementsByTagName(a))||[]}function m(a){b.error("Unsupported selector: "+a)}var k=document,l=b.filter,n=b.isArray,o=b.makeArray,p=c._isNodeList,t=c._nodeName,q=Array.prototype.push,v=" ",w=",",s=b.trim,r="*",u=/^#[\w-]+$/,x=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/,
y;(function(){var a,b,c=!0;[0,0].sort(function(){c=!1;return 0});y=function(d){if(a&&(b=c,d.sort(a),b))for(var e=1,g=d.length;e<g;)d[e]===d[e-1]?d.splice(e,1):e++;return d};a=k.documentElement.compareDocumentPosition?function(a,c){return a==c?(b=!0,0):!a.compareDocumentPosition||!c.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(c)&4?-1:1}:function(a,c){if(a==c)return b=!0,0;if(a.sourceIndex&&c.sourceIndex)return a.sourceIndex-c.sourceIndex}})();(function(){var a=
k.createElement("div");a.appendChild(k.createComment(""));0<a.getElementsByTagName(r).length&&(g=function(a,b){var c=o(b.getElementsByTagName(a));if(a===r){for(var d=[],e=0,g;g=c[e++];)1===g.nodeType&&d.push(g);c=d}return c})})();var z=k.getElementsByClassName?function(a,b,c){if(!c)return[];var a=c.getElementsByClassName(a),d=0,e=a.length,g;if(b&&b!==r)for(c=[];d<e;++d)g=a[d],t(g,b)&&c.push(g);else c=o(a);return c}:k.querySelectorAll?function(a,b,c){return c&&o(c.querySelectorAll((b?b:"")+"."+a))||
[]}:function(a,b,d){if(!d)return[];for(var b=d.getElementsByTagName(b||r),d=[],e=0,g=b.length,f;e<g;++e)f=b[e],c.__hasClass(f,a)&&d.push(f);return d};b.mix(c,{query:f,get:function(a,b){return f(a,b)[0]||null},unique:y,filter:function(a,d,e){var a=f(a,e),e=b.require("sizzle"),g,h,i,j,k=[];if("string"===typeof d&&(d=s(d))&&(g=x.exec(d)))i=g[1],h=g[2],j=g[3],i?i&&!h&&!j&&(d=function(a){return c.__attr(a,"id")===i}):d=function(a){var b=!0,d=!0;h&&(b=t(a,h));j&&(d=c.__hasClass(a,j));return d&&b};b.isFunction(d)?
k=b.filter(a,d):d&&e?k=e.matches(d,a):m(d);return k},test:function(a,b,d){a=f(a,d);return a.length&&c.filter(a,b,d).length===a.length}});return c},{requires:["./base"]});
KISSY.add("dom/style-ie",function(b,c,j,f){if(!j.ie)return c;var h=document,a=h.documentElement,i=f._CUSTOM_STYLES,d=/^-?\d+(?:px)?$/i,e=/^-?\d/,g=/opacity=([^)]*)/,m=/alpha\([^)]*\)/i;try{b.isNullOrUndefined(a.style.opacity)&&(i.opacity={get:function(a,b){return g.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,c){var c=parseFloat(c),d=a.style,e=a.currentStyle,g=isNaN(c)?"":"alpha(opacity="+100*c+")",f=b.trim(e&&e.filter||d.filter||
"");d.zoom=1;if(1<=c&&""===b.trim(f.replace(m,""))&&(d.removeAttribute("filter"),e&&!e.filter))return;d.filter=m.test(f)?f.replace(m,g):f+(f?", ":"")+g}})}catch(k){b.log("IE filters ActiveX is disabled. ex = "+k)}var j=8==j.ie,l={};l.thin=j?"1px":"2px";l.medium=j?"3px":"4px";l.thick=j?"5px":"6px";b.each(["","Top","Left","Right","Bottom"],function(a){var b="border"+a+"Width",c="border"+a+"Style";i[b]={get:function(a,d){var e=d?a.currentStyle:0,g=e&&""+e[b]||void 0;g&&0>g.indexOf("px")&&(g=l[g]&&"none"!==
e[c]?l[g]:0);return g}}});if(!(h.defaultView||{}).getComputedStyle&&a.currentStyle)c._getComputedStyle=function(a,b){var b=c._cssProps[b]||b,g=a.currentStyle&&a.currentStyle[b];if(!d.test(g)&&e.test(g)){var f=a.style,h=f.left,i=a.runtimeStyle&&a.runtimeStyle.left;i&&(a.runtimeStyle.left=a.currentStyle.left);f.left="fontSize"===b?"1em":g||0;g=f.pixelLeft+"px";f.left=h;i&&(a.runtimeStyle.left=i)}return""===g?"auto":g};return c},{requires:["./base","ua","./style"]});
KISSY.add("dom/traversal",function(b,c,j){function f(a,e,g,f,k,l){if(!(a=c.get(a)))return null;if(0===e)return a;l||(a=a[g]);if(!a)return null;k=k&&c.get(k)||null;e===j&&(e=1);var l=[],n=b.isArray(e),o,p;b.isNumber(e)&&(o=0,p=e,e=function(){return++o===p});for(;a&&a!=k;){if(i(a)&&h(a,e)&&(!f||f(a)))if(l.push(a),!n)break;a=a[g]}return n?l:l[0]||null}function h(a,e){if(!e)return!0;if(b.isArray(e))for(var g=0;g<e.length;g++){if(c.test(a,e[g]))return!0}else if(c.test(a,e))return!0;return!1}function a(a,
b,g){var f=[],h=a=c.get(a);a&&g&&(h=a.parentNode);if(h){g=0;for(h=h.firstChild;h;h=h.nextSibling)if(i(h)&&h!==a&&(!b||c.test(h,b)))f[g++]=h}return f}var i=c._isElementNode;b.mix(c,{closest:function(a,b,g){return f(a,b,"parentNode",function(a){return a.nodeType!=c.DOCUMENT_FRAGMENT_NODE},g,!0)},parent:function(a,b,g){return f(a,b,"parentNode",function(a){return a.nodeType!=c.DOCUMENT_FRAGMENT_NODE},g)},first:function(a,b){var g=c.get(a);return f(g&&g.firstChild,b,"nextSibling",j,j,!0)},last:function(a,
b){var g=c.get(a);return f(g&&g.lastChild,b,"previousSibling",j,j,!0)},next:function(a,b){return f(a,b,"nextSibling",j)},prev:function(a,b){return f(a,b,"previousSibling",j)},siblings:function(b,c){return a(b,c,!0)},children:function(b,c){return a(b,c,j)},__contains:document.documentElement.contains?function(a,b){if(a.nodeType==c.TEXT_NODE)return!1;var g;if(b.nodeType==c.TEXT_NODE)b=b.parentNode,g=!0;else{if(b.nodeType==c.DOCUMENT_NODE)return!1;g=a!==b}return g&&(a.contains?a.contains(b):!0)}:document.documentElement.compareDocumentPosition?
function(a,b){return!!(a.compareDocumentPosition(b)&16)}:0,contains:function(a,b){a=c.get(a);b=c.get(b);if(a&&b)return c.__contains(a,b)},equals:function(a,b){a=c.query(a);b=c.query(b);if(a.length!=b.length)return!1;for(var g=a.length;0<=g;g--)if(a[g]!=b[g])return!1;return!0}});return c},{requires:["./base"]});KISSY.add("dom",function(b,c){return c},{requires:"dom/attr,dom/class,dom/create,dom/data,dom/insertion,dom/offset,dom/style,dom/selector,dom/style-ie,dom/traversal".split(",")});
KISSY.add("event/keycodes",function(){var b={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,
WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,
MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(c){if(c.altKey&&!c.ctrlKey||c.metaKey||c.keyCode>=b.F1&&c.keyCode<=b.F12)return!1;switch(c.keyCode){case b.ALT:case b.CAPS_LOCK:case b.CONTEXT_MENU:case b.CTRL:case b.DOWN:case b.END:case b.ESC:case b.HOME:case b.INSERT:case b.LEFT:case b.MAC_FF_META:case b.META:case b.NUMLOCK:case b.NUM_CENTER:case b.PAGE_DOWN:case b.PAGE_UP:case b.PAUSE:case b.PHANTOM:case b.PRINT_SCREEN:case b.RIGHT:case b.SHIFT:case b.UP:case b.WIN_KEY:case b.WIN_KEY_RIGHT:return!1;
default:return!0}},isCharacterKey:function(c){if(c>=b.ZERO&&c<=b.NINE||c>=b.NUM_ZERO&&c<=b.NUM_MULTIPLY||c>=b.A&&c<=b.Z||goog.userAgent.WEBKIT&&0==c)return!0;switch(c){case b.SPACE:case b.QUESTION_MARK:case b.NUM_PLUS:case b.NUM_MINUS:case b.NUM_PERIOD:case b.NUM_DIVISION:case b.SEMICOLON:case b.DASH:case b.EQUALS:case b.COMMA:case b.PERIOD:case b.SLASH:case b.APOSTROPHE:case b.SINGLE_QUOTE:case b.OPEN_SQUARE_BRACKET:case b.BACKSLASH:case b.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};return b});
KISSY.add("event/object",function(b,c){function j(a,b,c){this.currentTarget=a;this.originalEvent=b||{};b?(this.type=b.type,this._fix()):(this.type=c,this.target=a);this.currentTarget=a;this.fixed=!0}var f=document,h="altKey,attrChange,attrName,bubbles,button,cancelable,charCode,clientX,clientY,ctrlKey,currentTarget,data,detail,eventPhase,fromElement,handler,keyCode,metaKey,newValue,offsetX,offsetY,originalTarget,pageX,pageY,prevValue,relatedNode,relatedTarget,screenX,screenY,shiftKey,srcElement,target,toElement,view,wheelDelta,which,axis".split(",");
b.augment(j,{_fix:function(){for(var a=this.originalEvent,b=h.length,d,e=this.currentTarget,e=9===e.nodeType?e:e.ownerDocument||f;b;)d=h[--b],this[d]=a[d];this.target||(this.target=this.srcElement||f);3===this.target.nodeType&&(this.target=this.target.parentNode);!this.relatedTarget&&this.fromElement&&(this.relatedTarget=this.fromElement===this.target?this.toElement:this.fromElement);this.pageX===c&&this.clientX!==c&&(a=e.documentElement,b=e.body,this.pageX=this.clientX+(a&&a.scrollLeft||b&&b.scrollLeft||
0)-(a&&a.clientLeft||b&&b.clientLeft||0),this.pageY=this.clientY+(a&&a.scrollTop||b&&b.scrollTop||0)-(a&&a.clientTop||b&&b.clientTop||0));this.which===c&&(this.which=this.charCode===c?this.keyCode:this.charCode);this.metaKey===c&&(this.metaKey=this.ctrlKey);!this.which&&this.button!==c&&(this.which=this.button&1?1:this.button&2?3:this.button&4?2:0)},preventDefault:function(){var a=this.originalEvent;a.preventDefault?a.preventDefault():a.returnValue=!1;this.isDefaultPrevented=!0},stopPropagation:function(){var a=
this.originalEvent;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0;this.isPropagationStopped=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=!0;this.stopPropagation()},halt:function(a){a?this.stopImmediatePropagation():this.stopPropagation();this.preventDefault()}});return j});
KISSY.add("event/utils",function(b,c){var j=document;return{splitAndRun:function(c,h){b.each(c.split(/\s+/),h)},batchForType:function(c,h,a,i){if(i&&0<i.indexOf(" ")){var d=b.makeArray(arguments);b.each(i.split(/\s+/),function(b){var g=[].concat(d);g.splice(0,4,a,b);c[h].apply(c,g)});return!0}return 0},isValidTarget:function(b){return b&&b.nodeType!==c.TEXT_NODE&&b.nodeType!==c.COMMENT_NODE},isIdenticalHandler:function(c,h,a){var i=c.scope||a,d=1,e=h.scope||a;if(c.fn!==h.fn||i!==e)d=0;else if((c=
c.data)!==(h=h.data))!c&&h||c&&!h?d=0:c&&h&&(!c.equals||!h.equals?b.error("no equals in data"):c.equals(h,a)||(d=0));return d},simpleAdd:j.addEventListener?function(b,c,a,i){b.addEventListener&&b.addEventListener(c,a,!!i)}:function(b,c,a){b.attachEvent&&b.attachEvent("on"+c,a)},simpleRemove:j.removeEventListener?function(b,c,a,i){b.removeEventListener&&b.removeEventListener(c,a,!!i)}:function(b,c,a){b.detachEvent&&b.detachEvent("on"+c,a)}}},{requires:["dom"]});
KISSY.add("event/base",function(b,c,j,f,h){function a(a,b){var c=u._data(a);return(c&&c.events||{})[b]||[]}function i(b,c){for(var d=a(b,c.type).slice(0),e,g,f=0,i=d.length;f<i&&!(e=d[f],e=e.fn.call(e.scope||b,c,e.data),e!==h&&(!1!==g&&(g=e),!1===e&&c.halt()),c.isImmediatePropagationStopped);++f);return g}function d(a,b,c,d,e){var g=s[b]||{};!d.length&&(!g.setup||!1===g.setup.call(a))&&l(a,b,c);g.add&&g.add.call(a,e)}var e=f.isValidTarget,g=f.isIdenticalHandler,m=f.batchForType,k=f.simpleRemove,l=
f.simpleAdd,n=f.splitAndRun,o=c._nodeName,p=b.makeArray,t=b.each,q=b.trim,v="",w="trigger-none-"+b.now(),s={},r="ksEventTargetId"+b.now(),u={_clone:function(a,b){if(b.nodeType===c.ELEMENT_NODE&&u._hasData(a)){var d=u._data(a).events;t(d,function(a,c){t(a,function(a){u.on(b,c,a.fn,a.scope,a.data)})})}},_hasData:function(a){return c.hasData(a,r)},_data:function(a){var b=p(arguments);b.splice(1,0,r);return c.data.apply(c,b)},_removeData:function(a){var b=p(arguments);b.splice(1,0,r);return c.removeData.apply(c,
b)},special:s,__add:function(a,c,f,h,m,k){var n;if(c&&b.isFunction(h)&&(!a||e(c))){(n=u._data(c))||u._data(c,n={});var l=n.events=n.events||{},l=l[f]=l[f]||[],h={fn:h,scope:m,data:k},p=n.handler;p||(p=n.handler=function(a,c){if(!(a&&a.type==v)){var d=p.target;if(!a||!a.fixed)a=new j(d,a);var e=a.type;b.isPlainObject(c)&&b.mix(a,c);e&&(a.type=e);return i(d,a)}},p.target=c);for(n=l.length-1;0<=n;--n)if(g(l[n],h,c))return;a&&(d(c,f,p,l,h),c=null);l.push(h)}},add:function(a,b,d,e,g){b=q(b);if(m(u,"add",
a,b,d,e,g))return a;c.query(a).each(function(a){u.__add(!0,a,b,d,e,g)});return a},__remove:function(a,c,d,f,i,j){if(c&&(!a||e(c))){var m=u._data(c),n=m&&m.events,l,p,o,w=a&&s[d]||{};if(n)if(d){if(l=n[d]){p=l.length;if(f&&p){var t={data:j,fn:f,scope:i},r,j=i=0;for(o=[];i<p;++i)r=l[i],g(r,t,c)?w.remove&&w.remove.call(c,r):o[j++]=r;n[d]=o;p=o.length}if(f===h||0===p)a&&(!w.tearDown||!1===w.tearDown.call(c))&&k(c,d,m.handler),delete n[d]}b.isEmptyObject(n)&&(m.handler.target=null,delete m.handler,delete m.events,
u._removeData(c))}else for(d in n)u.__remove(a,c,d)}},remove:function(a,b,d,e,g){b=q(b);if(m(u,"remove",a,b,d,e))return a;c.query(a).each(function(a){u.__remove(!0,a,b,d,e,g)});return a},_handle:i,fire:function(a,d,g,f){var m=!0,d=q(d);if(-1<d.indexOf(" "))return n(d,function(b){m=u.fire(a,b,g,f)&&m}),m;g=g||{};g.type=d;c.query(a).each(function(a){var c=d,k=g;if(e(a)){var n,l=!0;k instanceof j?n=k:(n=new j(a,h,c),b.mix(n,k));n.type=c;f&&n.halt();var k=a,p="on"+c;do n.currentTarget=k,i(k,n),k[p]&&
!1===k[p].call(k)&&n.preventDefault(),k=k.parentNode||k.ownerDocument||k===a.ownerDocument&&window;while(k&&!n.isPropagationStopped);if(n.isDefaultPrevented)l=!1;else if(!("click"===c&&o(a,"a"))){var s;try{p&&a[c]&&((s=a[p])&&(a[p]=null),v=c,a[c]())}catch(r){b.log("trigger action error : "),b.log(r)}s&&(a[p]=s);v=w}a=l}else a=!1;m=a&&m});return m}};u.__getListeners=a;u.on=u.add;u.detach=u.remove;return u},{requires:["dom","./object","./utils"]});
KISSY.add("event/target",function(b,c,j,f,h){function a(a,c,d){if(d instanceof j)return d.currentTarget=a,d;a=new j(a,h,c);b.isPlainObject(d)&&b.mix(a,d);a.type=c;return a}function i(a){a[m]=a[m]||{};return a[m]}function d(a){a[n]=a[n]||{};return a[n]}function e(a,b){var c=i(a);return c[b]&&c[b].bubbles||c[o]&&c[o].bubbles}function g(a){return function(b,d,e){var g=this,b=k(b);l(b,function(b){c["__"+a](!1,g,b,d,e)});return g}}var m="__~ks_publish",k=b.trim,l=f.splitAndRun,n="__~ks_bubble_targets",
o="*",f={fire:function(b,d){var g=this,f,h,i,b=k(b);if(0<b.indexOf(" "))return l(b,function(a){h=g.fire(a,d);!1===h&&(f=!1)}),f;i=a(g,b,d);f=c._handle(g,i);!i.isPropagationStopped&&e(g,b)&&(h=g.bubble(b,i),!1!==f&&(f=h));return f},publish:function(a,b){var c=i(this);(a=k(a))&&(c[a]=b)},bubble:function(a,c){var e,g=d(this);b.each(g,function(b){b=b.fire(a,c);!1!==e&&(e=b)});return e},addTarget:function(a){d(this)[b.stamp(a)]=a},removeTarget:function(a){delete d(this)[b.stamp(a)]},on:g("add")};f.detach=
g("remove");return f},{requires:["./base","./object","./utils"]});KISSY.add("event/focusin",function(b,c,j){c.ie||b.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(b){function c(a){return j.fire(a.target,b.name)}var a=0;j.special[b.name]={setup:function(){0===a++&&document.addEventListener(b.fix,c,!0)},tearDown:function(){0===--a&&document.removeEventListener(b.fix,c,!0)}}});return j},{requires:["ua","./base"]});
KISSY.add("event/hashchange",function(b,c,j,f){var h=document,f=h.documentMode||f.ie;if(!("onhashchange"in window)||f&&8>f){var a=window,i="<html><head><title>"+(h.title||"")+" - {hash}</title>{head}</head><body>{hash}</body></html>",d=function(){return"#"+location.href.replace(/^[^#]*#?(.*)$/,"$1")},e,g,m=function(){var a=d();a!==g&&(g=a,k(a));e=setTimeout(m,50)},k=f&&8>f?function(a){var a=b.substitute(i,{hash:b.escapeHTML(a),head:j._isCustomDomain()?"<script>document.domain = '"+h.domain+"';<\/script>":
""}),c=o.contentWindow.document;try{c.open(),c.write(a),c.close()}catch(d){}}:function(){c.fire(a,"hashchange")},l=function(){e||m()},n=function(){e&&clearTimeout(e);e=0},o;8>f&&(l=function(){if(!o){var e=j._genEmptyIframeSrc();o=j.create("<iframe "+(e?'src="'+e+'"':"")+' style="display: none" height="0" width="0" tabindex="-1" title="empty"/>');j.prepend(o,h.documentElement);c.add(o,"load",function(){c.remove(o,"load");k(d());c.add(o,"load",f);m()});h.onpropertychange=function(){try{"title"===event.propertyName&&
(o.contentWindow.document.title=h.title+" - "+d())}catch(a){}};var f=function(){var e=b.trim(o.contentWindow.document.body.innerText),f=d();e!=f&&(b.log("set loc hash :"+e),g=location.hash=e);c.fire(a,"hashchange")}}},n=function(){e&&clearTimeout(e);e=0;c.detach(o);j.remove(o);o=0});c.special.hashchange={setup:function(){if(this===a){g=d();l()}},tearDown:function(){this===a&&n()}}}},{requires:["./base","dom","ua"]});
KISSY.add("event/valuechange",function(b,c,j){function f(a){j.removeData(a,m);if(j.hasData(a,k)){var b=j.data(a,k);clearTimeout(b);j.removeData(a,k)}}function h(a){f(a.target)}function a(a){j.hasData(a,k)||j.data(a,k,setTimeout(function(){var b=a.value,d=j.data(a,m);b!==d&&(c.fire(a,e,{prevVal:d,newVal:b},!0),j.data(a,m,b));j.data(a,k,setTimeout(arguments.callee,l))},l))}function i(b){var c=b.target;"focus"==b.type&&j.data(c,m,c.value);a(c)}function d(a){f(a);c.remove(a,"blur",h);c.remove(a,"mousedown keyup keydown focus",
i)}var e="valuechange",g=j._nodeName,m="event/valuechange/history",k="event/valuechange/poll",l=50;c.special[e]={setup:function(){if(g(this,"input")||g(this,"textarea"))d(this),c.on(this,"blur",h),c.on(this,"mousedown keyup keydown focus",i)},tearDown:function(){d(this)}};return c},{requires:["./base","dom"]});
KISSY.add("event/delegate",function(b,c,j,f){function h(a,b){if(void 0===a.fn&&void 0===a.selector)return!0;if(void 0===a.fn)return this.selector==a.selector;var c=this.scope||b,d=a.scope||b;return this.fn==a.fn&&this.selector==a.selector&&c==d}function a(a,b){var d=c.closest(a.target,[b.selector],this);if(d){for(var e=a.currentTarget,f=0;f<d.length&&!(a.currentTarget=d[f],!1===b.fn.call(b.scope||this,a)&&a.halt(),a.isPropagationStopped);f++);a.currentTarget=e}}function i(a,b){var d,e=a.target,f=
a.relatedTarget;a.type=b.preType;if((e=c.closest(e,b.selector,this))&&e!==f&&(!f||!c.contains(e,f)))f=a.currentTarget,a.currentTarget=e,d=b.fn.call(b.scope||this,a),a.currentTarget=f;return d}var d=f.batchForType,e={focus:{type:"focusin"},blur:{type:"focusout"},mouseenter:{type:"mouseover",handler:i},mouseleave:{type:"mouseout",handler:i}};b.mix(j,{delegate:function(b,f,i,l,n){if(d(j,"delegate",b,f,i,l,n))return b;c.query(b).each(function(b){var c=f,d=a;e[f]&&(f=e[c].type,d=e[c].handler||d);j.on(b,
f,d,b,{fn:l,selector:i,preType:c,scope:n,equals:h})});return b},undelegate:function(b,f,i,l,n){if(d(j,"undelegate",b,f,i,l,n))return b;c.query(b).each(function(b){var c=f,d=a;e[f]&&(f=e[c].type,d=e[c].handler||d);j.remove(b,f,d,b,{fn:l,selector:i,preType:c,scope:n,equals:h})});return b}});return j},{requires:["dom","./base","./utils"]});
KISSY.add("event/mouseenter",function(b,c,j,f){f.ie||b.each([{name:"mouseenter",fix:"mouseover"},{name:"mouseleave",fix:"mouseout"}],function(f){function a(a){var d=a.relatedTarget;a.type=f.name;try{if(!d||d===document||d.parentNode)d!==this&&(!d||!j.contains(this,d))&&c._handle(this,a)}catch(e){b.log("withinElement error : ","error"),b.log(e,"error")}}c.special[f.name]={setup:function(){c.add(this,f.fix,a)},tearDown:function(){c.remove(this,f.fix,a)}}});return c},{requires:["./base","dom","ua"]});
KISSY.add("event/submit",function(b,c,j,f){b=document.documentMode;if(c.ie&&(9>c.ie||b&&9>b)){var h=f._nodeName;j.special.submit={setup:function(){if(h(this,"form"))return!1;j.on(this,"click keypress",a)},tearDown:function(){if(h(this,"form"))return!1;j.remove(this,"click keypress",a);f.query("form",this).each(function(a){a.__submit__fix&&(a.__submit__fix=0,j.remove(a,"submit",i))})}};var a=function(a){a=a.target;if((a=h(a,"input")||h(a,"button")?a.form:null)&&!a.__submit__fix)a.__submit__fix=1,j.on(a,
"submit",i)},i=function(a){this.parentNode&&j.fire(this.parentNode,"submit",a)}}},{requires:["ua","./base","dom"]});
KISSY.add("event/change",function(b,c,j,f){b=document.documentMode;if(c.ie&&(9>c.ie||b&&9>b)){var h=/^(?:textarea|input|select)$/i,a=function(a){a=a.type;return"checkbox"==a||"radio"==a};j.special.change={setup:function(){if(h.test(this.nodeName))if(a(this))j.on(this,"propertychange",i),j.on(this,"click",d);else return!1;else j.on(this,"beforeactivate",e)},tearDown:function(){if(h.test(this.nodeName))if(a(this))j.remove(this,"propertychange",i),j.remove(this,"click",d);else return!1;else j.remove(this,
"beforeactivate",e),f.query("textarea,input,select",this).each(function(a){a.__changeHandler&&(a.__changeHandler=0,j.remove(a,"change",g))})}};var i=function(a){"checked"==a.originalEvent.propertyName&&(this.__changed=1)},d=function(a){this.__changed&&(this.__changed=0,j.fire(this,"change",a))},e=function(a){a=a.target;h.test(a.nodeName)&&!a.__changeHandler&&(a.__changeHandler=1,j.on(a,"change",g))},g=function(b){if(!a(this)){var c;(c=this.parentNode)&&j.fire(c,"change",b)}}}},{requires:["ua","./base",
"dom"]});
KISSY.add("event/mousewheel",function(b,c,j,f,h){function a(a){var d,e,f,i=a.detail;a.wheelDelta&&(f=a.wheelDelta/120);a.detail&&(f=-(0==i%3?i/3:i));void 0!==a.axis&&(a.axis===a.HORIZONTAL_AXIS?(e=0,d=-1*f):a.axis===a.VERTICAL_AXIS&&(d=0,e=f));void 0!==a.wheelDeltaY&&(e=a.wheelDeltaY/120);void 0!==a.wheelDeltaX&&(d=-1*a.wheelDeltaX/120);!d&&!e&&(e=f);a=new h(this,a);b.mix(a,{deltaY:e,delta:f,deltaX:d,type:"mousewheel"});return c._handle(this,a)}var i=j.gecko?"DOMMouseScroll":"mousewheel",d=f.simpleRemove,
e=f.simpleAdd;c.special.mousewheel={setup:function(){var d;d=c._data(this)[d]=b.bind(a,this);e(this,i,d)},tearDown:function(){var a,b=c._data(this);a=b[a];d(this,i,a);delete b[a]}}},{requires:["./base","ua","./utils","./object"]});KISSY.add("event",function(b,c,j,f,h){j.KeyCodes=c;j.Target=f;j.Object=h;return j},{requires:"event/keycodes,event/base,event/target,event/object,event/focusin,event/hashchange,event/valuechange,event/delegate,event/mouseenter,event/submit,event/change,event/mousewheel".split(",")});
KISSY.add("node/base",function(b,c,j){function f(d,e,g){if(!(this instanceof f))return new f(d,e,g);if(d)if(b.isString(d)){if(d=c.create(d,e,g),d.nodeType===c.DOCUMENT_FRAGMENT_NODE)return h.push.apply(this,a(d.childNodes)),j}else{if(b.isArray(d)||i(d))return h.push.apply(this,a(d)),j}else return j;this[0]=d;this.length=1;return j}var h=Array.prototype,a=b.makeArray,i=c._isNodeList;b.augment(f,{length:0,item:function(a){return b.isNumber(a)?a>=this.length?null:new f(this[a]):new f(a)},add:function(a,
c,g){b.isNumber(c)&&(g=c,c=j);a=f.all(a,c).getDOMNodes();c=new f(this);g===j?h.push.apply(c,a):(g=[g,0],g.push.apply(g,a),h.splice.apply(c,g));return c},slice:function(a,b){return new f(h.slice.call(this,a,b))},getDOMNodes:function(){return h.slice.call(this)},each:function(a,c){var g=this;b.each(g,function(b,h){b=new f(b);return a.call(c||b,b,h,g)});return g},getDOMNode:function(){return this[0]},end:function(){return this.__parent||this},all:function(a){a=0<this.length?f.all(a,this):new f;a.__parent=
this;return a},one:function(a){a=this.all(a);if(a=a.length?a.slice(0,1):null)a.__parent=this;return a}});b.mix(f,{all:function(a,e){return b.isString(a)&&(a=b.trim(a))&&3<=a.length&&b.startsWith(a,"<")&&b.endsWith(a,">")?(e&&(e.getDOMNode&&(e=e.getDOMNode()),e.ownerDocument&&(e=e.ownerDocument)),new f(a,j,e)):new f(c.query(a,e))},one:function(a,b){var c=f.all(a,b);return c.length?c.slice(0,1):null}});b.mix(f,c._NODE_TYPE);return f},{requires:["dom"]});
KISSY.add("node/attach",function(b,c,j,f,h){function a(a,b,d){d.unshift(b);a=c[a].apply(c,d);return a===h?b:a}var i=f.prototype,d=b.makeArray;b.each("equals,contains,scrollTop,scrollLeft,height,width,innerHeight,innerWidth,outerHeight,outerWidth,addStyleSheet,appendTo,prependTo,insertBefore,before,after,insertAfter,test,hasClass,addClass,removeClass,replaceClass,toggleClass,removeAttr,hasAttr,hasProp,scrollIntoView,remove,empty,removeData,hasData,unselectable".split(","),function(b){i[b]=function(){var c=
d(arguments);return a(b,this,c)}});b.each("filter,first,last,parent,closest,next,prev,clone,siblings,children".split(","),function(a){i[a]=function(){var b=d(arguments);b.unshift(this);b=c[a].apply(c,b);return b===h?this:b===null?null:new f(b)}});b.each({attr:1,text:0,css:1,style:1,val:0,prop:1,offset:0,html:0,data:1},function(e,g){i[g]=function(){var f;f=d(arguments);f[e]===h&&!b.isObject(f[0])?(f.unshift(this),f=c[g].apply(c,f)):f=a(g,this,f);return f}});b.each(["on","detach","fire","delegate",
"undelegate"],function(a){i[a]=function(){var b=d(arguments);b.unshift(this);j[a].apply(j,b);return this}})},{requires:["dom","event","./base"]});KISSY.add("node/override",function(b,c,j,f){b.each(["append","prepend","before","after"],function(h){f.prototype[h]=function(a){b.isString(a)&&(a=c.create(a));if(a)c[h](a,this);return this}})},{requires:["dom","event","./base","./attach"]});
KISSY.add("anim/easing",function(){var b=Math.PI,c=Math.pow,j=Math.sin,f=1.70158,h={swing:function(a){return-Math.cos(a*b)/2+0.5},easeNone:function(a){return a},easeIn:function(a){return a*a},easeOut:function(a){return(2-a)*a},easeBoth:function(a){return 1>(a*=2)?0.5*a*a:0.5*(1- --a*(a-2))},easeInStrong:function(a){return a*a*a*a},easeOutStrong:function(a){return 1- --a*a*a*a},easeBothStrong:function(a){return 1>(a*=2)?0.5*a*a*a*a:0.5*(2-(a-=2)*a*a*a)},elasticIn:function(a){return 0===a||1===a?a:
-(c(2,10*(a-=1))*j((a-0.075)*2*b/0.3))},elasticOut:function(a){return 0===a||1===a?a:c(2,-10*a)*j((a-0.075)*2*b/0.3)+1},elasticBoth:function(a){return 0===a||2===(a*=2)?a:1>a?-0.5*c(2,10*(a-=1))*j((a-0.1125)*2*b/0.45):0.5*c(2,-10*(a-=1))*j((a-0.1125)*2*b/0.45)+1},backIn:function(a){1===a&&(a-=0.0010);return a*a*((f+1)*a-f)},backOut:function(a){return(a-=1)*a*((f+1)*a+f)+1},backBoth:function(a){return 1>(a*=2)?0.5*a*a*(((f*=1.525)+1)*a-f):0.5*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)},bounceIn:function(a){return 1-
h.bounceOut(1-a)},bounceOut:function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375},bounceBoth:function(a){return 0.5>a?0.5*h.bounceIn(2*a):0.5*h.bounceOut(2*a-1)+0.5},NativeTimeFunction:{easeNone:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeBoth:"ease-in-out",easeInStrong:"cubic-bezier(0.9, 0.0, 0.9, 0.5)",easeOutStrong:"cubic-bezier(0.1, 0.5, 0.1, 1.0)",easeBothStrong:"cubic-bezier(0.9, 0.0, 0.1, 1.0)"}};
return h});
KISSY.add("anim/manager",function(b){var c=b.stamp;return{interval:15,runnings:{},timer:null,start:function(b){var f=c(b);this.runnings[f]||(this.runnings[f]=b,this.startTimer())},stop:function(b){this.notRun(b)},notRun:function(j){delete this.runnings[c(j)];b.isEmptyObject(this.runnings)&&this.stopTimer()},pause:function(b){this.notRun(b)},resume:function(b){this.start(b)},startTimer:function(){var b=this;b.timer||(b.timer=setTimeout(function(){b.runFrames()?b.stopTimer():(b.timer=0,b.startTimer())},b.interval))},
stopTimer:function(){var b=this.timer;b&&(clearTimeout(b),this.timer=0)},runFrames:function(){var b=1,c=this.runnings,h;for(h in c)c.hasOwnProperty(h)&&(b=0,c[h]._frame());return b}}});
KISSY.add("anim/fx",function(b,c,j){function f(a){this.load(a)}function h(a,b){return(!a.style||null==a.style[b])&&null!=c.attr(a,b,j,1)?1:0}b.augment(f,{load:function(a){b.mix(this,a);this.startTime=b.now();this.pos=0;this.unit=this.unit||""},frame:function(a){var c=0,d=b.now();a||d>=this.duration+this.startTime?c=this.pos=1:(a=d-this.startTime,this.pos=this.easing(a/this.duration));this.update();return c},interpolate:function(a,c,d){return b.isNumber(a)&&b.isNumber(c)?(a+(c-a)*d).toFixed(3):j},
update:function(){var a=this.prop,f=this.elem,d=this.from,e=this.to,g=this.interpolate(d,e,this.pos);g===j?this.finished||(this.finished=1,c.css(f,a,e),b.log(this.prop+" update directly ! : "+g+" : "+d+" : "+e)):(g+=this.unit,h(f,a)?c.attr(f,a,g,1):c.css(f,a,g))},cur:function(){var a=this.prop,b=this.elem;if(h(b,a))return c.attr(b,a,j,1);var d,a=c.css(b,a);return isNaN(d=parseFloat(a))?!a||"auto"===a?0:a:d}});f.Factories={};f.getFx=function(a){return new (f.Factories[a.prop]||f)(a)};return f},{requires:["dom"]});
KISSY.add("anim/queue",function(b,c){function j(b,e,f){var e=e||a,i,j=c.data(b,h);!j&&!f&&c.data(b,h,j={});j&&(i=j[e],!i&&!f&&(i=j[e]=[]));return i}function f(d,e){var e=e||a,f=c.data(d,h);f&&delete f[e];b.isEmptyObject(f)&&c.removeData(d,h)}var h=b.guid("ks-queue-"+b.now()+"-"),a=b.guid("ks-queue-"+b.now()+"-"),i={queueCollectionKey:h,queue:function(a){var b=j(a.elem,a.config.queue);b.push(a);"..."!==b[0]&&i.dequeue(a);return b},remove:function(a){var c=j(a.elem,a.config.queue,1);c&&(a=b.indexOf(a,
c),-1<a&&c.splice(a,1))},removeQueues:function(a){c.removeData(a,h)},removeQueue:f,dequeue:function(a){var b=a.elem,a=a.config.queue,c=j(b,a,1),h=c&&c.shift();"..."==h&&(h=c.shift());h?(c.unshift("..."),h._runInternal()):f(b,a)}};return i},{requires:["dom"]});
KISSY.add("anim/base",function(b,c,j,f,h,a,i,d){function e(a,d,f,h,i){if(a=c.get(a)){if(!(this instanceof e))return new e(a,d,f,h,i);var d=b.isString(d)?b.unparam(d,";",":"):b.clone(d),j;for(j in d){var k=n(b.trim(j));j!=k&&(d[k]=d[j],delete d[j])}f=b.isPlainObject(f)?b.clone(f):{duration:parseFloat(f)||void 0,easing:h,complete:i};this.config=f=b.merge(q,f);f.duration*=1E3;this.elem=this.domEl=a;this.props=d;this._backupProps={};this._fxs={};this.on("complete",g)}}function g(a){var d=this._backupProps,
e=this.config;b.isEmptyObject(d=this._backupProps)||c.css(this.elem,d);e.complete&&e.complete.call(this,a)}function m(){var d=this.config,e=this._backupProps,g=this.elem,j,m,l,n=d.specialEasing||{},w=this._fxs,q=this.props;k(this);if(!1===this.fire("start"))this.stop(0);else{if(o(g))for(l in j="none"==c.css(g,"display"),q)if(m=q[l],"hide"==m&&j||"show"==m&&!j){this.stop(1);return}b.each(q,function(a,c){if(q.hasOwnProperty(c)){var e;b.isArray(a)?(e=n[c]=a[1],q[c]=a[0]):e=n[c]=n[c]||d.easing;b.isString(e)&&
(e=n[c]=f[e]);n[c]=e||f.easeNone}});b.each(t,function(a,d){var e,f,h;if(h=q[d]){f={};b.each(a,function(a){f[a]=c.css(g,a);n[a]=n[d]});c.css(g,d,h);for(e in f)q[e]=c.css(g,e),c.css(g,e,f[e]);delete q[d]}});for(l in q)if(q.hasOwnProperty(l)){m=b.trim(q[l]);var B,A,C={elem:g,prop:l,duration:d.duration,easing:n[l]},E=i.getFx(C);b.inArray(m,p)?(e[l]=c.style(g,l),"toggle"==m&&(m=j?"show":"hide"),"hide"==m?(B=0,A=E.cur(),e.display="none"):(A=0,B=E.cur(),c.css(g,l,A),c.show(g)),m=B):(B=m,A=E.cur());m+="";
var H="",G=m.match(v);if(G){B=parseFloat(G[2]);if((H=G[3])&&"px"!==H)c.css(g,l,m),A*=B/E.cur(),c.css(g,l,A+H);G[1]&&(B=("-="===G[1]?-1:1)*B+A)}C.from=A;C.to=B;C.unit=H;E.load(C);w[l]=E}if(o(g)&&(q.width||q.height))b.mix(e,{overflow:c.style(g,"overflow"),"overflow-x":c.style(g,"overflowX"),"overflow-y":c.style(g,"overflowY")}),c.css(g,"overflow","hidden"),"inline"===c.css(g,"display")&&"none"===c.css(g,"float")&&(h.ie?c.css(g,"zoom",1):c.css(g,"display","inline-block"));a.start(this)}}function k(a){var d=
a.elem,e=c.data(d,w);e||c.data(d,w,e={});e[b.stamp(a)]=a}function l(a,e,f,g){f&&!1!==g&&d.removeQueue(a,g);var a=c.data(a,w),a=b.merge(a),h;for(h in a)f=a[h],f.config.queue==g&&f.stop(e)}var n=c._camelCase,o=c._isElementNode,p=["hide","show","toggle"],t={border:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],borderBottom:["borderBottomWidth"],borderLeft:["borderLeftWidth"],borderTop:["borderTopWidth"],borderRight:["borderRightWidth"],font:["fontSize","fontWeight"],margin:["marginBottom",
"marginLeft","marginRight","marginTop"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"]},q={duration:1,easing:"easeNone"},v=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i;e.SHORT_HANDS=t;b.augment(e,j.Target,{isRunning:function(){var a=c.data(this.elem,w);return a?!!a[b.stamp(this)]:0},_runInternal:m,run:function(){!1===this.config.queue?m.call(this):d.queue(this);return this},_frame:function(){var a,b=1,c=this._fxs;for(a in c)c.hasOwnProperty(a)&&(b&=c[a].frame());(!1===this.fire("step")||
b)&&this.stop(b)},stop:function(e){var f=this.config.queue,g,h=this._fxs;if(this.isRunning()){if(e){for(g in h)h.hasOwnProperty(g)&&h[g].frame(1);this.fire("complete")}a.stop(this);e=this.elem;if(g=c.data(e,w))delete g[b.stamp(this)],b.isEmptyObject(g)&&c.removeData(e,w);!1!==f&&d.dequeue(this);return this}!1!==f&&d.remove(this)}});var w=b.guid("ks-anim-unqueued-"+b.now()+"-");e.stop=function(a,e,f,g){if(null===g||b.isString(g)||!1===g)return l.apply(void 0,arguments);f&&d.removeQueues(a);var h=c.data(a,
w),h=b.merge(h),i;for(i in h)h[i].stop(e)};e.isRunning=function(a){return(a=c.data(a,w))&&!b.isEmptyObject(a)};e.Q=d;return e},{requires:"dom,event,./easing,ua,./manager,./fx,./queue".split(",")});
KISSY.add("anim/color",function(b,c,j,f){function h(a){var a=a+"",c;if(c=a.match(g))return[parseInt(c[1]),parseInt(c[2]),parseInt(c[3])];if(c=a.match(m))return[parseInt(c[1]),parseInt(c[2]),parseInt(c[3]),parseInt(c[4])];if(c=a.match(k)){for(a=1;a<c.length;a++)2>c[a].length&&(c[a]+=c[a]);return[parseInt(c[1],i),parseInt(c[2],i),parseInt(c[3],i)]}if(e[a=a.toLowerCase()])return e[a];b.log("only allow rgb or hex color string : "+a,"warn");return[255,255,255]}function a(){a.superclass.constructor.apply(this,
arguments)}var i=16,d=Math.floor,e={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]},g=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,m=/^rgba\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+),\s*([0-9]+)\)$/i,k=/^#?([0-9A-F]{1,2})([0-9A-F]{1,2})([0-9A-F]{1,2})$/i,c=j.SHORT_HANDS;
c.background=["backgroundColor"];c.borderColor=["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"];c.border.push("borderBottomColor","borderLeftColor","borderRightColor","borderTopColor");c.borderBottom.push("borderBottomColor");c.borderLeft.push("borderLeftColor");c.borderRight.push("borderRightColor");c.borderTop.push("borderTopColor");b.extend(a,f,{load:function(){a.superclass.load.apply(this,arguments);this.from&&(this.from=h(this.from));this.to&&(this.to=h(this.to))},
interpolate:function(c,e,f){var g=a.superclass.interpolate;if(3==c.length&&3==e.length)return"rgb("+[d(g(c[0],e[0],f)),d(g(c[1],e[1],f)),d(g(c[2],e[2],f))].join(", ")+")";if(4==c.length||4==e.length)return"rgba("+[d(g(c[0],e[0],f)),d(g(c[1],e[1],f)),d(g(c[2],e[2],f)),d(g(c[3]||1,e[3]||1,f))].join(", ")+")";b.log("anim/color unknown value : "+c)}});b.each("backgroundColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor,color,outlineColor".split(","),function(b){f.Factories[b]=a});
return a},{requires:["dom","./base","./fx"]});KISSY.add("anim",function(b,c,j){c.Easing=j;return c},{requires:["anim/base","anim/easing","anim/color"]});
KISSY.add("node/anim",function(b,c,j,f,h){function a(a,b,c){for(var f=[],h={},c=c||0;c<b;c++)f.push.apply(f,i[c]);for(c=0;c<f.length;c++)h[f[c]]=a;return h}var i=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];b.augment(f,{animate:function(){var a=b.makeArray(arguments);b.each(this,function(b){j.apply(h,[b].concat(a)).run()});return this},stop:function(a,c,f){b.each(this,function(b){j.stop(b,a,c,f)});
return this},isRunning:function(){for(var a=0;a<this.length;a++)if(j.isRunning(this[a]))return 1;return 0}});b.each({show:a("show",3),hide:a("hide",3),toggle:a("toggle",3),fadeIn:a("show",3,2),fadeOut:a("hide",3,2),fadeToggle:a("toggle",3,2),slideDown:a("show",1),slideUp:a("hide",1),slideToggle:a("toggle",1)},function(a,e){f.prototype[e]=function(f,h,i){if(c[e]&&!f)c[e](this);else b.each(this,function(b){j(b,a,f,i||"easeOut",h).run()});return this}})},{requires:["dom","anim","./base"]});
KISSY.add("node",function(b,c,j){j.KeyCodes=c.KeyCodes;return j},{requires:["event","node/base","node/attach","node/override","node/anim"]});
KISSY.add("json/json2",function(b,c){function j(a){return 10>a?"0"+a:a}function f(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=k[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function h(a,b){var c,d,e,i,j=g,k,r=b[a];r&&"object"===typeof r&&"function"===typeof r.toJSON&&(r=r.toJSON(a));"function"===typeof l&&(r=l.call(b,a,r));switch(typeof r){case "string":return f(r);case "number":return isFinite(r)?""+r:"null";case "boolean":case "null":return""+
r;case "object":if(!r)return"null";g+=m;k=[];if("[object Array]"===Object.prototype.toString.apply(r)){i=r.length;for(c=0;c<i;c+=1)k[c]=h(c,r)||"null";e=0===k.length?"[]":g?"[\n"+g+k.join(",\n"+g)+"\n"+j+"]":"["+k.join(",")+"]";g=j;return e}if(l&&"object"===typeof l){i=l.length;for(c=0;c<i;c+=1)d=l[c],"string"===typeof d&&(e=h(d,r))&&k.push(f(d)+(g?": ":":")+e)}else for(d in r)Object.hasOwnProperty.call(r,d)&&(e=h(d,r))&&k.push(f(d)+(g?": ":":")+e);e=0===k.length?"{}":g?"{\n"+g+k.join(",\n"+g)+"\n"+
j+"}":"{"+k.join(",")+"}";g=j;return e}}var a=window,i=a.JSON;if(!i||9>c.ie)i=a.JSON={};"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+j(this.getUTCMonth()+1)+"-"+j(this.getUTCDate())+"T"+j(this.getUTCHours())+":"+j(this.getUTCMinutes())+":"+j(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,m,k={"":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;"function"!==typeof i.stringify&&(i.stringify=function(a,b,c){var d;m=g="";if(typeof c==="number")for(d=0;d<c;d=d+1)m=m+" ";else typeof c==="string"&&(m=c);if((l=b)&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw Error("JSON.stringify");return h("",{"":a})});
"function"!==typeof i.parse&&(i.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&typeof g==="object")for(e in g)if(Object.hasOwnProperty.call(g,e)){f=c(g,e);f!==void 0?g[e]=f:delete g[e]}return b.call(a,d,g)}var e,a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
""))){e=eval("("+a+")");return typeof b==="function"?c({"":e},""):e}throw new SyntaxError("JSON.parse");});return i},{requires:["ua"]});KISSY.add("json",function(b,c){return{parse:function(j){return b.isNullOrUndefined(j)||""===j?null:c.parse(j)},stringify:c.stringify}},{requires:["json/json2"]});
KISSY.add("ajax/form-serializer",function(b,c){var j=/^(?:select|textarea)/i,f=/\r?\n/g,h=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i;return{serialize:function(a){var i=[],d={};c.query(a).each(function(a){a=a.elements?b.makeArray(a.elements):[a];i.push.apply(i,a)});i=b.filter(i,function(a){return a.name&&!a.disabled&&(a.checked||j.test(a.nodeName)||h.test(a.type))});b.each(i,function(a){var g=c.val(a),g=b.map(b.makeArray(g),function(a){return a.replace(f,
"\r\n")}),a=d[a.name]=d[a.name]||[];a.push.apply(a,g)});return b.param(d,void 0,void 0,!1)}}},{requires:["dom"]});
KISSY.add("ajax/xhrobject",function(b,c){function j(a){var c=a.responseText,d=a.responseXML,e=a.config,f=e.converters,h=a.converters||{},j,l,n=e.contents,o=e.dataType;if(c||d){for(e=a.mimeType||a.getResponseHeader("Content-Type");"*"==o[0];)o.shift();if(!o.length)for(j in n)if(n[j].test(e)){o[0]!=j&&o.unshift(j);break}o[0]=o[0]||"text";"text"==o[0]&&void 0!==c?l=c:"xml"==o[0]&&void 0!==d?l=d:b.each(["text","xml"],function(a){var b=o[0];if(h[a]&&h[a][b]||f[a]&&f[a][b])return o.unshift(a),l="text"==
a?c:d,!1})}n=o[0];for(e=1;e<o.length;e++){j=o[e];var p=h[n]&&h[n][j]||f[n]&&f[n][j];if(!p)throw"no covert for "+n+" => "+j;l=p(l);n=j}a.responseData=l}function f(a){b.mix(this,{responseData:null,config:a||{},timeoutTimer:null,responseText:null,responseXML:null,responseHeadersString:"",responseHeaders:null,requestHeaders:{},readyState:0,state:0,statusText:null,status:0,transport:null})}var h=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg;b.augment(f,c.Target,{setRequestHeader:function(a,b){this.requestHeaders[a]=
b;return this},getAllResponseHeaders:function(){return 2===this.state?this.responseHeadersString:null},getResponseHeader:function(a){var b;if(2===this.state){if(!this.responseHeaders)for(this.responseHeaders={};b=h.exec(this.responseHeadersString);)this.responseHeaders[b[1]]=b[2];b=this.responseHeaders[a]}return void 0===b?null:b},overrideMimeType:function(a){this.state||(this.mimeType=a);return this},abort:function(a){a=a||"abort";this.transport&&this.transport.abort(a);this.callback(0,a);return this},
callback:function(a,b){if(2!=this.state){this.state=2;this.readyState=4;var c;if(200<=a&&300>a||304==a)if(304==a)b="notmodified",c=!0;else try{j(this),b="success",c=!0}catch(e){b="parsererror : "+e}else 0>a&&(a=0);this.status=a;this.statusText=b;c?this.fire("success"):this.fire("error");this.fire("complete");this.transport=void 0}}});return f},{requires:["event"]});
KISSY.add("ajax/base",function(b,c,j,f){function h(a){a=b.mix(b.clone(v),a||{},void 0,void 0,!0);if(!b.isBoolean(a.crossDomain)){var c=g.exec(a.url.toLowerCase());a.crossDomain=!(!c||!(c[1]!=p[1]||c[2]!=p[2]||(c[3]||("http:"===c[1]?k:l))!=(p[3]||("http:"===p[1]?k:l))))}a.processData&&a.data&&!b.isString(a.data)&&(a.data=b.param(a.data,void 0,void 0,a.serializeArray));a.type=a.type.toUpperCase();a.hasContent=!n.test(a.type);if(!a.hasContent&&(a.data&&(a.url+=(/\?/.test(a.url)?"&":"?")+a.data),!1===
a.cache))a.url+=(/\?/.test(a.url)?"&":"?")+"_ksTS="+(b.now()+"_"+b.guid());a.dataType=b.trim(a.dataType||"*").split(e);a.context=a.context||a;return a}function a(a,b){d.fire(a,{ajaxConfig:b.config,xhr:b})}function i(b){var c=this.config,b=b.type;this.timeoutTimer&&clearTimeout(this.timeoutTimer);c[b]&&c[b].call(c.context,this.responseData,this.statusText,this);a(b,this)}function d(c){if(c.url){var c=h(c),d=new f(c);a("start",d);var e=new (q[c.dataType[0]]||q["*"])(d);d.transport=e;c.contentType&&
d.setRequestHeader("Content-Type",c.contentType);var g=c.dataType[0],j=c.accepts;d.setRequestHeader("Accept",g&&j[g]?j[g]+("*"===g?"":", */*; q=0.01"):j["*"]);for(var k in c.headers)d.setRequestHeader(k,c.headers[k]);d.on("complete success error",i);d.readyState=1;a("send",d);c.async&&0<c.timeout&&(d.timeoutTimer=setTimeout(function(){d.abort("timeout")},1E3*c.timeout));try{d.state=1,e.send()}catch(m){2>d.status?d.callback(-1,m):b.error(m)}return d}}var e=/\s+/,g=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
m=function(a){return a},k=80,l=443,n=/^(?:GET|HEAD)$/,o,p;try{o=location.href}catch(t){b.log("ajax/base get curLocation error : "),b.log(t),o=document.createElement("a"),o.href="",o=o.href}p=g.exec(o);o=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/.test(p[1]);var q={},v={type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",async:!0,serializeArray:!0,processData:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",
"*":"*/*"},converters:{text:{json:c.parse,html:m,text:m,xml:b.parseXML}},contents:{xml:/xml/,html:/html/,json:/json/}};v.converters.html=v.converters.text;b.mix(d,j.Target);b.mix(d,{isLocal:o,setupConfig:function(a){b.mix(v,a,void 0,void 0,!0)},setupTransport:function(a,b){q[a]=b},getTransport:function(a){return q[a]},getConfig:function(){return v}});return d},{requires:["json","event","./xhrobject"]});
KISSY.add("ajax/xhrbase",function(b,c){function j(a,b){try{return new (b||f).XMLHttpRequest}catch(c){}}var f=window,h=f.XDomainRequest,a={proto:{}};a.xhr=f.ActiveXObject?function(a,d){var e;if(a&&h)e=new h;else if(!(e=!c.isLocal&&j(a,d)))a:{try{e=new (d||f).ActiveXObject("Microsoft.XMLHTTP");break a}catch(g){b.log("createActiveXHR error")}e=void 0}return e}:j;b.mix(a.proto,{sendInternal:function(){var a=this,c=a.xhrObj,e=c.config,f=a.xhr,j,k;e.username?f.open(e.type,e.url,e.async,e.username,e.password):
f.open(e.type,e.url,e.async);if(j=e.xhrFields)for(k in j)f[k]=j[k];c.mimeType&&f.overrideMimeType&&f.overrideMimeType(c.mimeType);!e.crossDomain&&!c.requestHeaders["X-Requested-With"]&&(c.requestHeaders["X-Requested-With"]="XMLHttpRequest");try{if(!e.crossDomain)for(k in c.requestHeaders)f.setRequestHeader(k,c.requestHeaders[k])}catch(l){b.log("setRequestHeader in xhr error : "),b.log(l)}f.send(e.hasContent&&e.data||null);!e.async||4==f.readyState?a._callback():h&&f instanceof h?(f.onload=function(){f.readyState=
4;f.status=200;a._callback()},f.onerror=function(){f.readyState=4;f.status=500;a._callback()}):f.onreadystatechange=function(){a._callback()}},abort:function(){this._callback(0,1)},_callback:function(a,d){var e=this.xhr,f=this.xhrObj,j=f.config;try{if(d||4==e.readyState)if(h&&e instanceof h?(e.onerror=b.noop,e.onload=b.noop):e.onreadystatechange=b.noop,d)4!==e.readyState&&e.abort();else{var k=e.status;h&&e instanceof h||(f.responseHeadersString=e.getAllResponseHeaders());var l=e.responseXML;l&&l.documentElement&&
(f.responseXML=l);f.responseText=e.responseText;try{var n=e.statusText}catch(o){b.log("xhr statustext error : ","error"),b.log(o,"error"),n=""}!k&&c.isLocal&&!j.crossDomain?k=f.responseText?200:404:1223===k&&(k=204);f.callback(k,n)}}catch(p){b.log(p.stack||p,"error"),e.onreadystatechange=b.noop,d||f.callback(-1,p)}}});return a},{requires:["./base"]});
KISSY.add("ajax/subdomain",function(b,c,j,f){function h(a){var b=a.config;this.xhrObj=a;a=b.url.match(i);this.__hostname=a[2];this.__protocol=a[1];b.crossDomain=!1}function a(){var b=e[this.__hostname];b.ready=1;j.detach(b.iframe,"load",a,this);this.send()}var i=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,d=document,e={};b.augment(h,c.proto,{send:function(){var g=this.xhrObj.config,h=this.__hostname,i=e[h],l="/sub_domain_proxy.html";g.xdr&&g.xdr.subDomain&&g.xdr.subDomain.proxy&&(l=g.xdr.subDomain.proxy);
i&&i.ready?(this.xhr=c.xhr(0,i.iframe.contentWindow))?this.sendInternal():b.error("document.domain not set correctly!"):(i?g=i.iframe:(i=e[h]={},g=i.iframe=document.createElement("iframe"),f.css(g,{position:"absolute",left:"-9999px",top:"-9999px"}),f.prepend(g,d.body||d.documentElement),g.src=this.__protocol+"//"+h+l),j.on(g,"load",a,this))}});return h},{requires:["./xhrbase","event","dom"]});
KISSY.add("ajax/xdr",function(b,c,j){function f(a,b,c){g||(g=!0,a='<object id="'+i+'" type="application/x-shockwave-flash" data="'+a+'" width="0" height="0"><param name="movie" value="'+a+'" /><param name="FlashVars" value="yid='+b+"&uid="+c+'&host=KISSY.io" /><param name="allowScriptAccess" value="always" /></object>',b=e.createElement("div"),j.prepend(b,e.body||e.documentElement),b.innerHTML=a)}function h(a){b.log("use flash xdr");this.xhrObj=a}var a={},i="io_swf",d,e=document,g=!1;b.augment(h,
{send:function(){var c=this,e=c.xhrObj.config;f((e.xdr||{}).src||b.Config.base+"ajax/io.swf",1,1);d?(c._uid=b.guid(),a[c._uid]=c,d.send(e.url,{id:c._uid,uid:c._uid,method:e.type,data:e.hasContent&&e.data||{}})):setTimeout(function(){c.send()},200)},abort:function(){d.abort(this._uid)},_xdrResponse:function(b,c){var d,e=this.xhrObj;e.responseText=decodeURI(c.c.responseText);switch(b){case "success":d={status:200,statusText:"success"};delete a[c.id];break;case "abort":delete a[c.id];break;case "timeout":case "transport error":case "failure":delete a[c.id],
d={status:500,statusText:b}}d&&e.callback(d.status,d.statusText)}});c.applyTo=function(a,c,d){var a=c.split("."),e=b;b.each(a,function(a){e=e[a]});e.apply(null,d)};c.xdrReady=function(){d=e.getElementById(i)};c.xdrResponse=function(b,c,d){var e=a[c.uid];e&&e._xdrResponse(b,c,d)};b.io=c;return h},{requires:["./base","dom"]});
KISSY.add("ajax/xhr",function(b,c,j,f,h){var a=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,i=window.XDomainRequest,d=j.xhr();if(d){var e=function(a){a=a.split(".");return 2>a.length?a.join("."):a.reverse().slice(0,2).reverse().join(".")},g=function(b){var c=b.config,g=c.xdr||{};if(c.crossDomain){c=c.url.match(a);if(e(location.hostname)==e(c[2]))return new f(b);if(!("withCredentials"in d)&&("flash"===""+g.use||!i))return new h(b)}this.xhrObj=b};b.augment(g,j.proto,{send:function(){this.xhr=j.xhr(this.xhrObj.config.crossDomain);
this.sendInternal()}});c.setupTransport("*",g)}return c},{requires:["./base","./xhrbase","./subdomain","./xdr"]});
KISSY.add("ajax/script",function(b,c){function j(b){if(!b.config.crossDomain&&!b.config.forceScript)return new (c.getTransport("*"))(b);this.xhrObj=b;return 0}var f=document;c.setupConfig({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{text:{script:function(c){b.globalEval(c);return c}}}});b.augment(j,{send:function(){var b=this,a,c=this.xhrObj.config,d=f.head||f.getElementsByTagName("head")[0]||
f.documentElement;b.head=d;a=f.createElement("script");b.script=a;a.async="async";c.scriptCharset&&(a.charset=c.scriptCharset);a.src=c.url;a.onerror=a.onload=a.onreadystatechange=function(a){a=a||window.event;b._callback((a.type||"error").toLowerCase())};d.insertBefore(a,d.firstChild)},_callback:function(b,a){var c=this.script,d=this.xhrObj,e=this.head;if(c&&(a||!c.readyState||/loaded|complete/.test(c.readyState)||"error"==b))c.onerror=c.onload=c.onreadystatechange=null,e&&c.parentNode&&e.removeChild(c),
this.head=this.script=void 0,!a&&"error"!=b?d.callback(200,"success"):"error"==b&&d.callback(500,"scripterror")},abort:function(){this._callback(0,1)}});c.setupTransport("script",j);return c},{requires:["./base","./xhr"]});
KISSY.add("ajax/jsonp",function(b,c){c.setupConfig({jsonp:"callback",jsonpCallback:function(){return b.guid("jsonp")}});c.on("start",function(c){var c=c.xhr,f=c.config;if("jsonp"==f.dataType[0]){var h,a=f.jsonpCallback,i=b.isFunction(a)?a():a,d=window[i];f.url+=(/\?/.test(f.url)?"&":"?")+f.jsonp+"="+i;window[i]=function(a){1<arguments.length&&(a=b.makeArray(arguments));h=[a]};c.on("complete",function(){window[i]=d;if(void 0===d)try{delete window[i]}catch(a){}else h&&d(h[0])});c.converters=c.converters||
{};c.converters.script=c.converters.script||{};c.converters.script.json=function(){h||b.error(" not call jsonpCallback : "+i);return h[0]};f.dataType.length=2;f.dataType[0]="script";f.dataType[1]="json"}});return c},{requires:["./base"]});
KISSY.add("ajax/form",function(b,c,j,f){c.on("start",function(b){b=b.xhr.config;if(b.form){var a=j.get(b.form);if("multipart/form-data"!=(a.encoding||a.enctype).toLowerCase()){if(a=f.serialize(a))b.hasContent?(b.data=b.data||"",b.data&&(b.data+="&"),b.data+=a):b.url+=(/\?/.test(b.url)?"&":"?")+a}else a=b.dataType[0],"*"==a&&(a="text"),b.dataType.length=2,b.dataType[0]="iframe",b.dataType[1]=a}});return c},{requires:["./base","dom","./form-serializer"]});
KISSY.add("ajax/iframe-upload",function(b,c,j,f){function h(a){this.xhr=a}var a=document;f.setupConfig({converters:{iframe:f.getConfig().converters.text,text:{iframe:function(a){return a}}}});b.augment(h,{send:function(){var f=this.xhr,d=f.config,e,g=c.get(d.form);this.attrs={target:c.attr(g,"target")||"",action:c.attr(g,"action")||""};this.form=g;var h=b.guid("ajax-iframe");f.iframe=c.create("<iframe  id='"+h+"' name='"+h+"' style='position:absolute;left:-9999px;top:-9999px;'/>");f.iframeId=h;c.prepend(f.iframe,
a.body||a.documentElement);c.attr(g,{target:f.iframeId,action:d.url});if(d.data){e=d.data;d=d.serializeArray;e=b.unparam(e);var h=[],k;for(k in e)for(var l=b.isArray(e[k]),n=b.makeArray(e[k]),o=0;o<n.length;o++){var p=a.createElement("input");p.type="hidden";p.name=k+(l&&d?"[]":"");p.value=n[o];c.append(p,g);h.push(p)}e=h}this.fields=e;j.on(f.iframe,"load error",this._callback,this);g.submit()},_callback:function(a){var b=this.xhr,a=a.type,e=b.iframe;e&&(c.attr(this.form,this.attrs),"load"==a?(a=
e.contentWindow.document,b.responseXML=a,b.responseText=c.text(a.body),b.callback(200,"success")):"error"==a&&b.callback(500,"error"),c.remove(this.fields),j.detach(e),setTimeout(function(){c.remove(e)},30),b.iframe=null)},abort:function(){this._callback(0,1)}});f.setupTransport("iframe",h);return f},{requires:["dom","event","./base"]});
KISSY.add("ajax",function(b,c,j){b.mix(j,{serialize:c.serialize,get:function(c,h,a,i,d){b.isFunction(h)&&(i=a,a=h,h=void 0);return j({type:d||"get",url:c,data:h,success:a,dataType:i})},post:function(c,h,a,i){b.isFunction(h)&&(i=a,a=h,h=void 0);return j.get(c,h,a,i,"post")},jsonp:function(c,h,a){b.isFunction(h)&&(a=h,h=void 0);return j.get(c,h,a,"jsonp")},getScript:b.getScript,getJSON:function(c,h,a){b.isFunction(h)&&(a=h,h=void 0);return j.get(c,h,a,"json")},upload:function(c,h,a,i,d){b.isFunction(a)&&
(d=i,i=a,a=void 0);return j({url:c,type:"post",dataType:d,form:h,data:a,success:i})}});return j},{requires:"ajax/form-serializer,ajax/base,ajax/xhrobject,ajax/xhr,ajax/script,ajax/jsonp,ajax/form,ajax/iframe-upload".split(",")});
KISSY.add("base/attribute",function(b,c){function j(a,b,c,d,e,f,g){g=g||c;return a.fire(b+(c.charAt(0).toUpperCase()+c.substring(1))+"Change",{attrName:g,subAttrName:f,prevVal:d,newVal:e})}function f(a,b,c){var d=a[b]||{};c&&(a[b]=d);return d}function h(a){return f(a,"__attrs",!0)}function a(a){return f(a,"__attrVals",!0)}function i(a,b){for(var d=0,e=b.length;a!=c&&d<e;d++)a=a[b[d]];return a}function d(d,e,f,g,h){var g=g||{},p,t,q;q=d.hasAttr(e);var v=e;!q&&-1!==e.indexOf(".")&&(p=e.split("."),e=
p.shift());q=d.get(e);p&&(t=i(q,p));if(!(!p&&q===f||p&&t===f)){if(p){var w=t=b.clone(q),s=p.length-1;if(0<=s){for(var r=0;r<s;r++)w=w[p[r]];w!=c&&(w[p[r]]=f)}f=t}if(!g.silent&&!1===j(d,"before",e,q,f,v))return!1;f=d.__set(e,f);if(!1===f)return f;g.silent||(f=a(d)[e],j(d,"after",e,q,f,v),h?h.push({prevVal:q,newVal:f,attrName:e,subAttrName:v}):j(d,"","*",[q],[f],[v],[e]));return d}}function e(){}e.INVALID={};var g=e.INVALID;b.augment(e,{getAttrs:function(){return h(this)},getAttrVals:function(){var a=
{},b,c=h(this);for(b in c)a[b]=this.get(b);return a},addAttr:function(a,c,d){var e=h(this),c=b.clone(c);e[a]?b.mix(e[a],c,d):e[a]=c;return this},addAttrs:function(a,c){var d=this;b.each(a,function(a,b){d.addAttr(b,a)});c&&d.set(c);return d},hasAttr:function(a){return a&&h(this).hasOwnProperty(a)},removeAttr:function(b){this.hasAttr(b)&&(delete h(this)[b],delete a(this)[b]);return this},set:function(a,c,e){var f;if(b.isPlainObject(a)){var g=a,a=0;f=!0;e=c;c=[];for(a in g)if(f=d(this,a,g[a],e,c),!1===
f)break;var h=[],i=[],q=[],v=[];b.each(c,function(a){i.push(a.prevVal);q.push(a.newVal);h.push(a.attrName);v.push(a.subAttrName)});h.length&&j(this,"","*",i,q,v,h);return f}return d(this,a,c,e)},__set:function(d,e){var i,j=f(h(this),d,!0),o=j.validator,j=j.setter;if((o=b.isString(o)?this[o]:o)&&!1===o.call(this,e,d))return!1;if(j=b.isString(j)?this[j]:j)i=j.call(this,e,d);if(i===g)return!1;i!==c&&(e=i);a(this)[d]=e},get:function(c){var d,e,g;!this.hasAttr(c)&&-1!==c.indexOf(".")&&(d=c.split("."),
c=d.shift());e=f(h(this),c).getter;g=c in a(this)?a(this)[c]:this.__getDefAttrVal(c);if(e=b.isString(e)?this[e]:e)g=e.call(this,g,c);d&&(g=i(g,d));return g},__getDefAttrVal:function(a){var d=f(h(this),a),e;if(e=b.isString(d.valueFn)?this[d.valueFn]:d.valueFn)e=e.call(this),e!==c&&(d.value=e),delete d.valueFn,h(this)[a]=d;return d.value},reset:function(a,c){if(b.isString(a))return this.hasAttr(a)?this.set(a,this.__getDefAttrVal(a),c):this;var c=a,d=h(this),e={};for(a in d)e[a]=this.__getDefAttrVal(a);
this.set(e,c);return this}});c&&(e.prototype.addAttrs=c);return e});KISSY.add("base/base",function(b,c,j){function f(b){for(var a=this.constructor;a;){var c=a.ATTRS;if(c){var d=void 0;for(d in c)c.hasOwnProperty(d)&&this.addAttr(d,c[d],!1)}a=a.superclass?a.superclass.constructor:null}if(b)for(var e in b)b.hasOwnProperty(e)&&this.__set(e,b[e])}b.augment(f,j.Target,c);return f},{requires:["./attribute","event"]});KISSY.add("base",function(b,c,j){c.Attribute=j;return c},{requires:["base/base","base/attribute"]});
KISSY.add("cookie/base",function(b){var c=document,j=encodeURIComponent,f=decodeURIComponent;return{get:function(h){var a,i;if(b.isString(h)&&""!==h&&(i=(""+c.cookie).match(RegExp("(?:^| )"+h+"(?:(?:=([^;]*))|;|$)"))))a=i[1]?f(i[1]):"";return a},set:function(f,a,i,d,e,g){var a=""+j(a),m=i;"number"===typeof m&&(m=new Date,m.setTime(m.getTime()+864E5*i));m instanceof Date&&(a+="; expires="+m.toUTCString());b.isString(d)&&""!==d&&(a+="; domain="+d);b.isString(e)&&""!==e&&(a+="; path="+e);g&&(a+="; secure");
c.cookie=f+"="+a},remove:function(b,a,c,d){this.set(b,"",-1,a,c,d)}}});KISSY.add("cookie",function(b,c){return c},{requires:["cookie/base"]});KISSY.add("core",function(b,c,j,f,h,a,i,d,e,g){c={UA:c,DOM:j,Event:f,EventTarget:f.Target,EventObject:f.Object,Node:h,NodeList:h,JSON:a,Ajax:i,IO:i,ajax:i,io:i,jsonp:i.jsonp,Anim:d,Easing:d.Easing,Base:e,Cookie:g,one:h.one,all:h.all,get:j.get,query:j.query};b.mix(b,c);return c},{requires:"ua,dom,event,node,json,ajax,anim,base,cookie".split(",")});KISSY.use("core");var TB=window.TB||{};TB.namespace=TB.namespace||function(){KISSY.namespace.apply(TB,arguments)};(function(){var f=KISSY,k=!"0"[0],J=k&&!window.XMLHttpRequest,p=!!window.ActiveXObject,h=document,G=window,F,o,b=" ",z="hover",d,r="g_config" in G?("appId" in G.g_config?parseInt(G.g_config["appId"]):undefined):undefined,K="mini-cart",m="mini-cart-no-layer",t=location.hostname.split("."),u=h.domain,A=u.indexOf("tmall.com")>-1,H=~location.hostname.indexOf("daily.taobao.net")||~location.hostname.indexOf("daily.tmall.net"),v=H?".daily.taobao.net":".taobao.com",e="",s=false,y=null,E=(h.location.href.indexOf("https://")===0),q={},j={siteNav:function(){if(!d){return}d.setAttribute("role","navigation");f.each(x("menu","*",d),function(R){TB.Global._addMenu(R)});var Q=h.forms.topSearch;l(Q,"submit",function(){if(Q.q.value==e){Q.action="http://list.taobao.com/browse/cat-0.htm"}});var i=x("cart","li",d)[0];l(i,"click",function(S){var R=S.target||S.srcElement;if(R.nodeName!="A"&&R.parentNode.nodeName==="A"){R=R.parentNode}if(R.nodeName==="A"&&R.href.indexOf("my_cart.htm")>-1){D(S);w(i,"hover");TB.Cart&&TB.Cart.redirect(R,R.href);if(G.MiniCart){G.MiniCart._clicked=false}}});var M="g_mytaobao_set_dynamic_count";var O=false;var P=x("mytaobao","li",d)[0];l(P,"mouseover",function(S){if(O){return}if(!TB.Global.isLogin()){return}O=true;window[M]=function(T){if(!T||!T[5]||T[5]==0){return}el=document.getElementById("myTaobaoPanel").getElementsByTagName("a")[2];el.innerHTML+='<span style="color:#f50;"> '+T[5]+"</span>"};var R="http://i"+v+"/json/my_taobao_remind_data.htm?from=site&t=";f.getScript(R+f.now()+"&callback="+M)});var L=false;var N=x("user","span",d)[0];l(N,"mouseover",function(V){var X=x("vip-stepleft","a",d)[0];var W=x("vip-stepright","a",d)[0];var U;var S="g_my_vip_icon";if(!TB.Global.isLogin()){return}if(L){return}L=true;window[S]=function(ae){var ad=document.getElementById("J_VipContent");var Z=document.getElementById("J_VipMedal");if(!ae||ae.isSuccess===false){ad.removeChild(Z);ad.style.height="100px";return}U=Math.ceil(ae.userMedals.length/5);var af=[];for(var ac=0;ac<ae.userMedals.length;ac++){af.push('<a title="'+ae.userMedals[ac].medalName+'" target="_self" href="'+ae.userMedals[ac].medalUrl+'"><img src="'+ae.userMedals[ac].pic+'" /></a>')}if(af.length===0){ad.removeChild(Z);ad.style.height="100px"}else{var ab=document.getElementById("J_VipMedalContent");var aa=new RegExp("(\\s|^)vip-loading(\\s|$)");Z.className=Z.className.replace(aa,"");ab.innerHTML=af.join("");if(af.length<=5){W.style.display=X.style.display="none"}ab.setAttribute("pageid","1");var Y=parseInt(ab.getAttribute("pageid"));l(X,"click",function(ag){if(Y>1){Y=Y-1;ab.style.left="-"+(Y-1)*205+"px";ab.setAttribute("pageid",Y)}});l(W,"click",function(ag){if(Y<U){ab.style.left="-"+Y*205+"px";Y=Y+1;ab.setAttribute("pageid",Y)}})}};var R=g("_nk_")||g("tracknick");var T="http://vipservice"+v+"/medal/GetUserVisibleMedals.do?from=diaoding&nick=";f.getScript(T+R+"&t="+f.now()+"&callback="+S,{charset:"utf-8"})})},tDog:function(){if((r&&r!=-1)||"tstart" in o||"tdog" in o){var i="http://"+F+"/p/header/webww-min.js?t=20110629.js",L=0;f.ready(function(){if(f.DOM){f.getScript(i)}else{if(L<10){setTimeout(arguments.callee,1000);L++}else{f.use("core",function(){f.getScript(i)})}}})}},tLabs:function(){if(location.href.indexOf("tms.taobao.com")!==-1){return}f.ready(function(){var L="http://"+F+"/p/tlabs/1.0.0/tlabs-min.js?t=1.0.0.js",i=g("_nk_")||g("tracknick");i=encodeURIComponent(a(unescape(i.replace(/\\u/g,"%u"))));f.getScript(L,function(){if(typeof TLabs!=="undefined"){TLabs.init({nick:i})}})})},POCMonitor:function(){var P=G._poc||[],O,M=0,L=[["_setAccount",(G.g_config||0).appId],["_setStartTime",(G.g_config||0).startTime||G.HUBBLE_st||G.g_hb_monitor_st]],N=10000;while((O=P[M++])){if(O[0]==="_setRate"){N=O[1]}else{if(O[0]==="_setAccount"){L[0]=O}else{if(O[0]==="_setStartTime"){L[1]=O}else{L.push(O)}}}}if(parseInt(Math.random()*N)===0){G._poc=L;f.getScript("http://a.tbcdn.cn/p/poc/m.js?v=0.0.1.js")}},initHeaderLinks:function(){if(u.indexOf(".taobao.net")===-1){return}var N=d?d.getElementsByTagName("a"):[],M=0,L=N.length,O=t;while(O.length>3){O.shift()}O=O.join(".");for(;M<L;M++){N[M].href=N[M].href.replace("taobao.com",O)}},initSiteNav:function(){var M=h.getElementById("J_Service"),L=h.getElementById("J_ServicesContainer"),O,i="http://www.taobao.com/index_inc/2010c/includes/get-services.php",P="__services_results";if(!M||!L){return}l(M,"mouseover",N);l(M,"keydown",N);function N(Q){if(Q.type==="keydown"&&Q.keyCode!==39&&Q.keyCode!==40){return}O=f.getScript(i+"?cb="+P,{charset:"gbk"});D(Q)}window[P]=function(Q){if(O){O.parentNode.removeChild(O)}O=null;try{L.innerHTML=Q;L.style.height="auto";c(M,"mouseover",N);c(M,"keydown",N)}catch(R){L.style.display="none"}}},test:function(){var i=false;var L=function(){if(i){return}i=true;if(location.href.indexOf("__cloudyrun__")>-1){f.getScript("http://assets.daily.taobao.net/p/cloudyrun/1.0/cloudyrun-taobao-pkg.js?t="+(+new Date()))}};f.ready(L);setTimeout(L,4000)},assist:function(){if(g("test_accouts")&&document.domain.indexOf("taobao.net")>-1){f.ready(function(){f.getScript("http://assets.daily.taobao.net/p/assist/login/login.js")})}},miniCart:function(){var i=TB.Global;if(i._OFF){return}if(A||u.indexOf("tmall.net")>-1){if(f.isUndefined(r)){return}else{if(!(g("uc2")&&g("mt"))){f.getScript("http://www"+v+"/go/app/tmall/login-api.php?t="+f.now());return}}}i.initMiniCart()},mpp:function(){f.getScript("http://"+F+"/p/tstart/1.0/build/tb-mpp-min.js?t=201107210.js",function(){f.ready(function(){if(!TB.Global.isLogin()){return}Mpp.Notify.register({appId:1010,type:1,callback:function(){f.getScript("http://"+(H?"webww.daily.taobao.net:8080":"webwangwang.taobao.com")+"/getOtherSystem.do?callback=TB.Global.setUserMsg&t="+f.now())}})})})},fpLBSBacon:function(){if(parseFloat(f.version)>=1.2){var i="http://a.tbcdn.cn/p/fp/2012/misc/lbs/??flashstorage.js,lbs.js?t=20120802.js";f.getScript(i)}}};var C=["tDog","tLabs","test","mpp"];for(var I=0;I<C.length;I++){(function(L){var i=j[L];j[L]=function(){setTimeout(i,1000)}})(C[I])}TB.Global={_addMenu:function(O){if(!O){return}var L=this,P=x("menu-hd","*",O)[0],N=x("menu-bd","*",O)[0];if(!N||!P){return}P.tabIndex=0;L._subMenus.push(N);N.setAttribute("role","menu");N.setAttribute("aria-hidden","true");if(!N.getAttribute("id")){N.setAttribute("id",f.guid("menu-"))}P.setAttribute("aria-haspopup",N.getAttribute("id"));P.setAttribute("aria-label","\u53f3\u952e\u5f39\u51fa\u83dc\u5355\uff0ctab\u952e\u5bfc\u822a\uff0cesc\u5173\u95ed\u5f53\u524d\u83dc\u5355");var M=false;if(!E&&J){M=h.createElement("iframe");M.src="about: blank";M.className="menu-bd";O.insertBefore(M,N)}l(O,"mouseover",function(R){var Q=R.relatedTarget;while(Q&&Q!==O){Q=Q.parentNode}if(Q!==O){f.each(L._subMenus,function(S){if(S!==N){w(S.parentNode,z);S.setAttribute("aria-hidden","true")}});B(O,z);N.setAttribute("aria-hidden","false");if(!M){return}M.style.height=parseInt(N.offsetHeight)+25+"px";M.style.width=parseInt(N.offsetWidth)+1+"px"}});l(O,"mouseout",function(R){var Q=R.relatedTarget;while(Q&&Q!==O){Q=Q.parentNode}if(Q!==O){w(O,z);N.setAttribute("aria-hidden","true");f.each(N.getElementsByTagName("input"),function(S){if(S.getAttribute("type")!=="hidden"){S.blur()}})}});l(O,"keydown",function(R){var Q=R.keyCode;if(Q==27||Q==37||Q==38){w(O,z);N.setAttribute("aria-hidden","true");P.focus();D(R)}else{if(Q==39||Q==40){B(O,z);N.setAttribute("aria-hidden","false");D(R)}}});var i;l(O,p?"focusin":"focus",function(){if(i){clearTimeout(i);i=null}},!p);l(O,p?"focusout":"blur",function(){i=setTimeout(function(){w(O,z);N.setAttribute("aria-hidden","true")},100)},!p)},init:function(i){if(s){return}s=true;F=H?"assets.daily.taobao.net":"a.tbcdn.cn";o=f.unparam(location.search.substring(1));d=h.getElementById("site-nav");this._OFF=!!!d;this.config=i;if(i&&i.mc&&i.mc===-1){this._OFF=true}if(window.top!==window.self){this._OFF=true}this._subMenus=[];for(var L in j){j[L]()}if(~location.search.indexOf("__test__=global.js")){f.ready(function(){f.later(M,3000)});function M(){var N=["Light","TLabs"];for(var O=0;O<N.length;O++){if(typeof N==="undefined"){alert("test case: failure");return}}alert("test case: success")}}},writeLoginInfo:function(aj,P){aj=aj||{};var Y=this,ai=g("_nk_")||g("tracknick"),M=n(g("uc1")),ad=parseInt(M._msg_)||0,U=f.now(),W="http://login.taobao.com",i=aj.memberServer||"http://member1.taobao.com",af=aj.outmemServer||"http://outmem.taobao.com",L=aj.loginServer||"https://login.taobao.com",Z=aj.loginUrl||L+"/member/login.jhtml?f=top",Q=location.href,aa,ag,O,ah,ae,V=e;if(/^http.*(\/member\/login\.jhtml)$/i.test(Q)){Q=e}aa=aj.redirectUrl||Q;if(aa){Z+="&redirectURL="+encodeURIComponent(aa)}ag=aj.logoutUrl||W+"/member/logout.jhtml?f=top&out=true&redirectURL="+encodeURIComponent(aa);O=i+"/member/newbie.htm";ah=af+"/message/list_private_msg.htm?t="+U;ae="http://i.taobao.com/my_taobao.htm?t="+U;y=ag;if(Y.isLogin()){V=Y.showVIP(ag)}else{V='\u4eb2\uff0c\u6b22\u8fce\u6765\u6dd8\u5b9d\uff01\u8bf7<a href="'+Z+'" target="_top">\u767b\u5f55</a>';V+='<a href="'+O+'" target="_top">\u514d\u8d39\u6ce8\u518c</a>'}if(P){var R=document.getElementById("site-nav");if(R){var ab=x("login-info","*",R)[0];if(ab&&ab.className==="login-info"){ab.innerHTML=V}}return}h.write(V);if(Y.showVIP(ag).length<1){return}var ac=document.getElementById("J_Vip_Areas");var X=null;l(ac,"mouseover",function(ak){if(S(ak,this)){X&&X.cancel();B(ac,"user-hover")}});l(ac,"mouseout",function(ak){if(S(ak,this)){X&&X.cancel();X=f.later(function(){w(ac,"user-hover")},300)}});function T(ak,al){while(al.nodeName!=="BODY"){if(ak===al.parentNode){return true}al=al.parentNode}return false}function S(al,ak){if(N(al).type=="mouseover"){return !T(ak,N(al).relatedTarget||N(al).fromElement)&&!((N(al).relatedTarget||N(al).fromElement)===ak)}else{return !T(ak,N(al).relatedTarget||N(al).toElement)&&!((N(al).relatedTarget||N(al).toElement)===ak)}}function N(ak){return ak||window.event}},showVIP:function(N){var T=parseInt(n(g("uc1"))["tag"]),O=e,L=e,P=e,Q="http://vip"+v,M=f.now(),i=g("_nk_")||g("tracknick"),S="http://i.taobao.com/my_taobao.htm?t="+M;if(T===0||T===-1){L='<a class="vip-my-power" href="http://vip.taobao.com/new.htm" rel="nofollow" target="_top">\u65b0\u624b\u7279\u8bad\u8425\u8d2d\u7269\u5165\u95e8</a>'}else{if(T===7){L='<a class="vip-my-power" href="http://vip.taobao.com/vip_club.htm" rel="nofollow" target="_top">\u7acb\u523b\u6fc0\u6d3b\u6211\u7684\u8eab\u4efd</a>'}else{L='<a class="vip-my-power" href="http://vip.taobao.com/growth_info.htm" rel="nofollow" target="_top">\u67e5\u770b\u6211\u7684\u4f1a\u5458\u7279\u6743</a>'}}if(T===0||T===-1){P='<a class="vip-my-service" href="http://vip.taobao.com/newuser/newGift.htm" rel="nofollow" target="_top">\u5feb\u53bb\u9886\u65b0\u4eba\u793c\u91d1!</a>'}else{if(T>2&&T<7){P='<a class="vip-my-service" href="http://service.taobao.com/support/minerva/robot_main.htm?dcs=2&sourceId=400&businessId=100&moduleGroupId=taobaocrm" rel="nofollow" target="_top">\u6211\u7684\u5ba2\u670d</a>'}else{P='<a class="vip-my-service" href="http://vip.taobao.com/growth_info.htm" rel="nofollow" target="_top">\u6211\u7684\u6210\u957f</a>'}}if(f.indexOf(T,[0,1,2,3,4,5,6,7])>-1){O='<span class="vip-areas user" id="J_Vip_Areas"><span class="vip-head"><a class="user-nick" href="'+S+'" target="_top">'+a(unescape(i.replace(/\\u/g,"%u")))+'</a><a class="vip-icon'+T+'" id="J_VipIcon" rel="nofollow" target="_top" href="http://vip.taobao.com/"></a><b></b></span><span class="vip-content" id="J_VipContent"><a href="http://i.taobao.com/my_taobao.htm" class="avatar"><img src="http://wwc.taobaocdn.com/avatar/getAvatar.do?userNick='+R(a(unescape(i.replace(/\\u/g,"%u"))))+'&width=80&height=80&type=sns" width="80" height="80"/></a><span class="vip-operate"><a href="http://member1.taobao.com/member/fresh/account_security.htm" target="_top">\u5e10\u53f7\u7ba1\u7406</a><a target="_top" href="'+N+'" id="J_Logout">\u9000\u51fa</a></span><span class="vip-my-level"><a class="vip-my-level'+T+'" target="_top" href="http://vip.taobao.com/growth_info.htm" rel="nofollow" target="_top"></a></span>'+L+P+'<span class="vip-medal vip-loading" id="J_VipMedal"><span class="vip-medalgroup"><span class="vip-medal-content" id="J_VipMedalContent"></span></span><span class="vip-step"><a href="javascript:;" target="_self" class="vip-stepleft"><s class="arrow arrow-lthin"><s></s></s></a><a href="javascript:;" target="_self" class="vip-stepright"><s class="arrow arrow-rthin"><s></s></s></a></span></span></span></span>'}else{O='<span class="vip-areas user user-special" id="J_Vip_Areas"><span class="vip-head vip-head-special"><a class="user-nick" href="'+S+'" target="_top">'+a(unescape(i.replace(/\\u/g,"%u")))+'</a><b></b></span><span class="vip-content vip-content-special" id="J_VipContent"><a href="http://i.taobao.com/my_taobao.htm" class="avatar"><img src="http://wwc.taobaocdn.com/avatar/getAvatar.do?userNick='+encodeURIComponent(i)+'&width=80&height=80&type=sns" width="80" height="80"/></a><span class="vip-operate"><a href="http://member1.taobao.com/member/fresh/account_security.htm" target="_top">\u5e10\u53f7\u7ba1\u7406</a><a target="_top" href="'+N+'" id="J_Logout">\u9000\u51fa</a></span>'+L+P+'<span class="vip-medal vip-loading" id="J_VipMedal"><span class="vip-medalgroup"><span class="vip-medal-content" id="J_VipMedalContent"></span></span><span class="vip-step"><a href="javascript:;" target="_self" class="vip-stepleft"><s class="arrow arrow-lthin"><s></s></s></a><a href="javascript:;" target="_self" class="vip-stepright"><s class="arrow arrow-rthin"><s></s></s></a></span></span></span></span>'}function R(W){var V=document.createElement("img");function U(X){if(!X){return""}if(window.ActiveXObject){execScript('SetLocale "zh-cn"',"vbscript");return X.replace(/[\d\D]/g,function(Y){window.vbsval="";execScript('window.vbsval=Hex(Asc("'+Y+'"))',"vbscript");return"%"+window.vbsval.slice(0,2)+"%"+window.vbsval.slice(-2)})}V.src="http://www.atpanel.com/jsclick?globaljs=1&separator="+X;return V.src.split("?separator=").pop()}return W.replace(/([^\x00-\xff]+)|([\x00-\xff]+)/g,function(Y,X,Z){return U(X)+encodeURIComponent(Z||"")})}return O},isLogin:function(){var L=g("tracknick"),i=g("_nk_")||L;return !!(g("_l_g_")&&i||g("ck1")&&L)},getCartElem:function(){return d&&x("cart","li",d)[0]},initMiniCart:function(){var L=this,P="http://cart"+v+"/top_cart_quantity.htm?",N=function(){f.getScript(P+"callback=TB.Global.setCartNum&t="+f.now()+(r?"&appid="+r:e))};if(L._OFF=(L._OFF||!!!L.getCartElem())){return}var i=n(g("mt")),M,O;if(i&&(M=i.ci)){M=M.split("_");O=parseInt(M[1]);M=parseInt(M[0]);L._OFF=M<0;if(M<0){return}if(L.isLogin()){if(O===0){N()}else{if(O===1){TB.Global.setCartNum(M)}}}else{if(O===0){TB.Global.setCartNum(M)}else{if(O===1){N()}}}}else{N()}},setCartNum:function(M){if(!f.isNumber(M)||TB.Global._OFF){return}var L=TB.Global.getCartElem();if(!L){return}var N=L.getElementsByTagName("a")[0],O='<span class="mini-cart-line"></span><s></s>\u8d2d\u7269\u8f66',i=r!==19;if(M<0){TB.Global._OFF=M===-1;N.innerHTML=O;w(L,K);G.MiniCart&&G.MiniCart.hide();return}N.innerHTML=O+'<span class="mc-count'+(M<10?" mc-pt3":e)+'">'+M+"</span>\u4ef6"+(i?"<b></b>":e);N.href="http://ju.atpanel.com/?url=http://cart"+v+"/my_cart.htm?from=mini&ad_id=&am_id=&cm_id=&pm_id=150042785330be233161";B(L,K);if(!i){B(L,m)}B(L,"menu");B(N,"menu-hd");N.id="mc-menu-hd";if(G.MiniCart){G.MiniCart.cartNum=M;G.MiniCart.isExpired=true}else{f.ready(function(){var P=0;f.getScript("http://"+F+"/p/global/1.0/minicart-min.js?t=20110811.js",function(){if(f.DOM){G.MiniCart.init(M,i)}else{if(P<10){setTimeout(arguments.callee,1000);P++}else{f.use("core",function(){G.MiniCart.init(M,i)})}}})})}},run:function(i){var L=this;L.initMiniCart();if(L.isLogin()){var M=0;f.later(function(){var O=h.getElementById("J_Logout");if(!O){if(M<20){setTimeout(arguments.callee,20);M++}return}var N=L.showVIP(y||"");if(N.length<1){return}var P=h.createElement("div");P.innerHTML=N;O.parentNode.insertBefore(P.firstChild,O);L._addMenu(P.firstChild)},30)}},setUserMsg:function(N){if(N.success&&N.success==="true"){var M=f.DOM;if(!M){return}var P=M.get(".login-info",d),O=M.offset(P),L=M.get("#gb-msg-notice"),i;if(!L){L=M.create('<div id="gb-msg-notice"><div class="gb-msg-inner gb-msg-info"><p class="gb-msg-content">'+N.result["messages"][0]+'</p><div class="gb-msg-icon gb-msg-close" title="\u5173\u95ed"></div></div><div class="gb-msg-icon gb-msg-tri"><div class="gb-msg-icon gb-msg-tri-inner"></div></div></div>');M.append(L,d.parentNode);M.offset(L,{left:O.left+30,top:O.top+M.height(P)+1});f.Event.on(L,"click",function(R){var Q=R.target;if(M.hasClass(Q,"gb-msg-close")){M.hide(L)}})}else{i=M.get(".gb-msg-content",L);M.html(i,N.result["messages"][0]);M.show(L)}}}};TB.Cart=f.merge({},{domain:document.domain.indexOf("taobao.net")>-1?"daily.taobao.net":"taobao.com",API:"http://cart.%domain%/check_cart_login.htm",cache:{},popup:null,redirect:function(O,N){var M=f.makeArray(arguments);var P=arguments.callee;var i=this;if(N.indexOf("ct=")===-1&&g("t")){N=N+(N.indexOf("?")===-1?"?":"&")+"ct="+g("t")}if(!f.DOM||!f.Event){f.getScript("http://a.tbcdn.cn/s/kissy/1.1.6/packages/core-min.js",function(){P.apply(i,M)});return}this._addStyleSheetOnce();var L=f.guid();this.cache[L]=f.makeArray(arguments);f.getScript(this.API.replace("%domain%",this.domain)+"?callback=TB.Cart.redirectCallback&guid="+L,{timeout:4000,error:function(){window.top.location.href=N}})},redirectCallback:function(M){var L=M.guid;var i=f.trim(this.cache[L][1]);if(!M.needLogin){window.top.location.href=i;return}if(!L){throw Error("[error] guid not found in callback data")}if(!this.popup){this.popup=this._initPopup()}this._initLoginIframe(i)},hidePopup:function(i){i&&i.preventDefault&&i.preventDefault();f.DOM.css(this.popup,"visibility","hidden")},showPopup:function(){this._centerPopup();f.DOM.css(this.popup,"visibility","visible")},_centerPopup:function(){var i=(f.DOM.viewportHeight()-parseInt(f.DOM.css(this.popup,"height"),10))/2;i=i<0?0:i;f.DOM.css(this.popup,"top",i)},_addStyleSheetOnce:function(){if(!this._stylesheetAdded){f.DOM.addStyleSheet("#g-cartlogin{position:fixed;_position:absolute;border:1px solid #aaa;left:50%;top:120px;margin-left:-206px;width:412px;height:272px;z-index:10001;background:#fafafa;-moz-box-shadow:rgba(0,0,0,0.2) 3px 3px 3px;-webkit-box-shadow:3px 3px 3px rgba(0,0,0,0.2);filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=3,OffY=3,Color=#16000000,Positive=true);} #g_minicart_login_close{position:absolute;right:5px;top:5px;width:17px;height:17px;background:url(http://img01.taobaocdn.com/tps/i1/T1krl0Xk8zXXXXXXXX-194-382.png) no-repeat -100px -69px;text-indent:-999em;overflow:hidden;}#g-cartlogin-close{cursor:pointer;position:absolute;right:5px;top:5px;width:17px;height:17px;line-height:0;overflow:hidden;background:url(http://img03.taobaocdn.com/tps/i1/T1k.tYXadGXXXXXXXX-146-77.png) no-repeat -132px 0;text-indent:-999em;}");this._stylesheetAdded=true}},_initPopup:function(){var i=f.DOM.create('<div id="g-cartlogin"></div>');f.DOM.append(i,f.DOM.get("body"));return i},_initLoginIframe:function(i){var L="https://login."+this.domain+"/member/login.jhtml?from=globalcart&style=mini&redirectURL="+encodeURIComponent(i)+"&full_redirect=true";this.popup.innerHTML='<iframe src="'+L+'" width="410" height="270" frameborder="0" scrolling="0"></iframe><span title="\u5173\u95ed" id="g-cartlogin-close">\u5173\u95ed</span>';f.Event.on("#g-cartlogin-close","click",this.hidePopup,this);this.showPopup()}});function g(L){if(G.userCookie&&!f.isUndefined(G.userCookie[L])){return G.userCookie[L]}if(f.isUndefined(q[L])){var i=h.cookie.match("(?:^|;)\\s*"+L+"=([^;]*)");q[L]=(i&&i[1])?decodeURIComponent(i[1]):e}return q[L]}function a(L){var M=h.createElement("div"),i=h.createTextNode(L);M.appendChild(i);return M.innerHTML}function x(T,U,L){var N=L.getElementsByTagName(U||"*"),R=[],P=0,O=0,Q=N.length,M,S;T=b+T+b;for(;P<Q;++P){M=N[P];S=M.className;if(S&&(b+S+b).indexOf(T)>-1){R[O++]=M}}return R}function l(N,M,L,i){if(!N){return}if(N.addEventListener){N.addEventListener(M,L,!!i)}else{if(N.attachEvent){N.attachEvent("on"+M,L)}}}function c(N,M,L,i){if(!N){return}if(N.removeEventListener){N.removeEventListener(M,L,!!i)}else{if(N.detachEvent){N.detachEvent("on"+M,L)}}}function B(M,i){var L=b+M.className+b;if(L.indexOf(b+i+b)===-1){L+=i;M.className=f.trim(L)}}function w(M,i){var L=b+M.className+b;if(L.indexOf(b+i+b)!==-1){L=L.replace(b+i+b,b);M.className=f.trim(L)}}function n(i){if(G.userCookie&&G.userCookie.version=="2"){return f.unparam(i,"&amp;")}return f.unparam(i)}function D(i){if(i.preventDefault){i.preventDefault()}else{i.returnValue=false}}})();(function(){var c=KISSY,d=c.DOM,b=c.Event;function a(K,J){var k=c.get("#"+K),y=k&&k.q,h=k&&k.search_type,s=k&&k.getElementsByTagName("label")[0],r=k&&k.cat,G=c.get("#J_TSearchTabs").getElementsByTagName("li"),f=G.length,D={},w=false,t=false,j="tsearch-tabs-active",n="tsearch-tabs-hover",B=function(q){for(var i=0;i<f;i++){d[i===q?"addClass":"removeClass"](G[i],j)}},F=c.get("#J_TSearchCat"),I=null,g=c.get("#J_TSearchCatHd"),m=F&&F.getElementsByTagName("div")[0],p=m&&m.getElementsByTagName("a")||[],v=p.length,E,u=function(i){for(E=0;E<v;E++){if(p[E].getAttribute("data-value")===i){return p[E]}}return null},A=function(){d.removeClass(F,"tsearch-cat-active")},H=function(){d.addClass(F,"tsearch-cat-active")},z=function(i){for(E=0;E<v;E++){d[p[E]===i?"addClass":"removeClass"](p[E],"tsearch-cat-selected")}A();g.innerHTML=i.innerHTML;r.value=i.getAttribute("data-value")},x=function(){y.focus();if(c.UA.ie){y.value=y.value}};if(!k){return}if(c.get("#J_TSearchTabs")){var C=0,o={"\u5b9d\u8d1d":["item","\u8f93\u5165\u60a8\u60f3\u8981\u7684\u5b9d\u8d1d"],"\u6dd8\u5b9d\u5546\u57ce":["mall","\u8f93\u5165\u60a8\u60f3\u8981\u7684\u5546\u54c1"],"\u5e97\u94fa":["shop","\u8f93\u5165\u60a8\u60f3\u8981\u7684\u5e97\u94fa\u540d\u6216\u638c\u67dc\u540d"],"\u62cd\u5356":["auction","\u8f93\u5165\u60a8\u60f3\u8981\u7684\u5b9d\u8d1d"],"\u6dd8\u5427":["taoba","\u8f93\u5165\u60a8\u60f3\u8981\u641c\u7d22\u7684\u5185\u5bb9"],"\u5b9d\u8d1d\u5206\u4eab":["share","\u8f93\u5165\u60a8\u60f3\u8981\u7684\u5b9d\u8d1d"]},l={"\u5bf6\u8c9d":["item","\u8f38\u5165\u60a8\u60f3\u8981\u7684\u5bf6\u8c9d"],"\u6dd8\u5bf6\u5546\u57ce":["mall","\u8f38\u5165\u60a8\u60f3\u8981\u7684\u5546\u54c1"],"\u5e97\u92ea":["shop","\u8f38\u5165\u60a8\u60f3\u8981\u7684\u5e97\u8216\u540d\u6216\u638c\u6ac3\u540d"],"\u62cd\u8ce3":["auction","\u8f38\u5165\u60a8\u60f3\u8981\u7684\u5bf6\u8c9d"],"\u6dd8\u5427":["taoba","\u8f38\u5165\u60a8\u60f3\u8981\u641c\u7d22\u7684\u5167\u5bb9"],"\u5bf6\u8c9d\u5206\u4eab":["share","\u8f38\u5165\u60a8\u60f3\u8981\u7684\u5bf6\u8c9d"]};for(;C<f;C++){(function(){var L=C,i=c.trim(G[L].getElementsByTagName("a")[0].innerHTML),q=o[i]||l[i];if(!q){return}D[q[0]]={index:L,hint:q[1]};b.on(G[L],"click",function(M){M.halt();B(L);d.removeClass(G[L],n);h.value=q[0];s.innerHTML=q[1];x()});b.on(G[L],"mouseenter",function(M){M.halt();if(!d.hasClass(G[L],j)){d.addClass(G[L],n)}});b.on(G[L],"mouseleave",function(M){M.halt();if(!d.hasClass(G[L],j)){d.removeClass(G[L],n)}})})()}}b.on(y,"focus",function(){s.innerHTML="";d.addClass(s,"hidden")});b.on(y,"blur",function(){if(c.trim(y.value)===""&&!w){s.innerHTML=D[h.value]["hint"];d.removeClass(s,"hidden")}});b.on("#J_TSearchTabs","mousedown",function(){w=true;t=true;setTimeout(function(){w=false})});b.on("#J_TSearchCat","click",function(i){i.halt();var q=i.target;switch(true){case d.hasClass(q.parentNode,"tsearch-cat-hd"):case d.hasClass(q,"tsearch-cat-hd"):H();break;case q.parentNode.nodeName.toLowerCase()==="div":z(q);x();break}});b.on(document,"click",A);b.on(k,"submit",function(){switch(k.search_type.value){case"item":if(y.value===""){k.action="http://list.taobao.com/browse/cat-0.htm"}break;case"mall":k.action="http://list.tmall.com/search_product.htm";break;case"shop":k.action="http://shopsearch.taobao.com/browse/shop_search.htm";break;case"auction":k.atype.value="a";break;case"taoba":k.action="http://ba.taobao.com/index.htm";break;case"share":k.tracelog.value="msearch2fx";if(y.value===""){k.action="http://jianghu.taobao.com/square.htm"}else{k.keyword.value=y.value;k.action="http://fx.taobao.com/view/share_search.htm"}break}});s.innerHTML="";setTimeout(function(){if(!t){h.value=(J&&J.searchType)?J.searchType:"item";if(document.domain.indexOf("shopsearch.taobao.com")>-1){h.value="shop"}var i=D[h.value];s.innerHTML=i.hint;B(i.index)}if(F&&(I=u(r.value))){z(I)}if(c.trim(y.value)!==""){s.innerHTML=""}if(J&&J.autoFocus){x()}k.atype.value="";if(k.keyword){k.keyword.value=""}if(k.tracelog){k.tracelog.value=""}})}function e(o){var h=c.get("#"+o);if(!h){return}var f=h.q;if(!f){return}if(!(window.TB&&TB.Suggest||c.Suggest)){return}var i=c.Suggest?c:TB,n=new i.Suggest(f,"http://suggest.taobao.com/sug",{resultFormat:"\u7ea6%result%\u4e2a\u5b9d\u8d1d"});var g=h.ssid;if(g){setTimeout(function(){g.value="s5-e"},0);g.setAttribute("autocomplete","off");var j=function(){if(g.value.indexOf("-p1")==-1){g.value+="-p1"}};try{if(n.subscribe){n.subscribe("onItemSelect",j)}if(n.on){n.on("onItemSelect",j)}}catch(l){}}var m=h.elements.search_type;var p=function(){return m.value};var k=n._needUpdate;n._needUpdate=function(){var q=p();return(q==="item"||q==="mall")&&k.call(n)}}TB.Header={init:function(f){if(c.get("#J_TSearch")){a("J_TSearchForm",f);setTimeout(function g(){if(typeof g.count=="undefined"){g.count=0}g.count++;if(!(window.TB&&TB.Suggest||c.Suggest)){setTimeout(arguments.callee,200)}else{e("J_TSearchForm")}},200)}}}})();