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

