// JavaScript Document
(function(a,b,c){
    var d={
        mix:function(a,b,d,f){
            if(!b||!a)return a;
            d===c&&(d=!0);
            var g,h,i;
            if(f&&(i=f.length))for(g=0;
            g<i;
            g++)h=f[g],h in b&&e(h,a,b,d);
            else for(h in b)e(h,a,b,d);
            return a
        }
        
    }
    ,e=function(a,b,c,d){
        if(d||!(a in b))b[a]=c[a]
    }
    ,f=a&&a[b]||{},g=0,h="";
    return a=f.__HOST||(f.__HOST=a||{}),b=a[b]=d.mix(f,d,!1),b.mix(b,{
        __APP_MEMBERS:["namespace"],__APP_INIT_METHODS:["__init"],version:"1.1.6",merge:function(){
            var a={},c,d=arguments.length;
            for(c=0;
            c<d;
            c++)b.mix(a,arguments[c]);
            return a
        }
        ,augment:function(){
            var a=arguments,d=a.length-2,e=a[0],f=a[d],g=a[d+1],h=1;
            b.isArray(g)||(f=g,g=c,d++),b.isBoolean(f)||(f=c,d++);
            for(;
            h<d;
            h++)b.mix(e.prototype,a[h].prototype||a[h],f,g);
            return e
        }
        ,extend:function(a,c,d,e){
            if(!c||!a)return a;
            var f=Object.create?function(a,b){
                return Object.create(a,{
                    constructor:{
                        value:b
                    }
                    
                })
            }
            :function(a,b){
                function c(){}c.prototype=a;
                var d=new c;
                return d.constructor=b,d
            }
            ,g=c.prototype,h;
            return a.prototype=h=f(g,a),a.superclass=f(g,c),d&&b.mix(h,d),e&&b.mix(a,e),a
        }
        ,__init:function(){
            this.Config=this.Config||{},this.Env=this.Env||{},this.Config.debug=""
        }
        ,namespace:function(){
            var b=arguments,c=b.length,d=null,e,f,g,i=b[c-1]===!0&&c--;
            for(e=0;
            e<c;
            e++){
                g=(h+b[e]).split("."),d=i?a:this;
                for(f=a[g[0]]===d?1:0;
                f<g.length;
                ++f)d=d[g[f]]=d[g[f]]||{}
            }
            return d
        }
        ,app:function(c,d){
            var e=b.isString(c),f=e?a[c]||{}:c,g=0,h=b.__APP_INIT_METHODS.length;
            b.mix(f,this,!0,b.__APP_MEMBERS);
            for(;
            g<h;
            g++)b[b.__APP_INIT_METHODS[g]].call(f);
            return b.mix(f,b.isFunction(d)?d():d),e&&(a[c]=f),f
        }
        ,log:function(d,e,f){
            b.Config.debug&&(f&&(d=f+": "+d),a.console!==c&&console.log&&console[e&&console[e]?e:"log"](d))
        }
        ,error:function(a){
            if(b.Config.debug)throw a
        }
        ,guid:function(a){
            return(a||h)+g++
        }
        
    }),b.__init(),b
})(this,"KISSY"),function(a,b){
    var c=a.__HOST,d=Object.prototype.toString,e=Array.prototype.indexOf,f=Array.prototype.lastIndexOf,g=Array.prototype.filter,h=String.prototype.trim,i="",j=/^\s+|\s+$/g,k={};
    a.mix(a,{
        type:function(a){
            return a==null?String(a):k[d.call(a)]||"object"
        }
        ,isNull:function(a){
            return a===null
        }
        ,isUndefined:function(a){
            return a===b
        }
        ,isEmptyObject:function(a){
            for(var b in a)return!1;
            return!0
        }
        ,isPlainObject:function(a){
            return a&&d.call(a)==="[object Object]"&&"isPrototypeOf"in a
        }
        ,clone:function(b){
            var c=b,d,e;
            if(b&&((d=a.isArray(b))||a.isPlainObject(b))){
                c=d?[]:{};
                for(e in b)b.hasOwnProperty(e)&&(c[e]=a.clone(b[e]))
            }
            return c
        }
        ,trim:h?function(a){
            return a==b?i:h.call(a)
        }
        :function(a){
            return a==b?i:a.toString().replace(j,i)
        }
        ,substitute:function(c,d,e){
            return!a.isString(c)||!a.isPlainObject(d)?c:c.replace(e||/\\?\{([^{}]+)\}/g,function(a,c){
                return a.charAt(0)==="\\"?a.slice(1):d[c]!==b?d[c]:i
            })
        }
        ,each:function(d,e,f){
            var g,h,i=0,j=d.length,k=j===b||a.type(d)==="function";
            f=f||c;
            if(k){
                for(g in d)if(e.call(f,d[g],g,d)===!1)break
            }
            else for(h=d[0];
            i<j&&e.call(f,h,i,d)!==!1;
            h=d[++i]);
            return d
        }
        ,indexOf:e?function(a,b){
            return e.call(b,a)
        }
        :function(a,b){
            for(var c=0,d=b.length;
            c<d;
            ++c)if(b[c]===a)return c;
            return-1
        }
        ,lastIndexOf:f?function(a,b){
            return f.call(b,a)
        }
        :function(a,b){
            for(var c=b.length-1;
            c>=0;
            c--)if(b[c]===a)break;
            return c
        }
        ,unique:function(b,c){
            c&&b.reverse();
            var d=b.slice(),e=0,f,g;
            while(e<d.length){
                g=d[e];
                while((f=a.lastIndexOf(g,d))!==e)d.splice(f,1);
                e+=1
            }
            return c&&d.reverse(),d
        }
        ,inArray:function(b,c){
            return a.indexOf(b,c)>-1
        }
        ,filter:g?function(a,b,c){
            return g.call(a,b,c)
        }
        :function(b,c,d){
            var e=[];
            return a.each(b,function(a,b,f){
                c.call(d,a,b,f)&&e.push(a)
            }),e
        }
        ,now:function(){
            return(new Date).getTime()
        }
        
    }),a.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(b,c){
        k["[object "+b+"]"]=c=b.toLowerCase(),a["is"+b]=function(b){
            return a.type(b)==c
        }
        
    })
}
(KISSY),function(a,b){
    function q(a){
        var b=typeof a;
        return a===null||b!=="object"&&b!=="function"
    }
    function r(a){
        return Array.prototype.slice.call(a)
    }
    var c=a.__HOST,d=c.document,e=d.documentElement,f="",g="&",h=encodeURIComponent("[]"),i=!1,j=[],k=!1,l=500,m=40,n=/^#?([\w-]+)$/,o=/^(\w+)\[\]$/,p=/\S/;
    a.mix(a,{
        isWindow:function(b){
            return a.type(b)==="object"&&"setInterval"in b
        }
        ,makeArray:function(c){
            return c===null||c===b?[]:a.isArray(c)?c:typeof c.length!="number"||a.isString(c)||a.isFunction(c)?[c]:r(c)
        }
        ,param:function(b,c){
            if(!a.isPlainObject(b))return f;
            c=c||g;
            var d=[],e,i;
            for(e in b){
                i=b[e],e=encodeURIComponent(e);
                if(q(i))d.push(e,"=",encodeURIComponent(i+f),c);
                else if(a.isArray(i)&&i.length)for(var j=0,k=i.length;
                j<k;
                ++j)q(i[j])&&d.push(e,h+"=",encodeURIComponent(i[j]+f),c)
            }
            return d.pop(),d.join(f)
        }
        ,unparam:function(b,c){
            if(typeof b!="string"||(b=a.trim(b)).length===0)return{};
            var d={},e=b.split(c||g),h,i,j,k,l=0,m=e.length;
            for(;
            l<m;
            ++l){
                h=e[l].split("="),i=decodeURIComponent(h[0]);
                try{
                    j=decodeURIComponent(h[1]||f)
                }
                catch(n){
                    j=h[1]||f
                }
                (k=i.match(o))&&k[1]?(d[k[1]]=d[k[1]]||[],d[k[1]].push(j)):d[i]=j
            }
            return d
        }
        ,globalEval:function(a){
            if(a&&p.test(a)){
                var b=d.getElementsByTagName("head")[0]||e,c=d.createElement("script");
                c.text=a,b.insertBefore(c,b.firstChild),b.removeChild(c)
            }
            
        }
        ,later:function(b,c,d,e,f){
            c=c||0,e=e||{};
            var g=b,h=a.makeArray(f),i,j;
            return a.isString(b)&&(g=e[b]),g||a.error("method undefined"),i=function(){
                g.apply(e,h)
            }
            ,j=d?setInterval(i,c):setTimeout(i,c),{
                id:j,interval:d,cancel:function(){
                    this.interval?clearInterval(j):clearTimeout(j)
                }
                
            }
            
        }
        ,ready:function(a){
            return k||this._bindReady(),i?a.call(c,this):j.push(a),this
        }
        ,_bindReady:function(){
            var a=this,b=d.documentElement.doScroll,e=b?"onreadystatechange":"DOMContentLoaded",f="complete",g=function(){
                a._fireReady()
            };
            k=!0;
            if(d.readyState===f)return g();
            if(d.addEventListener){
                function h(){
                    d.removeEventListener(e,h,!1),g()
                }
                d.addEventListener(e,h,!1),c.addEventListener("load",g,!1)
            }
            else{
                function i(){
                    d.readyState===f&&(d.detachEvent(e,i),g())
                }
                d.attachEvent(e,i),c.attachEvent("onload",g);
                var j=!1;
                try{
                    j=c.frameElement==null
                }
                catch(l){}if(b&&j){
                    function m(){
                        try{
                            b("left"),g()
                        }
                        catch(a){
                            setTimeout(m,1)
                        }
                        
                    }
                    m()
                }
                
            }
            
        }
        ,_fireReady:function(){
            if(i)return;
            i=!0;
            if(j){
                var a,b=0;
                while(a=j[b++])a.call(c,this);
                j=null
            }
            
        }
        ,available:function(b,c){
            b=(b+f).match(n)[1];
            if(!b||!a.isFunction(c))return;
            var e=1,g=a.later(function(){
                (d.getElementById(b)&&(c()||1)||++e>l)&&g.cancel()
            }
            ,m,!0)
        }
        
    });
    try{
        r(e.childNodes)
    }
    catch(s){
        r=function(a){
            for(var b=[],c=a.length-1;
            c>=0;
            c--)b[c]=a[c];
            return b
        }
        
    }
    location&&(location.search||f).indexOf("ks-debug")!==-1&&(a.Config.debug=!0),a._bindReady()
}
(KISSY),function(a,b){
    function r(a){
        var b=a.src,c=a.getAttribute("data-combo-prefix")||"??",d=a.getAttribute("data-combo-sep")||",",e=b.split(d),f,g=e[0],h=g.indexOf(c);
        if(h==-1)f=b.replace(p,"$1");
        else{
            f=g.substring(0,h);
            var i=g.substring(h+2,g.length);
            if(i.match(q))f+=i.replace(p,"$1");
            else for(var j=1;
            j<e.length;
            j++){
                var k=e[j];
                if(k.match(q)){
                    f+=k.replace(p,"$1");
                    break
                }
                
            }
            
        }
        return f
    }
    var c=a.__HOST,d=c.document,e=d.getElementsByTagName("head")[0]||d.documentElement,f="",g="cssfullpath",h=1,i=2,j=3,k=4,l=a.mix,m=d.createElement("script").readyState?function(a,b){
        var c=a.onreadystatechange;
        a.onreadystatechange=function(){
            var d=a.readyState;
            if(d==="loaded"||d==="complete")a.onreadystatechange=null,c&&c(),b.call(this)
        }
        
    }
    :function(a,b){
        a.addEventListener("load",b,!1)
    }
    ,n=/\.css(?:\?|$)/i,o;
    o={
        add:function(b,c,d){
            var e=this,f=e.Env.mods,g,h,j;
            return a.isString(b)&&!d&&a.isPlainObject(c)&&(h={},h[b]=c,b=h),a.isPlainObject(b)?(a.each(b,function(a,b){
                a.name=b,f[b]&&l(a,f[b],!1)
            }),l(f,b)):(d=d||{},g=f[b]||{},b=d.host||g.host||b,g=f[b]||{},l(g,{
                name:b,status:i
            }),g.fns||(g.fns=[]),c&&g.fns.push(c),j=g.requires,l(f[b]=g,d),f[b].requires=j,g.attach!==!1&&e.__isAttached(g.requires)&&e.__attachMod(g)),e
        }
        ,use:function(b,c,d){
            b=b.replace(/\s+/g,f).split(","),d=d||{};
            var e=this,g=e.Env.mods,h=(d||0).global,i,j=b.length,l,m,n;
            h&&e.__mixMods(h);
            if(e.__isAttached(b)){
                c&&c(e);
                return
            }
            for(i=0;
            i<j&&(l=g[b[i]]);
            i++){
                if(l.status===k)continue;
                d.order&&i>0&&(l.requires||(l.requires=[]),l._requires=l.requires.concat(),m=b[i-1],!a.inArray(m,l.requires)&&!a.inArray(l.name,g[m].requires||[])&&l.requires.push(m)),e.__attach(l,function(){
                    l._requires&&(l.requires=l._requires,delete l._requires),!n&&e.__isAttached(b)&&(n=!0,c&&c(e))
                }
                ,h)
            }
            return e
        }
        ,__attach:function(a,b,c){
            function h(){
                var c=a.requires||[];
                d.__isAttached(c)&&(a.status===i&&d.__attachMod(a),a.status===k&&b())
            }
            var d=this,e=a.requires||[],f=0,g=e.length;
            for(;
            f<g;
            f++)d.__attach(d.Env.mods[e[f]],h,c);
            d.__buildPath(a),d.__load(a,h,c)
        }
        ,__mixMods:function(a){
            var b=this.Env.mods,c=a.Env.mods,d;
            for(d in c)this.__mixMod(b,c,d,a)
        }
        ,__mixMod:function(b,c,d,e){
            var f=b[d]||{},g=f.status;
            a.mix(f,a.clone(c[d])),g&&(f.status=g),e&&this.__buildPath(f,e.Config.base),b[d]=f
        }
        ,__attachMod:function(c){
            var d=this;
            c.fns&&(a.each(c.fns,function(a){
                a&&a(d)
            }),c.fns=b),c.status=k
        }
        ,__isAttached:function(b){
            var c=this.Env.mods,d,e=(b=a.makeArray(b)).length-1;
            for(;
            e>=0&&(d=c[b[e]]);
            e--)if(d.status!==k)return!1;
            return!0
        }
        ,__load:function(b,c,d){
            function q(){
                r(),b.status!==j&&(d&&e.__mixMod(e.Env.mods,d.Env.mods,b.name,d),b.status!==k&&(b.status=i),c())
            }
            function r(){
                l[f]=i
            }
            var e=this,f=b.fullpath,l=a.Env._loadQueue,o=l[f],p;
            b.status=b.status||0,b.status<h&&o&&(b.status=o.nodeName?h:i),a.isString(b[g])&&(e.getScript(b[g]),b[g]=i),b.status<h&&f?(b.status=h,p=e.getScript(f,{
                success:function(){
                    KISSY.log(b.name+" is loaded.","info"),q()
                }
                ,error:function(){
                    b.status=j,r()
                }
                ,charset:b.charset
            }),n.test(f)||(l[f]=p)):b.status===h?m(o,q):c()
        }
        ,__buildPath:function(a,b){
            function d(d,e){
                !a[e]&&a[d]&&(a[e]=(b||c.base)+a[d]),a[e]&&c.debug&&(a[e]=a[e].replace(/-min/g,""))
            }
            var c=this.Config;
            d("path","fullpath"),a[g]!==i&&d("csspath",g)
        }
        ,getScript:function(c,f,g){
            var h=n.test(c),i=d.createElement(h?"link":"script"),j=f,k,l,o;
            return a.isPlainObject(j)&&(f=j.success,k=j.error,l=j.timeout,g=j.charset),h?(i.href=c,i.rel="stylesheet"):(i.src=c,i.async=!0),g&&(i.charset=g),h?a.isFunction(f)&&f.call(i):m(i,function(){
                o&&(o.cancel(),o=b),a.isFunction(f)&&f.call(i),e&&i.parentNode&&e.removeChild(i)
            }),a.isFunction(k)&&(o=a.later(function(){
                o=b,k()
            }
            ,(l||this.Config.timeout)*1e3)),e.insertBefore(i,e.firstChild),i
        }
        
    }
    ,l(a,o);
    var p=/^(.*)(seed|kissy)(-min)?\.js[^/]*/i,q=/(seed|kissy)(-min)?\.js/;
    a.__initLoader=function(){
        var a=d.getElementsByTagName("script"),b=a[a.length-1],c=r(b);
        this.Env.mods={},this.Env._loadQueue={},this.Config.base||(this.Config.base=c),this.Config.timeout||(this.Config.timeout=10)
    }
    ,a.__initLoader(),a.each(o,function(b,c){
        a.__APP_MEMBERS.push(c)
    }),a.__APP_INIT_METHODS.push("__initLoader")
}
(KISSY),function(a){
    var b={
        core:{
            path:"",charset:"utf-8"
        }
        
    };
    a.each(["sizzle","dd","datalazyload","flash","switchable","suggest","calendar","uibase","overlay","imagezoom","waterfall","template"],function(a){
        b[a]={
            path:a+"/"+a+"-pkg-min.js",requires:["core"],charset:"utf-8"
        }
        
    }),b.calendar.csspath="",b.overlay.requires=["uibase"],b.waterfall.requires=["template"],a.add(b)
}
(KISSY),KISSY.add("ua",function(a){
    var b=navigator.userAgent,c="",d="mobile",e=c,f=c,g,h={},i=function(a){
        var b=0;
        return parseFloat(a.replace(/\./g,function(){
            return b++===0?".":""
        }))
    };
    if((g=b.match(/AppleWebKit\/([\d.]*)/))&&g[1]){
        h[e="webkit"]=i(g[1]),(g=b.match(/Chrome\/([\d.]*)/))&&g[1]?h[f="chrome"]=i(g[1]):(g=b.match(/\/([\d.]*) Safari/))&&g[1]&&(h[f="safari"]=i(g[1]));
        if(/ Mobile\//.test(b))h[d]="apple";
        else if(g=b.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))h[d]=g[0].toLowerCase()
    }
    else if((g=b.match(/Presto\/([\d.]*)/))&&g[1])h[e="presto"]=i(g[1]),(g=b.match(/Opera\/([\d.]*)/))&&g[1]&&(h[f="opera"]=i(g[1]),(g=b.match(/Opera\/.* Version\/([\d.]*)/))&&g[1]&&(h[f]=i(g[1])),(g=b.match(/Opera Mini[^;]*/))&&g?h[d]=g[0].toLowerCase():(g=b.match(/Opera Mobi[^;]*/))&&g&&(h[d]=g[0]));
    else if((g=b.match(/MSIE\s([^;]*)/))&&g[1])h[e="trident"]=.1,h[f="ie"]=i(g[1]),(g=b.match(/Trident\/([\d.]*)/))&&g[1]&&(h[e]=i(g[1]));
    else if(g=b.match(/Gecko/))h[e="gecko"]=.1,(g=b.match(/rv:([\d.]*)/))&&g[1]&&(h[e]=i(g[1])),(g=b.match(/Firefox\/([\d.]*)/))&&g[1]&&(h[f="firefox"]=i(g[1]));
    h.core=e,h.shell=f,h._numberify=i,a.UA=h
}),KISSY.add("ua-extra",function(a){
    var b=a.UA,c=navigator.userAgent,d,e,f,g={},h=b._numberify;
    if(d=c.match(/360SE/))g[f="se360"]=3;
    else if((d=c.match(/Maxthon/))&&(e=window.external)){
        f="maxthon";
        try{
            g[f]=h(e.max_version)
        }
        catch(i){
            g[f]=.1
        }
        
    }
    else if(d=c.match(/TencentTraveler\s([\d.]*)/))g[f="tt"]=d[1]?h(d[1]):.1;
    else if(d=c.match(/TheWorld/))g[f="theworld"]=3;
    else if(d=c.match(/SE\s([\d.]*)/))g[f="sougou"]=d[1]?h(d[1]):.1;
    f&&(g.shell=f),a.mix(b,g)
}),KISSY.add("dom",function(a,b){
    function c(a,b){
        return a&&a.nodeType===b
    }
    a.DOM={
        _isElementNode:function(a){
            return c(a,1)
        }
        ,_isKSNode:function(b){
            return a.Node&&c(b,a.Node.TYPE)
        }
        ,_getWin:function(a){
            return a&&"scrollTo"in a&&a.document?a:c(a,9)?a.defaultView||a.parentWindow:a===b?window:!1
        }
        ,_nodeTypeIs:c
    }
    
}),KISSY.add("selector",function(a,b){
    function k(b,c){
        var f,k,r=[],s,t,u;
        c=m(c);
        if(a.isString(b)){
            b=a.trim(b);
            if(i.test(b))k=n(b.slice(1),c),k&&(r=[k]);
            else if(f=j.exec(b)){
                s=f[1],t=f[2],u=f[3];
                if(c=s?n(s,c):c)u?!s||b.indexOf(e)!==-1?r=p(u,t,c):(k=n(s,c),k&&d.hasClass(k,u)&&(r=[k])):t&&(r=o(t,c))
            }
            else{
                if(a.ExternalSelector)return a.ExternalSelector(b,c);
                q(b)
            }
            
        }
        else b&&(b[g]||b[h])?r=b[g]?[b[g]()]:b[h]():b&&(a.isArray(b)||l(b))?r=b:b&&(r=[b]);
        return l(r)&&(r=a.makeArray(r)),r.each=function(b,c){
            return a.each(r,b,c)
        }
        ,r
    }
    function l(a){
        return a&&!a.nodeType&&a.item&&a!=window
    }
    function m(d){
        return d===b?d=c:a.isString(d)&&i.test(d)?d=n(d.slice(1),c):d&&d.nodeType!==1&&d.nodeType!==9&&(d=null),d
    }
    function n(a,b){
        return b.nodeType!==9&&(b=b.ownerDocument),b.getElementById(a)
    }
    function o(a,b){
        return b.getElementsByTagName(a)
    }
    function p(a,b,c){
        var d=c.getElementsByClassName(a),e=d,g=0,h=0,i=d.length,j;
        if(b&&b!==f){
            e=[],b=b.toUpperCase();
            for(;
            g<i;
            ++g)j=d[g],j.tagName===b&&(e[h++]=j)
        }
        return e
    }
    function q(b){
        a.error("Unsupported selector: "+b)
    }
    var c=document,d=a.DOM,e=" ",f="*",g="getDOMNode",h=g+"s",i=/^#[\w-]+$/,j=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/;
    (function(){
        var a=c.createElement("div");
        a.appendChild(c.createComment("")),a.getElementsByTagName(f).length>0&&(o=function(a,b){
            var c=b.getElementsByTagName(a);
            if(a===f){
                var d=[],e=0,g=0,h;
                while(h=c[e++])h.nodeType===1&&(d[g++]=h);
                c=d
            }
            return c
        })
    })(),c.getElementsByClassName||(c.querySelectorAll?p=function(a,b,c){
        return c.querySelectorAll((b?b:"")+"."+a)
    }
    :p=function(a,b,c){
        var d=c.getElementsByTagName(b||f),g=[],h=0,i=0,j=d.length,k,l;
        a=e+a+e;
        for(;
        h<j;
        ++h)k=d[h],l=k.className,l&&(e+l+e).indexOf(a)>-1&&(g[i++]=k);
        return g
    }),a.query=k,a.get=function(a,b){
        return k(a,b)[0]||null
    }
    ,a.mix(d,{
        query:k,get:a.get,filter:function(b,c){
            var e=k(b),f,g,h,i=[];
            return a.isString(c)&&(f=j.exec(c))&&!f[1]&&(g=f[2],h=f[3],c=function(a){
                return!(g&&a.tagName!==g.toUpperCase()||h&&!d.hasClass(a,h))
            }),a.isFunction(c)?i=a.filter(e,c):c&&a.ExternalSelector?i=a.ExternalSelector._filter(b,c+""):q(c),i
        }
        ,test:function(a,b){
            var c=k(a);
            return c.length&&d.filter(c,b).length===c.length
        }
        
    })
}),KISSY.add("dom-data",function(a,b){
    function i(a){
        return a&&a.nodeType
    }
    var c=window,d=a.DOM,e="_ks_data_"+a.now(),f={},g={},h={
        EMBED:1,OBJECT:1,APPLET:1
    };
    a.mix(d,{
        data:function(j,k,l){
            if(a.isPlainObject(k)){
                for(var m in k)d.data(j,m,k[m]);
                return
            }
            if(l===b){
                var n=a.get(j),o,p,q,r;
                if(!n||h[n.nodeName])return;
                return n==c&&(n=g),o=i(n),p=o?f:n,q=o?n[e]:e,r=p[q],a.isString(k)&&r?r[k]:r
            }
            a.query(j).each(function(d){
                if(!d||h[d.nodeName])return;
                d==c&&(d=g);
                var j=f,m;
                i(d)?(m=d[e])||(m=d[e]=a.guid()):(m=e,j=d),k&&l!==b&&(j[m]||(j[m]={}),j[m][k]=l)
            })
        }
        ,removeData:function(b,h){
            a.query(b).each(function(b){
                if(!b)return;
                b==c&&(b=g);
                var j,l=f,m,n=i(b);
                n?j=b[e]:(l=b,j=e);
                if(!j)return;
                m=l[j];
                if(h)m&&(delete m[h],a.isEmptyObject(m)&&d.removeData(b));
                else{
                    if(!n)try{
                        delete b[e]
                    }
                    catch(o){}else b.removeAttribute&&b.removeAttribute(e);
                    n&&delete l[j]
                }
                
            })
        }
        
    })
}),KISSY.add("dom-class",function(a,b){
    function g(c,f,g,h){
        if(!(f=a.trim(f)))return h?!1:b;
        var i=a.query(c),j=0,k=i.length,l=f.split(e),m,n;
        for(;
        j<k;
        j++){
            m=i[j];
            if(d._isElementNode(m)){
                n=g(m,l,l.length);
                if(n!==b)return n
            }
            
        }
        if(h)return!1
    }
    var c=" ",d=a.DOM,e=/[\.\s]\s*\.?/,f=/[\n\t]/g;
    a.mix(d,{
        hasClass:function(a,b){
            return g(a,b,function(a,b,d){
                var e=a.className;
                if(e){
                    var f=c+e+c,g=0,h=!0;
                    for(;
                    g<d;
                    g++)if(f.indexOf(c+b[g]+c)<0){
                        h=!1;
                        break
                    }
                    if(h)return!0
                }
                
            }
            ,!0)
        }
        ,addClass:function(b,d){
            g(b,d,function(b,e,f){
                var g=b.className;
                if(!g)b.className=d;
                else{
                    var h=c+g+c,j=g,k=0;
                    for(;
                    k<f;
                    k++)h.indexOf(c+e[k]+c)<0&&(j+=c+e[k]);
                    b.className=a.trim(j)
                }
                
            })
        }
        ,removeClass:function(b,d){
            g(b,d,function(b,d,e){
                var g=b.className;
                if(g)if(!e)b.className="";
                else{
                    var h=(c+g+c).replace(f,c),i=0,j;
                    for(;
                    i<e;
                    i++){
                        j=c+d[i]+c;
                        while(h.indexOf(j)>=0)h=h.replace(j,c)
                    }
                    b.className=a.trim(h)
                }
                
            })
        }
        ,replaceClass:function(a,b,c){
            d.removeClass(a,b),d.addClass(a,c)
        }
        ,toggleClass:function(b,c,e){
            var f=a.isBoolean(e),h;
            g(b,c,function(a,b,c){
                var g=0,l;
                for(;
                g<c;
                g++)l=b[g],h=f?!e:d.hasClass(a,l),d[h?"removeClass":"addClass"](a,l)
            })
        }
        
    })
}),KISSY.add("dom-style",function(a,b){
    function y(b,d){
        var e=a.get(b),f=d===k?["Left","Right"]:["Top","Bottom"],g=d===k?e.offsetWidth:e.offsetHeight;
        return a.each(f,function(a){
            g-=parseFloat(c._getComputedStyle(e,"padding"+a))||0,g-=parseFloat(c._getComputedStyle(e,"border"+a+"Width"))||0
        }),g
    }
    function z(b,e,f){
        var g,h=f;
        if(f===m&&q.test(e)){
            h=0;
            if(a.inArray(c.css(b,"position"),["absolute","fixed"])){
                g=b[e==="left"?"offsetLeft":"offsetTop"];
                if(d.ie===8||d.opera)g-=p(c.css(b.offsetParent,"border-"+e+"-width"))||0;
                h=g-(p(c.css(b,"margin-"+e))||0)
            }
            
        }
        return h
    }
    var c=a.DOM,d=a.UA,e=document,f=e.documentElement,g="style",h="float",i="cssFloat",j="styleFloat",k="width",l="height",m="auto",n="display",o="none",p=parseInt,q=/^(?:left|top)/,r=/^(?:width|height|top|left|right|bottom|margin|padding)/i,s=/-([a-z])/ig,t=function(a,b){
        return b.toUpperCase()
    }
    ,u="",v="px",w={},x={};
    a.mix(c,{
        _CUSTOM_STYLES:w,_getComputedStyle:function(a,b){
            var c="",d=a.ownerDocument;
            return a[g]&&(c=d.defaultView.getComputedStyle(a,null)[b]),c
        }
        ,css:function(d,e,f){
            if(a.isPlainObject(e)){
                for(var h in e)c.css(d,h,e[h]);
                return
            }
            e.indexOf("-")>0&&(e=e.replace(s,t)),e=w[e]||e;
            if(f===b){
                var i=a.get(d),j="";
                return i&&i[g]&&(j=e.get?e.get(i):i[g][e],j===""&&!e.get&&(j=z(i,e,c._getComputedStyle(i,e)))),j===b?"":j
            }
            f===null||f===u?f=u:!isNaN(new Number(f))&&r.test(e)&&(f+=v);
            if((e===k||e===l)&&parseFloat(f)<0)return;
            a.each(a.query(d),function(a){
                a&&a[g]&&(e.set?e.set(a,f):a[g][e]=f,f===u&&(a[g].cssText||a.removeAttribute(g)))
            })
        }
        ,width:function(a,d){
            if(d===b)return y(a,k);
            c.css(a,k,d)
        }
        ,height:function(a,d){
            if(d===b)return y(a,l);
            c.css(a,l,d)
        }
        ,show:function(b){
            a.query(b).each(function(a){
                if(!a)return;
                a.style[n]=c.data(a,n)||u;
                if(c.css(a,n)===o){
                    var b=a.tagName,d=x[b],f;
                    d||(f=e.createElement(b),e.body.appendChild(f),d=c.css(f,n),c.remove(f),x[b]=d),c.data(a,n,d),a.style[n]=d
                }
                
            })
        }
        ,hide:function(b){
            a.query(b).each(function(a){
                if(!a)return;
                var b=a.style,d=b[n];
                d!==o&&(d&&c.data(a,n,d),b[n]=o)
            })
        }
        ,toggle:function(b){
            a.query(b).each(function(a){
                a&&(a.style[n]===o?c.show(a):c.hide(a))
            })
        }
        ,addStyleSheet:function(b,d){
            var f;
            d&&(d=d.replace("#",u))&&(f=a.get("#"+d));
            if(f)return;
            f=c.create("<style>",{
                id:d
            }),a.get("head").appendChild(f),f.styleSheet?f.styleSheet.cssText=b:f.appendChild(e.createTextNode(b))
        }
        
    }),f[g][i]!==b?w[h]=i:f[g][j]!==b&&(w[h]=j)
}),KISSY.add("dom-traversal",function(a,b){
    function e(e,f,g,h){
        if(!(e=a.get(e)))return null;
        f===b&&(f=1);
        var i=null,j,k;
        if(a.isNumber(f)&&f>=0){
            if(f===0)return e;
            j=0,k=f,f=function(){
                return++j===k
            }
            
        }
        while(e=e[g])if(d(e)&&(!f||c.test(e,f))&&(!h||h(e))){
            i=e;
            break
        }
        return i
    }
    function f(b,e,f){
        var g=[],h=a.get(b),i,j=h,k;
        h&&f&&(j=h.parentNode);
        if(j)for(i=0,k=j.firstChild;
        k;
        k=k.nextSibling)d(k)&&k!==h&&(!e||c.test(k,e))&&(g[i++]=k);
        return g
    }
    var c=a.DOM,d=c._isElementNode;
    a.mix(c,{
        parent:function(a,b){
            return e(a,b,"parentNode",function(a){
                return a.nodeType!=11
            })
        }
        ,next:function(a,b){
            return e(a,b,"nextSibling")
        }
        ,prev:function(a,b){
            return e(a,b,"previousSibling")
        }
        ,siblings:function(a,b){
            return f(a,b,!0)
        }
        ,children:function(a,b){
            return f(a,b)
        }
        ,contains:function(b,c){
            var d=!1;
            if((b=a.get(b))&&(c=a.get(c)))if(b.contains){
                if(c.nodeType===3){
                    c=c.parentNode;
                    if(c===b)return!0
                }
                if(c)return b.contains(c)
            }
            else{
                if(b.compareDocumentPosition)return!!(b.compareDocumentPosition(c)&16);
                while(!d&&(c=c.parentNode))d=c==b
            }
            return d
        }
        
    })
}),KISSY.add("dom-create",function(a,b){
    function r(b,c){
        return h(b)&&a.isPlainObject(c)&&d.attr(b,c,!0),b
    }
    function s(b,c){
        var d=null,e,f;
        if(b&&(b.push||b.item)&&b[0]){
            c=c||b[0].ownerDocument,d=c.createDocumentFragment(),b.item&&(b=a.makeArray(b));
            for(e=0,f=b.length;
            e<f;
            e++)d.appendChild(b[e])
        }
        else a.log("Unable to convert "+b+" to fragment.");
        return d
    }
    function t(a){
        var b=a.cloneNode(!0);
        return e.ie<8&&(b.innerHTML=a.innerHTML),b
    }
    function u(b,e,f,g){
        if(!f){
            v(b,e),a.isFunction(g)&&g();
            return
        }
        var h=a.guid("ks-tmp-"),i=new RegExp(n);
        e+='<span id="'+h+'"></span>',a.available(h,function(){
            var b=a.get("head"),f,j,k,l,m,n,o;
            i.lastIndex=0;
            while(f=i.exec(e))j=f[1],k=j?j.match(p):!1,k&&k[2]?(n=c.createElement("script"),n.src=k[2],(l=j.match(q))&&l[2]&&(n.charset=l[2]),n.async=!0,b.appendChild(n)):(o=f[2])&&o.length>0&&a.globalEval(o);
            (m=c.getElementById(h))&&d.remove(m),a.isFunction(g)&&g()
        }),v(b,e)
    }
    function v(a,b){
        b=(b+"").replace(n,"");
        try{
            a.innerHTML=b
        }
        catch(c){
            while(a.firstChild)a.removeChild(a.firstChild);
            b&&a.appendChild(d.create(b))
        }
        
    }
    var c=document,d=a.DOM,e=a.UA,f=e.ie,g=d._nodeTypeIs,h=d._isElementNode,i=d._isKSNode,j="div",k="parentNode",l=c.createElement(j),m=/<(\w+)/,n=/<script([^>]*)>([^<]*(?:(?!<\/script>)<[^<]*)*)<\/script>/ig,o=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/\ssrc=(['"])(.*?)\1/i,q=/\scharset=(['"])(.*?)\1/i;
    a.mix(d,{
        create:function(b,e,f){
            if(g(b,1)||g(b,3))return t(b);
            if(i(b))return t(b[0]);
            if(!(b=a.trim(b)))return null;
            var h=null,l=d._creators,n,p=j,q,u;
            return(n=o.exec(b))?h=(f||c).createElement(n[1]):((n=m.exec(b))&&(q=n[1])&&a.isFunction(l[q=q.toLowerCase()])&&(p=q),u=l[p](b,f).childNodes,u.length===1?h=u[0][k].removeChild(u[0]):h=s(u,f||c)),r(h,e)
        }
        ,_creators:{
            div:function(a,b){
                var c=b?b.createElement(j):l;
                return c.innerHTML=a,c
            }
            
        }
        ,html:function(c,d,e,f){
            if(d===b){
                var g=a.get(c);
                if(h(g))return g.innerHTML
            }
            else a.each(a.query(c),function(a){
                h(a)&&u(a,d,e,f)
            })
        }
        ,remove:function(b){
            a.each(a.query(b),function(a){
                h(a)&&a.parentNode&&a.parentNode.removeChild(a)
            })
        }
        
    });
    if(f||e.gecko||e.webkit){
        var w=d._creators,x=d.create,y="<table>",z="</table>",A=/(?:\/(?:thead|tfoot|caption|col|colgroup)>)+\s*<tbody/,B={
            option:"select",td:"tr",tr:"tbody",tbody:"table",col:"colgroup",legend:"fieldset"
        };
        for(var C in B)(function(a){
            w[C]=function(b,c){
                return x("<"+a+">"+b+"</"+a+">",null,c)
            }
            
        })(B[C]);
        f&&(w.script=function(a,b){
            var c=b?b.createElement(j):l;
            return c.innerHTML="-"+a,c.removeChild(c.firstChild),c
        }
        ,f<8&&(w.tbody=function(a,b){
            var c=x(y+a+z,null,b),d=c.children.tags("tbody")[0];
            return c.children.length>1&&d&&!A.test(a)&&d[k].removeChild(d),c
        })),a.mix(w,{
            optgroup:w.option,th:w.td,thead:w.tbody,tfoot:w.tbody,caption:w.tbody,colgroup:w.tbody
        })
    }
    
}),KISSY.add("event",function(a,b){
    function l(b,c,d,e,f){
        a.isString(c)&&(c=a.query(c));
        if(a.isArray(c))return a.each(c,function(a){
            k[b](a,d,e,f)
        }),!0;
        if((d=a.trim(d))&&d.indexOf(h)>0)return a.each(d.split(h),function(a){
            k[b](c,a,e,f)
        }),!0;
        if(c.getDOMNodes){
            for(var g=0;
            g<c.length;
            g++)k[b](c.item(g),d,e,f);
            return!0
        }
        
    }
    function m(a){
        return p(a)?d.data(a,g):-1
    }
    function n(a,b){
        p(a)&&d.data(a,g,b)
    }
    function o(a){
        d.removeData(a,g)
    }
    function p(a){
        return a&&a.nodeType!==3&&a.nodeType!==8
    }
    var c=document,d=a.DOM,e=c.addEventListener?function(a,b,c,d){
        a.addEventListener&&a.addEventListener(b,c,!!d)
    }
    :function(a,b,c){
        a.attachEvent&&a.attachEvent("on"+b,c)
    }
    ,f=c.removeEventListener?function(a,b,c,d){
        a.removeEventListener&&a.removeEventListener(b,c,!!d)
    }
    :function(a,b,c){
        a.detachEvent&&a.detachEvent("on"+b,c)
    }
    ,g="ksEventTargetId",h=" ",i=a.now(),j={},k={
        EVENT_GUID:g,special:{},add:function(b,c,d,f){
            if(l("add",b,c,d,f))return;
            var g=m(b),h,o,p,q,r,s;
            if(g===-1||!c||!a.isFunction(d))return;
            g||(n(b,g=i++),j[g]={
                target:b,events:{}
            }),p=j[g].events,p[c]||(h=!b.isCustomEventTarget,o=(h||b._supportSpecialEvent)&&k.special[c]||{},q=function(d,e){
                if(!d||!d.fixed)d=new a.EventObject(b,d,c);
                return a.isPlainObject(e)&&a.mix(d,e),o.setup&&o.setup(d),(o.handle||k._handle)(b,d,p[c].listeners)
            }
            ,p[c]={
                handle:q,listeners:[]
            }
            ,r=o.fix||c,s=o.capture,h?e(b,r,q,s):b._addEvent&&b._addEvent(r,q,s)),p[c].listeners.push({
                fn:d,scope:f||b
            })
        }
        ,remove:function(c,d,e,g){
            if(l("remove",c,d,e,g))return;
            var h=m(c),i,n,p,q,r,s,t,u,v;
            if(h===-1)return;
            if(!h||!(t=j[h]))return;
            if(t.target!==c)return;
            g=g||c,i=t.events||{};
            if(n=i[d]){
                p=n.listeners,s=p.length;
                if(a.isFunction(e)&&s){
                    for(q=0,r=0,u=[];
                    q<s;
                    ++q)if(e!==p[q].fn||g!==p[q].scope)u[r++]=p[q];
                    n.listeners=u,s=u.length
                }
                if(e===b||s===0)c.isCustomEventTarget?c._removeEvent&&c._removeEvent(d,n.handle):(v=k.special[d]||{},f(c,v.fix||d,n.handle)),delete i[d]
            }
            if(d===b||a.isEmptyObject(i)){
                for(d in i)k.remove(c,d);
                delete j[h],o(c)
            }
            
        }
        ,_handle:function(a,c,d){
            d=d.slice(0);
            var e,f=0,g=d.length,h;
            for(;
            f<g;
            ++f){
                h=d[f],e=h.fn.call(h.scope,c),e!==b&&(c.result=e,e===!1&&c.halt());
                if(c.isImmediatePropagationStopped)break
            }
            return e
        }
        ,_getCache:function(a){
            return j[a]
        }
        ,_simpleAdd:e,_simpleRemove:f
    };
    k.on=k.add,a.Event=k
}),KISSY.add("event-object",function(a,b){
    function e(b,c,d){
        var e=this;
        e.currentTarget=b,e.originalEvent=c||{},c?(e.type=c.type,e._fix()):(e.type=d,e.target=b),b.isCustomEventTarget&&a.DOM._isKSNode(b)&&(e.target=new a.Node(e.target)),e.currentTarget=b,e.fixed=!0
    }
    var c=document,d="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(e,{
        _fix:function(){
            var a=this,e=a.originalEvent,f=d.length,g,h=a.currentTarget,i=h.nodeType===9?h:h.ownerDocument||c;
            while(f)g=d[--f],a[g]=e[g];
            a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);
            if(a.pageX===b&&a.clientX!==b){
                var j=i.documentElement,k=i.body;
                a.pageX=a.clientX+(j&&j.scrollLeft||k&&k.scrollLeft||0)-(j&&j.clientLeft||k&&k.clientLeft||0),a.pageY=a.clientY+(j&&j.scrollTop||k&&k.scrollTop||0)-(j&&j.clientTop||k&&k.clientTop||0)
            }
            a.which===b&&(a.which=a.charCode!==b?a.charCode:a.keyCode),a.metaKey===b&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0)
        }
        ,preventDefault:function(){
            var a=this.originalEvent;
            a.preventDefault?a.preventDefault():a.returnValue=!1,this.isDefaultPrevented=!0
        }
        ,stopPropagation:function(){
            var a=this.originalEvent;
            a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.isPropagationStopped=!0
        }
        ,stopImmediatePropagation:function(){
            var a=this.originalEvent;
            a.stopImmediatePropagation?a.stopImmediatePropagation():this.stopPropagation(),this.isImmediatePropagationStopped=!0
        }
        ,halt:function(a){
            a?this.stopImmediatePropagation():this.stopPropagation(),this.preventDefault()
        }
        
    }),a.EventObject=e
}),KISSY.add("event-target",function(a,b){
    var c=a.Event;
    a.EventTarget={
        isCustomEventTarget:!0,fire:function(d,e){
            var f=a.DOM.data(this,c.EVENT_GUID)||-1,g=c._getCache(f)||{},h=g.events||{},i=h[d];
            return i&&a.isFunction(i.handle)?i.handle(b,e):this
        }
        ,on:function(a,b,d){
            return c.add(this,a,b,d),this
        }
        ,detach:function(a,b,d){
            return c.remove(this,a,b,d),this
        }
        
    }
    
}),KISSY.add("event-mouseenter",function(a){

    var b=a.Event;
    a.UA.ie||a.each([{
        name:"mouseenter",fix:"mouseover"
    }
    ,{
        name:"mouseleave",fix:"mouseout"
    }
    ],function(c){
        b.special[c.name]={
            fix:c.fix,setup:function(a){
                a.type=c.name
            }
            ,handle:function(c,d,e){
                a.DOM._isKSNode(c)&&(c=c[0]);
                var f=d.relatedTarget;
                try{
                    while(f&&f!==c)f=f.parentNode;
                    f!==c&&b._handle(c,d,e)
                }
                catch(g){
                    a.log(g)
                }
                
            }
            
        }
        
    })
}),KISSY.add("anim-easing",function(a){
    var b=Math,c=b.PI,d=b.pow,e=b.sin,f=1.70158,g={
        easeNone:function(a){
            return a
        }
        ,easeIn:function(a){
            return a*a
        }
        ,easeOut:function(a){
            return(2-a)*a
        }
        ,easeBoth:function(a){
            return(a*=2)<1?.5*a*a:.5*(1- --a*(a-2))
        }
        ,easeInStrong:function(a){
            return a*a*a*a
        }
        ,easeOutStrong:function(a){
            return 1- --a*a*a*a
        }
        ,easeBothStrong:function(a){
            return(a*=2)<1?.5*a*a*a*a:.5*(2-(a-=2)*a*a*a)
        }
        ,elasticIn:function(a){
            var b=.3,f=b/4;
            return a===0||a===1?a:-(d(2,10*(a-=1))*e((a-f)*2*c/b))
        }
        ,elasticOut:function(a){
            var b=.3,f=b/4;
            return a===0||a===1?a:d(2,-10*a)*e((a-f)*2*c/b)+1
        }
        ,elasticBoth:function(a){
            var b=.45,f=b/4;
            return a===0||(a*=2)===2?a:a<1?-0.5*d(2,10*(a-=1))*e((a-f)*2*c/b):d(2,-10*(a-=1))*e((a-f)*2*c/b)*.5+1
        }
        ,backIn:function(a){
            return a===1&&(a-=.001),a*a*((f+1)*a-f)
        }
        ,backOut:function(a){
            return(a-=1)*a*((f+1)*a+f)+1
        }
        ,backBoth:function(a){
            return(a*=2)<1?.5*a*a*(((f*=1.525)+1)*a-f):.5*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)
        }
        ,bounceIn:function(a){
            return 1-g.bounceOut(1-a)
        }
        ,bounceOut:function(a){
            var b=7.5625,c;
            return a<1/2.75?c=b*a*a:a<2/2.75?c=b*(a-=1.5/2.75)*a+.75:a<2.5/2.75?c=b*(a-=2.25/2.75)*a+.9375:c=b*(a-=2.625/2.75)*a+.984375,c
        }
        ,bounceBoth:function(a){
            return a<.5?g.bounceIn(a*2)*.5:g.bounceOut(a*2-1)*.5+.5
        }
        
    };
    g.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=g
}),KISSY.add("anim",function(a,b){
    function p(c,f,g,h,i,j){
        if(!(c=a.get(c)))return;
        if(!(this instanceof p))return new p(c,f,g,h,i,j);
        var k=this,l=a.isPlainObject(g),m=f,r;
        k.domEl=c,a.isPlainObject(m)&&(m=a.param(m,";").replace(/=/g,":").replace(/%23/g,"#").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()),k.props=s(m),k.targetStyle=m;
        if(l)r=a.merge(o,g);
        else{
            r=a.clone(o),g&&(r.duration=e(g)||1);
            if(a.isString(h)||a.isFunction(h))r.easing=h;
            a.isFunction(i)&&(r.complete=i),j!==b&&(r.nativeSupport=j)
        }
        k.config=r,r.nativeSupport&&q()&&a.isString(h=r.easing)&&(/cubic-bezier\([\s\d.,]+\)/.test(h)||(h=d.NativeTimeFunction[h]))&&(r.easing=h,k.transitionName=q()),a.isFunction(i)&&k.on(n,i)
    }
    function q(){
        var c="transition",d;
        return f.style[c]!==b?d=c:a.each(["Webkit","Moz","O"],function(a){
            if(f.style[c=a+"Transition"]!==b)return d=c,!1
        }),q=function(){
            return d
        }
        ,d
    }
    function r(b,d,e){
        a.UA.ie&&e.indexOf(i)>-1&&c.css(b,i,d[i].v),b.style.cssText+=";"+e
    }
    function s(a){
        var b,c={},d=g.length,e;
        f.innerHTML='<div style="'+a+'"></div>',b=f.firstChild.style;
        while(d--)if(e=b[g[d]])c[g[d]]=t(e);
        return c
    }
    function t(a){
        var b=e(a),c=(a+"").replace(/^[-\d.]+/,"");
        return isNaN(b)?{
            v:c,u:"",f:v
        }
        :{
            v:b,u:c,f:u
        }
        
    }
    function u(a,b,c){
        return(a+(b-a)*c).toFixed(3)
    }
    function v(a,b,c){
        var d=2,e,f,g,h=[],i=[];
        while(e=3,f=arguments[d-1],d--)if(w(f,0,4)==="rgb("){
            f=f.match(/\d+/g);
            while(e--)h.push(~~f[e])
        }
        else{
            if(w(f,0)!=="#")return b;
            f.length===4&&(f="#"+w(f,1)+w(f,1)+w(f,2)+w(f,2)+w(f,3)+w(f,3));
            while(e--)h.push(parseInt(w(f,1+e*2,2),16))
        }
        while(e--)g=~~(h[e+3]+(h[e]-h[e+3])*c),i.push(g<0?0:g>255?255:g);
        return"rgb("+i.join(",")+")"
    }
    function w(a,b,c){
        return a.substr(b,c||1)
    }
    var c=a.DOM,d=a.Easing,e=parseFloat,f=c.create("<div>"),g="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(" "),h=13,i="opacity",j="none",k="Property",l="start",m="step",n="complete",o={
        duration:1,easing:"easeNone",nativeSupport:!0
    };
    a.augment(p,a.EventTarget,{
        run:function(){
            var b=this,e=b.config,f=b.domEl,g,i,j,k,o=b.props,p={},q,r;
            for(q in o)p[q]=t(c.css(f,q));
            if(b.fire(l)===!1)return;
            return b.stop(),b.transitionName?b._nativeRun():(g=e.duration*1e3,j=a.now(),k=j+g,i=e.easing,a.isString(i)&&(i=d[i]||d.easeNone),b.timer=a.later(r=function(){
                var d=a.now(),e=d>k?1:(d-j)/g,h,l,r;
                for(q in o)h=p[q],l=o[q],l.v==0&&(l.u=h.u),h.u!==l.u&&(h.v=0),c.css(f,q,l.f(h.v,l.v,i(e))+l.u);
                if(b.fire(m)===!1||(r=d>k))b.stop(),r&&b.fire(n)
            }
            ,h,!0),r()),b
        }
        ,_nativeRun:function(){
            var b=this,d=b.config,e=b.domEl,f=b.props,g=d.duration*1e3,h=d.easing,i=b.transitionName,j={};
            a.log("Amin uses native transition."),j[i+"Property"]="all",j[i+"Duration"]=g+"ms",j[i+"TimingFunction"]=h,c.css(e,j),a.later(function(){
                r(e,f,b.targetStyle)
            }
            ,0),a.later(function(){
                b.stop(!0)
            }
            ,g)
        }
        ,stop:function(a){
            var c=this;
            return c.transitionName?c._nativeStop(a):(c.timer&&(c.timer.cancel(),c.timer=b),a&&(r(c.domEl,c.props,c.targetStyle),c.fire(n))),c
        }
        ,_nativeStop:function(a){
            var b=this,d=b.domEl,e=b.transitionName,f=b.props,g;
            if(a)c.css(d,e+k,j),b.fire(n);
            else{
                for(g in f)c.css(d,g,c._getComputedStyle(d,g));
                c.css(d,e+k,j)
            }
            
        }
        
    }),p.supportTransition=function(){
        return!!q()
    }
    ,a.Anim=p
}),KISSY.add("core");

