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