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

