/*
 Copyright 2011 Enideo. All rights reserved
*/
var _gaq=_gaq||[],addToc,insertStylesAndScripts,lIn;
(function(p,e,w){function $(c){p.location=C?U1+c.slice(0):U1+"#!"+c}function L(c){var h=U1+c.slice(1);if(C){h!=p.location.href&&p.history.pushState({},o,h);aa(c)}else p.location.hash="#!"+c}function Ba(c){c=c.replace(/^!/g,o);aa(c)}function aa(c){var h,i=o,f;h=t;if(ba(c)){z=c;t=c.split("/");f=t[1];t=t[t.length-2];if(t==o)t=f="home";if(t!=h){h=e("#p_"+t);if(h.length==0){e(ca).fadeIn();h=e(A,{id:"p_"+t}).addClass(da);e(D).append(h);h.load(c+" div.page>*",Ca)}else ea(h);fa();M==o&&e(J+","+N).removeAttr("class").eq(1).append(e(A)).css(E,
"#fff");if(M!==f){h=e(ga+f);if(h.length>0){h.addClass(S).siblings().removeClass(S);T(h);i=h.css(E)}e(J).stop(true,true).animate({backgroundColor:i},{duration:500,complete:function(){e(this).css({backgroundColor:i})}});e(ha).stop(true,true).fadeOut(500,function(){e(this).css({backgroundPosition:"+=10px 0"}).fadeIn(500)});e("#Wimg").stop(true,true).animate({opacity:0},500,function(){e(this).removeAttr("src").attr("src",U2+"img/"+f+".png").animate({opacity:o},500)});M=f}if(i==o){i=e(N).css(E);e(N).animate({backgroundColor:"#eee"},
500)}e(N+">div").stop(true,true).css({width:0,backgroundColor:i}).animate({width:"100%"},1E3,function(){e(this).parent().css({backgroundColor:i})});_gaq.push(["_trackPageview",c])}}}function ba(c){c=c.charAt(0)=="/"?c.slice(1):c;var h="/"+c,i="/",f=false;c=c.split("/");f=[["projects",ia,"code","links","about",ja]];var l=[u+"-"+F,u+"-"+F+"-"+O+"-hsl",ka,la,ma,na,oa],j,k;j=e.inArray(c[0],l);if(j>=0){if(j<2)c+="-plugin";c=["code"].concat(c)}l=l.slice(2);j=0;for(k=c.length;j<k;j++)if(f&&f[j]&&e.inArray(c[j],
f[j])>=0)switch(c[j]){case "code":f.push(l);i+=c[j]+"/";break;default:i+=c[j]+"/";f=null}(f=h===i)||$(i);return f}function Ca(){var c=e(this);pa(c);c.hide();ea(c)}function pa(c){function h(f){f.length>0&&e.getScript(U2+f.shift(),function(){h(f)})}var i=c.attr("id")||c.find("div.page").attr("id");e(".endnote",c).after(e("<p/>").addClass("btt").append(e(U).text("\u25b4 Back to the top \u25b4").bind(G,function(){e(D).animate({scrollTop:0},500)})));e("a",c).attr(qa,0).filter("[href]").bind(G,function(f){var l=
this.href;if(l.substring(0,4)==ra)l=l.replace(U1,"/");if(l.charAt(0)=="/"&&f.primary){l!=z&&L(l);return false}return true});if(i){i=i.replace(/^p_/,o);if(i==ka)h([i+H]);else if(i==la)h([P+u+".events.enterleave.bundle.min.js",i+H]);else if(i==ma)h([i+H]);else if(i==na)h([P+u+"."+F+"."+O+".hslLite.min.js",P+u+"."+F+"."+O+".hslCircle.min.js",i+H]);else if(i==oa)h([i+H]);else if(i==ja)h([i+H]);else i==ia&&addToc(c)}}function ea(c){e(D).scrollTop(0);if(c.attr("id")==="p_"+t){fa(true);c.animate({opacity:"show"},
750,function(){var h=e(this),i=h.attr("id");h=e("h1",h).eq(0).text();if(i=="p_home")h=V+" - "+h;else h+=" - "+V;document.title=h;e(".pagel."+i).show();e(D).scrollTop(0)})}}function fa(c){var h=(c=c||false)?0:750;e("div.page,div.pagel").not("#p_"+t).stop(true,true).animate({opacity:"hide"},h);c&&e(ca).fadeOut()}function T(c){c=c||e(ga+M);c.children().stop().animate({width:"6em"},250,sa).parent().siblings().children().stop().animate({width:"4em"},250,sa)}function ta(){ua(K.width()*Math.random(),K.height()/
2*Math.random(),true);setTimeout(ta,2E3)}function va(c){ua(c.pageX,c.pageY);W.unbind(X);setTimeout(function(){W.bind(X,va)},40);return false}function ua(c,h,i){wa++;var f="r_"+wa,l=e(A,{id:f}).addClass("ripple"),j=K.offset().left,k=K.offset().top;i=i||false;c-=50;h-=25;if(i){l.addClass("drop");c+=j;h+=k}else{c-=j;h-=k}K.append(l.css("left",c).css("top",h));setTimeout(function(){xa(f)},50)}function xa(c){var h=e("#"+c),i=h.data("step")||0,f=50;i+=50;if(i>500)h.remove();else{h.css(x+"-position","0px -"+
i+"px").data("step",i);if(h.hasClass("drop"))f=150;setTimeout(function(){xa(c)},f)}}function ya(c){var h=e("<"+Q+"/>").attr("type","text/css").get(0);if(h.styleSheet)h.styleSheet.cssText=c;else e(h).text(c);return h}var o="",r="RGB",H=".js",ra="http",da="page",U="<a/>",P="lib/",Q="style",I="color",ha="#hBg2",sa="linear",F=I+"s",J="header",V="Enideo",G="action",D="#"+da+"s",u="jquery",A="<div/>",N="#hBttm",O="pickers",ja="contact",S="current",R=ra+"://",qa="tabindex",za=" model: ",ca="#loading",ia=
"services",X="mousemove",x="background",oa="scroll-gears",Aa=x+"Color",E=x+"-"+I,ga=J+">nav>ul>li.",ka=u+"-events-"+G,ma=u+"-"+F+"-plugin",Y="array3Octet1Normalized",la=u+"-events-enter-leave",na=u+"-"+F+"-"+O+"-hsl-plugin",M=o,t,z,B,wa=0,W=e(J),K=e(ha),C=p.history&&typeof p.history.pushState=="function";if(MD>1)p.console={log:function(){}};_gaq.push(["_setAccount","UA-11524146-1"],["_trackPageLoadTime"]);lIn=function(){_gaq.push(["_trackSocial","LinkedIn","share",z])};B=false;if(C&&p.location.hash)B=
p.location.hash.replace(/^#!?\/?/,"/");else if(!C&&p.location.pathname!="/")B=p.location.pathname;else if(p.location.search)B=p.location.search.replace(/^.*=/,o);if(B)ba(B)&&$(B);else{p.location.hash==o&&!C&&L("/");jQuery.ajaxSettings.traditional=true;e(document).ready(function(){e("html").removeClass("no-js").addClass("js");if(/MSIE [0-7]\./.test(navigator.appVersion)){p.IE7_PNG_SUFFIX=".png";e.getScript("//ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js")}/MSIE [0-8]\./.test(navigator.appVersion)?
e.getScript("//scottjehl.github.com/Respond/respond.min.js"):e("head").append(ya("@media only screen and (orientation: portrait) and (max-device-width: 500px){ #W{display: none !important;visibility: hidden;} #flip{display:block !important;} }"));pa(e("body"));e(D).append(e("<img/>").attr("id","loading").hide());if(C){p.onpopstate=function(){L(p.location.pathname)};L(p.location.pathname)}else e.getScript(U2+P+u+".history.min.js",function(){setTimeout(function(){e.history.init(Ba)},100)});e("#logo").after(e("<form/>",
{action:""+R+"www.google.com/search",title:"Press enter to search"}).append(e("<input/>",{type:"search",name:"q",placeholder:"search"})).append(e("<input/>",{type:"hidden",name:"sitesearch",value:"enideo.com"})).bind("submit",function(){var c=e(this);p.location=c.attr(G)+"?q="+encodeURIComponent(c.children("input[type=search]").val()+" "+V+" site:enideo.com");return false}));e(J+" ul li").bind("mouseenter",function(){T(e(this))}).parent().bind("mouseleave",function(){T()});e("#logo").append(e("<span/>").addClass("reflection").append(e("<img/>").attr("src",
U2+"img/enideo-logo.png")).append());W.bind(X,va);ta();MD>0&&setTimeout(function(){e("#follow").css("opacity",0.01).append("<script type='text/javascript' src='https://apis.google.com/js/plusone.js'>{lang: 'en-GB'}<\/script>");p.fbAsyncInit=function(){FB.init({xfbml:true})};e.getScript(""+R+"connect.facebook.net/en_US/all.js",function(){FB.Event.subscribe("edge.create",function(){_gaq.push(["_trackSocial","facebook","like",z])});FB.Event.subscribe("edge.remove",function(){_gaq.push(["_trackSocial",
"facebook","unlike",z])});FB.Event.subscribe("message.send",function(){_gaq.push(["_trackSocial","facebook","send",z])})});e.getScript(R+"platform.twitter.com/widgets.js",function(){twttr.events.bind("follow",function(c){c&&c.type=="follow"&&_gaq.push(["_trackSocial","twitter","follow"])});twttr.events.bind("tweet",function(c){c&&_gaq.push(["_trackSocial","twitter","tweet",z])})});e.getScript(R+"platform.linkedin.com/in.js");setTimeout(function(){e("#follow").animate({opacity:1},1E3)},7E3)},5E3);
e(".noscript").remove()});insertStylesAndScripts=function(){e(".insertStyle").each(function(){var c=e(this),h=ya(c.text());c.after(h).removeClass("insertStyle")});e(".insertScript").each(function(){var c=e(this);e.globalEval(c.text());c.removeClass("insertScript")})};addToc=function(c){var h=e("h2,h3,h4",c);h=e("<nav/>").addClass("toc").append(e.toc(h));var i=e(D);e("a",h).each(function(){var f=e(this);f.data("target",e("a[name="+this.href.replace(/^.*#/g,o)+"]",c));f.removeAttr("href");f.bind(G,
function(){var l=e(this).data("target"),j=l.position().top;j-=i.scrollTop();i.animate({scrollTop:j},500);l.next().delay(750).animate({opacity:0},250).animate({opacity:o},250).animate({opacity:0},250).animate({opacity:o},250)})});e("h1",c).eq(0).after(h)};MD==2&&e.getScript("//www.google-analytics.com/ga.js");e.toc=function(c,h){var i=u+"-toc",f=e(c).addClass(i),l=(h=h||false)?"ol":"ul",j=e(A).append(e("<"+l+"/>").addClass(i+"-1")),k=1,s=[];f.each(function(){var a=e(this),d=a.text(),b=d.replace(/[^A-Z0-9]/gi,
"-").replace(/^-+/g,o),g,m=this.tagName,n=i+"-";d=e("<li/>").append(e(U,{href:"#"+b}).text(d));a.before(e(U,{name:b}).addClass("anchor"));e.each(s,function(q,v){if(v==m){g=q+1;return false}});if(g===w){s.push(m);g=s.length}n+=g;if(g<=k)e(l+"."+n+":last",j).append(d);else if(g>k){e(l+"."+(u+"-toc-"+(g-1))+":last>li:last",j).append(e("<"+l+"/>").addClass(n));e(l+"."+n+":last",j).append(d)}k=g});return j.children().eq(0)};(function(c){var h=G,i="mousedown."+h+" click."+h+" keypress."+h,f=qa,l=h+"mousedown",
j=h+h;c.event.special.action={setup:function(k){c(this).bind(i,c.event.special.action.handler);k&&"autotab"in k&&k.autotab===true&&c(this).not("["+f+"]").attr(f,0)},teardown:function(){c(this).unbind(i,c.event.special.action.handler)},handler:function(k){var s=this,a=c(s),d=k.altKey||k.ctrlKey||k.metaKey||k.shiftKey;if(k.type=="mousedown"){if(k.which==1||k.which==2){a.data(l,k.which);a.data(j,false);c(document).one("mouseup."+h,function(b){if(a.data(l)!==w){if(b.target==s||c.contains(s,b.target)){b.type=
h;b.currentTarget=s;b.primary=!(d||b.which==2);a.data(j,c.event.handle.apply(s,arguments))}a.removeData(l)}})}}else if(k.type=="click"){if(a.data(l)!==w){k.type=h;k.which=k.which||a.data(h+"mousedown")||1;k.primary=!(d||k.which==2);a.data(j,c.event.handle.apply(s,arguments));a.removeData(l)}}else if(k.type=="keypress"&&k.which==13){k.type=h;k.primary=!d;a.data(j,c.event.handle.apply(s,arguments));a.removeData(l)}return a.data(j)}}})(e);(function(c){function h(a,d,b){if(d in a)return a[d](b);else if(d==
r||r in f.convertModels[d]){if(d!=r)b=f.convertModels[d].RGB(b);for(var g in a)if(g==r||g in f.convertModels.RGB){if(g!=r)b=f.convertModels.RGB[g](b);b=c.colors.formats.array3Octet1Normalized.fromModel.RGB(b);return a[g](b)}}throw"No valid conversion methods for this "+I+za+d;}function i(a,d){var b=c.colors.models[this.currentModel].parameterIndexes,g=this.currentModel==r?this.format(Y):this.color;if(a){a=a.toLowerCase();if(a in b)if(d!==w){this.color[b[a]]=d;this.color=c.colors.models[this.currentModel].sanitize(this.color)}else return g[b[a]];
else throw"Parameter not in the "+S+" "+I+za+a;}else return g;return this}var f=function(a,d,b){if(this instanceof f===false)return new f(a,d,b);if(a&&a instanceof f)return a;this.currentModel=f.defaultModel;if(a){if(typeof a=="string")a=c.trim(a);this.inputColor=a;if(d&&d in f.formats&&f.formats[d].validate(a)===true)this.inputFormat=d;else{if(b===w)b=d;for(d in f.formats)if(f.formats[d].validate(a)===true){this.inputFormat=d;break}}if(this.inputFormat){d=f.formats[d];this.inputModel=b||d.model||
f.defaultInputModel;a=h(d.toModel,this.inputModel,a);if(this.inputModel!=this.currentModel){a=f.models[this.inputModel].sanitize(a);a=h(f.convertModels[this.inputModel],this.currentModel,a)}this.color=f.models[this.currentModel].sanitize(a)}}else this.color=f.models[this.currentModel].sanitize();if(this.color)return this;else throw"Color format unknown: "+a;};f.fn=f.prototype={get:i,set:i,model:function(a){if(a===w)return this.currentModel;else if(a==this.currentModel)return this;else if(a in f.models){this.color=
h(f.convertModels[this.currentModel],a,this.color);this.currentModel=a;return this}else throw"Model does not exist";},format:function(a){var d=this.currentModel==r&&a!==Y?this.format(Y):this.color;if(a&&a in f.formats)return h(f.formats[a].fromModel,this.currentModel,d);else throw"Format does not exist";},toString:function(a){if(!a||a in f.formats===false)a=f.defaultString;try{return this.format(a).toString()}catch(d){return this.format(f.defaultString).toString()}},isFormat:function(a){if(a&&a in
f.formats)return f.formats[a].validate(this.inputColor);else throw"Format does not exist";}};f.formats={array3Octet:{validate:function(a,d){var b=0;d=d||3;if(c.isArray(a)&&a.length==d){for(;b<d;)if(typeof a[b]=="number"&&a[b]>=0&&b<3&&a[b]<=255&&/^\d+$/.test(a[b].toString())||b==3&&a[b]<=1)b++;else break;if(b==d)return true}return false},toModel:{RGB:function(a){return a.slice(0,3)}},fromModel:{RGB:function(a){return a.slice(0,3)}}},array3Octet1Normalized:{validate:function(a){return f.formats.array3Octet.validate(a,
4)},toModel:{RGB:function(a){return a.slice(0,4)}},fromModel:{RGB:function(a){var d=0;for(a=a.slice(0,4);d<3;){a[d]=Math.round(a[d]);d++}return a}}},rgb:{validate:function(a,d){var b=1,g;if(a&&typeof a=="string"&&(g=/^rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)$/.exec(a))){for(;b<4;){g[b]=parseInt(g[b]);if(g[b]<256)b++;else break}if(b==4)if(d){g.shift();return g.slice(0)}else return true}return false},fromModel:{RGB:function(a){return"rgb("+a[0]+","+a[1]+","+a[2]+")"}},toModel:{RGB:function(a){a=
f.formats.rgb.validate(a,true);return a===false?null:a}},model:r}};f.models={RGB:{sanitize:function(a){var d;if(!a||!c.isArray(a))a=[Math.floor(256*Math.random()),Math.floor(256*Math.random()),Math.floor(256*Math.random()),Math.random()];for(;a.length<4;)a.length==3?a.push(1):a.push(0);a=a.slice(0,4);for(d=0;d<a.length;d++){a[d]||(a[d]=0);if(d<3){if(a[d]>255)a[d]=255;if(a[d]<0)a[d]=0}else if(d==3){a[d]=parseFloat(a[d]);if(a[d]>1)a[d]=1;if(a[d]<0)a[d]=0}}return a},parameterIndexes:{r:0,g:1,b:2,a:3,
red:0,green:1,blue:2,alpha:3}}};f.convertModels={};f.defaultInputModel=f.defaultModel=r;f.defaultString="rgb";c.colors===w&&c.extend({colors:f});c.extend(c.colors.formats,{rgba:{validate:function(a,d){var b=1,g;if(a&&typeof a=="string"&&(g=/^rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*(0|1|0\.[0-9]+)\s*\)$/.exec(a))){for(;b<4;){g[b]=parseInt(g[b]);if(g[b]<256)b++;else break}if(b==4&&g[4]>=0&&g[4]<=1){g[b]=parseFloat(g[b]);b++}if(b==5)if(d){g.shift();return g.slice(0)}else return true}return false},
fromModel:{RGB:function(a){return"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")"}},toModel:{RGB:function(a){a=f.formats.rgba.validate(a,true);return a===false?null:a}},model:r}});c.extend(c.colors.formats,{array3Normalized:{validate:function(a,d){var b=0;d=d||3;if(c.isArray(a)&&a.length==d){for(;b<d;)if(typeof a[b]=="number"&&a[b]<=1&&a[b]>=0)b++;else break;if(b==d)return true}return false},toModel:{RGB:function(a){return[a[0]*255,a[1]*255,a[2]*255]}},fromModel:{RGB:function(a){return[a[0]/255,a[1]/255,
a[2]/255]}}},array4Normalized:{validate:function(a){return f.formats.array3Normalized.validate(a,4)},toModel:{RGB:function(a){return[a[0]*255,a[1]*255,a[2]*255,a[3]]}},fromModel:{RGB:function(a){var d;a=a.slice(0);for(d in a)if(d!=3&&a[d]){a[d]+=1;a[d]/=256}return[a[0],a[1],a[2],a[3]]}}}});var l={hex:{validate:function(a,d){var b;if(a&&typeof a=="string")if(b=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(a))return d?[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]:true;else if(b=
/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(a))return d?[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]:true;return false},fromModel:{RGB:function(a){return"#"+(a[0]<16?"0":o)+a[0].toString(16)+(a[1]<16?"0":o)+a[1].toString(16)+(a[2]<16?"0":o)+a[2].toString(16)}},toModel:{RGB:function(a){a=l.hex.validate(a,true);return a===false?null:a}},model:r}};c.extend(c.colors.formats,l);c.extend(c.colors.formats,{transparent:{validate:function(a){return a&&typeof a=="string"&&/^transparent$/i.test(a)},
fromModel:{RGB:function(a){if(a[3]==0)return"transparent";else throw"Color is not transparent: "+a.toString();}},toModel:{RGB:function(){return[255,255,255,0]}}}});var j={name:{list:{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,
0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,
79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,
92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,
153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],
navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,
19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,
205,50]},validate:function(a){if(!a||typeof a!="string"||/^\w+$/.test(a)==false)return false;a=a.toLowerCase();return a in this.list},fromModel:{RGB:function(a){var d;a=a.slice(0,3).toString();for(d in j.name.list)if(j.name.list[d].toString()==a)return d;throw"No name corresponds to the "+I+": "+a.toString();}},toModel:{RGB:function(a){a=a.toLowerCase();return j.name.list[a]}}}};c.extend(c.colors.formats,j);c.colors.fn.mixWith=function(a,d){var b=0,g,m,n,q;if(typeof d=="number")q=d;g=this.get();n=
this.model();if(c.isArray(a))try{m=f(a)}catch(v){for(b=0;b<a.length;b++){if(a[b]instanceof f==false)a[b]=f(a[b]);m=b==0?a[b].model(n):m.mixWith(a[b],b/(b+1))}}else{if(a instanceof f==false)a=f(a);m=a}m=m.model(n).get();g=g.slice(0);m=m.slice(0);if(q==w)q=b?1/(b+1):0.5;for(b=0;b<g.length;b++){if("cycleMixes"in f.models[n]&&f.models[n].cycleMixes[b])if(f.models[n].cycleMixes[b]>0)for(;g[b]>m[b];)m[b]+=f.models[n].cycleMixes[b];else for(;g[b]<m[b];)m[b]+=f.models[n].cycleMixes[b];g[b]=g[b]*q+m[b]*(1-
q)}g=f.models[n].sanitize(g);return c.extend(c.colors(),{color:g,currentModel:n})};c.each([Aa,"borderBottomColor","borderLeftColor","borderRightColor","borderTopColor",I,"outlineColor"],function(a,d){c.fx.step[d]=function(b){var g;if(!b.colorInit){b.colorInit=true;b.start=c.colors(c(b.elem).visibleColor(d));if(/^(|transparent)$/i.test(c.curCSS(b.elem,d))){b.start.model(r).set("alpha",0);g=r}if(b.end=="transparent"){b.middle=c.colors(c(b.elem).parent().visibleColor(d));b.middle.model(r).set("alpha",
0);g=r}else if(b.end==o){c(b.elem).css(d,o);b.middle=c.colors(c(b.elem).css(d))}else b.middle=c.colors(b.end);if(b.options.mixModel!==w)g=b.options.mixModel;if(g!==w){b.start.model(g);b.middle.model(g)}}b.elem.style[d]=b.pos!=1?b.start.mixWith(b.middle,Math.max(Math.min(1-b.pos,1),0)).toString():b.end}});jQuery.fn.visibleColor=function(a){var d,b=this.get(0);do{d=c.curCSS(b,a);if(d!=o&&d!="transparent")break;if(c.nodeName(b,"body")){d="transparent";break}a=Aa}while(b=b.parentNode);return d};c.extend(c.support,
{rgba:/rgba/.test(c(A).attr(Q,x+":#f00;"+x+":rgba(0,0,0,0.5);").css(E)),hsl:/hsl/.test(c(A).attr(Q,x+":#f00;"+x+":hsl(0,0,0);").css(E)),hsla:/hsla/.test(c(A).attr(Q,x+":#f00;"+x+":hsla(0,0,0,0.5);").css(E))});if("rgba"in c.support&&c.support.rgba)c.colors.defaultString="rgba";var k={HSL:{sanitize:function(a){var d;if(!a||!c.isArray(a))a=[Math.floor(361*Math.random()),Math.floor(101*Math.random()),Math.floor(101*Math.random()),Math.random()];for(;a.length<4;)a.length==3?a.push(1):a.push(0);a=a.slice(0,
4);for(d=0;d<a.length;d++){a[d]||(a[d]=0);a[d]=parseFloat(a[d]);if(d==0){for(;a[d]>360;)a[d]-=360;if(a[d]<0)a[d]+=360}else if(d<3){for(;a[d]>100;)a[d]=100;if(a[d]<0)a[d]=0}else if(d==3){if(a[d]>1)a[d]=1;if(a[d]<0)a[d]=0}}return a},parameterIndexes:{h:0,s:1,l:2,a:3,hue:0,saturation:1,lightness:2,alpha:3},cycleMixes:[360,0,0,0],reverseCylce:function(a){this.cycleMixes[this.parameterIndexes[a]]*=-1}}},s={array1Circle2Percentage:{validate:function(a,d){var b=0;d=d||3;if(c.isArray(a)&&a.length==d){for(;b<
d;)if(typeof a[b]=="number"&&a[b]>=0&&(b==0&&a[b]<=360||(b==1||b==2)&&a[b]<=100||b==3&&a[b]<=1))b++;else break;if(b==d)return true}return false},toModel:{HSL:function(a){return a.slice(0,3)}},fromModel:{HSL:function(a){return a.slice(0,3)}}},array1Circle2Percentage1Normalized:{validate:function(a){return s.array1Circle2Percentage.validate(a,4)},toModel:{HSL:function(a){return a.slice(0,4)}},fromModel:{HSL:function(a){return a.slice(0,4)}}}};c.extend(true,c.colors.convertModels,{RGB:{HSL:function(a){var d=
a[0]/255,b=a[1]/255,g=a[2]/255,m=Math.max(d,b,g),n=Math.min(d,b,g),q=m-n,v=(m+n)/2;if(m==n)d=n=0;else{n=v>0.5?q/(2-m-n):q/(m+n);d=m==d?(b-g)/q+(b<g?6:0):m==b?(g-d)/q+2:(d-b)/q+4;d/=6}return[d*360,n*100,v*100,a[3]]}},HSL:{RGB:function(a){function d(v,Z,y){if(y<0)y+=1;if(y>1)y-=1;return y<1/6?v+(Z-v)*6*y:y<0.5?Z:y<2/3?v+(Z-v)*(2/3-y)*6:v}var b,g,m,n,q;m=a[0]/360;g=a[1]/100;b=a[2]/100;if(g==0)b=g=m=b;else{n=b<0.5?b*(1+g):b+g-b*g;q=2*b-n;b=d(q,n,m+1/3);g=d(q,n,m);m=d(q,n,m-1/3)}return[b*255,g*255,m*255,
a[3]]}}});c.extend(c.colors.models,k);c.extend(c.colors.formats,s);c.extend(c.colors.formats,{hsl:{validate:function(a,d){var b=1,g;if(a&&typeof a=="string"&&(g=/^hsl\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})%\s*,\s*([0-9]{1,3})%\s*\)$/.exec(a))){for(;b<4;){g[b]=parseInt(g[b]);if(b==0&&g[b]<=360||b>0&&g[b]<=100)b++;else break}if(b==4)if(d){g.shift();return g.slice(0)}else return true}return false},fromModel:{HSL:function(a){return"hsl("+Math.round(a[0])+","+Math.round(a[1])+","+Math.round(a[2])+")"}},toModel:{HSL:function(a){a=
c.colors.formats.hsl.validate(a,true);return a===false?null:a}},model:"HSL"}});c.extend(c.colors.formats,{hsla:{validate:function(a,d){var b=1,g;if(a&&typeof a=="string"&&(g=/^hsla\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})%\s*,\s*([0-9]{1,3})%\s*,\s*(0|1|0\.[0-9]+)\s*\)$/.exec(a))){for(;b<4;){g[b]=parseInt(g[b]);if(b==0&&g[b]<=360||b>0&&g[b]<=100)b++;else break}if(b==4&&g[4]>=0&&g[4]<=1){g[b]=parseFloat(g[b]);b++}if(b==5)return d?g.slice(1):true}return false},fromModel:{HSL:function(a){return"hsla("+Math.round(a[0])+
","+Math.round(a[1])+","+Math.round(a[2])+","+a[3]+")"}},toModel:{HSL:function(a){a=c.colors.formats.hsla.validate(a,true);return a===false?null:a}},model:"HSL"}});c.extend(true,c.colors.formats,{array3Normalized:{toModel:{HSL:function(a){return[a[0]*360,a[1]*100,a[2]*100]}},fromModel:{HSL:function(a){return[a[0]/360,a[1]/100,a[2]/100]}}},array4Normalized:{toModel:{HSL:function(a){return[Math.round(a[0]*360),a[1]*100,a[2]*100,a[3]]}},fromModel:{HSL:function(a){return[a[0]/360,a[1]/100,a[2]/100,a[3]]}}}})})(e)}})(window,
jQuery);

