/*
Copyright 2012, KISSY UI Library v1.30rc
MIT Licensed
build time: Jul 11 21:24
*/
KISSY.add("node/anim",function(b,g,e,f,h){function c(b,j,a){for(var d=[],e={},a=a||0;a<j;a++)d.push.apply(d,k[a]);for(a=0;a<d.length;a++)e[d[a]]=b;return e}var k=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];b.augment(f,{animate:function(){var i=b.makeArray(arguments);b.each(this,function(b){e.apply(h,[b].concat(i)).run()});return this},stop:function(i,j,a){b.each(this,function(d){e.stop(d,i,j,a)});
return this},pause:function(i,j){b.each(this,function(a){e.pause(a,j)});return this},resume:function(i,j){b.each(this,function(a){e.resume(a,j)});return this},isRunning:function(){for(var b=0;b<this.length;b++)if(e.isRunning(this[b]))return 1;return 0},isPaused:function(){for(var b=0;b<this.length;b++)if(e.isPaused(this[b]))return 1;return 0}});b.each({show:c("show",3),hide:c("hide",3),toggle:c("toggle",3),fadeIn:c("show",3,2),fadeOut:c("hide",3,2),fadeToggle:c("toggle",3,2),slideDown:c("show",1),
slideUp:c("hide",1),slideToggle:c("toggle",1)},function(c,j){f.prototype[j]=function(a,d,f){if(g[j]&&!a)g[j](this);else b.each(this,function(b){e(b,c,a,f||"easeOut",d).run()});return this}})},{requires:["dom","anim","./base"]});
KISSY.add("node/attach",function(b,g,e,f,h){function c(b,a,d){d.unshift(a);b=g[b].apply(g,d);return b===h?a:b}var k=f.prototype,i=b.makeArray;b.each("nodeName,equals,contains,scrollTop,scrollLeft,height,width,innerHeight,innerWidth,outerHeight,outerWidth,addStyleSheet,appendTo,prependTo,insertBefore,before,after,insertAfter,test,hasClass,addClass,removeClass,replaceClass,toggleClass,removeAttr,hasAttr,hasProp,scrollIntoView,remove,empty,removeData,hasData,unselectable,wrap,wrapAll,replaceWith,wrapInner,unwrap".split(","),function(b){k[b]=
function(){var a=i(arguments);return c(b,this,a)}});b.each("filter,first,last,parent,closest,next,prev,clone,siblings,contents,children".split(","),function(b){k[b]=function(){var a=i(arguments);a.unshift(this);a=g[b].apply(g,a);return a===h?this:a===null?null:new f(a)}});b.each({attr:1,text:0,css:1,style:1,val:0,prop:1,offset:0,html:0,outerHTML:0,data:1},function(e,a){k[a]=function(){var d;d=i(arguments);d[e]===h&&!b.isObject(d[0])?(d.unshift(this),d=g[a].apply(g,d)):d=c(a,this,d);return d}});b.each("on,detach,fire,fireHandler,delegate,undelegate".split(","),
function(b){k[b]=function(){var a=i(arguments);a.unshift(this);e[b].apply(e,a);return this}})},{requires:["dom","event","./base"]});
KISSY.add("node/base",function(b,g,e){function f(a,d,c){if(!(this instanceof f))return new f(a,d,c);if(a)if(b.isString(a)){if(a=g.create(a,d,c),a.nodeType===g.DOCUMENT_FRAGMENT_NODE)return k.apply(this,i(a.childNodes)),e}else{if(b.isArray(a)||j(a))return k.apply(this,i(a)),e}else return e;this[0]=a;this.length=1;return e}var h=Array.prototype,c=h.slice,k=h.push,i=b.makeArray,j=g._isNodeList;b.augment(f,{length:0,item:function(a){return b.isNumber(a)?a>=this.length?null:new f(this[a]):new f(a)},add:function(a,
d,c){b.isNumber(d)&&(c=d,d=e);a=f.all(a,d).getDOMNodes();d=new f(this);c===e?k.apply(d,a):(c=[c,0],c.push.apply(c,a),h.splice.apply(d,c));return d},slice:function(a,b){return new f(c.apply(this,arguments))},getDOMNodes:function(){return c.call(this)},each:function(a,d){var c=this;b.each(c,function(b,e){b=new f(b);return a.call(d||b,b,e,c)});return c},getDOMNode:function(){return this[0]},end:function(){return this.__parent||this},all:function(a){a=0<this.length?f.all(a,this):new f;a.__parent=this;
return a},one:function(a){a=this.all(a);if(a=a.length?a.slice(0,1):null)a.__parent=this;return a}});b.mix(f,{all:function(a,d){return b.isString(a)&&(a=b.trim(a))&&3<=a.length&&b.startsWith(a,"<")&&b.endsWith(a,">")?(d&&(d.getDOMNode&&(d=d.getDOMNode()),d.ownerDocument&&(d=d.ownerDocument)),new f(a,e,d)):new f(g.query(a,d))},one:function(a,b){var c=f.all(a,b);return c.length?c.slice(0,1):null}});b.mix(f,g.NodeTypes);return f},{requires:["dom"]});
KISSY.add("node",function(b,g,e){e.KeyCodes=g.KeyCodes;b.mix(b,{Node:e,NodeList:e,one:e.one,all:e.all});return e},{requires:["event","node/base","node/attach","node/override","node/anim"]});
KISSY.add("node/override",function(b,g,e,f){var h=f.prototype;b.each(["append","prepend","before","after"],function(c){h[c]=function(e){b.isString(e)&&(e=g.create(e));if(e)g[c](e,this);return this}});b.each(["wrap","wrapAll","replaceWith","wrapInner"],function(c){var e=h[c];h[c]=function(c){b.isString(c)&&(c=f.all(c,this[0].ownerDocument));return e.call(this,c)}})},{requires:["dom","event","./base","./attach"]});
