/*!
 * jQuery Color Animations v@VERSION
 * http://jquery.org/
 *
 * Copyright 2011 John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Date: @DATE
 */
(function(o,c){var j="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),g=/^([\-+])=\s*(\d+\.?\d*)/,f=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(p){return[p[1],p[2],p[3],p[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(p){return[2.55*p[1],2.55*p[2],2.55*p[3],p[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(p){return[parseInt(p[1],16),parseInt(p[2],16),parseInt(p[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,parse:function(p){return[parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16),parseInt(p[3]+p[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(p){return[p[1],p[2]/100,p[3]/100,p[4]]}}],d=o.Color=function(q,r,p,s){return new o.Color.fn.parse(q,r,p,s)},i={rgba:{cache:"_rgba",props:{red:{idx:0,type:"byte",empty:true},green:{idx:1,type:"byte",empty:true},blue:{idx:2,type:"byte",empty:true},alpha:{idx:3,type:"percent",def:1}}},hsla:{cache:"_hsla",props:{hue:{idx:0,type:"degrees",empty:true},saturation:{idx:1,type:"percent",empty:true},lightness:{idx:2,type:"percent",empty:true}}}},n={"byte":{floor:true,min:0,max:255},percent:{min:0,max:1},degrees:{mod:360,floor:true}},l=i.rgba.props,m=d.support={},a,k=o.each;i.hsla.props.alpha=l.alpha;function h(r,t,q){var p=n[t.type]||{},s=t.empty||q;if(s&&r==null){return null}if(t.def&&r==null){return t.def}if(p.floor){r=~~r}else{r=parseFloat(r)}if(r==null||isNaN(r)){return t.def}if(p.mod){r=r%p.mod;return r<0?p.mod+r:r}return p.min>r?p.min:p.max<r?p.max:r}function e(p){var r=d(),q=r._rgba=[];p=p.toLowerCase();k(f,function(x,y){var w=y.re.exec(p),v=w&&y.parse(w),u,t=y.space||"rgba",s=i[t].cache;if(v){u=r[t](v);r[s]=u[s];q=r._rgba=u._rgba;return false}});if(q.length!==0){if(Math.max.apply(Math,q)===0){o.extend(q,a.transparent)}return r}if(p=a[p]){return p}}d.fn=d.prototype={constructor:d,parse:function(w,u,p,v){if(w===c){this._rgba=[null,null,null,null];return this}if(w instanceof o||w.nodeType){w=w instanceof o?w.css(u):o(w).css(u);u=c}var t=this,r=o.type(w),q=this._rgba=[],s;if(u!==c){w=[w,u,p,v];r="array"}if(r==="string"){return this.parse(e(w)||a._default)}if(r==="array"){k(l,function(x,y){q[y.idx]=h(w[y.idx],y)});return this}if(r==="object"){if(w instanceof d){k(i,function(x,y){if(w[y.cache]){t[y.cache]=w[y.cache].slice()}})}else{k(i,function(x,y){k(y.props,function(A,B){var z=y.cache;if(!t[z]&&y.to){if(w[A]==null||A==="alpha"){return}t[z]=y.to(t._rgba)}t[z][B.idx]=h(w[A],B,true)})})}return this}},is:function(r){var q=d(r),s=true,p=this;k(i,function(t,v){var u=q[v.cache],w;if(u){w=p[v.cache]||v.to&&v.to(p._rgba)||[];k(v.props,function(x,y){if(u[y.idx]!=null){s=(u[y.idx]===w[y.idx]);return s}})}return s});return s},_space:function(){var p=[],q=this;k(i,function(r,s){if(q[s.cache]){p.push(r)}});return p.pop()},transition:function(q,v){var r=d(q),s=r._space(),t=i[s],u=this[t.cache]||t.to(this._rgba),p=u.slice();r=r[t.cache];k(t.props,function(z,B){var y=B.idx,x=u[y],w=r[y],A=n[B.type]||{};if(w===null){return}if(x===null){p[y]=w}else{if(A.mod){if(w-x>A.mod/2){x+=A.mod}else{if(x-w>A.mod/2){x-=A.mod}}}p[B.idx]=h((w-x)*v+x,B)}});return this[s](p)},blend:function(s){if(this._rgba[3]===1){return this}var r=this._rgba.slice(),q=r.pop(),p=d(s)._rgba;return d(o.map(r,function(t,u){return(1-q)*p[u]+q*t}))},toRgbaString:function(){var q="rgba(",p=o.map(this._rgba,function(r,s){return r==null?(s>2?1:0):r});if(p[3]===1){p.pop();q="rgb("}return q+p.join(",")+")"},toHslaString:function(){var q="hsla(",p=o.map(this.hsla(),function(r,s){if(r==null){r=s>2?1:0}if(s&&s<3){r=Math.round(r*100)+"%"}return r});if(p[3]===1){p.pop();q="hsl("}return q+p.join(",")+")"},toHexString:function(p){var q=this._rgba.slice(),r=q.pop();if(p){q.push(~~(r*255))}return"#"+o.map(q,function(s,t){s=(s||0).toString(16);return s.length===1?"0"+s:s}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}};d.fn.parse.prototype=d.fn;function b(t,s,r){r=(r+1)%1;if(r*6<1){return t+(s-t)*6*r}if(r*2<1){return s}if(r*3<2){return t+(s-t)*((2/3)-r)*6}return t}i.hsla.to=function(t){if(t[0]==null||t[1]==null||t[2]==null){return[null,null,null,t[3]]}var p=t[0]/255,w=t[1]/255,x=t[2]/255,z=t[3],y=Math.max(p,w,x),u=Math.min(p,w,x),A=y-u,B=y+u,q=B*0.5,v,C;if(u===y){v=0}else{if(p===y){v=(60*(w-x)/A)+360}else{if(w===y){v=(60*(x-p)/A)+120}else{v=(60*(p-w)/A)+240}}}if(q===0||q===1){C=q}else{if(q<=0.5){C=A/B}else{C=A/(2-B)}}return[Math.round(v)%360,C,q,z==null?1:z]};i.hsla.from=function(v){if(v[0]==null||v[1]==null||v[2]==null){return[null,null,null,v[3]]}var y=v[0]/360,C=v[1],x=v[2],B=v[3],u=x<=0.5?x*(1+C):x+C-x*C,w=2*x-u,t,z,A;return[Math.round(b(w,u,y+(1/3))*255),Math.round(b(w,u,y)*255),Math.round(b(w,u,y-(1/3))*255),B]};k(i,function(q,s){var r=s.props,p=s.cache,u=s.to,t=s.from;d.fn[q]=function(z){if(u&&!this[p]){this[p]=u(this._rgba)}if(z===c){return this[p].slice()}var y=o.type(z),v=(y==="array"||y==="object")?z:arguments,x=this[p].slice(),w;k(r,function(A,C){var B=v[y==="object"?A:C.idx];if(B==null){B=x[C.idx]}x[C.idx]=h(B,C)});if(t){w=d(t(x));w[p]=x;return w}else{return d(x)}};k(r,function(v,w){if(d.fn[v]){return}d.fn[v]=function(A){var C=o.type(A),z=(v==="alpha"?(this._hsla?"hsla":"rgba"):q),y=this[z](),B=y[w.idx],x;if(C==="undefined"){return B}if(C==="function"){A=A.call(this,B);C=o.type(A)}if(A==null&&w.empty){return this}if(C==="string"){x=g.exec(A);if(x){A=B+parseFloat(x[2])*(x[1]==="+"?1:-1)}}y[w.idx]=A;return this[z](y)}})});k(j,function(p,q){o.cssHooks[q]={set:function(u,v){var s,r,t;if(o.type(v)!=="string"||(s=e(v))){v=d(s||v);if(!m.rgba&&v._rgba[3]!==1){t=q==="backgroundColor"?u.parentNode:u;do{r=o.curCSS(t,"backgroundColor")}while((r===""||r==="transparent")&&(t=t.parentNode)&&t.style);v=v.blend(r&&r!=="transparent"?r:"_default")}v=v.toRgbaString()}u.style[q]=v}};o.fx.step[q]=function(r){if(!r.colorInit){r.start=d(r.elem,q);r.end=d(r.end);r.colorInit=true}o.cssHooks[q].set(r.elem,r.start.transition(r.end,r.pos))}});o(function(){var q=document.createElement("div"),p=q.style;p.cssText="background-color:rgba(1,1,1,.5)";m.rgba=p.backgroundColor.indexOf("rgba")>-1});a=o.Color.names={aqua:"#00ffff",azure:"#f0ffff",beige:"#f5f5dc",black:"#000000",blue:"#0000ff",brown:"#a52a2a",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkviolet:"#9400d3",fuchsia:"#ff00ff",gold:"#ffd700",green:"#008000",indigo:"#4b0082",khaki:"#f0e68c",lightblue:"#add8e6",lightcyan:"#e0ffff",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightyellow:"#ffffe0",lime:"#00ff00",magenta:"#ff00ff",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",violet:"#800080",red:"#ff0000",silver:"#c0c0c0",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jq18);