/*
Copyright 2011, KISSY UI Library v1.20dev
MIT Licensed
build time: ${build.time}
*/
(function(d,b,u){var j={mix:function(c,m,w,z){if(!m||!c)return c;if(w===u)w=true;var l,r,x;if(z&&(x=z.length))for(l=0;l<x;l++){r=z[l];if(r in m)if(w||!(r in c))c[r]=m[r]}else for(r in m)if(w||!(r in c))c[r]=m[r];return c}},n=d&&d[b]||{},q=0;d=n.__HOST||(n.__HOST=d||{});b=d[b]=j.mix(n,j,false);b.mix(b,{__APP_MEMBERS:["namespace"],__APP_INIT_METHODS:["__init"],version:"1.20dev",buildTime:"20110418155905",merge:function(){var c={},m,w=arguments.length;for(m=0;m<w;m++)b.mix(c,arguments[m]);return c},augment:function(){var c=
arguments,m=c.length-2,w=c[0],z=c[m],l=c[m+1],r=1;if(!b.isArray(l)){z=l;l=u;m++}if(!b.isBoolean(z)){z=u;m++}for(;r<m;r++)b.mix(w.prototype,c[r].prototype||c[r],z,l);return w},extend:function(c,m,w,z){if(!m||!c)return c;var l=Object.create?function(y,B){return Object.create(y,{constructor:{value:B}})}:function(y,B){function f(){}f.prototype=y;var e=new f;e.constructor=B;return e},r=m.prototype,x;x=l(r,c);c.prototype=b.mix(x,c.prototype);c.superclass=l(r,m);w&&b.mix(x,w);z&&b.mix(c,z);return c},__init:function(){this.Config=
this.Config||{};this.Env=this.Env||{};this.Config.debug=""},namespace:function(){var c=arguments,m=c.length,w=null,z,l,r,x=c[m-1]===true&&m--;for(z=0;z<m;z++){r=(""+c[z]).split(".");w=x?d:this;for(l=d[r[0]]===w?1:0;l<r.length;++l)w=w[r[l]]=w[r[l]]||{}}return w},app:function(c,m){var w=b.isString(c),z=w?d[c]||{}:c,l=0,r=b.__APP_INIT_METHODS.length;for(b.mix(z,this,true,b.__APP_MEMBERS);l<r;l++)b[b.__APP_INIT_METHODS[l]].call(z);b.mix(z,b.isFunction(m)?m():m);w&&(d[c]=z);return z},config:function(c){for(var m in c)this["_"+
m]&&this["_"+m](c[m])},log:function(c,m,w){if(b.Config.debug){if(w)c=w+": "+c;if(d.console!==u&&console.log)console[m&&console[m]?m:"log"](c)}},error:function(c){if(b.Config.debug)throw c;},guid:function(c){return(c||"")+q++}});b.__init();return b})(this,"KISSY");
(function(d,b){var u=d.__HOST,j=Object.prototype.toString,n=Array.prototype.indexOf,q=Array.prototype.lastIndexOf,c=Array.prototype.filter,m=String.prototype.trim,w=/^\s+|\s+$/g,z={};d.mix(d,{type:function(l){return l==null?String(l):z[j.call(l)]||"object"},isNull:function(l){return l===null},isUndefined:function(l){return l===b},isEmptyObject:function(l){for(var r in l)return false;return true},isPlainObject:function(l){return l&&j.call(l)==="[object Object]"&&"isPrototypeOf"in l},clone:function(l,
r,x){var y=l,B,f,e=x||{};if(l&&((B=d.isArray(l))||d.isPlainObject(l))){if(l["__~ks_cloned"])return e[l["__~ks_cloned"]];l["__~ks_cloned"]=y=d.guid();e[y]=l;if(B)y=r?d.filter(l,r):l.concat();else{y={};for(f in l)if(f!=="__~ks_cloned"&&l.hasOwnProperty(f)&&(!r||r.call(l,l[f],f,l)!==false))y[f]=d.clone(l[f],r,e)}}if(!x){d.each(e,function(o){if(o["__~ks_cloned"])try{delete o["__~ks_cloned"]}catch(h){o["__~ks_cloned"]=b}});e=b}return y},trim:m?function(l){return l==b?"":m.call(l)}:function(l){return l==
b?"":l.toString().replace(w,"")},substitute:function(l,r,x){if(!d.isString(l)||!d.isPlainObject(r))return l;return l.replace(x||/\\?\{([^{}]+)\}/g,function(y,B){if(y.charAt(0)==="\\")return y.slice(1);return r[B]!==b?r[B]:""})},each:function(l,r,x){var y,B=0,f=l&&l.length,e=f===b||d.type(l)==="function";x=x||u;if(e)for(y in l){if(r.call(x,l[y],y,l)===false)break}else for(y=l[0];B<f&&r.call(x,y,B,l)!==false;y=l[++B]);return l},indexOf:n?function(l,r){return n.call(r,l)}:function(l,r){for(var x=0,y=
r.length;x<y;++x)if(r[x]===l)return x;return-1},lastIndexOf:q?function(l,r){return q.call(r,l)}:function(l,r){for(var x=r.length-1;x>=0;x--)if(r[x]===l)break;return x},unique:function(l,r){r&&l.reverse();for(var x=l.slice(),y=0,B,f;y<x.length;){for(f=x[y];(B=d.lastIndexOf(f,x))!==y;)x.splice(B,1);y+=1}r&&x.reverse();return x},inArray:function(l,r){return d.indexOf(l,r)>-1},filter:c?function(l,r,x){return c.call(l,r,x||this)}:function(l,r,x){var y=[];d.each(l,function(B,f,e){if(r.call(x||this,B,f,
e))y.push(B)});return y},now:function(){return(new Date).getTime()}});d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(l,r){z["[object "+l+"]"]=r=l.toLowerCase();d["is"+l]=function(x){return d.type(x)==r}})})(KISSY);
(function(d,b){function u(a){a=a.split("/");for(var p=[],g,s=0;s<a.length;s++){g=a[s];if(g!=".")g==".."?p.pop():p.push(g)}return p.join("/")}function j(a,p){if(!p)return p;if(d.isArray(p)){for(var g=0;g<p.length;g++)p[g]=j(a,p[g]);return p}if(p.lastIndexOf("../",0)==0||p.lastIndexOf("./",0)==0){g=x;var s;if((s=a.lastIndexOf("/"))!=-1)g=a.substring(0,s+1);return u(g+p)}else return p.indexOf("./")!=-1||p.indexOf("../")!=-1?u(p):p}function n(a){return a.replace(/(-min)?\.js[^/]*$/i,x)}function q(a){if(a.charAt(a.length-
1)!="/")a+="/";a=d.trim(a);if(!a.match(/^(http(s)?)|(file):/i)&&a.lastIndexOf("/",0)!=0)a=k+a;return u(a)}function c(a){for(var p=0;p<a.length;p++)if(a[p].match(/\/$/))a[p]+="index";return a}function m(a){var p=a.src,g=a.getAttribute("data-combo-prefix")||"??";a=a.getAttribute("data-combo-sep")||",";a=p.split(a);var s,v=a[0];g=v.indexOf(g);if(g==-1)s=p.replace(t,"$1");else{s=v.substring(0,g);p=v.substring(g+2,v.length);if(p.match(A))s+=p.replace(t,"$1");else d.each(a,function(C){if(C.match(A)){s+=
C.replace(t,"$1");return false}})}if(!s.match(/^(http(s)?)|(file):/i)&&s.lastIndexOf("/",0)!=0)s=k+s;return s}if(!d.use){var w=d.__HOST,z=!w.getSelection&&w.ActiveXObject,l=w.document,r=l.getElementsByTagName("head")[0]||l.documentElement,x="",y=2,B=3,f=4,e=d.mix,o=l.createElement("script").readyState?function(a,p){var g=a.onreadystatechange;a.onreadystatechange=function(){var s=a.readyState;if(s==="loaded"||s==="complete"){a.onreadystatechange=null;g&&g();p.call(this)}}}:function(a,p){a.addEventListener("load",
p,false)},h=/\.css(?:\?|$)/i,i=encodeURIComponent(d.buildTime),k=location.href.replace(/[^/]*$/i,x);w={__currentModule:null,__startLoadTime:0,__startLoadModuleName:null,add:function(a,p,g){var s=this.Env.mods,v;if(d.isString(a)&&!g&&d.isPlainObject(p)){v={};v[a]=p;a=v}if(d.isPlainObject(a)){d.each(a,function(D,F){D.name=F;s[F]&&e(D,s[F],false)});e(s,a);return this}if(d.isString(a)){var C;if(g&&(C=g.host)){a=s[C];if(!a){d.error("module "+C+" can not be found !");return this}if(this.__isAttached(C))p.call(this,
this);else{a.fns=a.fns||[];a.fns.push(p)}return this}this.__registerModule(a,p,g);if(g&&g.attach===false)return this;p=s[a];a=j(a,p.requires);if(this.__isAttached(a))this.__attachMod(p);else if(this.Config.debug&&!p)for(a=d.makeArray(a).length-1;a>=0;a--);return this}if(d.isFunction(a)){g=p;p=a;if(z){if(+new Date-this.__startLoadTime<15)(a=this.__startLoadModuleName)?this.__registerModule(a,p,g):d.error("\u4ece\u7f13\u5b58\u8bfb\u53d6\uff1f\uff1f\u4f46\u662f\u8bf7\u6c42\u524d\u8bb0\u5f55\u6ca1\u6709\u6a21\u5757\u540d");else{a=this.__findModuleNameByInteractive();this.__registerModule(a,p,g)}this.__startLoadModuleName=
null;this.__startLoadTime=0}else this.__currentModule={def:p,config:g};return this}d.error("invalid format for KISSY.add !");return this},__findModuleNameByInteractive:function(){for(var a=document.getElementsByTagName("script"),p,g,s=0;s<a.length;s++){g=a[s];if(g.readyState=="interactive"){p=g;break}}p||d.error("\u627e\u4e0d\u5230 interactive \u72b6\u6001\u7684 script");a=p.src;if(a.lastIndexOf(this.Config.base,0)==0)return n(a.substring(this.Config.base.length));p=this.__packages;for(var v in p){g=p[v].path;if(p.hasOwnProperty(v))if(a.lastIndexOf(g,
0)==0)return n(a.substring(g.length))}d.error("interactive \u72b6\u6001\u7684 script \u6ca1\u6709\u5bf9\u5e94\u5305 \uff1a"+a)},__registerModule:function(a,p,g){g=g||{};var s=this.Env.mods,v=s[a]||{};e(v,{name:a,status:y});v.fns=v.fns||[];v.fns.push(p);e(s[a]=v,g)},_packages:function(a){var p;p=this.__packages=this.__packages||{};d.each(a,function(g){p[g.name]=g;if(g.path)g.path=q(g.path);if(g.tag)g.tag=encodeURIComponent(g.tag)})},_combine:function(a,p){var g=this,s;if(d.isObject(a))d.each(a,function(v,C){d.each(v,function(D){g._combine(D,
C)})});else{s=g.__combines=g.__combines||{};if(p)s[a]=p;else return s[a]||a}},__mixMods:function(a){var p=this.Env.mods,g=a.Env.mods,s;for(s in g)this.__mixMod(p,g,s,a)},__mixMod:function(a,p,g,s){var v=a[g]||{},C=v.status;d.mix(v,d.clone(p[g]));if(C)v.status=C;s&&this.__buildPath(v,s.Config.base);a[g]=v},use:function(a,p,g){a=a.replace(/\s+/g,x).split(",");c(a);g=g||{};var s=this,v;g.global&&s.__mixMods(g.global);if(s.__isAttached(a)){var C=s.__getModules(a);p&&p.apply(s,C)}else{d.each(a,function(D){s.__attachModByName(D,
function(){if(!v&&s.__isAttached(a)){v=true;var F=s.__getModules(a);p&&p.apply(s,F)}},g)});return s}},__getModules:function(a){var p=this,g=[p];d.each(a,function(s){g.push(p.require(s))});return g},require:function(a){a=this.Env.mods[a];var p=this.onRequire&&this.onRequire(a);if(p!==undefined)return p;return a&&a.value},__getPackagePath:function(a){if(a.packagepath)return a.packagepath;var p=this._combine(a.name),g=this.__packages||{},s="",v;for(v in g)if(g.hasOwnProperty(v))if(p.lastIndexOf(v,0)==
0)if(v.length>s)s=v;g=(p=g[s])&&p.path||this.Config.base;if(p&&p.charset)a.charset=p.charset;a.tag=p?p.tag:i;return a.packagepath=g},__attachModByName:function(a,p,g){var s=this.Env.mods,v=s[a];if(!v){v=this.Config.componentJsName||function(C){return C+"-min.js"};v={path:d.isFunction(v)?v(this._combine(a)):v,charset:"utf-8"};s[a]=v}v.name=a;v&&v.status===f||this.__attach(v,p,g)},__attach:function(a,p,g){function s(){if(!F&&v.__isAttached(a.requires)){a.status===y&&v.__attachMod(a);if(a.status===f){F=
true;p()}}}var v=this,C=v.Env.mods,D=(a.requires||[]).concat();a.requires=D;d.each(D,function(G,E,J){G=J[E]=j(a.name,G);(E=C[G])&&E.status===f||v.__attachModByName(G,s,g)});v.__buildPath(a,v.__getPackagePath(a));v.__load(a,function(){if(v.__currentModule){v.__registerModule(a.name,v.__currentModule.def,v.__currentModule.config);v.__currentModule=null}a.requires=a.requires||[];var G=[];d.each(a.requires,function(E,J,K){E=K[J]=j(a.name,E);J=C[E];K=d.inArray(E,D);J&&J.status===f||K||v.__attachModByName(E,
s,g);if(!K&&(!J||J.status<y))G.push(E)});G.length!=0&&G.unshift(a.name);if(d.isString(a.csspath)||d.isString(a.cssfullpath)){v.__buildPath(a,v.__getPackagePath(a));d.getScript(a.cssfullpath)}s()},g);var F=false},__attachMod:function(a){var p=this,g=a.fns;g&&d.each(g,function(s){s=d.isFunction(s)?s.apply(p,p.__getModules(a.requires)):s;a.value=a.value||s});a.status=f},__isAttached:function(a){var p=this.Env.mods,g=true;d.each(a,function(s){s=p[s];if(!s||s.status!==f)return g=false});return g},__load:function(a,
p,g){function s(){D[C]=y;if(a.status!==B){g.global&&v.__mixMod(v.Env.mods,g.global.Env.mods,a.name,g.global);if(a.status!==f)a.status=y;p()}}var v=this,C=a.fullpath,D=d.Env._loadQueue,F=D[C];a.status=a.status||0;if(a.status<1&&F)a.status=F.nodeName?1:y;if(d.isString(a.cssfullpath)){v.getScript(a.cssfullpath);a.cssfullpath=a.csspath=y}if(a.status<1&&C){a.status=1;if(z){v.__startLoadModuleName=a.name;v.__startLoadTime=Number(+new Date)}F=v.getScript(C,{success:function(){s()},error:function(){a.status=
B;D[C]=y},charset:a.charset});h.test(C)||(D[C]=F)}else a.status===1?o(F,s):p()},__buildPath:function(a,p){function g(v,C){if(!a[v]&&a[C]){a[C]=j(a.name,a[C]);a[v]=(p||s.base)+a[C]}if(a[v]&&s.debug)a[v]=a[v].replace(/-min/ig,x);if(a[v]&&!a[v].match(/\?t=/)&&a.tag)a[v]+="?t="+a.tag}var s=this.Config;g("fullpath","path");g("cssfullpath","csspath")},getScript:function(a,p,g){var s=/\.css(?:\?|$)/i.test(a),v=l.createElement(s?"link":"script"),C=p,D,F,G;if(d.isPlainObject(C)){p=C.success;D=C.error;F=C.timeout;
g=C.charset}if(s){v.href=a;v.rel="stylesheet"}else{v.src=a;v.async=true}if(g)v.charset=g;if(s)d.isFunction(p)&&p.call(v);else o(v,function(){if(G){G.cancel();G=b}d.isFunction(p)&&p.call(v)});if(d.isFunction(D))G=d.later(function(){G=b;D()},(F||this.Config.timeout)*1E3);r.insertBefore(v,r.firstChild);return v}};e(d,w);var t=/^(.*)(seed|kissy)(-min)?\.js[^/]*/i,A=/(seed|kissy)(-min)?\.js/i;d.__initLoader=function(){var a=l.getElementsByTagName("script");a=m(a[a.length-1]);this.Env.mods={};this.Env._loadQueue=
{};if(!this.Config.base)this.Config.base=q(a);if(!this.Config.timeout)this.Config.timeout=10};d.__initLoader();d.each(w,function(a,p){d.__APP_MEMBERS.push(p)});d.__APP_INIT_METHODS.push("__initLoader")}})(KISSY);
(function(d,b){function u(f){var e=typeof f;return f===null||e!=="object"&&e!=="function"}function j(f){return Array.prototype.slice.call(f)}var n=d.__HOST,q=n.document,c=q.documentElement,m=encodeURIComponent("[]"),w=false,z=[],l=false,r=/^#?([\w-]+)$/,x=/^(\w+)\[\]$/,y=/\S/;d.mix(d,{isWindow:function(f){return d.type(f)==="object"&&"setInterval"in f},makeArray:function(f){if(f===null||f===b)return[];if(d.isArray(f))return f;if(typeof f.length!=="number"||d.isString(f)||d.isFunction(f))return[f];
return j(f)},param:function(f,e){if(!d.isPlainObject(f))return"";e=e||"&";var o=[],h,i;for(h in f){i=f[h];h=encodeURIComponent(h);if(u(i))o.push(h,"=",encodeURIComponent(i+""),e);else if(d.isArray(i)&&i.length)for(var k=0,t=i.length;k<t;++k)u(i[k])&&o.push(h,m+"=",encodeURIComponent(i[k]+""),e)}o.pop();return o.join("")},unparam:function(f,e){if(typeof f!=="string"||(f=d.trim(f)).length===0)return{};for(var o={},h=f.split(e||"&"),i,k,t,A,a=0,p=h.length;a<p;++a){i=h[a].split("=");k=decodeURIComponent(i[0]);
try{t=decodeURIComponent(i[1]||"")}catch(g){t=i[1]||""}if((A=k.match(x))&&A[1]){o[A[1]]=o[A[1]]||[];o[A[1]].push(t)}else o[k]=t}return o},globalEval:function(f){if(f&&y.test(f)){var e=q.getElementsByTagName("head")[0]||c,o=q.createElement("script");o.text=f;e.insertBefore(o,e.firstChild);e.removeChild(o)}},later:function(f,e,o,h,i){e=e||0;h=h||{};var k=f,t=d.makeArray(i),A;if(d.isString(f))k=h[f];k||d.error("method undefined");f=function(){k.apply(h,t)};A=o?setInterval(f,e):setTimeout(f,e);return{id:A,
interval:o,cancel:function(){this.interval?clearInterval(A):clearTimeout(A)}}},ready:function(f){l||this._bindReady();w?f.call(n,this):z.push(f);return this},_bindReady:function(){var f=this,e=q.documentElement.doScroll,o=e?"onreadystatechange":"DOMContentLoaded",h=function(){f._fireReady()};l=true;if(q.readyState==="complete")return h();if(q.addEventListener){var i=function(){q.removeEventListener(o,i,false);h()};q.addEventListener(o,i,false);n.addEventListener("load",h,false)}else{var k=function(){if(q.readyState===
"complete"){q.detachEvent(o,k);h()}};q.attachEvent(o,k);n.attachEvent("onload",h);var t=false;try{t=n.frameElement==null}catch(A){}if(e&&t){var a=function(){try{e("left");h()}catch(p){setTimeout(a,1)}};a()}}},_fireReady:function(){if(!w){w=true;if(z){for(var f,e=0;f=z[e++];)f.call(n,this);z=null}}},available:function(f,e){if((f=(f+"").match(r)[1])&&d.isFunction(e))var o=1,h=d.later(function(){if(q.getElementById(f)&&(e()||1)||++o>500)h.cancel()},40,true)}});try{j(c.childNodes)}catch(B){j=function(f){for(var e=
[],o=f.length-1;o>=0;o--)e[o]=f[o];return e}}if(location&&(location.search||"").indexOf("ks-debug")!==-1)d.Config.debug=true})(KISSY);(function(d){d.config({combine:{core:["dom","ua","event","node","json","ajax","anim","base","cookie"]}})})(KISSY);
KISSY.add("ua/base",function(){var d=navigator.userAgent,b="",u="",j,n={},q=function(c){var m=0;return parseFloat(c.replace(/\./g,function(){return m++===0?".":""}))};if((j=d.match(/AppleWebKit\/([\d.]*)/))&&j[1]){n[b="webkit"]=q(j[1]);if((j=d.match(/Chrome\/([\d.]*)/))&&j[1])n[u="chrome"]=q(j[1]);else if((j=d.match(/\/([\d.]*) Safari/))&&j[1])n[u="safari"]=q(j[1]);if(/ Mobile\//.test(d))n.mobile="apple";else if(j=d.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))n.mobile=j[0].toLowerCase()}else if((j=
d.match(/Presto\/([\d.]*)/))&&j[1]){n[b="presto"]=q(j[1]);if((j=d.match(/Opera\/([\d.]*)/))&&j[1]){n[u="opera"]=q(j[1]);if((j=d.match(/Opera\/.* Version\/([\d.]*)/))&&j[1])n[u]=q(j[1]);if((j=d.match(/Opera Mini[^;]*/))&&j)n.mobile=j[0].toLowerCase();else if((j=d.match(/Opera Mobi[^;]*/))&&j)n.mobile=j[0]}}else if((j=d.match(/MSIE\s([^;]*)/))&&j[1]){n[b="trident"]=0.1;n[u="ie"]=q(j[1]);if((j=d.match(/Trident\/([\d.]*)/))&&j[1])n[b]=q(j[1])}else if(j=d.match(/Gecko/)){n[b="gecko"]=0.1;if((j=d.match(/rv:([\d.]*)/))&&
j[1])n[b]=q(j[1]);if((j=d.match(/Firefox\/([\d.]*)/))&&j[1])n[u="firefox"]=q(j[1])}n.core=b;n.shell=u;n._numberify=q;return n});
KISSY.add("ua/extra",function(d,b){var u=navigator.userAgent,j,n,q={},c=b._numberify;if(u.match(/360SE/))q[n="se360"]=3;else if(u.match(/Maxthon/)&&(j=window.external)){n="maxthon";try{q[n]=c(j.max_version)}catch(m){q[n]=0.1}}else if(j=u.match(/TencentTraveler\s([\d.]*)/))q[n="tt"]=j[1]?c(j[1]):0.1;else if(u.match(/TheWorld/))q[n="theworld"]=3;else if(j=u.match(/SE\s([\d.]*)/))q[n="sougou"]=j[1]?c(j[1]):0.1;n&&(q.shell=n);d.mix(b,q);return b},{requires:["ua/base"]});
KISSY.add("ua",function(d,b){return b},{requires:["ua/extra"]});KISSY.add("dom/base",function(d,b){function u(j,n){return j&&j.nodeType===n}return{_isElementNode:function(j){return u(j,1)},_isKSNode:function(j){var n=d.require("node/node");return n&&u(j,n.TYPE)},_getWin:function(j){return j&&"scrollTo"in j&&j.document?j:u(j,9)?j.defaultView||j.parentWindow:j===b?window:false},_nodeTypeIs:u}});
KISSY.add("dom/attr",function(d,b,u,j){var n=document.documentElement,q=!n.hasAttribute,c=n.textContent!==j?"textContent":"innerText",m=b._isElementNode,w=/^(?:href|src|style)/,z=/^(?:href|src|colspan|rowspan)/,l=/\r/g,r=/^(?:radio|checkbox)/,x={readonly:"readOnly"},y={val:1,css:1,html:1,text:1,data:1,width:1,height:1,offset:1},B={tabindex:{getter:function(f){return f.tabIndex},setter:function(f,e){if(isNaN(parseInt(e))){f.removeAttribute("tabindex");f.removeAttribute("tabIndex")}else f.tabIndex=
e}},style:{getter:function(f){return f.style.cssText},setter:function(f,e){f.style.cssText=e}},checked:{setter:function(f,e){f.checked=!!e}},disabled:{setter:function(f,e){f.disabled=!!e}}};q&&d.mix(x,{"for":"htmlFor","class":"className"});B={tabindex:{getter:function(f){return f.tabIndex},setter:function(f,e){if(isNaN(parseInt(e))){f.removeAttribute("tabindex");f.removeAttribute("tabIndex")}else f.tabIndex=e}},style:{getter:function(f){return f.style.cssText},setter:function(f,e){f.style.cssText=
e}},checked:{setter:function(f,e){f.checked=!!e}},disabled:{setter:function(f,e){f.disabled=!!e}}};d.mix(b,{attr:function(f,e,o,h){if(d.isPlainObject(e)){h=o;for(var i in e)b.attr(f,i,e[i],h)}else if(e=d.trim(e)){e=e.toLowerCase();if(h&&y[e])return b[e](f,o);e=x[e]||e;var k=B[e];if(o===j){f=b.get(f);if(!m(f))return j;if(k&&k.getter)return k.getter(f);var t;w.test(e)||(t=f[e]);if(t===j)t=f.getAttribute(e);if(q)if(z.test(e))t=f.getAttribute(e,2);return t===null?j:t}d.each(b.query(f),function(A){if(m(A))k&&
k.setter?k.setter(A,o):A.setAttribute(e,""+o)})}},removeAttr:function(f,e){e=e.toLowerCase();d.each(b.query(f),function(o){if(m(o)){b.attr(o,e,"");o.removeAttribute(e)}})},hasAttr:q?function(f,e){e=e.toLowerCase();var o=b.get(f).getAttributeNode(e);return!!(o&&o.specified)}:function(f,e){e=e.toLowerCase();return b.get(f).hasAttribute(e)},val:function(f,e){if(e===j){var o=b.get(f);if(!m(o))return j;if(o&&o.nodeName.toUpperCase()==="option".toUpperCase())return(o.attributes.value||{}).specified?o.value:
o.text;if(o&&o.nodeName.toUpperCase()==="select".toUpperCase()){var h=o.selectedIndex,i=o.options;if(h<0)return null;else if(o.type==="select-one")return b.val(i[h]);o=[];for(var k=0,t=i.length;k<t;++k)i[k].selected&&o.push(b.val(i[k]));return o}if(u.webkit&&r.test(o.type))return o.getAttribute("value")===null?"on":o.value;return(o.value||"").replace(l,"")}d.each(b.query(f),function(A){if(A&&A.nodeName.toUpperCase()==="select".toUpperCase()){if(d.isNumber(e))e+="";var a=d.makeArray(e),p=A.options,
g;k=0;for(t=p.length;k<t;++k){g=p[k];g.selected=d.inArray(b.val(g),a)}if(!a.length)A.selectedIndex=-1}else if(m(A))A.value=e})},text:function(f,e){if(e===j){var o=b.get(f);if(m(o))return o[c]||"";else if(b._nodeTypeIs(o,3))return o.nodeValue}else d.each(b.query(f),function(h){if(m(h))h[c]=e;else if(b._nodeTypeIs(h,3))h.nodeValue=e})}});return b},{requires:["dom/base","ua"]});
KISSY.add("dom/class",function(d,b,u){function j(c,m,w,z){if(!(m=d.trim(m)))return z?false:u;c=b.query(c);var l=0,r=c.length;m=m.split(n);for(var x;l<r;l++){x=c[l];if(b._isElementNode(x)){x=w(x,m,m.length);if(x!==u)return x}}if(z)return false;return u}var n=/[\.\s]\s*\.?/,q=/[\n\t]/g;d.mix(b,{hasClass:function(c,m){return j(c,m,function(w,z,l){if(w=w.className){w=" "+w+" ";for(var r=0,x=true;r<l;r++)if(w.indexOf(" "+z[r]+" ")<0){x=false;break}if(x)return true}},true)},addClass:function(c,m){j(c,m,
function(w,z,l){var r=w.className;if(r){var x=" "+r+" ";r=r;for(var y=0;y<l;y++)if(x.indexOf(" "+z[y]+" ")<0)r+=" "+z[y];w.className=d.trim(r)}else w.className=m},u)},removeClass:function(c,m){j(c,m,function(w,z,l){var r=w.className;if(r)if(l){r=(" "+r+" ").replace(q," ");for(var x=0,y;x<l;x++)for(y=" "+z[x]+" ";r.indexOf(y)>=0;)r=r.replace(y," ");w.className=d.trim(r)}else w.className=""},u)},replaceClass:function(c,m,w){b.removeClass(c,m);b.addClass(c,w)},toggleClass:function(c,m,w){var z=d.isBoolean(w),
l;j(c,m,function(r,x,y){for(var B=0,f;B<y;B++){f=x[B];l=z?!w:b.hasClass(r,f);b[l?"removeClass":"addClass"](r,f)}},u)}});return b},{requires:["dom/base"]});
KISSY.add("dom/create",function(d,b,u,j){function n(a){var p=a.cloneNode(true);if(u.ie<8)p.innerHTML=a.innerHTML;return p}function q(a,p,g,s){if(g){var v=d.guid("ks-tmp-"),C=RegExp(B);p+='<span id="'+v+'"></span>';d.available(v,function(){var D=b.get("head"),F,G,E,J,K,I;for(C.lastIndex=0;F=C.exec(p);)if((E=(G=F[1])?G.match(e):false)&&E[2]){F=m.createElement("script");F.src=E[2];if((J=G.match(o))&&J[2])F.charset=J[2];F.async=true;D.appendChild(F)}else if((I=F[2])&&I.length>0)d.globalEval(I);(K=m.getElementById(v))&&
b.remove(K);d.isFunction(s)&&s()});c(a,p)}else{c(a,p);d.isFunction(s)&&s()}}function c(a,p){p=(p+"").replace(B,"");try{a.innerHTML=p}catch(g){for(;a.firstChild;)a.removeChild(a.firstChild);p&&a.appendChild(b.create(p))}}var m=document,w=u.ie,z=b._nodeTypeIs,l=b._isElementNode,r=b._isKSNode,x=m.createElement("div"),y=/<(\w+)/,B=/<script([^>]*)>([^<]*(?:(?!<\/script>)<[^<]*)*)<\/script>/ig,f=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,e=/\ssrc=(['"])(.*?)\1/i,o=/\scharset=(['"])(.*?)\1/i;d.mix(b,{create:function(a,
p,g){if(z(a,1)||z(a,3))return n(a);if(r(a))return n(a[0]);if(!(a=d.trim(a)))return null;var s=null;s=b._creators;var v,C="div",D;if(v=f.exec(a))s=(g||m).createElement(v[1]);else{if((v=y.exec(a))&&(D=v[1])&&d.isFunction(s[D=D.toLowerCase()]))C=D;a=s[C](a,g).childNodes;if(a.length===1)g=a[0].parentNode.removeChild(a[0]);else{a=a;D=g||m;g=null;if(a&&(a.push||a.item)&&a[0]){D=D||a[0].ownerDocument;g=D.createDocumentFragment();if(a.item)a=d.makeArray(a);D=0;for(s=a.length;D<s;D++)g.appendChild(a[D])}g=
g}s=g}g=s;l(g)&&d.isPlainObject(p)&&b.attr(g,p,true);return g},_creators:{div:function(a,p){var g=p?p.createElement("div"):x;g.innerHTML=a;return g}},html:function(a,p,g,s){if(p===j){a=b.get(a);if(l(a))return a.innerHTML}else d.each(b.query(a),function(v){l(v)&&q(v,p,g,s)})},remove:function(a){d.each(b.query(a),function(p){l(p)&&p.parentNode&&p.parentNode.removeChild(p)})}});if(w||u.gecko||u.webkit){var h=b._creators,i=b.create,k=/(?:\/(?:thead|tfoot|caption|col|colgroup)>)+\s*<tbody/,t={option:"select",
td:"tr",tr:"tbody",tbody:"table",col:"colgroup",legend:"fieldset"},A;for(A in t)(function(a){h[A]=function(p,g){return i("<"+a+">"+p+"</"+a+">",null,g)}})(t[A]);if(w){h.script=function(a,p){var g=p?p.createElement("div"):x;g.innerHTML="-"+a;g.removeChild(g.firstChild);return g};if(w<8)h.tbody=function(a,p){var g=i("<table>"+a+"</table>",null,p),s=g.children.tags("tbody")[0];g.children.length>1&&s&&!k.test(a)&&s.parentNode.removeChild(s);return g}}d.mix(h,{optgroup:h.option,th:h.td,thead:h.tbody,tfoot:h.tbody,
caption:h.tbody,colgroup:h.tbody})}return b},{requires:["dom/base","ua"]});
KISSY.add("dom/data",function(d,b,u){var j=window,n="_ks_data_"+d.now(),q={},c={},m={EMBED:1,OBJECT:1,APPLET:1};d.mix(b,{data:function(w,z,l){if(d.isPlainObject(z))for(var r in z)b.data(w,r,z[r]);else if(l===u){w=b.get(w);var x;if(!(!w||m[w.nodeName])){if(w==j)w=c;x=(r=w&&w.nodeType)?q:w;w=x[r?w[n]:n];if(d.isString(z)&&w)return w[z];return w}}else b.query(w).each(function(y){if(!(!y||m[y.nodeName])){if(y==j)y=c;var B=q,f;if(y&&y.nodeType){if(!(f=y[n]))f=y[n]=d.guid()}else{f=n;B=y}if(z&&l!==u){B[f]||
(B[f]={});B[f][z]=l}}})},removeData:function(w,z){b.query(w).each(function(l){if(l){if(l==j)l=c;var r,x=q,y,B=l&&l.nodeType;if(B)r=l[n];else{x=l;r=n}if(r){y=x[r];if(z){if(y){delete y[z];d.isEmptyObject(y)&&b.removeData(l)}}else{if(B)l.removeAttribute&&l.removeAttribute(n);else try{delete l[n]}catch(f){}B&&delete x[r]}}}})}});return b},{requires:["dom/base"]});
KISSY.add("dom/insertion",function(d,b){d.mix(b,{insertBefore:function(u,j){if((u=b.get(u))&&(j=b.get(j))&&j.parentNode)j.parentNode.insertBefore(u,j);return u},insertAfter:function(u,j){if((u=b.get(u))&&(j=b.get(j))&&j.parentNode)j.nextSibling?j.parentNode.insertBefore(u,j.nextSibling):j.parentNode.appendChild(u);return u},append:function(u,j){if((u=b.get(u))&&(j=b.get(j)))j.appendChild&&j.appendChild(u)},prepend:function(u,j){if((u=b.get(u))&&(j=b.get(j)))j.firstChild?b.insertBefore(u,j.firstChild):
j.appendChild(u)}});return b},{requires:["dom/base"]});
KISSY.add("dom/offset",function(d,b,u,j){function n(i){var k=0,t=0,A=z(i[y]);if(i[h]){i=i[h]();k=i[B];t=i[f];if(u.mobile!=="apple"){k+=b[e](A);t+=b[o](A)}}return{left:k,top:t}}var q=window,c=document,m=b._isElementNode,w=b._nodeTypeIs,z=b._getWin,l=c.compatMode==="CSS1Compat",r=Math.max,x=parseInt,y="ownerDocument",B="left",f="top",e="scrollLeft",o="scrollTop",h="getBoundingClientRect";d.mix(b,{offset:function(i,k){if(!(i=b.get(i))||!i[y])return null;if(k===j)return n(i);var t=i;if(b.css(t,"position")===
"static")t.style.position="relative";var A=n(t),a={},p,g;for(g in k){p=x(b.css(t,g),10)||0;a[g]=p+k[g]-A[g]}b.css(t,a)},scrollIntoView:function(i,k,t,A){if((i=b.get(i))&&i[y]){A=A===j?true:!!A;t=t===j?true:!!t;if(!k||k===q)return i.scrollIntoView(t);k=b.get(k);if(w(k,9))k=z(k);var a=k&&"scrollTo"in k&&k.document,p=b.offset(i),g=a?{left:b.scrollLeft(k),top:b.scrollTop(k)}:b.offset(k),s={left:p[B]-g[B],top:p[f]-g[f]};p=a?b.viewportHeight(k):k.clientHeight;g=a?b.viewportWidth(k):k.clientWidth;var v=
b[e](k),C=b[o](k),D=v+g,F=C+p,G=i.offsetHeight;i=i.offsetWidth;var E=s.left+v-(x(b.css(k,"borderLeftWidth"))||0);s=s.top+C-(x(b.css(k,"borderTopWidth"))||0);var J=E+i,K=s+G,I,H;if(G>p||s<C||t)I=s;else if(K>F)I=K-p;if(A)if(i>g||E<v||t)H=E;else if(J>D)H=J-g;if(a){if(I!==j||H!==j)k.scrollTo(H,I)}else{if(I!==j)k[o]=I;if(H!==j)k[e]=H}}}});d.each(["Left","Top"],function(i,k){var t="scroll"+i;b[t]=function(A){var a=0,p=z(A),g;if(p&&(g=p.document))a=p[k?"pageYOffset":"pageXOffset"]||g.documentElement[t]||
g.body[t];else if(m(A=b.get(A)))a=A[t];return a}});d.each(["Width","Height"],function(i){b["doc"+i]=function(k){k=k||c;return r(l?k.documentElement["scroll"+i]:k.body["scroll"+i],b["viewport"+i](k))};b["viewport"+i]=function(k){var t="inner"+i;k=z(k);var A=k.document;return t in k?k[t]:l?A.documentElement["client"+i]:A.body["client"+i]}});return b},{requires:["dom/base","ua"]});
KISSY.add("dom/style",function(d,b,u,j){function n(o,h){var i=b.get(o),k=h===w?i.offsetWidth:i.offsetHeight;d.each(h===w?["Left","Right"]:["Top","Bottom"],function(t){k-=parseFloat(b._getComputedStyle(i,"padding"+t))||0;k-=parseFloat(b._getComputedStyle(i,"border"+t+"Width"))||0});return k}function q(o,h,i){var k=i;if(i===z&&r.test(h)){k=0;if(d.inArray(b.css(o,"position"),["absolute","fixed"])){i=o[h==="left"?"offsetLeft":"offsetTop"];if(u.ie===8||u.opera)i-=l(b.css(o.offsetParent,"border-"+h+"-width"))||
0;k=i-(l(b.css(o,"margin-"+h))||0)}}return k}var c=document,m=c.documentElement,w="width",z="auto",l=parseInt,r=/^(?:left|top)/,x=/^(?:width|height|top|left|right|bottom|margin|padding)/i,y=/-([a-z])/ig,B=function(o,h){return h.toUpperCase()},f={},e={};d.mix(b,{_CUSTOM_STYLES:f,_getComputedStyle:function(o,h){var i="",k=o.ownerDocument;if(o.style)i=k.defaultView.getComputedStyle(o,null)[h];return i},css:function(o,h,i){if(d.isPlainObject(h))for(var k in h)b.css(o,k,h[k]);else{if(h.indexOf("-")>0)h=
h.replace(y,B);h=f[h]||h;if(i===j){o=b.get(o);k="";if(o&&o.style){k=h.get?h.get(o):o.style[h];if(k===""&&!h.get)k=q(o,h,b._getComputedStyle(o,h))}return k===j?"":k}else{if(i===null||i==="")i="";else if(!isNaN(new Number(i))&&x.test(h))i+="px";(h===w||h==="height")&&parseFloat(i)<0||d.each(b.query(o),function(t){if(t&&t.style){h.set?h.set(t,i):t.style[h]=i;if(i==="")t.style.cssText||t.removeAttribute("style")}})}}},width:function(o,h){if(h===j)return n(o,w);else b.css(o,w,h)},height:function(o,h){if(h===
j)return n(o,"height");else b.css(o,"height",h)},show:function(o){b.query(o).each(function(h){if(h){h.style.display=b.data(h,"display")||"";if(b.css(h,"display")==="none"){var i=h.tagName,k=e[i],t;if(!k){t=c.createElement(i);c.body.appendChild(t);k=b.css(t,"display");b.remove(t);e[i]=k}b.data(h,"display",k);h.style.display=k}}})},hide:function(o){b.query(o).each(function(h){if(h){var i=h.style,k=i.display;if(k!=="none"){k&&b.data(h,"display",k);i.display="none"}}})},toggle:function(o){b.query(o).each(function(h){if(h)b.css.display===
"none"?b.show(h):b.hide(h)})},addStyleSheet:function(o,h){var i;if(h&&(h=h.replace("#","")))i=b.get("#"+h);if(!i){i=b.create("<style>",{id:h});b.get("head").appendChild(i);if(i.styleSheet)i.styleSheet.cssText=o;else i.appendChild(c.createTextNode(o))}},unselectable:function(o){b.query(o).each(function(h){if(h)if(u.gecko)h.style.MozUserSelect="none";else if(u.webkit)h.style.KhtmlUserSelect="none";else if(u.ie||u.opera){var i=0,k=h.getElementsByTagName("*");for(h.setAttribute("unselectable","on");h=
k[i++];)switch(h.tagName.toLowerCase()){case "iframe":case "textarea":case "input":case "select":break;default:h.setAttribute("unselectable","on")}}})}});if(m.style.cssFloat!==j)f["float"]="cssFloat";else if(m.style.styleFloat!==j)f["float"]="styleFloat";return b},{requires:["dom/base","ua"]});
KISSY.add("dom/selector",function(d,b,u){function j(e,o){var h,i,k=[],t;i=d.require("sizzle");o=n(o);if(d.isString(e)){e=d.trim(e);if(B.test(e)){if(i=q(e.slice(1),o))k=[i]}else if(h=f.exec(e)){i=h[1];t=h[2];h=h[3];if(o=i?q(i,o):o)if(h)if(!i||e.indexOf(l)!==-1)k=m(h,t,o);else{if((i=q(i,o))&&b.hasClass(i,h))k=[i]}else if(t)k=c(t,o)}else if(i)k=i(e,o);else w(e)}else if(e&&(e[x]||e[y]))k=e[x]?[e[x]()]:e[y]();else if(e&&(d.isArray(e)||e&&!e.nodeType&&e.item&&!e.setTimeout))k=e;else if(e)k=[e];if(k&&!k.nodeType&&
k.item&&!k.setTimeout)k=d.makeArray(k);k.each=function(A,a){return d.each(k,A,a)};return k}function n(e){if(e===u)e=z;else if(d.isString(e)&&B.test(e))e=q(e.slice(1),z);else if(e&&e.nodeType!==1&&e.nodeType!==9)e=null;return e}function q(e,o){if(o.nodeType!==9)o=o.ownerDocument;return o.getElementById(e)}function c(e,o){return o.getElementsByTagName(e)}function m(e,o,h){h=e=h.getElementsByClassName(e);var i=0,k=0,t=e.length,A;if(o&&o!==r){h=[];for(o=o.toUpperCase();i<t;++i){A=e[i];if(A.tagName===
o)h[k++]=A}}return h}function w(e){d.error("Unsupported selector: "+e)}var z=document,l=" ",r="*",x="getDOMNode",y=x+"s",B=/^#[\w-]+$/,f=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/;(function(){var e=z.createElement("div");e.appendChild(z.createComment(""));if(e.getElementsByTagName(r).length>0)c=function(o,h){var i=h.getElementsByTagName(o);if(o===r){for(var k=[],t=0,A=0,a;a=i[t++];)if(a.nodeType===1)k[A++]=a;i=k}return i}})();z.getElementsByClassName||(m=z.querySelectorAll?function(e,o,h){return h.querySelectorAll((o?
o:"")+"."+e)}:function(e,o,h){o=h.getElementsByTagName(o||r);h=[];var i=0,k=0,t=o.length,A,a;for(e=l+e+l;i<t;++i){A=o[i];if((a=A.className)&&(l+a+l).indexOf(e)>-1)h[k++]=A}return h});d.mix(b,{query:j,get:function(e,o){return j(e,o)[0]||null},filter:function(e,o,h){h=j(e,h);var i=d.require("sizzle"),k,t,A,a=[];if(d.isString(o)&&(k=f.exec(o))&&!k[1]){t=k[2];A=k[3];o=function(p){return!(t&&p.tagName!==t.toUpperCase()||A&&!b.hasClass(p,A))}}if(d.isFunction(o))a=d.filter(h,o);else if(o&&i)a=i._filter(e,
o+"");else w(o);return a},test:function(e,o,h){e=j(e,h);return e.length&&b.filter(e,o,h).length===e.length}});return b},{requires:["dom/base"]});
KISSY.add("dom/style-ie",function(d,b,u,j,n){if(!u.ie)return b;u=document;j=u.documentElement;var q=b._CUSTOM_STYLES,c=/^-?\d+(?:px)?$/i,m=/^-?\d/,w=/^(?:width|height)$/;try{if(j.style.opacity==n&&j.filters)q.opacity={get:function(l){var r=100;try{r=l.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(x){try{r=l.filters("alpha").opacity}catch(y){}}return r/100+""},set:function(l,r){var x=l.style,y=(l.currentStyle||0).filter||"";x.zoom=1;if(y)y=d.trim(y.replace(/alpha\(opacity[=:][^)]+\),?/ig,
""));if(y&&r!=1)y+=", ";x.filter=y+(r!=1?"alpha(opacity="+r*100+")":"")}}}catch(z){}if(!(u.defaultView||{}).getComputedStyle&&j.currentStyle)b._getComputedStyle=function(l,r){var x=l.style,y=l.currentStyle[r];if(w.test(r))y=b[r](l)+"px";else if(!c.test(y)&&m.test(y)){var B=x.left,f=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;x.left=r==="fontSize"?"1em":y||0;y=x.pixelLeft+"px";x.left=B;l.runtimeStyle.left=f}return y};return b},{requires:["./base","ua","./style"]});
KISSY.add("dom/traversal",function(d,b,u){function j(c,m,w,z){if(!(c=b.get(c)))return null;if(m===u)m=1;var l=null,r,x;if(d.isNumber(m)&&m>=0){if(m===0)return c;r=0;x=m;m=function(){return++r===x}}for(;c=c[w];)if(q(c)&&(!m||b.test(c,m))&&(!z||z(c))){l=c;break}return l}function n(c,m,w){var z=[];var l=c=b.get(c);if(c&&w)l=c.parentNode;if(l){w=0;for(l=l.firstChild;l;l=l.nextSibling)if(q(l)&&l!==c&&(!m||b.test(l,m)))z[w++]=l}return z}var q=b._isElementNode;d.mix(b,{parent:function(c,m){return j(c,m,
"parentNode",function(w){return w.nodeType!=11})},next:function(c,m){return j(c,m,"nextSibling",u)},prev:function(c,m){return j(c,m,"previousSibling",u)},siblings:function(c,m){return n(c,m,true)},children:function(c,m){return n(c,m,u)},contains:function(c,m){var w=false;if((c=b.get(c))&&(m=b.get(m)))if(c.contains){if(m.nodeType===3){m=m.parentNode;if(m===c)return true}if(m)return c.contains(m)}else if(c.compareDocumentPosition)return!!(c.compareDocumentPosition(m)&16);else for(;!w&&(m=m.parentNode);)w=
m==c;return w}});return b},{requires:["dom/base"]});KISSY.add("dom",function(d,b){return b},{requires:["dom/attr","dom/class","dom/create","dom/data","dom/insertion","dom/offset","dom/style","dom/selector","dom/style-ie","dom/traversal"]});
KISSY.add("event/object",function(d,b){function u(q,c,m){this.currentTarget=q;this.originalEvent=c||{};if(c){this.type=c.type;this._fix()}else{this.type=m;this.target=q}this.currentTarget=q;this.fixed=true}var j=document,n="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" ");d.augment(u,
{_fix:function(){var q=this.originalEvent,c=n.length,m,w=this.currentTarget;for(w=w.nodeType===9?w:w.ownerDocument||j;c;){m=n[--c];this[m]=q[m]}if(!this.target)this.target=this.srcElement||j;if(this.target.nodeType===3)this.target=this.target.parentNode;if(!this.relatedTarget&&this.fromElement)this.relatedTarget=this.fromElement===this.target?this.toElement:this.fromElement;if(this.pageX===b&&this.clientX!==b){q=w.documentElement;c=w.body;this.pageX=this.clientX+(q&&q.scrollLeft||c&&c.scrollLeft||
0)-(q&&q.clientLeft||c&&c.clientLeft||0);this.pageY=this.clientY+(q&&q.scrollTop||c&&c.scrollTop||0)-(q&&q.clientTop||c&&c.clientTop||0)}if(this.which===b)this.which=this.charCode!==b?this.charCode:this.keyCode;if(this.metaKey===b)this.metaKey=this.ctrlKey;if(!this.which&&this.button!==b)this.which=this.button&1?1:this.button&2?3:this.button&4?2:0},preventDefault:function(){var q=this.originalEvent;if(q.preventDefault)q.preventDefault();else q.returnValue=false;this.isDefaultPrevented=true},stopPropagation:function(){var q=
this.originalEvent;if(q.stopPropagation)q.stopPropagation();else q.cancelBubble=true;this.isPropagationStopped=true},stopImmediatePropagation:function(){var q=this.originalEvent;q.stopImmediatePropagation?q.stopImmediatePropagation():this.stopPropagation();this.isImmediatePropagationStopped=true},halt:function(q){q?this.stopImmediatePropagation():this.stopPropagation();this.preventDefault()}});return u});
KISSY.add("event/base",function(d,b,u,j){function n(f,e,o,h,i){if(d.isString(e))e=b.query(e);if(d.isArray(e)){d.each(e,function(k){B[f](k,o,h,i)});return true}if((o=d.trim(o))&&o.indexOf(r)>0){d.each(o.split(r),function(k){B[f](e,k,h,i)});return true}return j}function q(f){return f&&f.nodeType!==3&&f.nodeType!==8?b.data(f,l):-1}function c(f,e){f&&f.nodeType!==3&&f.nodeType!==8&&b.data(f,l,e)}var m=document,w=m.addEventListener?function(f,e,o,h){f.addEventListener&&f.addEventListener(e,o,!!h)}:function(f,
e,o){f.attachEvent&&f.attachEvent("on"+e,o)},z=m.removeEventListener?function(f,e,o,h){f.removeEventListener&&f.removeEventListener(e,o,!!h)}:function(f,e,o){f.detachEvent&&f.detachEvent("on"+e,o)},l="ksEventTargetId",r=" ",x=d.now(),y={},B={EVENT_GUID:l,special:{},add:function(f,e,o,h){if(!n("add",f,e,o,h)){var i=q(f),k,t,A,a,p;if(!(i===-1||!e||!d.isFunction(o))){if(!i){c(f,i=x++);y[i]={target:f,events:{}}}t=y[i].events;if(!t[e]){k=((i=!f.isCustomEventTarget)||f._supportSpecialEvent)&&B.special[e]||
{};A=function(g,s){if(!g||!g.fixed)g=new u(f,g,e);if(d.isPlainObject(s)){var v=g.type;d.mix(g,s);g.type=v}k.setup&&k.setup(g);return(k.handle||B._handle)(f,g)};t[e]={handle:A,listeners:[]};a=k.fix||e;p=k.capture;k.init&&k.init.apply(null,d.makeArray(arguments));i&&k.fix!==false&&w(f,a,A,p)}t[e].listeners.push({fn:o,scope:h||f})}}},__getListeners:function(f,e){var o,h=[];if(o=(B.__getEvents(f)||{})[e])h=o.listeners;return h},__getEvents:function(f){var e=q(f),o;if(e!==-1)if(e&&(o=y[e]))if(o.target===
f)return o.events||{}},remove:function(f,e,o,h){if(!n("remove",f,e,o,h)){var i=B.__getEvents(f),k=q(f),t,A,a,p,g,s,v=(!f.isCustomEventTarget||f._supportSpecialEvent)&&B.special[e]||{};if(i!==j){h=h||f;if(t=i[e]){A=t.listeners;a=A.length;if(d.isFunction(o)&&a){g=p=0;for(s=[];p<a;++p)if(o!==A[p].fn||h!==A[p].scope)s[g++]=A[p];t.listeners=s;a=s.length}if(o===j||a===0){if(!f.isCustomEventTarget){v=B.special[e]||{};if(v.fix!==false)z(f,v.fix||e,t.handle)}delete i[e]}}v.destroy&&v.destroy.apply(null,d.makeArray(arguments));
if(e===j||d.isEmptyObject(i)){for(e in i)B.remove(f,e);delete y[k];b.removeData(f,l)}}}},_handle:function(f,e){var o=B.__getListeners(f,e.type);o=o.slice(0);for(var h,i,k=0,t=o.length;k<t;++k){h=o[k];h=h.fn.call(h.scope,e);if(i!==false)i=h;if(h!==j){e.result=h;h===false&&e.halt()}if(e.isImmediatePropagationStopped)break}return i},_getCache:function(f){return y[f]},__getID:q,_simpleAdd:w,_simpleRemove:z};B.on=B.add;return B},{requires:["dom","event/object"]});
KISSY.add("event/target",function(d,b,u,j){return{isCustomEventTarget:true,fire:function(n,q){var c=u.data(this,b.EVENT_GUID)||-1;if((c=((b._getCache(c)||{}).events||{})[n])&&d.isFunction(c.handle))return c.handle(j,q)},on:function(n,q,c){b.add(this,n,q,c);return this},detach:function(n,q,c){b.remove(this,n,q,c);return this}}},{requires:["event/base","dom"]});
KISSY.add("event/focusin",function(d,b){document.addEventListener&&d.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(u){b.special[u.name]={fix:u.fix,capture:true,setup:function(j){j.type=u.name}}})},{requires:["event/base"]});
KISSY.add("event/mouseenter",function(d,b,u,j){j.ie||d.each([{name:"mouseenter",fix:"mouseover"},{name:"mouseleave",fix:"mouseout"}],function(n){b.special[n.name]={fix:n.fix,setup:function(q){q.type=n.name},handle:function(q,c){if(u._isKSNode(q))q=q[0];var m=c.relatedTarget;try{for(;m&&m!==q;)m=m.parentNode;m!==q&&b._handle(q,c)}catch(w){}}}})},{requires:["event/base","dom","ua"]});
KISSY.add("event",function(d,b,u){b.Target=u;return b},{requires:["event/base","event/target","event/object","event/focusin","event/mouseenter"]});
KISSY.add("node/node",function(d,b,u){function j(n,q,c){if(!(this instanceof j))return new j(n,q,c);if(!n){this.length=0;return u}if(d.isString(n)){n=b.create(n,q,c);if(n.nodeType===11)return new (d.require("node/nodelist"))(n.childNodes)}else if(n instanceof j)return n;else n=n;this[0]=n;return u}j.TYPE="-ks-Node";d.augment(j,{length:1,getDOMNode:function(){return this[0]},nodeType:j.TYPE});j.one=function(n,q){var c=b.get(n,q);return c?new j(c,u,u):null};return j},{requires:["dom"]});
KISSY.add("node/nodelist",function(d,b,u,j){function n(m){if(!(this instanceof n))return new n(m);q.push.apply(this,d.makeArray(m)||[]);return j}var q=Array.prototype,c=b._isElementNode;d.mix(n.prototype,{length:0,item:function(m){var w=null,z,l;if(c(m)){z=0;for(l=this.length;z<l;z++)if(m===this[z]){m=z;break}}if(c(this[m]))w=new u(this[m]);return w},getDOMNodes:function(){return q.slice.call(this)},each:function(m,w){var z=this.length,l=0,r;for(r=new u(this[0]);l<z&&m.call(w||r,r,l,this)!==false;r=
new u(this[++l]));return this}});n.all=function(m,w){return new n(b.query(m,w,true))};return n},{requires:["dom","node/node"]});
KISSY.add("node/attach",function(d,b,u,j,n,q){function c(t,A,a,p){t=[this[t?o:e]()].concat(d.makeArray(A));if(A[a]===q&&(a!=1||d.isString(A[0])))return p.apply(b,t);p.apply(b,t);return this}function m(t,A){d.each(t,function(a){d.each([B,f],function(p,g){p[a]=function(s){switch(A){case h:return function(){return c.call(this,g,arguments,1,s)};case i:return function(){return c.call(this,g,arguments,0,s)};case k:return function(){var v=this[g?o:e]();return(v=s.apply(b,[v].concat(d.makeArray(arguments))))?
new (d.isArray(v)?n:j)(v):null};default:return function(){var v=this[g?o:e]();v=s.apply(b,[v].concat(d.makeArray(arguments)));return v===q?this:v}}}(b[a])})})}function w(t,A,a){t&&d.each(this,function(p){var g;if(A||d.isString(t))g=b.create(t);else{if(r(t,1)||r(t,3))g=t;if(x(t))g=t[0]}b[a](g,p)});return this}function z(t,A){if((t=b.get(t))&&t.appendChild)d.each(this,function(a){b[A](a,t)});return this}function l(t,A){t.__wrap=t.__wrap||[];t.__wrap.push(A)}var r=b._nodeTypeIs,x=b._isKSNode,y=d.require("event/target"),
B=j.prototype,f=n.prototype,e="getDOMNode",o=e+"s",h=1,i=2,k=4;d.mix(B,{one:function(t){return j.one(t,this[0])},all:function(t){return n.all(t,this[0])}});m(["data","removeData"],h);m(["hasClass","addClass","removeClass","replaceClass","toggleClass"],q);m(["attr","removeAttr"],h);m(["val","text"],i);m(["css"],h);m(["width","height"],i);m(["offset"],i);m(["scrollIntoView"],q);m(["parent","next","prev","siblings","children"],k);m(["contains"],q);m(["html","unselectable"],i);m(["remove"],q);d.each(["insertBefore",
"insertAfter"],function(t){B[t]=function(A){b[t].call(b,this[0],A);return this}});d.each([B,f],function(t,A){d.each(["append","prepend"],function(a){t[a]=function(p){return w.call(this,p,A,a)};t[a+"To"]=function(p){return z.call(this,p,a)}})});d.augment(j,y,{fire:null,on:function(t,A,a){function p(s){var v=d.makeArray(arguments);v.shift();s.target=new j(s.target);if(s.relatedTarget)s.relatedTarget=new j(s.relatedTarget);v.unshift(s);return A.apply(a||g,v)}var g=this;u.add(this[0],t,p,a);l(A,p);return this},
detach:function(t,A,a){if(d.isFunction(A)){A=A.__wrap||[];for(var p=0;p<A.length;p++)u.remove(this[0],t,A[p],a)}else u.remove(this[0],t,A,a);return this}});d.augment(n,y,{fire:null});B._supportSpecialEvent=true;d.each({on:"add",detach:"remove"},function(t,A){f[A]=function(a,p,g){for(var s=0;s<this.length;s++)this.item(s).on(a,p,g)}})},{requires:["dom","event","node/node","node/nodelist"]});KISSY.add("node",function(d,b,u){b.List=u;return b},{requires:["node/node","node/nodelist","node/attach"]});
KISSY.add("json/json2",function(){function d(r){return r<10?"0"+r:r}function b(r){c.lastIndex=0;return c.test(r)?'"'+r.replace(c,function(x){var y=z[x];return typeof y==="string"?y:"\\u"+("0000"+x.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+r+'"'}function u(r,x){var y,B,f,e,o=m,h,i=x[r];if(i&&typeof i==="object"&&typeof i.toJSON==="function")i=i.toJSON(r);if(typeof l==="function")i=l.call(x,r,i);switch(typeof i){case "string":return b(i);case "number":return isFinite(i)?String(i):"null";case "boolean":case "null":return String(i);
case "object":if(!i)return"null";m+=w;h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){e=i.length;for(y=0;y<e;y+=1)h[y]=u(y,i)||"null";f=h.length===0?"[]":m?"[\n"+m+h.join(",\n"+m)+"\n"+o+"]":"["+h.join(",")+"]";m=o;return f}if(l&&typeof l==="object"){e=l.length;for(y=0;y<e;y+=1){B=l[y];if(typeof B==="string")if(f=u(B,i))h.push(b(B)+(m?": ":":")+f)}}else for(B in i)if(Object.hasOwnProperty.call(i,B))if(f=u(B,i))h.push(b(B)+(m?": ":":")+f);f=h.length===0?"{}":m?"{\n"+m+h.join(",\n"+m)+
"\n"+o+"}":"{"+h.join(",")+"}";m=o;return f}}var j=window,n=j.JSON;if(!n)n=j.JSON={};if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+d(this.getUTCMonth()+1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
c=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m,w,z={"":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;if(typeof n.stringify!=="function")n.stringify=function(r,x,y){var B;w=m="";if(typeof y==="number")for(B=0;B<y;B+=1)w+=" ";else if(typeof y==="string")w=y;if((l=x)&&typeof x!=="function"&&(typeof x!=="object"||typeof x.length!=="number"))throw Error("JSON.stringify");return u("",{"":r})};if(typeof n.parse!==
"function")n.parse=function(r,x){function y(f,e){var o,h,i=f[e];if(i&&typeof i==="object")for(o in i)if(Object.hasOwnProperty.call(i,o)){h=y(i,o);if(h!==undefined)i[o]=h;else delete i[o]}return x.call(f,e,i)}var B;r=String(r);q.lastIndex=0;if(q.test(r))r=r.replace(q,function(f){return"\\u"+("0000"+f.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(r.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
""))){B=eval("("+r+")");return typeof x==="function"?y({"":B},""):B}throw new SyntaxError("JSON.parse");};return n});KISSY.add("json",function(d,b){return{parse:function(u){if(u==null||u==="")return null;return b.parse(u)},stringify:b.stringify}},{requires:["json/json2"]});
KISSY.add("ajax/impl",function(d,b,u,j){function n(g){g=d.merge(p,g);if(!g.url)return j;if(g.data&&!d.isString(g.data))g.data=d.param(g.data);g.context=g.context||g;var s,v=i,C,D=g.type.toUpperCase();if(g.dataType===y){s=g.jsonpCallback||d.guid(y);g.url=g.url+(g.url.indexOf("?")===-1?"?":"&")+(g.jsonp+"="+s);g.dataType=B;var F=m[s];m[s]=function(I){if(d.isFunction(F))F(I);else{m[s]=j;try{delete m[s]}catch(H){}}q([i,k],I,v,E,g)}}if(g.data&&D===z)g.url=g.url+(g.url.indexOf("?")===-1?"?":"&")+g.data;
if(g.dataType===B){c(e,g);D=d.getScript(g.url,s?null:function(){q([i,k],f,v,E,g)});c(o,g);return D}var G=false,E=g.xhr();c(e,g);E.open(D,g.url,g.async);try{if(g.data||g.contentType)E.setRequestHeader(r,g.contentType);E.setRequestHeader("Accept",g.dataType&&g.accepts[g.dataType]?g.accepts[g.dataType]+", */*; q=0.01":g.accepts._default)}catch(J){}E.onreadystatechange=function(I){if(!E||E.readyState===0||I==="abort"){G||q(k,null,t,E,g);G=true;if(E)E.onreadystatechange=w}else if(!G&&E&&(E.readyState===
4||I===A)){G=true;E.onreadystatechange=w;var H;if(I===A)H=A;else{a:{try{H=E.status>=200&&E.status<300||E.status===304||E.status===1223;break a}catch(P){}H=false}H=H?i:t}v=H;try{H=E;var M=g.dataType,N=f,O,L=H;if(!d.isString(L)){N=H.getResponseHeader(r)||f;L=(O=M==="xml"||!M&&N.indexOf("xml")>=0)?H.responseXML:H.responseText;if(O&&L.documentElement.nodeName===a)throw a;}if(d.isString(L))if(M===x||!M&&N.indexOf(x)>=0)L=u.parse(L);C=L}catch(Q){v=a}q([v===i?i:t,k],C,v,E,g);if(I===A){E.abort();c(h,g)}if(g.async)E=
null}};c(o,g);try{E.send(D===l?g.data:null)}catch(K){q([t,k],C,t,E,g)}g.async||c(k,g);return E}function q(g,s,v,C,D){if(d.isArray(g))d.each(g,function(F){q(F,s,v,C,D)});else{v===g&&D[g]&&D[g].call(D.context,s,v,C);c(g,D)}}function c(g,s){n.fire(g,{ajaxConfig:s})}var m=window,w=function(){},z="GET",l="POST",r="Content-Type",x="json",y=x+"p",B="script",f="",e="start",o="send",h="stop",i="success",k="complete",t="error",A="timeout",a="parsererror",p={type:z,url:f,contentType:"application/x-www-form-urlencoded",
async:true,data:null,xhr:m.ActiveXObject?function(){if(m.XmlHttpRequest)try{return new m.XMLHttpRequest}catch(g){}try{return new m.ActiveXObject("Microsoft.XMLHTTP")}catch(s){}}:function(){return new m.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"},jsonp:"callback"};d.mix(n,b.Target);d.mix(n,{get:function(g,s,v,C,D){if(d.isFunction(s)){C=v;v=s}return n({type:D||
z,url:g,data:s,success:function(F,G,E){v&&v.call(this,F,G,E)},dataType:C})},post:function(g,s,v,C){if(d.isFunction(s)){C=v;v=s;s=j}return n.get(g,s,v,C,l)},jsonp:function(g,s,v){if(d.isFunction(s)){v=s;s=null}return n.get(g,s,v,y)}});return n},{requires:["event","json"]});KISSY.add("ajax",function(d,b){return b},{requires:["ajax/impl"]});
KISSY.add("anim/easing",function(){var d=Math,b=d.PI,u=d.pow,j=d.sin,n=1.70158,q={easeNone:function(c){return c},easeIn:function(c){return c*c},easeOut:function(c){return(2-c)*c},easeBoth:function(c){return(c*=2)<1?0.5*c*c:0.5*(1- --c*(c-2))},easeInStrong:function(c){return c*c*c*c},easeOutStrong:function(c){return 1- --c*c*c*c},easeBothStrong:function(c){return(c*=2)<1?0.5*c*c*c*c:0.5*(2-(c-=2)*c*c*c)},elasticIn:function(c){if(c===0||c===1)return c;return-(u(2,10*(c-=1))*j((c-0.075)*2*b/0.3))},elasticOut:function(c){if(c===
0||c===1)return c;return u(2,-10*c)*j((c-0.075)*2*b/0.3)+1},elasticBoth:function(c){if(c===0||(c*=2)===2)return c;if(c<1)return-0.5*u(2,10*(c-=1))*j((c-0.1125)*2*b/0.45);return u(2,-10*(c-=1))*j((c-0.1125)*2*b/0.45)*0.5+1},backIn:function(c){if(c===1)c-=0.0010;return c*c*((n+1)*c-n)},backOut:function(c){return(c-=1)*c*((n+1)*c+n)+1},backBoth:function(c){if((c*=2)<1)return 0.5*c*c*(((n*=1.525)+1)*c-n);return 0.5*((c-=2)*c*(((n*=1.525)+1)*c+n)+2)},bounceIn:function(c){return 1-q.bounceOut(1-c)},bounceOut:function(c){return c<
1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+0.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+0.9375:7.5625*(c-=2.625/2.75)*c+0.984375},bounceBoth:function(c){if(c<0.5)return q.bounceIn(c*2)*0.5;return q.bounceOut(c*2-1)*0.5+0.5}};q.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 q});
KISSY.add("anim/manager",function(d){function b(j){j[u]=j[u]||d.guid("anim-");return j[u]}var u=d.guid("anim-");return{interval:20,runnings:{},timer:null,start:function(j){var n=b(j);if(!this.runnings[n]){this.runnings[n]=j;this.startTimer()}},stop:function(j){this.notRun(j)},notRun:function(j){delete this.runnings[b(j)];d.isEmptyObject(this.runnings)&&this.stopTimer()},pause:function(j){this.notRun(j)},resume:function(j){this.start(j)},startTimer:function(){var j=this;if(!j.timer)j.timer=setTimeout(function(){if(j.runFrames())j.stopTimer();
else{j.timer=null;j.startTimer()}},j.interval)},stopTimer:function(){var j=this.timer;if(j){clearTimeout(j);this.timer=null}},runFrames:function(){var j=true,n=this.runnings,q;for(q in n)if(n.hasOwnProperty(q)){j=false;n[q]._runFrame()}return j}}});
KISSY.add("anim/base",function(d,b,u,j,n,q,c){function m(h,i,k,t,A,a){if(!(h=b.get(h)))return c;if(!(this instanceof m))return new m(h,i,k,t,A,a);var p=d.isPlainObject(k);i=i;this.domEl=h;if(d.isPlainObject(i))i=String(d.param(i,";")).replace(/=/g,":").replace(/%23/g,"#").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();var g=i,s=h,v;h={};var C=r.length;s=b.insertAfter(s.cloneNode(true),s);v=s.style;for(z(s,g);C--;){var D=r[C];if(v[D])h[D]=(e[D]||e["*"]).getter(s,D)}g=l(g);for(var F in g)h[F]=(e[F]||
e["*"]).getter(s,F);b.remove(s);this.props=h;this.targetStyle=i;if(p)p=d.merge(B,k);else{p=d.clone(B);if(k)p.duration=parseFloat(k)||1;if(d.isString(t)||d.isFunction(t))p.easing=t;if(d.isFunction(A))p.complete=A;if(a!==c)p.nativeSupport=a}if(!d.isEmptyObject(l(i)))p.nativeSupport=false;this.config=p;if(p.nativeSupport&&o()&&d.isString(t=p.easing))if(/cubic-bezier\([\s\d.,]+\)/.test(t)||(t=j.NativeTimeFunction[t])){p.easing=t;this.transitionName=o()}if(d.isFunction(A))this.callback=A;return c}function w(h,
i){return i}function z(h,i){if(n.ie&&i.indexOf(y)>-1){var k=i.match(/opacity\s*:\s*([^;]+)(;|$)/);k&&b.css(h,y,parseFloat(k[1]))}h.style.cssText+=";"+i;k=l(i);for(var t in k)h[t]=k[t]}function l(h){for(var i={},k=0;k<x.length;k++){var t=x[k].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(t=h.match(RegExp(t+"\\s*:([^;]+)(;|$)")))i[x[k]]=d.trim(t[1])}return i}var r,x,y,B,f;u=u.Target;r="borderBottomWidth borderBottomStyle borderLeftWidth borderLeftStyle borderRightWidth borderRightStyle borderSpacing borderTopWidth borderTopStyle bottom fontFamily fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop maxHeight maxWidth minHeight minWidth opacity outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex".split(" ");
x=[];y="opacity";B={duration:1,easing:"easeNone",nativeSupport:true};m.PROPS=r;m.CUSTOM_ATTRS=x;m.PROP_OPS={"*":{getter:function(h,i){var k=b.css(h,i),t=parseFloat(k);k=(k+"").replace(/^[-\d.]+/,"");if(isNaN(t))return{v:k,u:"",f:w};return{v:t,u:k,f:this.interpolate}},setter:function(h,i,k){return b.css(h,i,k)},interpolate:function(h,i,k){return(h+(i-h)*k).toFixed(3)}}};var e=m.PROP_OPS;d.augment(m,u,{isRunning:false,elapsedTime:0,start:0,finish:0,duration:0,run:function(){var h=this.config,i=this.domEl,
k,t=this.props,A={},a;if(this.fire("start")!==false){this.stop();this.duration=k=h.duration*1E3;if(this.transitionName)this._nativeRun();else{for(a in t)A[a]=(e[a]||e["*"]).getter(i,a);this.source=A;i=d.now();k=i+k;h=h.easing;if(d.isString(h))h=j[h]||j.easeNone;this.start=i;this.finish=k;this.easing=h;q.start(this)}this.isRunning=true;return this}},_complete:function(){this.fire("complete");this.callback&&this.callback()},_runFrame:function(){var h=this.domEl,i=this.finish,k=this.start,t=this.duration,
A=d.now(),a=this.source,p=this.easing,g=this.props,s;k=A-k;t=A>i?1:k/t;var v,C;this.elapsedTime=k;for(s in g){k=a[s];v=g[s];if(v.v==0)v.u=k.u;if(k.u!==v.u){k.v=0;k.u=v.u}k=v.f(k.v,v.v,p(t))+v.u;(e[s]||e["*"]).setter(h,s,k)}if(this.fire("step")===false||(C=A>i)){this.stop();C&&this._complete()}},_nativeRun:function(){var h=this,i=h.domEl,k=h.duration,t=h.config.easing,A=h.transitionName,a={};a[A+"Property"]="all";a[A+"Duration"]=k+"ms";a[A+"TimingFunction"]=t;b.css(i,a);d.later(function(){z(i,h.targetStyle)},
0);d.later(function(){h.stop(true)},k)},stop:function(h){if(this.transitionName)this._nativeStop(h);else{if(h){z(this.domEl,this.targetStyle);this._complete()}q.stop(this)}this.isRunning=false;return this},_nativeStop:function(h){var i=this.domEl,k=this.transitionName,t=this.props,A;if(h){b.css(i,k+"Property","none");this._complete()}else{for(A in t)b.css(i,A,b._getComputedStyle(i,A));b.css(i,k+"Property","none")}}});m.supportTransition=function(){if(f)return f;var h="transition",i,k=document.body;
if(k.style[h]!==c)i=h;else d.each(["Webkit","Moz","O"],function(t){if(k.style[h=t+"Transition"]!==c){i=h;return false}});return f=i};var o=m.supportTransition;return m},{requires:["dom","event","./easing","ua","./manager"]});
KISSY.add("anim/node-plugin",function(d,b,u,j,n){function q(f,e,o,h,i){if(e==="toggle"){i=b.css(f,m)===w?1:0;e="show"}if(i)b.css(f,m,b.data(f,m)||"");var k={},t={};d.each(B[e],function(A){if(A===z){k[z]=b.css(f,z);b.css(f,z,l)}else if(A===r){k[r]=b.css(f,r);t.opacity=i?1:0;i&&b.css(f,r,0)}else if(A===x){k[x]=b.css(f,x);t.height=i?b.css(f,x)||f.naturalHeight:0;i&&b.css(f,x,0)}else if(A===y){k[y]=b.css(f,y);t.width=i?b.css(f,y)||f.naturalWidth:0;i&&b.css(f,y,0)}});(new u(f,t,o,"easeOut",function(){if(!i){var A=
f.style,a=A[m];if(a!==w){a&&b.data(f,m,a);A[m]=w}k[x]&&b.css(f,{height:k[x]});k[y]&&b.css(f,{width:k[y]});k[r]&&b.css(f,{opacity:k[r]});k[z]&&b.css(f,{overflow:k[z]})}h&&d.isFunction(h)&&h()})).run()}j=d.require("node/node").prototype;var c=d.require("node/nodelist").prototype,m="display",w="none",z="overflow",l="hidden",r="opacity",x="height",y="width",B={show:[z,r,x,y],fade:[r],slide:[z,x]};d.each([j,c],function(f){f.animate=function(){var e=d.makeArray(arguments);d.each(this,function(o){u.apply(n,
[o].concat(e)).run()});return this};d.each({show:["show",1],hide:["show",0],toggle:["toggle"],fadeIn:["fade",1],fadeOut:["fade",0],slideDown:["slide",1],slideUp:["slide",0]},function(e,o){f[o]=function(h,i){b[o]&&arguments.length===0?b[o](this):d.each(this,function(k){q(k,e[0],h,i,e[1])});return this}})})},{requires:["dom","anim/base","node"]});
KISSY.add("anim/color",function(d,b,u){function j(z){z=z.toLowerCase();var l;if(l=z.match(q))return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])];else if(l=z.match(c)){for(z=1;z<l.length;z++)if(l[z].length<2)l[z]+=l[z];return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}if(n[z])return n[z];return[255,255,255]}var n={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]},q=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,c=/^#?([0-9A-F]{1,2})([0-9A-F]{1,2})([0-9A-F]{1,2})$/i,m="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),w=u.PROP_OPS;u=u.PROPS;u.push.apply(u,m);w.color={getter:function(z,l){return{v:j(b.css(z,l)),u:"",f:this.interpolate}},setter:w["*"].setter,interpolate:function(z,l,r){var x=
w["*"].interpolate;return"rgb("+[Math.floor(x(z[0],l[0],r)),Math.floor(x(z[1],l[1],r)),Math.floor(x(z[2],l[2],r))].join(", ")+")"}};d.each(m,function(z){w[z]=w.color})},{requires:["dom","./base"]});KISSY.add("anim/scroll",function(d,b,u){var j=u.PROP_OPS;u.CUSTOM_ATTRS.push("scrollLeft","scrollTop");j.scrollLeft=j.scrollTop={getter:function(n,q){return{v:n[q],u:"",f:j["*"].interpolate}},setter:function(n,q,c){n[q]=c}}},{requires:["dom","./base"]});
KISSY.add("anim",function(d,b,u){b.Easing=u;return b},{requires:["anim/base","anim/easing","anim/node-plugin","anim/color","anim/scroll"]});
KISSY.add("base/attribute",function(d,b){function u(){this.__attrs={};this.__attrVals={}}function j(n){n+="";return n.charAt(0).toUpperCase()+n.substring(1)}d.augment(u,{__getDefAttrs:function(){return d.clone(this.__attrs)},addAttr:function(n,q,c){if(this.__attrs[n])d.mix(this.__attrs[n],q,c);else this.__attrs[n]=d.clone(q||{});return this},hasAttr:function(n){return n&&this.__attrs.hasOwnProperty(n)},removeAttr:function(n){if(this.hasAttr(n)){delete this.__attrs[n];delete this.__attrVals[n]}return this},
set:function(n,q){var c=this.get(n);if(c!==q)if(false!==this.__fireAttrChange("before",n,c,q)){this.__set(n,q);this.__fireAttrChange("after",n,c,this.__attrVals[n]);return this}},__fireAttrChange:function(n,q,c,m){return this.fire(n+j(q)+"Change",{attrName:q,prevVal:c,newVal:m})},__set:function(n,q){var c,m=this.__attrs[n];if(m=m&&m.setter)c=m.call(this,q);if(c!==b)q=c;this.__attrVals[n]=q},get:function(n){var q;q=(q=this.__attrs[n])&&q.getter;n=n in this.__attrVals?this.__attrVals[n]:this.__getDefAttrVal(n);
if(q)n=q.call(this,n);return n},__getDefAttrVal:function(n){n=this.__attrs[n];var q;if(n){if(q=n.valueFn){q=q.call(this);if(q!==b)n.value=q;delete n.valueFn}return n.value}},reset:function(n){if(this.hasAttr(n))return this.set(n,this.__getDefAttrVal(n));for(n in this.__attrs)this.hasAttr(n)&&this.reset(n);return this}});u.__capitalFirst=j;return u});
KISSY.add("base/base",function(d,b){function u(j){b.call(this);for(var n=this.constructor;n;){var q=n.ATTRS;if(q){var c=void 0;for(c in q)q.hasOwnProperty(c)&&this.addAttr(c,q[c],false)}n=n.superclass?n.superclass.constructor:null}if(j)for(var m in j)j.hasOwnProperty(m)&&this.__set(m,j[m])}d.augment(u,d.require("event/target"),b);return u},{requires:["base/attribute","event"]});KISSY.add("base",function(d,b){return b},{requires:["base/base"]});
KISSY.add("cookie/base",function(d){function b(q){return d.isString(q)&&q!==""}var u=document,j=encodeURIComponent,n=decodeURIComponent;return{get:function(q){var c;if(b(q))if(q=String(u.cookie).match(RegExp("(?:^| )"+q+"(?:(?:=([^;]*))|;|$)")))c=q[1]?n(q[1]):"";return c},set:function(q,c,m,w,z,l){c=String(j(c));var r=m;if(typeof r==="number"){r=new Date;r.setTime(r.getTime()+m*864E5)}if(r instanceof Date)c+="; expires="+r.toUTCString();if(b(w))c+="; domain="+w;if(b(z))c+="; path="+z;if(l)c+="; secure";
u.cookie=q+"="+c},remove:function(q,c,m,w){this.set(q,"",0,c,m,w)}}});KISSY.add("cookie",function(d,b){return b},{requires:["cookie/base"]});KISSY.add("core",function(d,b,u,j,n,q,c,m,w,z){b={UA:b,DOM:u,Event:j,EventTarget:j.Target,Node:n,NodeList:n.List,JSON:q,Ajax:c,IO:c,ajax:c,io:c,jsonp:c.jsonp,Anim:m,Easing:m.Easing,Base:w,Cookie:z,one:n.one,all:n.List.all,get:u.get,query:u.query};d.mix(d,b);return b},{requires:["ua","dom","event","node","json","ajax","anim","base","cookie"]});KISSY.use("core");
