1.2
authorDmitry Baranovskiy <dbaranovskiy@Fresh-Air.sydney.atlassian.com>
Mon, 26 Oct 2009 06:15:59 +0000 (17:15 +1100)
committerDmitry Baranovskiy <dbaranovskiy@Fresh-Air.sydney.atlassian.com>
Mon, 26 Oct 2009 06:15:59 +0000 (17:15 +1100)
Replaced colour map to Dean Edwards solution
Speed up IE rendering a bit
Rewamp animation
Fixed some bugs with gradients in IE

raphael-min.js
raphael.js

index 66fde4a..58af3bd 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Raphael 1.1 - JavaScript Vector Library
+ * Raphael 1.2 - JavaScript Vector Library
  *
  * Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
  */
-window.Raphael=(function(){var at=/[, ]+/,m=document,ad=window,aj={was:"Raphael" in ad,is:ad.Raphael},l=function(){if(l.is(arguments[0],"array")){var e=arguments[0],E=q[ao](l,e.splice(0,3+l.is(e[0],ah))),av=E.set();for(var au=0,aw=e[z];au<aw;au++){var R=e[au]||{};({circle:1,rect:1,path:1,ellipse:1,text:1,image:1}[h](R.type))&&av[ae](E[R.type]().attr(R));}return av;}return q[ao](l,arguments);},d={},G=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup"],w="",h="hasOwnProperty",v="prototype",f="setAttribute",c="appendChild",ao="apply",z="length",t="join",H="split",J="concat",ae="push",b=parseFloat,u=parseInt,L=Math.pow,V=Math.min,r=Math.max,ai=Math.round,Y=/^(?=[\da-f]$)/,ah="number",j="toString",A={"clip-rect":"0 0 10e9 10e9",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},F={"clip-rect":"csv",cx:ah,cy:ah,fill:"colour","fill-opacity":ah,"font-size":ah,height:ah,opacity:ah,path:"path",r:ah,rotation:"csv",rx:ah,ry:ah,scale:"csv",stroke:"colour","stroke-opacity":ah,"stroke-width":ah,translation:"csv",width:ah,x:ah,y:ah},Q="replace";l.version="1.1";l.type=(ad.SVGAngle||m.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");l.svg=!(l.vml=l.type=="VML");l.idGenerator=0;l.fn={};l.is=function(i,e){e=(e+w).toLowerCase();if((e=="object"||e=="undefined")&&typeof i==e){return true;}if(i==null&&e=="null"){return true;}return Object[v][j].call(i)[Q](/^\[object\s+|\]$/gi,w).toLowerCase()==e;};l.setWindow=function(e){ad=e;m=ad.document;};l.hsb2rgb=ar(function(az,ax,aD){if(l.is(az,"object")&&"h" in az&&"s" in az&&"b" in az){aD=az.b;ax=az.s;az=az.h;}var au,av,aE;if(aD==0){return{r:0,g:0,b:0,hex:"#000"};}if(az>1||ax>1||aD>1){az/=255;ax/=255;aD/=255;}var aw=~~(az*6),aA=(az*6)-aw,R=aD*(1-ax),E=aD*(1-(ax*aA)),aF=aD*(1-(ax*(1-aA)));au=[aD,E,R,R,aF,aD,aD][aw];av=[aF,aD,aD,E,R,R,aF][aw];aE=[R,R,aF,aD,aD,E,R][aw];au*=255;av*=255;aE*=255;var aB={r:au,g:av,b:aE},e=(~~au)[j](16),ay=(~~av)[j](16),aC=(~~aE)[j](16);e=e[Q](Y,"0");ay=ay[Q](Y,"0");aC=aC[Q](Y,"0");aB.hex="#"+e+ay+aC;return aB;},l);l.rgb2hsb=ar(function(e,i,ax){if(l.is(e,"object")&&"r" in e&&"g" in e&&"b" in e){ax=e.b;i=e.g;e=e.r;}if(l.is(e,"string")){var az=l.getRGB(e);e=az.r;i=az.g;ax=az.b;}if(e>1||i>1||ax>1){e/=255;i/=255;ax/=255;}var aw=r(e,i,ax),E=V(e,i,ax),au,R,av=aw;if(E==aw){return{h:0,s:0,b:aw};}else{var ay=(aw-E);R=ay/aw;if(e==aw){au=(i-ax)/ay;}else{if(i==aw){au=2+((ax-e)/ay);}else{au=4+((e-i)/ay);}}au/=6;if(au<0){au+=1;}if(au>1){au-=1;}}return{h:au,s:R,b:av};},l);l._path2string=function(){var R=w,aw;for(var E=0,au=this[z];E<au;E++){for(var e=0,av=this[E][z];e<av;e++){R+=this[E][e];e&&e!=av-1&&(R+=",");}E!=au-1&&(R+=" ");}return R[Q](/,(?=-)/g,w);};function ar(R,i,e){function E(){var au=Array[v].splice.call(arguments,0,arguments[z]),av=au[t]("\u25ba");E.cache=E.cache||{};E.count=E.count||[];if(av in E.cache){return e?e(E.cache[av]):E.cache[av];}if(E.count[z]>=1000){delete E.cache[E.count.shift()];}E.count[ae](av);E.cache[av]=R[ao](i,au);return e?e(E.cache[av]):E.cache[av];}return E;}l.getRGB=ar(function(e){var az={none:"none",aliceblue:"#f0f8ff",amethyst:"#96c",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},av;e=az[(e+w).toLowerCase()]||e;if(!e){return{r:-1,g:-1,b:-1,hex:"none",error:1};}if(e=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}var E,R,ay,aw=(e+w).match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i);if(aw){if(aw[2]){ay=u(aw[2].substring(5),16);R=u(aw[2].substring(3,5),16);E=u(aw[2].substring(1,3),16);}if(aw[3]){ay=u(aw[3].substring(3)+aw[3].substring(3),16);R=u(aw[3].substring(2,3)+aw[3].substring(2,3),16);E=u(aw[3].substring(1,2)+aw[3].substring(1,2),16);}if(aw[4]){aw=aw[4][H](/\s*,\s*/);E=b(aw[0]);R=b(aw[1]);ay=b(aw[2]);}if(aw[5]){aw=aw[5][H](/\s*,\s*/);E=b(aw[0])*2.55;R=b(aw[1])*2.55;ay=b(aw[2])*2.55;}if(aw[6]){aw=aw[6][H](/\s*,\s*/);E=b(aw[0]);R=b(aw[1]);ay=b(aw[2]);return l.hsb2rgb(E,R,ay);}if(aw[7]){aw=aw[7][H](/\s*,\s*/);E=b(aw[0])*2.55;R=b(aw[1])*2.55;ay=b(aw[2])*2.55;return l.hsb2rgb(E,R,ay);}aw={r:E,g:R,b:ay};var i=(~~E)[j](16),au=(~~R)[j](16),ax=(~~ay)[j](16);i=i[Q](Y,"0");au=au[Q](Y,"0");ax=ax[Q](Y,"0");aw.hex="#"+i+au+ax;av=aw;}else{av={r:-1,g:-1,b:-1,hex:"none",error:1};}return av;},l);l.getColor=function(i){var E=this.getColor.start=this.getColor.start||{h:0,s:1,b:i||0.75},e=this.hsb2rgb(E.h,E.s,E.b);E.h+=0.075;if(E.h>1){E.h=0;E.s-=0.2;if(E.s<=0){this.getColor.start={h:0,s:1,b:E.b};}}return e.hex;};l.getColor.reset=function(){delete this.start;};l.parsePathString=ar(function(e){if(!e){return null;}var E={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];if(l.is(e,"array")&&l.is(e[0],"array")){i=D(e);}if(!i[z]){(e+w)[Q](/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(au,R,ax){var aw=[],av=R.toLowerCase();ax[Q](/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(az,ay){ay&&aw[ae](+ay);});while(aw[z]>=E[av]){i[ae]([R][J](aw.splice(0,E[av])));if(!E[av]){break;}}});}i[j]=l._path2string;return i;});var T=ar(function(aA){if(!aA){return{x:0,y:0,width:0,height:0};}aA=ag(aA);var ax=0,aw=0,R=[],E=[];for(var au=0,az=aA[z];au<az;au++){if(aA[au][0]=="M"){ax=aA[au][1];aw=aA[au][2];R[ae](ax);E[ae](aw);}else{var av=ab(ax,aw,aA[au][1],aA[au][2],aA[au][3],aA[au][4],aA[au][5],aA[au][6]);R=R[J](av.min.x,av.max.x);E=E[J](av.min.y,av.max.y);}}var e=V[ao](0,R),ay=V[ao](0,E);return{x:e,y:ay,width:r[ao](0,R)-e,height:r[ao](0,E)-ay};}),D=function(aw){var R=[];if(!l.is(aw,"array")||!l.is(aw&&aw[0],"array")){aw=l.parsePathString(aw);}for(var E=0,au=aw[z];E<au;E++){R[E]=[];for(var e=0,av=aw[E][z];e<av;e++){R[E][e]=aw[E][e];}}R[j]=l._path2string;return R;},g=ar(function(au){if(!l.is(au,"array")||!l.is(au&&au[0],"array")){au=l.parsePathString(au);}var aA=[],aC=0,aB=0,aF=0,aE=0,R=0;if(au[0][0]=="M"){aC=au[0][1];aB=au[0][2];aF=aC;aE=aB;R++;aA[ae](["M",aC,aB]);}for(var ax=R,aG=au[z];ax<aG;ax++){var e=aA[ax]=[],aD=au[ax];if(aD[0]!=aD[0].toLowerCase()){e[0]=aD[0].toLowerCase();switch(e[0]){case"a":e[1]=aD[1];e[2]=aD[2];e[3]=aD[3];e[4]=aD[4];e[5]=aD[5];e[6]=+(aD[6]-aC).toFixed(3);e[7]=+(aD[7]-aB).toFixed(3);break;case"v":e[1]=+(aD[1]-aB).toFixed(3);break;case"m":aF=aD[1];aE=aD[2];default:for(var aw=1,ay=aD[z];aw<ay;aw++){e[aw]=+(aD[aw]-((aw%2)?aC:aB)).toFixed(3);}}}else{e=aA[ax]=[];if(aD[0]=="m"){aF=aD[1]+aC;aE=aD[2]+aB;}for(var av=0,E=aD[z];av<E;av++){aA[ax][av]=aD[av];}}var az=aA[ax][z];switch(aA[ax][0]){case"z":aC=aF;aB=aE;break;case"h":aC+=+aA[ax][az-1];break;case"v":aB+=+aA[ax][az-1];break;default:aC+=+aA[ax][az-2];aB+=+aA[ax][az-1];}}aA[j]=l._path2string;return aA;},0,D),I=ar(function(au){if(!l.is(au,"array")||!l.is(au&&au[0],"array")){au=l.parsePathString(au);}var az=[],aB=0,aA=0,aE=0,aD=0,R=0;if(au[0][0]=="M"){aB=+au[0][1];aA=+au[0][2];aE=aB;aD=aA;R++;az[0]=["M",aB,aA];}for(var ax=R,aF=au[z];ax<aF;ax++){var e=az[ax]=[],aC=au[ax];if(aC[0]!=(aC[0]+w).toUpperCase()){e[0]=(aC[0]+w).toUpperCase();switch(e[0]){case"A":e[1]=aC[1];e[2]=aC[2];e[3]=aC[3];e[4]=aC[4];e[5]=aC[5];e[6]=+(aC[6]+aB);e[7]=+(aC[7]+aA);break;case"V":e[1]=+aC[1]+aA;break;case"H":e[1]=+aC[1]+aB;break;case"M":aE=+aC[1]+aB;aD=+aC[2]+aA;default:for(var aw=1,ay=aC[z];aw<ay;aw++){e[aw]=+aC[aw]+((aw%2)?aB:aA);}}}else{for(var av=0,E=aC[z];av<E;av++){az[ax][av]=aC[av];}}switch(e[0]){case"Z":aB=aE;aA=aD;break;case"H":aB=e[1];break;case"V":aA=e[1];break;default:aB=az[ax][az[ax][z]-2];aA=az[ax][az[ax][z]-1];}}az[j]=l._path2string;return az;},null,D),k=function(i,R,e,E){return[i,R,e,E,e,E];},K=function(i,R,aw,au,e,E){var av=1/3,az=2/3;return[av*i+az*aw,av*R+az*au,av*e+az*aw,av*E+az*au,e,E];},B=function(aF,a9,aO,aM,aG,aA,av,aE,a8,aH){var au=Math.PI,aL=au*120/180,e=au/180*(+aG||0),aS=[],aP,a5=ar(function(ba,bd,i){var bc=ba*Math.cos(i)-bd*Math.sin(i),bb=ba*Math.sin(i)+bd*Math.cos(i);return{x:bc,y:bb};});if(!aH){aP=a5(aF,a9,-e);aF=aP.x;a9=aP.y;aP=a5(aE,a8,-e);aE=aP.x;a8=aP.y;var E=Math.cos(au/180*aG),aC=Math.sin(au/180*aG),aU=(aF-aE)/2,aT=(a9-a8)/2;aO=r(aO,Math.abs(aU));aM=r(aM,Math.abs(aT));var R=aO*aO,aX=aM*aM,aZ=(aA==av?-1:1)*Math.sqrt(Math.abs((R*aX-R*aT*aT-aX*aU*aU)/(R*aT*aT+aX*aU*aU))),aJ=aZ*aO*aT/aM+(aF+aE)/2,aI=aZ*-aM*aU/aO+(a9+a8)/2,az=Math.asin((a9-aI)/aM),ay=Math.asin((a8-aI)/aM);az=aF<aJ?au-az:az;ay=aE<aJ?au-ay:ay;az<0&&(az=au*2+az);ay<0&&(ay=au*2+ay);if(av&&az>ay){az=az-au*2;}if(!av&&ay>az){ay=ay-au*2;}}else{az=aH[0];ay=aH[1];aJ=aH[2];aI=aH[3];}var aD=ay-az;if(Math.abs(aD)>aL){var aK=ay,aN=aE,aB=a8;ay=az+aL*(av&&ay>az?1:-1);aE=aJ+aO*Math.cos(ay);a8=aI+aM*Math.sin(ay);aS=B(aE,a8,aO,aM,aG,0,av,aN,aB,[ay,aK,aJ,aI]);}aD=ay-az;var ax=Math.cos(az),a7=Math.sin(az),aw=Math.cos(ay),a6=Math.sin(ay),aV=Math.tan(aD/4),aY=4/3*aO*aV,aW=4/3*aM*aV,a4=[aF,a9],a3=[aF+aY*a7,a9-aW*ax],a2=[aE+aY*a6,a8-aW*aw],a0=[aE,a8];a3[0]=2*a4[0]-a3[0];a3[1]=2*a4[1]-a3[1];if(aH){return[a3,a2,a0][J](aS);}else{aS=[a3,a2,a0][J](aS)[t](",")[H](",");var aQ=[];for(var a1=0,aR=aS[z];a1<aR;a1++){aQ[a1]=a1%2?a5(aS[a1-1],aS[a1],e).y:a5(aS[a1],aS[a1+1],e).x;}return aQ;}},O=ar(function(i,e,aK,aI,av,au,az,aw,aE){var aC=L(1-aE,3)*i+L(1-aE,2)*3*aE*aK+(1-aE)*3*aE*aE*av+L(aE,3)*az,aA=L(1-aE,3)*e+L(1-aE,2)*3*aE*aI+(1-aE)*3*aE*aE*au+L(aE,3)*aw,aG=i+2*aE*(aK-i)+aE*aE*(av-2*aK+i),aF=e+2*aE*(aI-e)+aE*aE*(au-2*aI+e),aJ=aK+2*aE*(av-aK)+aE*aE*(az-2*av+aK),aH=aI+2*aE*(au-aI)+aE*aE*(aw-2*au+aI),aD=(1-aE)*i+aE*aK,aB=(1-aE)*e+aE*aI,R=(1-aE)*av+aE*az,E=(1-aE)*au+aE*aw;return{x:aC,y:aA,m:{x:aG,y:aF},n:{x:aJ,y:aH},start:{x:aD,y:aB},end:{x:R,y:E}};}),ab=ar(function(i,e,R,E,aG,aF,aC,az){var aE=(aG-2*R+i)-(aC-2*aG+R),aB=2*(R-i)-2*(aG-R),ay=i-R,aw=(-aB+Math.sqrt(aB*aB-4*aE*ay))/2/aE,au=(-aB-Math.sqrt(aB*aB-4*aE*ay))/2/aE,aA=[e,az],aD=[i,aC],ax=O(i,e,R,E,aG,aF,aC,az,aw>0&&aw<1?aw:0),av=O(i,e,R,E,aG,aF,aC,az,au>0&&au<1?au:0);aD=aD[J](ax.x,av.x);aA=aA[J](ax.y,av.y);aE=(aF-2*E+e)-(az-2*aF+E);aB=2*(E-e)-2*(aF-E);ay=e-E;aw=(-aB+Math.sqrt(aB*aB-4*aE*ay))/2/aE;au=(-aB-Math.sqrt(aB*aB-4*aE*ay))/2/aE;ax=O(i,e,R,E,aG,aF,aC,az,aw>0&&aw<1?aw:0);av=O(i,e,R,E,aG,aF,aC,az,au>0&&au<1?au:0);aD=aD[J](ax.x,av.x);aA=aA[J](ax.y,av.y);return{min:{x:V[ao](0,aD),y:V[ao](0,aA)},max:{x:r[ao](0,aD),y:r[ao](0,aA)}};}),ag=ar(function(aF,aA){var au=I(aF),aB=aA&&I(aA),aC={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},aw=function(aG,aH){var i,aI;if(!aG){return["C",aH.x,aH.y,aH.x,aH.y,aH.x,aH.y];}!(aG[0] in {T:1,Q:1})&&(aH.qx=aH.qy=null);switch(aG[0]){case"M":aH.X=aG[1];aH.Y=aG[2];break;case"A":aG=["C"][J](B[ao](0,[aH.x,aH.y][J](aG.slice(1))));break;case"S":i=aH.x+(aH.x-(aH.bx||aH.x));aI=aH.y+(aH.y-(aH.by||aH.y));aG=["C",i,aI][J](aG.slice(1));break;case"T":aH.qx=aH.x+(aH.x-(aH.qx||aH.x));aH.qy=aH.y+(aH.y-(aH.qy||aH.y));aG=["C"][J](K(aH.x,aH.y,aH.qx,aH.qy,aG[1],aG[2]));break;case"Q":aH.qx=aG[1];aH.qy=aG[2];aG=["C"][J](K(aH.x,aH.y,aG[1],aG[2],aG[3],aG[4]));break;case"L":aG=["C"][J](k(aH.x,aH.y,aG[1],aG[2]));break;case"H":aG=["C"][J](k(aH.x,aH.y,aG[1],aH.y));break;case"V":aG=["C"][J](k(aH.x,aH.y,aH.x,aG[1]));break;case"Z":aG=["C"][J](k(aH.x,aH.y,aH.X,aH.Y));break;}return aG;},E=function(aG,aH){if(aG[aH][z]>7){aG[aH].shift();var aI=aG[aH];while(aI[z]){aG.splice(aH++,0,["C"][J](aI.splice(0,6)));}aG.splice(aH,1);aD=r(au[z],aB&&aB[z]||0);}},R=function(aK,aJ,aH,aG,aI){if(aK&&aJ&&aK[aI][0]=="M"&&aJ[aI][0]!="M"){aJ.splice(aI,0,["M",aG.x,aG.y]);aH.bx=0;aH.by=0;aH.x=aK[aI][1];aH.y=aK[aI][2];aD=r(au[z],aB&&aB[z]||0);}};for(var ay=0,aD=r(au[z],aB&&aB[z]||0);ay<aD;ay++){au[ay]=aw(au[ay],aC);E(au,ay);aB&&(aB[ay]=aw(aB[ay],e));aB&&E(aB,ay);R(au,aB,aC,e,ay);R(aB,au,e,aC,ay);var ax=au[ay],aE=aB&&aB[ay],av=ax[z],az=aB&&aE[z];aC.x=ax[av-2];aC.y=ax[av-1];aC.bx=b(ax[av-4])||aC.x;aC.by=b(ax[av-3])||aC.y;e.bx=aB&&(b(aE[az-4])||e.x);e.by=aB&&(b(aE[az-3])||e.y);e.x=aB&&aE[az-2];e.y=aB&&aE[az-1];}return aB?[au,aB]:au;},null,D),x=ar(function(az){var ay=[];for(var av=0,aA=az[z];av<aA;av++){var e={},ax=az[av].match(/^([^:]*):?([\d\.]*)/);e.color=l.getRGB(ax[1]);if(e.color.error){return null;}e.color=e.color.hex;ax[2]&&(e.offset=ax[2]+"%");ay[ae](e);}for(var av=1,aA=ay[z]-1;av<aA;av++){if(!ay[av].offset){var E=b(ay[av-1].offset||0),R=0;for(var au=av+1;au<aA;au++){if(ay[au].offset){R=ay[au].offset;break;}}if(!R){R=100;au=aA;}R=b(R);var aw=(R-E)/(au-av+1);for(;av<au;av++){E+=aw;ay[av].offset=E+"%";}}}return ay;}),X=function(){var E,i,au,R,e;if(l.is(arguments[0],"string")||l.is(arguments[0],"object")){if(l.is(arguments[0],"string")){E=m.getElementById(arguments[0]);}else{E=arguments[0];}if(E.tagName){if(arguments[1]==null){return{container:E,width:E.style.pixelWidth||E.offsetWidth,height:E.style.pixelHeight||E.offsetHeight};}else{return{container:E,width:arguments[1],height:arguments[2]};}}}else{if(l.is(arguments[0],ah)&&arguments[z]>3){return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]};}}},a=function(e,E){var i=this;for(var R in E){if(E[h](R)&&!(R in e)){switch(typeof E[R]){case"function":(function(au){e[R]=e===i?au:function(){return au[ao](i,arguments);};})(E[R]);break;case"object":e[R]=e[R]||{};a.call(this,e[R],E[R]);break;default:e[R]=E[R];break;}}}};if(l.svg){d.svgns="http://www.w3.org/2000/svg";d.xlink="http://www.w3.org/1999/xlink";var ai=function(e){return +e+(~~e===e)*0.5;};var N=function(av){for(var E=0,R=av[z];E<R;E++){if(av[E][0].toLowerCase()!="a"){for(var e=1,au=av[E][z];e<au;e++){av[E][e]=ai(av[E][e]);}}else{av[E][6]=ai(av[E][6]);av[E][7]=ai(av[E][7]);}}return av;};var P=function(E,e){if(e){for(var i in e){if(e[h](i)){E[f](i,e[i]);}}}else{return m.createElementNS(d.svgns,E);}};l[j]=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version;};var aq=function(e,R){var i=P("path");R.canvas&&R.canvas[c](i);var E=new s(i,R);E.type="path";W(E,{fill:"none",stroke:"#000",path:e});return E;};var af=function(R,aD,e){var aA="linear",ax=0.5,av=0.5,aF=R.style;aD=(aD+w)[Q](/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,function(aG,i,aH){aA="radial";if(i&&aH){ax=b(i);av=b(aH);if(L(ax-0.5,2)+L(av-0.5,2)>0.25){av=Math.sqrt(0.25-L(ax-0.5,2))+0.5;}}return w;});aD=aD[H](/\s*\-\s*/);if(aA=="linear"){var aw=aD.shift();aw=-b(aw);if(isNaN(aw)){return null;}var au=[0,0,Math.cos(aw*Math.PI/180),Math.sin(aw*Math.PI/180)],aC=1/(r(Math.abs(au[2]),Math.abs(au[3]))||1);au[2]*=aC;au[3]*=aC;if(au[2]<0){au[0]=-au[2];au[2]=0;}if(au[3]<0){au[1]=-au[3];au[3]=0;}}var az=x(aD);if(!az){return null;}var E=P(aA+"Gradient");E.id="r"+(l.idGenerator++)[j](36);aA=="radial"?P(E,{fx:ax,fy:av}):P(E,{x1:au[0],y1:au[1],x2:au[2],y2:au[3]});e.defs[c](E);for(var ay=0,aE=az[z];ay<aE;ay++){var aB=P("stop");P(aB,{offset:az[ay].offset?az[ay].offset:!ay?"0%":"100%","stop-color":az[ay].color||"#fff"});E[c](aB);}P(R,{fill:"url(#"+E.id+")",opacity:1,"fill-opacity":1});aF.fill=w;aF.opacity=1;aF.fillOpacity=1;return 1;};var C=function(i){var e=i.getBBox();P(i.pattern,{patternTransform:l.format("translate({0},{1})",e.x,e.y)});};var W=function(aB,aK){var aE={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},aG=aB.node,aC=aB.attrs,ay=aB.attr("rotation"),av=function(aR,aQ){aQ=aE[(aQ+w).toLowerCase()];if(aQ){var aO=aR.attrs["stroke-width"]||"1",aM={round:aO,square:aO,butt:0}[aR.attrs["stroke-linecap"]||aK["stroke-linecap"]]||0,aP=[];var aN=aQ[z];while(aN--){aP[aN]=aQ[aN]*aO+((aN%2)?1:-1)*aM;}P(aG,{"stroke-dasharray":aP[t](",")});}};b(ay)&&aB.rotate(0,true);for(var aF in aK){if(aK[h](aF)){if(!(aF in A)){continue;}var aD=aK[aF];aC[aF]=aD;switch(aF){case"href":case"title":case"target":var aI=aG.parentNode;if(aI.tagName.toLowerCase()!="a"){var R=P("a");aI.insertBefore(R,aG);R[c](aG);aI=R;}aI.setAttributeNS(aB.paper.xlink,aF,aD);break;case"clip-rect":var i=(aD+w)[H](at);if(i[z]==4){aB.clip&&aB.clip.parentNode.parentNode.removeChild(aB.clip.parentNode);var E=P("clipPath"),aH=P("rect");E.id="r"+(l.idGenerator++)[j](36);P(aH,{x:i[0],y:i[1],width:i[2],height:i[3]});E[c](aH);aB.paper.defs[c](E);P(aG,{"clip-path":"url(#"+E.id+")"});aB.clip=aH;}if(!aD){var aJ=m.getElementById(aG.getAttribute("clip-path")[Q](/(^url\(#|\)$)/g,w));aJ&&aJ.parentNode.removeChild(aJ);P(aG,{"clip-path":w});delete aB.clip;}break;case"path":if(aD&&aB.type=="path"){aC.path=N(I(aD));P(aG,{d:aC.path});}break;case"width":aG[f](aF,aD);if(aC.fx){aF="x";aD=aC.x;}else{break;}case"x":if(aC.fx){aD=-aC.x-(aC.width||0);}case"rx":if(aF=="rx"&&aB.type=="rect"){break;}case"cx":aG[f](aF,aD);aB.pattern&&C(aB);break;case"height":aG[f](aF,aD);if(aC.fy){aF="y";aD=aC.y;}else{break;}case"y":if(aC.fy){aD=-aC.y-(aC.height||0);}case"ry":if(aF=="ry"&&aB.type=="rect"){break;}case"cy":aG[f](aF,aD);aB.pattern&&C(aB);break;case"r":if(aB.type=="rect"){P(aG,{rx:aD,ry:aD});}else{aG[f](aF,aD);}break;case"src":if(aB.type=="image"){aG.setAttributeNS(aB.paper.xlink,"href",aD);}break;case"stroke-width":aG.style.strokeWidth=aD;aG[f](aF,aD);if(aC["stroke-dasharray"]){av(aB,aC["stroke-dasharray"]);}break;case"stroke-dasharray":av(aB,aD);break;case"rotation":ay=aD;aB.rotate(aD,true);break;case"translation":var aw=(aD+w)[H](at);aB.translate((+aw[0]+1||2)-1,(+aw[1]+1||2)-1);break;case"scale":var aw=(aD+w)[H](at);aB.scale(+aw[0]||1,+aw[1]||+aw[0]||1,+aw[2]||null,+aw[3]||null);break;case"fill":var au=(aD+w).match(/^url\(['"]?([^\)]+)['"]?\)$/i);if(au){var E=P("pattern"),aA=P("image");E.id="r"+(l.idGenerator++)[j](36);P(E,{x:0,y:0,patternUnits:"userSpaceOnUse"});P(aA,{x:0,y:0});aA.setAttributeNS(aB.paper.xlink,"href",au[1]);E[c](aA);var aL=m.createElement("img");aL.style.cssText="position:absolute;left:-9999em;top-9999em";aL.onload=function(){P(E,{width:this.offsetWidth,height:this.offsetHeight});P(aA,{width:this.offsetWidth,height:this.offsetHeight});m.body.removeChild(this);d.safari();};m.body[c](aL);aL.src=au[1];aB.paper.defs[c](E);aG.style.fill="url(#"+E.id+")";P(aG,{fill:"url(#"+E.id+")"});aB.pattern=E;aB.pattern&&C(aB);break;}if(!l.getRGB(aD).error){delete aK.gradient;delete aC.gradient;if(!l.is(aC.opacity,"undefined")&&l.is(aK.opacity,"undefined")){aG.style.opacity=aC.opacity;P(aG,{opacity:aC.opacity});}if(!l.is(aC["fill-opacity"],"undefined")&&l.is(aK["fill-opacity"],"undefined")){aG.style.fillOpacity=aC["fill-opacity"];P(aG,{"fill-opacity":aC["fill-opacity"]});}}else{if((aB.type in {circle:1,ellipse:1}||(aD+w).charAt(0)!="r")&&af(aG,aD,aB.paper)){aC.gradient=aD;aC.fill="none";break;}}case"stroke":aG.style[aF]=l.getRGB(aD).hex;aG[f](aF,l.getRGB(aD).hex);break;case"gradient":(aB.type in {circle:1,ellipse:1}||(aD+w).charAt(0)!="r")&&af(aG,aD,aB.paper);break;case"opacity":case"fill-opacity":if(aC.gradient){var e=m.getElementById(aG.getAttribute("fill")[Q](/^url\(#|\)$/g,w));if(e){var ax=e.getElementsByTagName("stop");ax[ax[z]-1][f]("stop-opacity",aD);}break;}default:aF=="font-size"&&(aD=u(aD,10)+"px");var az=aF[Q](/(\-.)/g,function(aM){return aM.substring(1).toUpperCase();});aG.style[az]=aD;aG[f](aF,aD);break;}}}am(aB,aK);u(ay,10)&&aB.rotate(ay,true);};var ac=1.2;var am=function(e,au){if(e.type!="text"||!("text" in au||"font" in au||"font-size" in au||"x" in au||"y" in au)){return;}var az=e.attrs,E=e.node,aB=E.firstChild?u(m.defaultView.getComputedStyle(E.firstChild,w).getPropertyValue("font-size"),10):10;if("text" in au){while(E.firstChild){E.removeChild(E.firstChild);}var R=(au.text+w)[H]("\n");for(var av=0,aA=R[z];av<aA;av++){var ax=P("tspan");av&&P(ax,{dy:aB*ac,x:az.x});ax[c](m.createTextNode(R[av]));E[c](ax);}}else{var R=E.getElementsByTagName("tspan");for(var av=0,aA=R[z];av<aA;av++){av&&P(R[av],{dy:aB*ac,x:az.x});}}P(E,{y:az.y});var aw=e.getBBox(),ay=az.y-(aw.y+aw.height/2);ay&&P(E,{y:az.y+ay});};var s=function(i,e){var R=0,E=0;this[0]=i;this.node=i;i.raphael=this;this.paper=e;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};};s[v].rotate=function(i,e,R){if(i==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][t](" ");}return this._.rt.deg;}var E=this.getBBox();i=(i+w)[H](at);if(i[z]-1){e=b(i[1]);R=b(i[2]);}i=b(i[0]);if(e!=null){this._.rt.deg=i;}else{this._.rt.deg+=i;}(R==null)&&(e=null);this._.rt.cx=e;this._.rt.cy=R;e=e==null?E.x+E.width/2:e;R=R==null?E.y+E.height/2:R;if(this._.rt.deg){this.transformations[0]=l.format("rotate({0} {1} {2})",this._.rt.deg,e,R);this.clip&&P(this.clip,{transform:l.format("rotate({0} {1} {2})",-this._.rt.deg,e,R)});}else{this.transformations[0]=w;this.clip&&P(this.clip,{transform:w});}P(this.node,{transform:this.transformations[t](" ")});return this;};s[v].hide=function(){this.node.style.display="none";return this;};s[v].show=function(){this.node.style.display="block";return this;};s[v].remove=function(){this.node.parentNode.removeChild(this.node);for(var e in this){delete this[e];}};s[v].getBBox=function(){if(this.type=="path"){return T(this.attrs.path);}if(this.node.style.display=="none"){this.show();var R=true;}var ax={};try{ax=this.node.getBBox();}catch(av){}finally{ax=ax||{};}if(this.type=="text"){ax={x:ax.x,y:Infinity,width:0,height:0};for(var E=0,au=this.node.getNumberOfChars();E<au;E++){var aw=this.node.getExtentOfChar(E);(aw.y<ax.y)&&(ax.y=aw.y);(aw.y+aw.height-ax.y>ax.height)&&(ax.height=aw.y+aw.height-ax.y);(aw.x+aw.width-ax.x>ax.width)&&(ax.width=aw.x+aw.width-ax.x);}}R&&this.hide();return ax;};s[v].attr=function(){if(arguments[z]==1&&l.is(arguments[0],"string")){if(arguments[0]=="translation"){return this.translate();}if(arguments[0]=="rotation"){return this.rotate();}if(arguments[0]=="scale"){return this.scale();}return this.attrs[arguments[0]];}if(arguments[z]==1&&l.is(arguments[0],"array")){var e={};for(var i in arguments[0]){if(arguments[0][h](i)){e[arguments[0][i]]=this.attrs[arguments[0][i]];}}return e;}if(arguments[z]==2){var E={};E[arguments[0]]=arguments[1];W(this,E);}else{if(arguments[z]==1&&l.is(arguments[0],"object")){W(this,arguments[0]);}}return this;};s[v].toFront=function(){this.node.parentNode[c](this.node);return this;};s[v].toBack=function(){if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);}return this;};s[v].insertAfter=function(e){if(e.node.nextSibling){e.node.parentNode.insertBefore(this.node,e.node.nextSibling);}else{e.node.parentNode[c](this.node);}return this;};s[v].insertBefore=function(e){var i=e.node;i.parentNode.insertBefore(this.node,i);return this;};var S=function(i,e,av,au){e=ai(e);av=ai(av);var R=P("circle");i.canvas&&i.canvas[c](R);var E=new s(R,i);E.attrs={cx:e,cy:av,r:au,fill:"none",stroke:"#000"};E.type="circle";P(R,E.attrs);return E;};var aa=function(E,e,ax,i,av,aw){e=ai(e);ax=ai(ax);var au=P("rect");E.canvas&&E.canvas[c](au);var R=new s(au,E);R.attrs={x:e,y:ax,width:i,height:av,r:aw||0,rx:aw||0,ry:aw||0,fill:"none",stroke:"#000"};R.type="rect";P(au,R.attrs);return R;};var n=function(i,e,aw,av,au){e=ai(e);aw=ai(aw);var R=P("ellipse");i.canvas&&i.canvas[c](R);var E=new s(R,i);E.attrs={cx:e,cy:aw,rx:av,ry:au,fill:"none",stroke:"#000"};E.type="ellipse";P(R,E.attrs);return E;};var y=function(E,aw,e,ax,i,av){var au=P("image");P(au,{x:e,y:ax,width:i,height:av,preserveAspectRatio:"none"});au.setAttributeNS(E.xlink,"href",aw);E.canvas&&E.canvas[c](au);var R=new s(au,E);R.attrs={x:e,y:ax,width:i,height:av,src:aw};R.type="image";return R;};var Z=function(i,e,av,au){var R=P("text");P(R,{x:e,y:av,"text-anchor":"middle"});i.canvas&&i.canvas[c](R);var E=new s(R,i);E.attrs={x:e,y:av,"text-anchor":"middle",text:au,font:A.font,stroke:"none",fill:"#000"};E.type="text";W(E,E.attrs);return E;};var U=function(i,e){this.width=i||this.width;this.height=e||this.height;this.canvas[f]("width",this.width);this.canvas[f]("height",this.height);return this;};var q=function(){var R=X[ao](null,arguments),E=R&&R.container,i=R.x,ax=R.y,au=R.width,e=R.height;if(!E){throw new Error("SVG container not found.");}d.canvas=P("svg");var aw=d.canvas;d.width=au||512;d.height=e||342;aw[f]("width",d.width);aw[f]("height",d.height);if(E==1){aw.style.cssText="position:absolute;left:"+i+"px;top:"+ax+"px";m.body[c](aw);}else{if(E.firstChild){E.insertBefore(aw,E.firstChild);}else{E[c](aw);}}E={canvas:aw};for(var av in d){if(d[h](av)){E[av]=d[av];}}a.call(E,E,l.fn);E.clear();E.raphael=l;return E;};d.clear=function(){var e=this.canvas;while(e.firstChild){e.removeChild(e.firstChild);}(this.desc=P("desc"))[c](m.createTextNode("Created with Rapha\u00ebl"));e[c](this.desc);e[c](this.defs=P("defs"));};d.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this){delete this[e];}};}if(l.vml){var M=function(aE){var aB=/[ahqtv]/ig,aw=I;(aE+w).match(aB)&&(aw=ag);aB=/[clmz]/g;if(aw==I&&!(aE+w).match(aB)){var E={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},au=/([clmz]),?([^clmz]*)/gi,av=/-?[^,\s-]+/g;var aA=(aE+w)[Q](au,function(aF,aH,i){var aG=[];i[Q](av,function(aI){aG[ae](ai(aI));});return E[aH]+aG;});return aA;}var aC=aw(aE),R,aA=[],e;for(var ay=0,aD=aC[z];ay<aD;ay++){R=aC[ay];e=(aC[ay][0]+w).toLowerCase();e=="z"&&(e="x");for(var ax=1,az=R[z];ax<az;ax++){e+=ai(R[ax])+(ax!=az-1?",":w);}aA[ae](e);}return aA[t](" ");};l[j]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+this.version;};var aq=function(e,av){var R=ap("group");R.style.cssText="position:absolute;left:0;top:0;width:"+av.width+"px;height:"+av.height+"px";R.coordsize=av.coordsize;R.coordorigin=av.coordorigin;var E=ap("shape"),i=E.style;i.width=av.width+"px";i.height=av.height+"px";E.coordsize=this.coordsize;E.coordorigin=this.coordorigin;R[c](E);var au=new s(E,R,av);au.isAbsolute=true;au.type="path";au.path=[];au.Path=w;e&&W(au,{fill:"none",stroke:"#000",path:e});av.canvas[c](R);return au;};var W=function(az,aD){az.attrs=az.attrs||{};var aB=az.node,aE=az.attrs,aw=aB.style,R,aI=az;for(var ax in aD){if(aD[h](ax)){aE[ax]=aD[ax];}}aD.href&&(aB.href=aD.href);aD.title&&(aB.title=aD.title);aD.target&&(aB.target=aD.target);if(aD.path&&az.type=="path"){aE.path=aD.path;aB.path=M(aE.path);}if(aD.rotation!=null){az.rotate(aD.rotation,true);}if(aD.translation){R=(aD.translation+w)[H](at);az.translate(R[0],R[1]);}if(aD.scale){R=(aD.scale+w)[H](at);az.scale(+R[0]||1,+R[1]||+R[0]||1,+R[2]||null,+R[3]||null);}if("clip-rect" in aD){var e=(aD["clip-rect"]+w)[H](at);if(e[z]==4){e[2]=+e[2]+(+e[0]);e[3]=+e[3]+(+e[1]);var ay=aB.clipRect||m.createElement("div"),aH=ay.style,av=aB.parentNode;aH.clip=l.format("rect({1}px {2}px {3}px {0}px)",e);if(!aB.clipRect){aH.position="absolute";aH.top=0;aH.left=0;aH.width=az.paper.width+"px";aH.height=az.paper.height+"px";av.parentNode.insertBefore(ay,av);ay[c](av);aB.clipRect=ay;}}if(!aD["clip-rect"]){aB.clipRect&&(aB.clipRect.style.clip=w);}}if(az.type=="image"&&aD.src){aB.src=aD.src;}if(az.type=="image"&&aD.opacity){aB.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(aD.opacity*100)+")";aw.filter=(aB.filterMatrix||w)+(aB.filterOpacity||w);}aD.font&&(aw.font=aD.font);aD["font-family"]&&(aw.fontFamily='"'+aD["font-family"][H](",")[0][Q](/^['"]+|['"]+$/g,w)+'"');aD["font-size"]&&(aw.fontSize=aD["font-size"]);aD["font-weight"]&&(aw.fontWeight=aD["font-weight"]);aD["font-style"]&&(aw.fontStyle=aD["font-style"]);if(aD.opacity!=null||aD["stroke-width"]!=null||aD.fill!=null||aD.stroke!=null||aD["stroke-width"]!=null||aD["stroke-opacity"]!=null||aD["fill-opacity"]!=null||aD["stroke-dasharray"]!=null||aD["stroke-miterlimit"]!=null||aD["stroke-linejoin"]!=null||aD["stroke-linecap"]!=null){aB=az.shape||aB;var aC=(aB.getElementsByTagName("fill")&&aB.getElementsByTagName("fill")[0]),aF=false;!aC&&(aF=aC=ap("fill"));if("fill-opacity" in aD||"opacity" in aD){var i=((+aE["fill-opacity"]+1||2)-1)*((+aE.opacity+1||2)-1);i<0&&(i=0);i>1&&(i=1);aC.opacity=i;}aD.fill&&(aC.on=true);if(aC.on==null||aD.fill=="none"){aC.on=false;}if(aC.on&&aD.fill){var E=aD.fill.match(/^url\(([^\)]+)\)$/i);if(E){aC.src=E[1];aC.type="tile";}else{aC.color=l.getRGB(aD.fill).hex;aC.src=w;aC.type="solid";if(l.getRGB(aD.fill).error&&(aI.type in {circle:1,ellipse:1}||(aD.fill+w).charAt(0)!="r")&&af(aI,aD.fill)){aE.fill="none";aE.gradient=aD.fill;}}}aF&&aB[c](aC);var au=(aB.getElementsByTagName("stroke")&&aB.getElementsByTagName("stroke")[0]),aG=false;!au&&(aG=au=ap("stroke"));if((aD.stroke&&aD.stroke!="none")||aD["stroke-width"]||aD["stroke-opacity"]!=null||aD["stroke-dasharray"]||aD["stroke-miterlimit"]||aD["stroke-linejoin"]||aD["stroke-linecap"]){au.on=true;}(aD.stroke=="none"||au.on==null||aD.stroke==0||aD["stroke-width"]==0)&&(au.on=false);au.on&&aD.stroke&&(au.color=l.getRGB(aD.stroke).hex);var i=((+aE["stroke-opacity"]+1||2)-1)*((+aE.opacity+1||2)-1);i<0&&(i=0);i>1&&(i=1);au.opacity=i;aD["stroke-linejoin"]&&(au.joinstyle=aD["stroke-linejoin"]||"miter");au.miterlimit=aD["stroke-miterlimit"]||8;aD["stroke-linecap"]&&(au.endcap={butt:"flat",square:"square",round:"round"}[aD["stroke-linecap"]]||"miter");aD["stroke-width"]&&(au.weight=(b(aD["stroke-width"])||1)*12/16);if(aD["stroke-dasharray"]){var aA={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};au.dashstyle=aA[aD["stroke-dasharray"]]||w;}aG&&aB[c](au);}if(aI.type=="text"){var aw=aI.paper.span.style;aE.font&&(aw.font=aE.font);aE["font-family"]&&(aw.fontFamily=aE["font-family"]);aE["font-size"]&&(aw.fontSize=aE["font-size"]);aE["font-weight"]&&(aw.fontWeight=aE["font-weight"]);aE["font-style"]&&(aw.fontStyle=aE["font-style"]);aI.node.string&&(aI.paper.span.innerHTML=(aI.node.string+w)[Q](/</g,"&#60;")[Q](/&/g,"&#38;")[Q](/\n/g,"<br>"));aI.W=aE.w=aI.paper.span.offsetWidth;aI.H=aE.h=aI.paper.span.offsetHeight;aI.X=aE.x;aI.Y=aE.y+ai(aI.H/2);switch(aE["text-anchor"]){case"start":aI.node.style["v-text-align"]="left";aI.bbx=ai(aI.W/2);break;case"end":aI.node.style["v-text-align"]="right";aI.bbx=-ai(aI.W/2);break;default:aI.node.style["v-text-align"]="center";break;}}};var af=function(e,ax){e.attrs=e.attrs||{};var ay=e.attrs,aA=e.node.getElementsByTagName("fill"),av="linear",aw=".5 .5";e.attrs.gradient=ax;ax=(ax+w)[Q](/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,function(aC,aD,i){av="radial";if(aD&&i){aD=b(aD);i=b(i);if(L(aD-0.5,2)+L(i-0.5,2)>0.25){i=Math.sqrt(0.25-L(aD-0.5,2))+0.5;}aw=aD+" "+i;}return w;});ax=ax[H](/\s*\-\s*/);if(av=="linear"){var E=ax.shift();E=-b(E);if(isNaN(E)){return null;}}var au=x(ax);if(!au){return null;}e=e.shape||e.node;aA=aA[0]||ap("fill");if(au[z]){aA.on=true;aA.method="none";aA.type=(av=="radial")?"gradientradial":"gradient";aA.color=au[0].color;aA.color2=au[au[z]-1].color;var aB=[];for(var R=0,az=au[z];R<az;R++){au[R].offset&&aB[ae](au[R].offset+" "+au[R].color);}if(aB[z]&&aA.colors){aA.colors.value=aB[t](",");}else{aA.colors.value="0% "+aA.color;}if(av=="radial"){aA.focus="100%";aA.focussize=aw;aA.focusposition=aw;}else{aA.angle=(270-E)%360;}}return 1;};var s=function(au,aw,e){var av=0,E=0,i=0,R=1;this[0]=au;this.node=au;au.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=aw;this.paper=e;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};};s[v].rotate=function(i,e,E){if(i==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][t](" ");}return this._.rt.deg;}i=(i+w)[H](at);if(i[z]-1){e=b(i[1]);E=b(i[2]);}i=b(i[0]);if(e!=null){this._.rt.deg=i;}else{this._.rt.deg+=i;}E==null&&(e=null);this._.rt.cx=e;this._.rt.cy=E;this.setBox(this.attrs,e,E);this.Group.style.rotation=this._.rt.deg;return this;};s[v].setBox=function(av,aw,au){var E=this.Group.style,ax=(this.shape&&this.shape.style)||this.node.style;av=av||{};for(var ay in av){if(av[h](ay)){this.attrs[ay]=av[ay];}}aw=aw||this._.rt.cx;au=au||this._.rt.cy;var aB=this.attrs,aE,aD,aF,aA;switch(this.type){case"circle":aE=aB.cx-aB.r;aD=aB.cy-aB.r;aF=aA=aB.r*2;break;case"ellipse":aE=aB.cx-aB.rx;aD=aB.cy-aB.ry;aF=aB.rx*2;aA=aB.ry*2;break;case"rect":case"image":aE=+aB.x;aD=+aB.y;aF=aB.width||0;aA=aB.height||0;break;case"text":this.textpath.v=["m",ai(aB.x),", ",ai(aB.y-2),"l",ai(aB.x)+1,", ",ai(aB.y-2)][t](w);aE=aB.x-ai(this.W/2);aD=aB.y-this.H/2;aF=this.W;aA=this.H;break;case"path":if(!this.attrs.path){aE=0;aD=0;aF=this.paper.width;aA=this.paper.height;}else{var az=T(this.attrs.path);aE=az.x;aD=az.y;aF=az.width;aA=az.height;}break;default:aE=0;aD=0;aF=this.paper.width;aA=this.paper.height;break;}aw=(aw==null)?aE+aF/2:aw;au=(au==null)?aD+aA/2:au;var R=aw-this.paper.width/2,aC=au-this.paper.height/2;if(this.type=="path"||this.type=="text"){(E.left!=R+"px")&&(E.left=R+"px");(E.top!=aC+"px")&&(E.top=aC+"px");this.X=this.type=="text"?aE:-R;this.Y=this.type=="text"?aD:-aC;this.W=aF;this.H=aA;(ax.left!=-R+"px")&&(ax.left=-R+"px");(ax.top!=-aC+"px")&&(ax.top=-aC+"px");}else{(E.left!=R+"px")&&(E.left=R+"px");(E.top!=aC+"px")&&(E.top=aC+"px");this.X=aE;this.Y=aD;this.W=aF;this.H=aA;(E.width!=this.paper.width+"px")&&(E.width=this.paper.width+"px");(E.height!=this.paper.height+"px")&&(E.height=this.paper.height+"px");(ax.left!=aE-R+"px")&&(ax.left=aE-R+"px");(ax.top!=aD-aC+"px")&&(ax.top=aD-aC+"px");(ax.width!=aF+"px")&&(ax.width=aF+"px");(ax.height!=aA+"px")&&(ax.height=aA+"px");var aG=(+av.r||0)/(V(aF,aA));if(this.type=="rect"&&this.arcsize!=aG&&(aG||this.arcsize)){var e=ap(aG?"roundrect":"rect");e.arcsize=aG;this.Group[c](e);this.node.parentNode.removeChild(this.node);this.node=e;this.arcsize=aG;W(this,this.attrs);this.setBox(this.attrs);}}};s[v].hide=function(){this.Group.style.display="none";return this;};s[v].show=function(){this.Group.style.display="block";return this;};s[v].getBBox=function(){if(this.type=="path"){return T(this.attrs.path);}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H};};s[v].remove=function(){this.node.parentNode.removeChild(this[0]);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this){delete this[e];}};s[v].attr=function(){if(arguments[z]==1&&l.is(arguments[0],"string")){if(arguments[0]=="translation"){return this.translate();}if(arguments[0]=="rotation"){return this.rotate();}if(arguments[0]=="scale"){return this.scale();}return this.attrs[arguments[0]];}if(this.attrs&&arguments[z]==1&&l.is(arguments[0],"array")){var e={};for(var E=0,R=arguments[0][z];E<R;E++){e[arguments[0][E]]=this.attrs[arguments[0][E]];}return e;}var au;if(arguments[z]==2){au={};au[arguments[0]]=arguments[1];}if(arguments[z]==1&&l.is(arguments[0],"object")){au=arguments[0];}if(au){if(au.gradient&&(this.type in {circle:1,ellipse:1}||(au.gradient+w).charAt(0)!="r")){af(this,au.gradient);}if(au.text&&this.type=="text"){this.node.string=au.text;}W(this,au);this.setBox(this.attrs);}return this;};s[v].toFront=function(){this.Group.parentNode[c](this.Group);return this;};s[v].toBack=function(){if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);}return this;};s[v].insertAfter=function(e){if(e.Group.nextSibling){e.Group.parentNode.insertBefore(this.Group,e.Group.nextSibling);}else{e.Group.parentNode[c](this.Group);}return this;};s[v].insertBefore=function(e){e.Group.parentNode.insertBefore(this.Group,e.Group);return this;};var S=function(i,e,ax,av){var au=ap("group"),aw=ap("oval"),E=aw.style;au.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";au.coordsize=i.coordsize;au.coordorigin=i.coordorigin;au[c](aw);var R=new s(aw,au,i);R.type="circle";W(R,{stroke:"#000",fill:"none"});R.attrs.cx=e;R.attrs.cy=ax;R.attrs.r=av;R.setBox({x:e-av,y:ax-av,width:av*2,height:av*2});i.canvas[c](au);return R;};var aa=function(i,ax,aw,ay,R,e){var au=ap("group"),E=ap(e?"roundrect":"rect"),az=(+e||0)/(V(ay,R));E.arcsize=az;au.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";au.coordsize=i.coordsize;au.coordorigin=i.coordorigin;au[c](E);var av=new s(E,au,i);av.type="rect";W(av,{stroke:"#000"});av.arcsize=az;av.setBox({x:ax,y:aw,width:ay,height:R,r:+e});i.canvas[c](au);return av;};var n=function(e,ay,ax,E,i){var au=ap("group"),R=ap("oval"),aw=R.style;au.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";au.coordsize=e.coordsize;au.coordorigin=e.coordorigin;au[c](R);var av=new s(R,au,e);av.type="ellipse";W(av,{stroke:"#000"});av.attrs.cx=ay;av.attrs.cy=ax;av.attrs.rx=E;av.attrs.ry=i;av.setBox({x:ay-E,y:ax-i,width:E*2,height:i*2});e.canvas[c](au);return av;};var y=function(i,e,ay,ax,az,R){var au=ap("group"),E=ap("image"),aw=E.style;au.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";au.coordsize=i.coordsize;au.coordorigin=i.coordorigin;E.src=e;au[c](E);var av=new s(E,au,i);av.type="image";av.attrs.src=e;av.attrs.x=ay;av.attrs.y=ax;av.attrs.w=az;av.attrs.h=R;av.setBox({x:ay,y:ax,width:az,height:R});i.canvas[c](au);return av;};var Z=function(i,ay,ax,az){var au=ap("group"),R=ap("shape"),aw=R.style,aA=ap("path"),e=aA.style,E=ap("textpath");au.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";au.coordsize=i.coordsize;au.coordorigin=i.coordorigin;aA.v=l.format("m{0},{1}l{2},{1}",ai(ay),ai(ax),ai(ay)+1);aA.textpathok=true;aw.width=i.width;aw.height=i.height;E.string=az;E.on=true;R[c](E);R[c](aA);au[c](R);var av=new s(E,au,i);av.shape=R;av.textpath=aA;av.type="text";av.attrs.text=az;av.attrs.x=ay;av.attrs.y=ax;av.attrs.w=1;av.attrs.h=1;W(av,{font:A.font,stroke:"none",fill:"#000"});av.setBox();i.canvas[c](au);return av;};var U=function(E,e){var i=this.canvas.style;this.width=b(E||this.width);this.height=b(e||this.height);i.width=this.width+"px";i.height=this.height+"px";i.clip="rect(0 "+this.width+"px "+this.height+"px 0)";this.coordsize=this.width+" "+this.height;return this;};m.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!m.namespaces.rvml&&m.namespaces.add("rvml","urn:schemas-microsoft-com:vml");var ap=function(e){return m.createElement("<rvml:"+e+' class="rvml">');};}catch(an){var ap=function(e){return m.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}var q=function(){var R=X[ao](null,arguments),i=R.container,az=R.height,aA,E=R.width,ay=R.x,ax=R.y;if(!i){throw new Error("VML container not found.");}var av={},aw=av.canvas=m.createElement("div"),au=aw.style;E=b(E)||512;az=b(az)||342;av.width=E;av.height=az;av.coordsize=E+" "+az;av.coordorigin="0 0";av.span=m.createElement("span");av.span.style.cssText="position:absolute;left:-9999px;top:-9999px;padding:0;margin:0;line-height:1;display:inline;";aw[c](av.span);au.cssText=l.format("width:{0}px;height:{1}px;position:absolute;clip:rect(0 {0}px {1}px 0)",E,az);if(i==1){m.body[c](aw);au.left=ay+"px";au.top=ax+"px";i={style:{width:E,height:az}};}else{i.style.width=E;i.style.height=az;if(i.firstChild){i.insertBefore(aw,i.firstChild);}else{i[c](aw);}}for(var e in d){if(d[h](e)){av[e]=d[e];}}a.call(av,av,l.fn);av.clear=function(){while(aw.firstChild){aw.removeChild(aw.firstChild);}};av.raphael=l;return av;};d.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var e in this){delete this[e];}};}if({"Apple Computer, Inc.":1,"Google Inc.":1}[navigator.vendor]){d.safari=function(){var e=this.rect(-99,-99,this.width+99,this.height+99);setTimeout(function(){e.remove();});};}else{d.safari=function(){};}var o=(function(){if(m.addEventListener){return function(au,E,i,e){var R=function(av){return i.call(e,av);};au.addEventListener(E,R,false);return function(){au.removeEventListener(E,R,false);return true;};};}else{if(m.attachEvent){return function(av,R,E,i){var au=function(aw){return E.call(i,aw||ad.event);};av.attachEvent("on"+R,au);var e=function(){av.detachEvent("on"+R,au);return true;};if(R=="mouseover"){av.attachEvent("onmouseenter",au);return function(){av.detachEvent("onmouseenter",au);return e();};}else{if(R=="mouseout"){av.attachEvent("onmouseleave",au);return function(){av.detachEvent("onmouseleave",au);return e();};}}return e;};}}})();for(var ak=G[z];ak--;){(function(e){s[v][e]=function(i){if(l.is(i,"function")){this.events=this.events||{};this.events[e]=this.events[e]||{};this.events[e][i]=this.events[e][i]||[];this.events[e][i][ae](o(this.shape||this.node,e,i,this));}return this;};s[v]["un"+e]=function(i){this.events&&this.events[e]&&this.events[e][i]&&this.events[e][i][z]&&this.events[e][i].shift()()&&!this.events[e][i][z]&&delete this.events[e][i];};})(G[ak]);}d.circle=function(e,E,i){return S(this,e||0,E||0,i||0);};d.rect=function(e,au,i,E,R){return aa(this,e||0,au||0,i||0,E||0,R||0);};d.ellipse=function(e,R,E,i){return n(this,e||0,R||0,E||0,i||0);};d.path=function(e){e&&!l.is(e,"string")&&!l.is(e[0],"array")&&(e+=w);return aq(l.format[ao](l,arguments),this);};d.image=function(R,e,au,i,E){return y(this,R||"about:blank",e||0,au||0,i||0,E||0);};d.text=function(e,E,i){return Z(this,e||0,E||0,i||w);};d.set=function(e){arguments[z]>1&&(e=Array[v].splice.call(arguments,0,arguments[z]));return new p(e);};d.setSize=U;s[v].stop=function(){clearTimeout(this.animation_in_progress);return this;};s[v].scale=function(aE,aD,R,E){if(aE==null&&aD==null){return{x:this._.sx,y:this._.sy,toString:function(){return this.x+" "+this.y;}};}aD=aD||aE;!+aD&&(aD=aE);var aI,aG,aH,aF,aU=this.attrs;if(aE!=0){var aB=this.getBBox(),ay=aB.x+aB.width/2,av=aB.y+aB.height/2,aT=aE/this._.sx,aS=aD/this._.sy;R=(+R||R==0)?R:ay;E=(+E||E==0)?E:av;var aA=~~(aE/Math.abs(aE)),ax=~~(aD/Math.abs(aD)),aL=this.node.style,aW=R+(ay-R)*aA*aT,aV=E+(av-E)*ax*aS;switch(this.type){case"rect":case"image":var az=aU.width*aA*aT,aK=aU.height*ax*aS,aC=aU.r*V(aT,aS),aw=aW-az/2,au=aV-aK/2;this.attr({width:az,height:aK,x:aw,y:au,r:aC});break;case"circle":case"ellipse":this.attr({rx:aU.rx*aT,ry:aU.ry*aS,r:aU.r*V(aT,aS),cx:aW,cy:aV});break;case"path":var aN=g(aU.path),aO=true;for(var aQ=0,aJ=aN[z];aQ<aJ;aQ++){var aM=aN[aQ];if(aM[0].toUpperCase()=="M"&&aO){continue;}else{aO=false;}if(l.svg&&aM[0].toUpperCase()=="A"){aM[aN[aQ][z]-2]*=aT;aM[aN[aQ][z]-1]*=aS;aM[1]*=aT;aM[2]*=aS;aM[5]=+(aA+ax?!!+aM[5]:!+aM[5]);}else{for(var aP=1,aR=aM[z];aP<aR;aP++){aM[aP]*=(aP%2)?aT:aS;}}}var e=T(aN),aI=aW-e.x-e.width/2,aG=aV-e.y-e.height/2;aN[0][1]+=aI;aN[0][2]+=aG;this.attr({path:aN});break;}if(this.type in {text:1,image:1}&&(aA!=1||ax!=1)){if(this.transformations){this.transformations[2]="scale("[J](aA,",",ax,")");this.node[f]("transform",this.transformations[t](" "));aI=(aA==-1)?-aU.x-(az||0):aU.x;aG=(ax==-1)?-aU.y-(aK||0):aU.y;this.attr({x:aI,y:aG});aU.fx=aA-1;aU.fy=ax-1;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[J](aA,", M12=0, M21=0, M22=",ax,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");aL.filter=(this.node.filterMatrix||w)+(this.node.filterOpacity||w);}}else{if(this.transformations){this.transformations[2]=w;this.node[f]("transform",this.transformations[t](" "));aU.fx=0;aU.fy=0;}else{this.node.filterMatrix=w;aL.filter=(this.node.filterMatrix||w)+(this.node.filterOpacity||w);}}aU.scale=[aE,aD,R,E][t](" ");this._.sx=aE;this._.sy=aD;}return this;};l.easing_formulas={linear:function(e){return e;},"<":function(e){return L(e,3);},">":function(e){return L(e-1,3)+1;},"<>":function(e){e=e*2;if(e<1){return L(e,3)/2;}e-=2;return(L(e,3)+2)/2;},backIn:function(i){var e=1.70158;return i*i*((e+1)*i-e);},backOut:function(i){i=i-1;var e=1.70158;return i*i*((e+1)*i+e)+1;},elastic:function(E){if(E==0||E==1){return E;}var i=0.3,e=i/4;return L(2,-10*E)*Math.sin((E-e)*(2*Math.PI)/i)+1;},bounce:function(R){var i=7.5625,E=2.75,e;if(R<(1/E)){e=i*R*R;}else{if(R<(2/E)){R-=(1.5/E);e=i*R*R+0.75;}else{if(R<(2.5/E)){R-=(2.25/E);e=i*R*R+0.9375;}else{R-=(2.625/E);e=i*R*R+0.984375;}}}return e;}};s[v].animate=function(aM,aD,aC,au){clearTimeout(this.animation_in_progress);if(l.is(aC,"function")||!aC){au=aC||null;}var aG={},E={},aA={},az={x:0,y:0};for(var aE in aM){if(aM[h](aE)){if(aE in F){aG[aE]=this.attr(aE);(aG[aE]==null)&&(aG[aE]=A[aE]);E[aE]=aM[aE];switch(F[aE]){case"number":aA[aE]=(E[aE]-aG[aE])/aD;break;case"colour":aG[aE]=l.getRGB(aG[aE]);var aF=l.getRGB(E[aE]);aA[aE]={r:(aF.r-aG[aE].r)/aD,g:(aF.g-aG[aE].g)/aD,b:(aF.b-aG[aE].b)/aD};break;case"path":var av=ag(aG[aE],E[aE]);aG[aE]=av[0];E[aE]=av[1];aA[aE]=[];for(var aI=0,ay=aG[aE][z];aI<ay;aI++){aA[aE][aI]=[0];for(var aH=1,aK=aG[aE][aI][z];aH<aK;aH++){aA[aE][aI][aH]=(E[aE][aI][aH]-aG[aE][aI][aH])/aD;}}break;case"csv":var e=(aM[aE]+w)[H](at),ax=(aG[aE]+w)[H](at);switch(aE){case"translation":aG[aE]=[0,0];aA[aE]=[e[0]/aD,e[1]/aD];break;case"rotation":aG[aE]=(ax[1]==e[1]&&ax[2]==e[2])?ax:[0,e[1],e[2]];aA[aE]=[(e[0]-aG[aE][0])/aD,0,0];break;case"scale":aM[aE]=e;aG[aE]=(aG[aE]+w)[H](at);aA[aE]=[(e[0]-aG[aE][0])/aD,(e[1]-aG[aE][1])/aD,0,0];break;case"clip-rect":aG[aE]=(aG[aE]+w)[H](at);aA[aE]=[];var aI=4;while(aI--){aA[aE][aI]=(e[aI]-aG[aE][aI])/aD;}break;}E[aE]=e;}}}}var R=+new Date,aB=0,aL=function(i){return i>255?255:i;},aw=this;(function aJ(){var aO=new Date-R,aW={},aN;if(aO<aD){var aU=l.easing_formulas[aC]?l.easing_formulas[aC](aO/aD):aO/aD;for(var aS in aG){if(aG[h](aS)){switch(F[aS]){case"number":aN=+aG[aS]+aU*aD*aA[aS];break;case"colour":aN="rgb("+[aL(ai(aG[aS].r+aU*aD*aA[aS].r)),aL(ai(aG[aS].g+aU*aD*aA[aS].g)),aL(ai(aG[aS].b+aU*aD*aA[aS].b))][t](",")+")";break;case"path":aN=[];for(var aQ=0,aX=aG[aS][z];aQ<aX;aQ++){aN[aQ]=[aG[aS][aQ][0]];for(var aP=1,aR=aG[aS][aQ][z];aP<aR;aP++){aN[aQ][aP]=+aG[aS][aQ][aP]+aU*aD*aA[aS][aQ][aP];}aN[aQ]=aN[aQ][t](" ");}aN=aN[t](" ");break;case"csv":switch(aS){case"translation":var aV=aA[aS][0]*(aO-aB),aT=aA[aS][1]*(aO-aB);az.x+=aV;az.y+=aT;aN=aV+" "+aT;break;case"rotation":aN=+aG[aS][0]+aU*aD*aA[aS][0];aG[aS][1]&&(aN+=","+aG[aS][1]+","+aG[aS][2]);break;case"scale":aN=[+aG[aS][0]+aU*aD*aA[aS][0],+aG[aS][1]+aU*aD*aA[aS][1],(2 in aM[aS]?aM[aS][2]:w),(3 in aM[aS]?aM[aS][3]:w)][t](" ");break;case"clip-rect":aN=[];var aQ=4;while(aQ--){aN[aQ]=+aG[aS][aQ]+aU*aD*aA[aS][aQ];}break;}break;}aW[aS]=aN+w;}}aw.attr(aW);aw.animation_in_progress=setTimeout(aJ);l.svg&&d.safari();}else{(az.x||az.y)&&aw.translate(-az.x,-az.y);aM.scale&&(aM.scale=aM.scale+w);aw.attr(aM);clearTimeout(aw.animation_in_progress);l.svg&&d.safari();(l.is(au,"function"))&&au.call(aw);}aB=aO;})();return this;};s[v].translate=function(e,E){if(e==null){return{x:this._.tx,y:this._.ty};}this._.tx+=+e;this._.ty+=+E;switch(this.type){case"circle":case"ellipse":this.attr({cx:+e+this.attrs.cx,cy:+E+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+e+this.attrs.x,y:+E+this.attrs.y});break;case"path":var i=g(this.attrs.path);i[0][1]+=+e;i[0][2]+=+E;this.attr({path:i});break;}return this;};s[v][j]=function(){return"Rapha\u00ebl\u2019s object";};var p=function(e){this.items=[];this[z]=0;if(e){for(var E=0,R=e[z];E<R;E++){if(e[E]&&(e[E].constructor==s||e[E].constructor==p)){this[this.items[z]]=this.items[this.items[z]]=e[E];this[z]++;}}}};p[v][ae]=function(){var au,e;for(var E=0,R=arguments[z];E<R;E++){au=arguments[E];if(au&&(au.constructor==s||au.constructor==p)){e=this.items[z];this[e]=this.items[e]=au;this[z]++;}}return this;};p[v].pop=function(){delete this[this[z]--];return this.items.pop();};for(var al in s[v]){if(s[v][h](al)){p[v][al]=(function(e){return function(){for(var E=0,R=this.items[z];E<R;E++){this.items[E][e][ao](this.items[E],arguments);}return this;};})(al);}}p[v].attr=function(E,aw){if(E&&l.is(E,"array")&&l.is(E[0],"object")){for(var e=0,av=E[z];e<av;e++){this.items[e].attr(E[e]);}}else{for(var R=0,au=this.items[z];R<au;R++){this.items[R].attr[ao](this.items[R],arguments);}}return this;};p[v].animate=function(av,E,ay,ax){if(l.is(ay,"function")||!ay){ax=ay||null;}var e=this.items[z],R=e,aw=this;if(ax){var au=function(){!--e&&ax.call(aw);};while(R--){this.items[R].animate(av,E,ay||au,au);}}else{while(R--){this.items[R].animate(av,E,ay);}}return this;};p[v].getBBox=function(){var e=[],aw=[],E=[],au=[];for(var R=this.items[z];R--;){var av=this.items[R].getBBox();e[ae](av.x);aw[ae](av.y);E[ae](av.x+av.width);au[ae](av.y+av.height);}e=V[ao](0,e);aw=V[ao](0,aw);return{x:e,y:aw,width:r[ao](0,E)-e,height:r[ao](0,au)-aw};};l.registerFont=function(i){if(!i.face){return i;}this.fonts=this.fonts||{};var R={w:i.w,face:{},glyphs:{}},E=i.face["font-family"];for(var aw in i.face){if(i.face[h](aw)){R.face[aw]=i.face[aw];}}if(this.fonts[E]){this.fonts[E][ae](R);}else{this.fonts[E]=[R];}if(!i.svg){R.face["units-per-em"]=u(i.face["units-per-em"],10);for(var au in i.glyphs){if(i.glyphs[h](au)){var av=i.glyphs[au];R.glyphs[au]={w:av.w,k:{},d:av.d&&"M"+av.d[Q](/[mlcxtrv]/g,function(ax){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[ax]||"M";})+"z"};if(av.k){for(var e in av.k){if(av[h](e)){R.glyphs[au].k[e]=av.k[e];}}}}}}return i;};d.getFont=function(ay,az,E,au){au=au||"normal";E=E||"normal";az=+az||{normal:400,bold:700,lighter:300,bolder:800}[az]||400;var av=l.fonts[ay];if(!av){var R=new RegExp("(^|\\s)"+ay[Q](/[^\w\d\s+!~.:_-]/g,w)+"(\\s|$)","i");for(var e in l.fonts){if(l.fonts[h](e)){if(R.test(e)){av=l.fonts[e];break;}}}}var aw;if(av){for(var ax=0,aA=av[z];ax<aA;ax++){aw=av[ax];if(aw.face["font-weight"]==az&&(aw.face["font-style"]==E||!aw.face["font-style"])&&aw.face["font-stretch"]==au){break;}}}return aw;};d.print=function(aA,az,ax,E,aE){var av=this.set(),ay=(ax+w)[H](w),e=0,aD=w,au;l.is(E,"string")&&(E=this.getFont(E));if(E){au=(aE||16)/E.face["units-per-em"];for(var aw=0,aB=ay[z];aw<aB;aw++){var R=aw&&E.glyphs[ay[aw-1]]||{},aC=E.glyphs[ay[aw]];e+=aw?(R.w||E.w)+(R.k&&R.k[ay[aw]]||0):0;aC&&aC.d&&av[ae](this.path(aC.d).attr({fill:"#000",stroke:"none",translation:[e,0]}));}av.scale(au,au,0,az).translate(aA,(aE||16)/2);}return av;};l.format=function(i){var e=l.is(arguments[1],"array")?[0][J](arguments[1]):arguments;i&&l.is(i,"string")&&e[z]-1&&(i=i[Q](/\{(\d+)\}/g,function(R,E){return e[++E]==null?w:e[E];}));return i||w;};l.ninja=function(){var E=ad.Raphael,i;if(aj.was){ad.Raphael=aj.is;}else{try{delete ad.Raphael;}catch(R){ad.Raphael=i;}}return E;};l.el=s[v];return l;})();
\ No newline at end of file
+window.Raphael=(function(){var a=/[, ]+/,z=document,ab=window,h={was:"Raphael" in ab,is:ab.Raphael},Y=function(){if(Y.is(arguments[0],"array")){var e=arguments[0],E=p[ax](Y,e.splice(0,3+Y.is(e[0],W))),aA=E.set();for(var S=0,aB=e[j];S<aB;S++){var R=e[S]||{};({circle:1,rect:1,path:1,ellipse:1,text:1,image:1}[F](R.type))&&aA[c](E[R.type]().attr(R));}return aA;}return p[ax](Y,arguments);},ar={},u=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup"],aa="",X=" ",F="hasOwnProperty",az="prototype",o="setAttribute",ao="appendChild",ax="apply",j="length",ae="join",r="split",au="concat",c="push",J=parseFloat,v=parseInt,ap=Math.pow,al=Math.min,d=Math.max,C=Math.round,av=/^(?=[\da-f]$)/,W="number",af="toString",g={"clip-rect":"0 0 10e9 10e9",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},L={"clip-rect":"csv",cx:W,cy:W,fill:"colour","fill-opacity":W,"font-size":W,height:W,opacity:W,path:"path",r:W,rotation:"csv",rx:W,ry:W,scale:"csv",stroke:"colour","stroke-opacity":W,"stroke-width":W,translation:"csv",width:W,x:W,y:W},aq="replace";Y.version="1.2";Y.type=(ab.SVGAngle||z.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");Y.svg=!(Y.vml=Y.type=="VML");Y._id=0;Y._oid=0;Y.fn={};Y.is=function(i,e){e=(e+aa).toLowerCase();return((e=="object"||e=="undefined")&&typeof i==e)||(i==null&&e=="null")||Object[az][af].call(i)[aq](/^\[object\s+|\]$/gi,aa).toLowerCase()==e;};Y.setWindow=function(e){ab=e;z=ab.document;};var ah=function(e){if(Y.vml){ah=V(function(S){var aA;try{var i=new ActiveXObject("htmlfile");i.write("<body>");i.close();aA=i.body;}catch(aC){aA=createPopup().document.body;}var R=aA.createTextRange();aA.style.color=S;var aB=R.queryCommandValue("ForeColor");aB=((aB&255)<<16)|(aB&65280)|((aB&16711680)>>>16);return"#"+("000000"+aB[af](16)).slice(-6);});}else{var E=z.createElement("i");E.className="Rapha\u00ebl colour picker";E.style.cssText="display:none";z.body[ao](E);ah=V(function(i){E.style.color=i;return z.defaultView.getComputedStyle(E,aa).getPropertyValue("color");});}return ah(e);};Y.hsb2rgb=V(function(aE,aC,aI){if(Y.is(aE,"object")&&"h" in aE&&"s" in aE&&"b" in aE){aI=aE.b;aC=aE.s;aE=aE.h;}var S,aA,aJ;if(aI==0){return{r:0,g:0,b:0,hex:"#000"};}if(aE>1||aC>1||aI>1){aE/=255;aC/=255;aI/=255;}var aB=~~(aE*6),aF=(aE*6)-aB,R=aI*(1-aC),E=aI*(1-(aC*aF)),aK=aI*(1-(aC*(1-aF)));S=[aI,E,R,R,aK,aI,aI][aB];aA=[aK,aI,aI,E,R,R,aK][aB];aJ=[R,R,aK,aI,aI,E,R][aB];S*=255;aA*=255;aJ*=255;var aG={r:S,g:aA,b:aJ},e=(~~S)[af](16),aD=(~~aA)[af](16),aH=(~~aJ)[af](16);e=e[aq](av,"0");aD=aD[aq](av,"0");aH=aH[aq](av,"0");aG.hex="#"+e+aD+aH;return aG;},Y);Y.rgb2hsb=V(function(e,i,aC){if(Y.is(e,"object")&&"r" in e&&"g" in e&&"b" in e){aC=e.b;i=e.g;e=e.r;}if(Y.is(e,"string")){var aE=Y.getRGB(e);e=aE.r;i=aE.g;aC=aE.b;}if(e>1||i>1||aC>1){e/=255;i/=255;aC/=255;}var aB=d(e,i,aC),E=al(e,i,aC),S,R,aA=aB;if(E==aB){return{h:0,s:0,b:aB};}else{var aD=(aB-E);R=aD/aB;if(e==aB){S=(i-aC)/aD;}else{if(i==aB){S=2+((aC-e)/aD);}else{S=4+((e-i)/aD);}}S/=6;S<0&&S++;S>1&&S--;}return{h:S,s:R,b:aA};},Y);Y._path2string=function(){var R=aa,aB;for(var E=0,S=this[j];E<S;E++){for(var e=0,aA=this[E][j];e<aA;e++){R+=this[E][e];e&&e!=aA-1&&(R+=",");}E!=S-1&&(R+=X);}return R[aq](/,(?=-)/g,aa);};function V(R,i,e){function E(){var S=Array[az].splice.call(arguments,0,arguments[j]),aB=S[ae]("\u25ba"),aA=E.cache=E.cache||{},aC=E.count=E.count||[];if(aA[F](aB)){return e?e(aA[aB]):aA[aB];}aC[j]>=1000&&delete aA[aC.shift()];aC[c](aB);aA[aB]=R[ax](i,S);return e?e(aA[aB]):aA[aB];}return E;}Y.getRGB=V(function(e){if(!e||!!((e+aa).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1};}e=e+aa;if(e=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}!(({hs:1,rg:1}[F](e.substring(0,2))))&&(e=ah(e));var aA,E,R,aD,aB=e.match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i);if(aB){if(aB[2]){aD=v(aB[2].substring(5),16);R=v(aB[2].substring(3,5),16);E=v(aB[2].substring(1,3),16);}if(aB[3]){aD=v(aB[3].substring(3)+aB[3].substring(3),16);R=v(aB[3].substring(2,3)+aB[3].substring(2,3),16);E=v(aB[3].substring(1,2)+aB[3].substring(1,2),16);}if(aB[4]){aB=aB[4][r](/\s*,\s*/);E=J(aB[0]);R=J(aB[1]);aD=J(aB[2]);}if(aB[5]){aB=aB[5][r](/\s*,\s*/);E=J(aB[0])*2.55;R=J(aB[1])*2.55;aD=J(aB[2])*2.55;}if(aB[6]){aB=aB[6][r](/\s*,\s*/);E=J(aB[0]);R=J(aB[1]);aD=J(aB[2]);return Y.hsb2rgb(E,R,aD);}if(aB[7]){aB=aB[7][r](/\s*,\s*/);E=J(aB[0])*2.55;R=J(aB[1])*2.55;aD=J(aB[2])*2.55;return Y.hsb2rgb(E,R,aD);}aB={r:E,g:R,b:aD};var i=(~~E)[af](16),S=(~~R)[af](16),aC=(~~aD)[af](16);i=i[aq](av,"0");S=S[aq](av,"0");aC=aC[aq](av,"0");aB.hex="#"+i+S+aC;return aB;}return{r:-1,g:-1,b:-1,hex:"none",error:1};},Y);Y.getColor=function(i){var E=this.getColor.start=this.getColor.start||{h:0,s:1,b:i||0.75},e=this.hsb2rgb(E.h,E.s,E.b);E.h+=0.075;if(E.h>1){E.h=0;E.s-=0.2;E.s<=0&&(this.getColor.start={h:0,s:1,b:E.b});}return e.hex;};Y.getColor.reset=function(){delete this.start;};Y.parsePathString=V(function(e){if(!e){return null;}var E={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];if(Y.is(e,"array")&&Y.is(e[0],"array")){i=ac(e);}if(!i[j]){(e+aa)[aq](/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(S,R,aC){var aB=[],aA=R.toLowerCase();aC[aq](/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(aE,aD){aD&&aB[c](+aD);});while(aB[j]>=E[aA]){i[c]([R][au](aB.splice(0,E[aA])));if(!E[aA]){break;}}});}i[af]=Y._path2string;return i;});var H=V(function(aF){if(!aF){return{x:0,y:0,width:0,height:0};}aF=w(aF);var aC=0,aB=0,R=[],E=[];for(var S=0,aE=aF[j];S<aE;S++){if(aF[S][0]=="M"){aC=aF[S][1];aB=aF[S][2];R[c](aC);E[c](aB);}else{var aA=ag(aC,aB,aF[S][1],aF[S][2],aF[S][3],aF[S][4],aF[S][5],aF[S][6]);R=R[au](aA.min.x,aA.max.x);E=E[au](aA.min.y,aA.max.y);}}var e=al[ax](0,R),aD=al[ax](0,E);return{x:e,y:aD,width:d[ax](0,R)-e,height:d[ax](0,E)-aD};}),ac=function(aB){var R=[];if(!Y.is(aB,"array")||!Y.is(aB&&aB[0],"array")){aB=Y.parsePathString(aB);}for(var E=0,S=aB[j];E<S;E++){R[E]=[];for(var e=0,aA=aB[E][j];e<aA;e++){R[E][e]=aB[E][e];}}R[af]=Y._path2string;return R;},O=V(function(S){if(!Y.is(S,"array")||!Y.is(S&&S[0],"array")){S=Y.parsePathString(S);}var aF=[],aH=0,aG=0,aK=0,aJ=0,R=0;if(S[0][0]=="M"){aH=S[0][1];aG=S[0][2];aK=aH;aJ=aG;R++;aF[c](["M",aH,aG]);}for(var aC=R,aL=S[j];aC<aL;aC++){var e=aF[aC]=[],aI=S[aC];if(aI[0]!=aI[0].toLowerCase()){e[0]=aI[0].toLowerCase();switch(e[0]){case"a":e[1]=aI[1];e[2]=aI[2];e[3]=aI[3];e[4]=aI[4];e[5]=aI[5];e[6]=+(aI[6]-aH).toFixed(3);e[7]=+(aI[7]-aG).toFixed(3);break;case"v":e[1]=+(aI[1]-aG).toFixed(3);break;case"m":aK=aI[1];aJ=aI[2];default:for(var aB=1,aD=aI[j];aB<aD;aB++){e[aB]=+(aI[aB]-((aB%2)?aH:aG)).toFixed(3);}}}else{e=aF[aC]=[];if(aI[0]=="m"){aK=aI[1]+aH;aJ=aI[2]+aG;}for(var aA=0,E=aI[j];aA<E;aA++){aF[aC][aA]=aI[aA];}}var aE=aF[aC][j];switch(aF[aC][0]){case"z":aH=aK;aG=aJ;break;case"h":aH+=+aF[aC][aE-1];break;case"v":aG+=+aF[aC][aE-1];break;default:aH+=+aF[aC][aE-2];aG+=+aF[aC][aE-1];}}aF[af]=Y._path2string;return aF;},0,ac),n=V(function(S){if(!Y.is(S,"array")||!Y.is(S&&S[0],"array")){S=Y.parsePathString(S);}var aE=[],aG=0,aF=0,aJ=0,aI=0,R=0;if(S[0][0]=="M"){aG=+S[0][1];aF=+S[0][2];aJ=aG;aI=aF;R++;aE[0]=["M",aG,aF];}for(var aC=R,aK=S[j];aC<aK;aC++){var e=aE[aC]=[],aH=S[aC];if(aH[0]!=(aH[0]+aa).toUpperCase()){e[0]=(aH[0]+aa).toUpperCase();switch(e[0]){case"A":e[1]=aH[1];e[2]=aH[2];e[3]=aH[3];e[4]=aH[4];e[5]=aH[5];e[6]=+(aH[6]+aG);e[7]=+(aH[7]+aF);break;case"V":e[1]=+aH[1]+aF;break;case"H":e[1]=+aH[1]+aG;break;case"M":aJ=+aH[1]+aG;aI=+aH[2]+aF;default:for(var aB=1,aD=aH[j];aB<aD;aB++){e[aB]=+aH[aB]+((aB%2)?aG:aF);}}}else{for(var aA=0,E=aH[j];aA<E;aA++){aE[aC][aA]=aH[aA];}}switch(e[0]){case"Z":aG=aJ;aF=aI;break;case"H":aG=e[1];break;case"V":aF=e[1];break;default:aG=aE[aC][aE[aC][j]-2];aF=aE[aC][aE[aC][j]-1];}}aE[af]=Y._path2string;return aE;},null,ac),ay=function(i,R,e,E){return[i,R,e,E,e,E];},an=function(i,R,aB,S,e,E){var aA=1/3,aC=2/3;return[aA*i+aC*aB,aA*R+aC*S,aA*e+aC*aB,aA*E+aC*S,e,E];},y=function(aK,be,aT,aR,aL,aF,aA,aJ,bd,aM){var S=Math.PI,aQ=S*120/180,e=S/180*(+aL||0),aX=[],aU,ba=V(function(bf,bi,i){var bh=bf*Math.cos(i)-bi*Math.sin(i),bg=bf*Math.sin(i)+bi*Math.cos(i);return{x:bh,y:bg};});if(!aM){aU=ba(aK,be,-e);aK=aU.x;be=aU.y;aU=ba(aJ,bd,-e);aJ=aU.x;bd=aU.y;var E=Math.cos(S/180*aL),aH=Math.sin(S/180*aL),aZ=(aK-aJ)/2,aY=(be-bd)/2;aT=d(aT,Math.abs(aZ));aR=d(aR,Math.abs(aY));var R=aT*aT,a2=aR*aR,a4=(aF==aA?-1:1)*Math.sqrt(Math.abs((R*a2-R*aY*aY-a2*aZ*aZ)/(R*aY*aY+a2*aZ*aZ))),aO=a4*aT*aY/aR+(aK+aJ)/2,aN=a4*-aR*aZ/aT+(be+bd)/2,aE=Math.asin((be-aN)/aR),aD=Math.asin((bd-aN)/aR);aE=aK<aO?S-aE:aE;aD=aJ<aO?S-aD:aD;aE<0&&(aE=S*2+aE);aD<0&&(aD=S*2+aD);if(aA&&aE>aD){aE=aE-S*2;}if(!aA&&aD>aE){aD=aD-S*2;}}else{aE=aM[0];aD=aM[1];aO=aM[2];aN=aM[3];}var aI=aD-aE;if(Math.abs(aI)>aQ){var aP=aD,aS=aJ,aG=bd;aD=aE+aQ*(aA&&aD>aE?1:-1);aJ=aO+aT*Math.cos(aD);bd=aN+aR*Math.sin(aD);aX=y(aJ,bd,aT,aR,aL,0,aA,aS,aG,[aD,aP,aO,aN]);}aI=aD-aE;var aC=Math.cos(aE),bc=Math.sin(aE),aB=Math.cos(aD),bb=Math.sin(aD),a0=Math.tan(aI/4),a3=4/3*aT*a0,a1=4/3*aR*a0,a9=[aK,be],a8=[aK+a3*bc,be-a1*aC],a7=[aJ+a3*bb,bd-a1*aB],a5=[aJ,bd];a8[0]=2*a9[0]-a8[0];a8[1]=2*a9[1]-a8[1];if(aM){return[a8,a7,a5][au](aX);}else{aX=[a8,a7,a5][au](aX)[ae](",")[r](",");var aV=[];for(var a6=0,aW=aX[j];a6<aW;a6++){aV[a6]=a6%2?ba(aX[a6-1],aX[a6],e).y:ba(aX[a6],aX[a6+1],e).x;}return aV;}},A=V(function(i,e,aN,aL,aA,S,aC,aB,aH){var aF=ap(1-aH,3)*i+ap(1-aH,2)*3*aH*aN+(1-aH)*3*aH*aH*aA+ap(aH,3)*aC,aD=ap(1-aH,3)*e+ap(1-aH,2)*3*aH*aL+(1-aH)*3*aH*aH*S+ap(aH,3)*aB,aJ=i+2*aH*(aN-i)+aH*aH*(aA-2*aN+i),aI=e+2*aH*(aL-e)+aH*aH*(S-2*aL+e),aM=aN+2*aH*(aA-aN)+aH*aH*(aC-2*aA+aN),aK=aL+2*aH*(S-aL)+aH*aH*(aB-2*S+aL),aG=(1-aH)*i+aH*aN,aE=(1-aH)*e+aH*aL,R=(1-aH)*aA+aH*aC,E=(1-aH)*S+aH*aB;return{x:aF,y:aD,m:{x:aJ,y:aI},n:{x:aM,y:aK},start:{x:aG,y:aE},end:{x:R,y:E}};}),ag=V(function(i,e,R,E,aL,aK,aH,aE){var aJ=(aL-2*R+i)-(aH-2*aL+R),aG=2*(R-i)-2*(aL-R),aD=i-R,aB=(-aG+Math.sqrt(aG*aG-4*aJ*aD))/2/aJ,S=(-aG-Math.sqrt(aG*aG-4*aJ*aD))/2/aJ,aF=[e,aE],aI=[i,aH],aC=A(i,e,R,E,aL,aK,aH,aE,aB>0&&aB<1?aB:0),aA=A(i,e,R,E,aL,aK,aH,aE,S>0&&S<1?S:0);aI=aI[au](aC.x,aA.x);aF=aF[au](aC.y,aA.y);aJ=(aK-2*E+e)-(aE-2*aK+E);aG=2*(E-e)-2*(aK-E);aD=e-E;aB=(-aG+Math.sqrt(aG*aG-4*aJ*aD))/2/aJ;S=(-aG-Math.sqrt(aG*aG-4*aJ*aD))/2/aJ;aC=A(i,e,R,E,aL,aK,aH,aE,aB>0&&aB<1?aB:0);aA=A(i,e,R,E,aL,aK,aH,aE,S>0&&S<1?S:0);aI=aI[au](aC.x,aA.x);aF=aF[au](aC.y,aA.y);return{min:{x:al[ax](0,aI),y:al[ax](0,aF)},max:{x:d[ax](0,aI),y:d[ax](0,aF)}};}),w=V(function(aK,aF){var S=n(aK),aG=aF&&n(aF),aH={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},aB=function(aL,aM){var i,aN;if(!aL){return["C",aM.x,aM.y,aM.x,aM.y,aM.x,aM.y];}!(aL[0] in {T:1,Q:1})&&(aM.qx=aM.qy=null);switch(aL[0]){case"M":aM.X=aL[1];aM.Y=aL[2];break;case"A":aL=["C"][au](y[ax](0,[aM.x,aM.y][au](aL.slice(1))));break;case"S":i=aM.x+(aM.x-(aM.bx||aM.x));aN=aM.y+(aM.y-(aM.by||aM.y));aL=["C",i,aN][au](aL.slice(1));break;case"T":aM.qx=aM.x+(aM.x-(aM.qx||aM.x));aM.qy=aM.y+(aM.y-(aM.qy||aM.y));aL=["C"][au](an(aM.x,aM.y,aM.qx,aM.qy,aL[1],aL[2]));break;case"Q":aM.qx=aL[1];aM.qy=aL[2];aL=["C"][au](an(aM.x,aM.y,aL[1],aL[2],aL[3],aL[4]));break;case"L":aL=["C"][au](ay(aM.x,aM.y,aL[1],aL[2]));break;case"H":aL=["C"][au](ay(aM.x,aM.y,aL[1],aM.y));break;case"V":aL=["C"][au](ay(aM.x,aM.y,aM.x,aL[1]));break;case"Z":aL=["C"][au](ay(aM.x,aM.y,aM.X,aM.Y));break;}return aL;},E=function(aL,aM){if(aL[aM][j]>7){aL[aM].shift();var aN=aL[aM];while(aN[j]){aL.splice(aM++,0,["C"][au](aN.splice(0,6)));}aL.splice(aM,1);aI=d(S[j],aG&&aG[j]||0);}},R=function(aP,aO,aM,aL,aN){if(aP&&aO&&aP[aN][0]=="M"&&aO[aN][0]!="M"){aO.splice(aN,0,["M",aL.x,aL.y]);aM.bx=0;aM.by=0;aM.x=aP[aN][1];aM.y=aP[aN][2];aI=d(S[j],aG&&aG[j]||0);}};for(var aD=0,aI=d(S[j],aG&&aG[j]||0);aD<aI;aD++){S[aD]=aB(S[aD],aH);E(S,aD);aG&&(aG[aD]=aB(aG[aD],e));aG&&E(aG,aD);R(S,aG,aH,e,aD);R(aG,S,e,aH,aD);var aC=S[aD],aJ=aG&&aG[aD],aA=aC[j],aE=aG&&aJ[j];aH.x=aC[aA-2];aH.y=aC[aA-1];aH.bx=J(aC[aA-4])||aH.x;aH.by=J(aC[aA-3])||aH.y;e.bx=aG&&(J(aJ[aE-4])||e.x);e.by=aG&&(J(aJ[aE-3])||e.y);e.x=aG&&aJ[aE-2];e.y=aG&&aJ[aE-1];}return aG?[S,aG]:S;},null,ac),l=V(function(aE){var aD=[];for(var aA=0,aF=aE[j];aA<aF;aA++){var e={},aC=aE[aA].match(/^([^:]*):?([\d\.]*)/);e.color=Y.getRGB(aC[1]);if(e.color.error){return null;}e.color=e.color.hex;aC[2]&&(e.offset=aC[2]+"%");aD[c](e);}for(var aA=1,aF=aD[j]-1;aA<aF;aA++){if(!aD[aA].offset){var E=J(aD[aA-1].offset||0),R=0;for(var S=aA+1;S<aF;S++){if(aD[S].offset){R=aD[S].offset;break;}}if(!R){R=100;S=aF;}R=J(R);var aB=(R-E)/(S-aA+1);for(;aA<S;aA++){E+=aB;aD[aA].offset=E+"%";}}}return aD;}),Z=function(){var E,i,S,R,e;if(Y.is(arguments[0],"string")||Y.is(arguments[0],"object")){if(Y.is(arguments[0],"string")){E=z.getElementById(arguments[0]);}else{E=arguments[0];}if(E.tagName){if(arguments[1]==null){return{container:E,width:E.style.pixelWidth||E.offsetWidth,height:E.style.pixelHeight||E.offsetHeight};}else{return{container:E,width:arguments[1],height:arguments[2]};}}}else{if(Y.is(arguments[0],W)&&arguments[j]>3){return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]};}}},aj=function(e,E){var i=this;for(var R in E){if(E[F](R)&&!(R in e)){switch(typeof E[R]){case"function":(function(S){e[R]=e===i?S:function(){return S[ax](i,arguments);};})(E[R]);break;case"object":e[R]=e[R]||{};aj.call(this,e[R],E[R]);break;default:e[R]=E[R];break;}}}};if(Y.svg){ar.svgns="http://www.w3.org/2000/svg";ar.xlink="http://www.w3.org/1999/xlink";var C=function(e){return +e+(~~e===e)*0.5;};var I=function(aA){for(var E=0,R=aA[j];E<R;E++){if(aA[E][0].toLowerCase()!="a"){for(var e=1,S=aA[E][j];e<S;e++){aA[E][e]=C(aA[E][e]);}}else{aA[E][6]=C(aA[E][6]);aA[E][7]=C(aA[E][7]);}}return aA;};var am=function(E,e){if(e){for(var i in e){if(e[F](i)){E[o](i,e[i]);}}}else{return z.createElementNS(ar.svgns,E);}};Y[af]=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version;};var m=function(e,R){var i=am("path");R.canvas&&R.canvas[ao](i);var E=new ad(i,R);E.type="path";M(E,{fill:"none",stroke:"#000",path:e});return E;};var b=function(R,aI,e){var aF="linear",aC=0.5,aA=0.5,aK=R.style;aI=(aI+aa)[aq](/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,function(aL,i,aM){aF="radial";if(i&&aM){aC=J(i);aA=J(aM);if(ap(aC-0.5,2)+ap(aA-0.5,2)>0.25){aA=Math.sqrt(0.25-ap(aC-0.5,2))+0.5;}}return aa;});aI=aI[r](/\s*\-\s*/);if(aF=="linear"){var aB=aI.shift();aB=-J(aB);if(isNaN(aB)){return null;}var S=[0,0,Math.cos(aB*Math.PI/180),Math.sin(aB*Math.PI/180)],aH=1/(d(Math.abs(S[2]),Math.abs(S[3]))||1);S[2]*=aH;S[3]*=aH;if(S[2]<0){S[0]=-S[2];S[2]=0;}if(S[3]<0){S[1]=-S[3];S[3]=0;}}var aE=l(aI);if(!aE){return null;}var E=am(aF+"Gradient");E.id="r"+(Y._id++)[af](36);aF=="radial"?am(E,{fx:aC,fy:aA}):am(E,{x1:S[0],y1:S[1],x2:S[2],y2:S[3]});e.defs[ao](E);for(var aD=0,aJ=aE[j];aD<aJ;aD++){var aG=am("stop");am(aG,{offset:aE[aD].offset?aE[aD].offset:!aD?"0%":"100%","stop-color":aE[aD].color||"#fff"});E[ao](aG);}am(R,{fill:"url(#"+E.id+")",opacity:1,"fill-opacity":1});aK.fill=aa;aK.opacity=1;aK.fillOpacity=1;return 1;};var B=function(i){var e=i.getBBox();am(i.pattern,{patternTransform:Y.format("translate({0},{1})",e.x,e.y)});};var M=function(aG,aP){var aJ={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},aL=aG.node,aH=aG.attrs,aD=aG.rotate(),aA=function(aW,aV){aV=aJ[(aV+aa).toLowerCase()];if(aV){var aT=aW.attrs["stroke-width"]||"1",aR={round:aT,square:aT,butt:0}[aW.attrs["stroke-linecap"]||aP["stroke-linecap"]]||0,aU=[];var aS=aV[j];while(aS--){aU[aS]=aV[aS]*aT+((aS%2)?1:-1)*aR;}am(aL,{"stroke-dasharray":aU[ae](",")});}};J(aD)&&aG.rotate(0,true);for(var aK in aP){if(aP[F](aK)){if(!(aK in g)){continue;}var aI=aP[aK];aH[aK]=aI;switch(aK){case"href":case"title":case"target":var aN=aL.parentNode;if(aN.tagName.toLowerCase()!="a"){var R=am("a");aN.insertBefore(R,aL);R[ao](aL);aN=R;}aN.setAttributeNS(aG.paper.xlink,aK,aI);break;case"clip-rect":var i=(aI+aa)[r](a);if(i[j]==4){aG.clip&&aG.clip.parentNode.parentNode.removeChild(aG.clip.parentNode);var E=am("clipPath"),aM=am("rect");E.id="r"+(Y._id++)[af](36);am(aM,{x:i[0],y:i[1],width:i[2],height:i[3]});E[ao](aM);aG.paper.defs[ao](E);am(aL,{"clip-path":"url(#"+E.id+")"});aG.clip=aM;}if(!aI){var aO=z.getElementById(aL.getAttribute("clip-path")[aq](/(^url\(#|\)$)/g,aa));aO&&aO.parentNode.removeChild(aO);am(aL,{"clip-path":aa});delete aG.clip;}break;case"path":if(aI&&aG.type=="path"){aH.path=I(n(aI));am(aL,{d:aH.path});}break;case"width":aL[o](aK,aI);if(aH.fx){aK="x";aI=aH.x;}else{break;}case"x":if(aH.fx){aI=-aH.x-(aH.width||0);}case"rx":if(aK=="rx"&&aG.type=="rect"){break;}case"cx":aL[o](aK,C(aI));aG.pattern&&B(aG);break;case"height":aL[o](aK,aI);if(aH.fy){aK="y";aI=aH.y;}else{break;}case"y":if(aH.fy){aI=-aH.y-(aH.height||0);}case"ry":if(aK=="ry"&&aG.type=="rect"){break;}case"cy":aL[o](aK,C(aI));aG.pattern&&B(aG);break;case"r":if(aG.type=="rect"){am(aL,{rx:aI,ry:aI});}else{aL[o](aK,aI);}break;case"src":if(aG.type=="image"){aL.setAttributeNS(aG.paper.xlink,"href",aI);}break;case"stroke-width":aL.style.strokeWidth=aI;aL[o](aK,aI);if(aH["stroke-dasharray"]){aA(aG,aH["stroke-dasharray"]);}break;case"stroke-dasharray":aA(aG,aI);break;case"rotation":aD=aI;aG.rotate(aI,true);break;case"translation":var aB=(aI+aa)[r](a);aG.translate((+aB[0]+1||2)-1,(+aB[1]+1||2)-1);break;case"scale":var aB=(aI+aa)[r](a);aG.scale(+aB[0]||1,+aB[1]||+aB[0]||1,+aB[2]||null,+aB[3]||null);break;case"fill":var S=(aI+aa).match(/^url\(['"]?([^\)]+)['"]?\)$/i);if(S){var E=am("pattern"),aF=am("image");E.id="r"+(Y._id++)[af](36);am(E,{x:0,y:0,patternUnits:"userSpaceOnUse"});am(aF,{x:0,y:0});aF.setAttributeNS(aG.paper.xlink,"href",S[1]);E[ao](aF);var aQ=z.createElement("img");aQ.style.cssText="position:absolute;left:-9999em;top-9999em";aQ.onload=function(){am(E,{width:this.offsetWidth,height:this.offsetHeight});am(aF,{width:this.offsetWidth,height:this.offsetHeight});z.body.removeChild(this);ar.safari();};z.body[ao](aQ);aQ.src=S[1];aG.paper.defs[ao](E);aL.style.fill="url(#"+E.id+")";am(aL,{fill:"url(#"+E.id+")"});aG.pattern=E;aG.pattern&&B(aG);break;}if(!Y.getRGB(aI).error){delete aP.gradient;delete aH.gradient;if(!Y.is(aH.opacity,"undefined")&&Y.is(aP.opacity,"undefined")){aL.style.opacity=aH.opacity;am(aL,{opacity:aH.opacity});}if(!Y.is(aH["fill-opacity"],"undefined")&&Y.is(aP["fill-opacity"],"undefined")){aL.style.fillOpacity=aH["fill-opacity"];am(aL,{"fill-opacity":aH["fill-opacity"]});}}else{if((aG.type in {circle:1,ellipse:1}||(aI+aa).charAt(0)!="r")&&b(aL,aI,aG.paper)){aH.gradient=aI;aH.fill="none";break;}}case"stroke":aL.style[aK]=Y.getRGB(aI).hex;aL[o](aK,Y.getRGB(aI).hex);break;case"gradient":(aG.type in {circle:1,ellipse:1}||(aI+aa).charAt(0)!="r")&&b(aL,aI,aG.paper);break;case"opacity":case"fill-opacity":if(aH.gradient){var e=z.getElementById(aL.getAttribute("fill")[aq](/^url\(#|\)$/g,aa));if(e){var aC=e.getElementsByTagName("stop");aC[aC[j]-1][o]("stop-opacity",aI);}break;}default:aK=="font-size"&&(aI=v(aI,10)+"px");var aE=aK[aq](/(\-.)/g,function(aR){return aR.substring(1).toUpperCase();});aL.style[aE]=aI;aL[o](aK,aI);break;}}}t(aG,aP);J(aD)&&aG.rotate(aD,true);};var f=1.2;var t=function(e,S){if(e.type!="text"||!("text" in S||"font" in S||"font-size" in S||"x" in S||"y" in S)){return;}var aE=e.attrs,E=e.node,aG=E.firstChild?v(z.defaultView.getComputedStyle(E.firstChild,aa).getPropertyValue("font-size"),10):10;if("text" in S){while(E.firstChild){E.removeChild(E.firstChild);}var R=(S.text+aa)[r]("\n");for(var aA=0,aF=R[j];aA<aF;aA++){var aC=am("tspan");aA&&am(aC,{dy:aG*f,x:aE.x});aC[ao](z.createTextNode(R[aA]));E[ao](aC);}}else{var R=E.getElementsByTagName("tspan");for(var aA=0,aF=R[j];aA<aF;aA++){aA&&am(R[aA],{dy:aG*f,x:aE.x});}}am(E,{y:aE.y});var aB=e.getBBox(),aD=aE.y-(aB.y+aB.height/2);aD&&isFinite(aD)&&am(E,{y:aE.y+aD});};var ad=function(i,e){var R=0,E=0;this[0]=i;this.id=Y._oid++;this.node=i;i.raphael=this;this.paper=e;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};};ad[az].rotate=function(i,e,R){if(this.removed){return this;}if(i==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][ae](X);}return this._.rt.deg;}var E=this.getBBox();i=(i+aa)[r](a);if(i[j]-1){e=J(i[1]);R=J(i[2]);}i=J(i[0]);if(e!=null){this._.rt.deg=i;}else{this._.rt.deg+=i;}(R==null)&&(e=null);this._.rt.cx=e;this._.rt.cy=R;e=e==null?E.x+E.width/2:e;R=R==null?E.y+E.height/2:R;if(this._.rt.deg){this.transformations[0]=Y.format("rotate({0} {1} {2})",this._.rt.deg,e,R);this.clip&&am(this.clip,{transform:Y.format("rotate({0} {1} {2})",-this._.rt.deg,e,R)});}else{this.transformations[0]=aa;this.clip&&am(this.clip,{transform:aa});}am(this.node,{transform:this.transformations[ae](X)});return this;};ad[az].hide=function(){!this.removed&&(this.node.style.display="none");return this;};ad[az].show=function(){!this.removed&&(this.node.style.display="");return this;};ad[az].remove=function(){this.node.parentNode.removeChild(this.node);for(var e in this){delete this[e];}this.removed=true;};ad[az].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return H(this.attrs.path);}if(this.node.style.display=="none"){this.show();var R=true;}var aC={};try{aC=this.node.getBBox();}catch(aA){}finally{aC=aC||{};}if(this.type=="text"){aC={x:aC.x,y:Infinity,width:0,height:0};for(var E=0,S=this.node.getNumberOfChars();E<S;E++){var aB=this.node.getExtentOfChar(E);(aB.y<aC.y)&&(aC.y=aB.y);(aB.y+aB.height-aC.y>aC.height)&&(aC.height=aB.y+aB.height-aC.y);(aB.x+aB.width-aC.x>aC.width)&&(aC.width=aB.x+aB.width-aC.x);}}R&&this.hide();return aC;};ad[az].attr=function(){if(this.removed){return this;}if(arguments[j]==1&&Y.is(arguments[0],"string")){if(arguments[0]=="translation"){return this.translate();}if(arguments[0]=="rotation"){return this.rotate();}if(arguments[0]=="scale"){return this.scale();}return this.attrs[arguments[0]];}if(arguments[j]==1&&Y.is(arguments[0],"array")){var e={};for(var i in arguments[0]){if(arguments[0][F](i)){e[arguments[0][i]]=this.attrs[arguments[0][i]];}}return e;}if(arguments[j]==2){var E={};E[arguments[0]]=arguments[1];M(this,E);}else{if(arguments[j]==1&&Y.is(arguments[0],"object")){M(this,arguments[0]);}}return this;};ad[az].toFront=function(){!this.removed&&this.node.parentNode[ao](this.node);return this;};ad[az].toBack=function(){if(this.removed){return this;}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);}return this;};ad[az].insertAfter=function(e){if(this.removed){return this;}if(e.node.nextSibling){e.node.parentNode.insertBefore(this.node,e.node.nextSibling);}else{e.node.parentNode[ao](this.node);}return this;};ad[az].insertBefore=function(e){if(this.removed){return this;}var i=e.node;i.parentNode.insertBefore(this.node,i);return this;};var D=function(i,e,aA,S){e=C(e);aA=C(aA);var R=am("circle");i.canvas&&i.canvas[ao](R);var E=new ad(R,i);E.attrs={cx:e,cy:aA,r:S,fill:"none",stroke:"#000"};E.type="circle";am(R,E.attrs);return E;};var ai=function(E,e,aC,i,aA,aB){e=C(e);aC=C(aC);var S=am("rect");E.canvas&&E.canvas[ao](S);var R=new ad(S,E);R.attrs={x:e,y:aC,width:i,height:aA,r:aB||0,rx:aB||0,ry:aB||0,fill:"none",stroke:"#000"};R.type="rect";am(S,R.attrs);return R;};var U=function(i,e,aB,aA,S){e=C(e);aB=C(aB);var R=am("ellipse");i.canvas&&i.canvas[ao](R);var E=new ad(R,i);E.attrs={cx:e,cy:aB,rx:aA,ry:S,fill:"none",stroke:"#000"};E.type="ellipse";am(R,E.attrs);return E;};var k=function(E,aB,e,aC,i,aA){var S=am("image");am(S,{x:e,y:aC,width:i,height:aA,preserveAspectRatio:"none"});S.setAttributeNS(E.xlink,"href",aB);E.canvas&&E.canvas[ao](S);var R=new ad(S,E);R.attrs={x:e,y:aC,width:i,height:aA,src:aB};R.type="image";return R;};var K=function(i,e,aA,S){var R=am("text");am(R,{x:e,y:aA,"text-anchor":"middle"});i.canvas&&i.canvas[ao](R);var E=new ad(R,i);E.attrs={x:e,y:aA,"text-anchor":"middle",text:S,font:g.font,stroke:"none",fill:"#000"};E.type="text";M(E,E.attrs);return E;};var aw=function(i,e){this.width=i||this.width;this.height=e||this.height;this.canvas[o]("width",this.width);this.canvas[o]("height",this.height);return this;};var p=function(){var R=Z[ax](null,arguments),E=R&&R.container,i=R.x,aC=R.y,S=R.width,e=R.height;if(!E){throw new Error("SVG container not found.");}ar.canvas=am("svg");var aB=ar.canvas;ar.width=S||512;ar.height=e||342;aB[o]("width",ar.width);aB[o]("height",ar.height);if(E==1){aB.style.cssText="position:absolute;left:"+i+"px;top:"+aC+"px";z.body[ao](aB);}else{if(E.firstChild){E.insertBefore(aB,E.firstChild);}else{E[ao](aB);}}E={canvas:aB};for(var aA in ar){if(ar[F](aA)){E[aA]=ar[aA];}}aj.call(E,E,Y.fn);E.clear();E.raphael=Y;return E;};ar.clear=function(){var e=this.canvas;while(e.firstChild){e.removeChild(e.firstChild);}(this.desc=am("desc"))[ao](z.createTextNode("Created with Rapha\u00ebl"));e[ao](this.desc);e[ao](this.defs=am("defs"));};ar.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var e in this){delete this[e];}};}if(Y.vml){var ak=function(aJ){var aG=/[ahqtv]/ig,aB=n;(aJ+aa).match(aG)&&(aB=w);aG=/[clmz]/g;if(aB==n&&!(aJ+aa).match(aG)){var E={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},S=/([clmz]),?([^clmz]*)/gi,aA=/-?[^,\s-]+/g;var aF=(aJ+aa)[aq](S,function(aK,aM,i){var aL=[];i[aq](aA,function(aN){aL[c](C(aN));});return E[aM]+aL;});return aF;}var aH=aB(aJ),R,aF=[],e;for(var aD=0,aI=aH[j];aD<aI;aD++){R=aH[aD];e=(aH[aD][0]+aa).toLowerCase();e=="z"&&(e="x");for(var aC=1,aE=R[j];aC<aE;aC++){e+=C(R[aC])+(aC!=aE-1?",":aa);}aF[c](e);}return aF[ae](X);};Y[af]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+this.version;};var m=function(e,aA){var R=T("group");R.style.cssText="position:absolute;left:0;top:0;width:"+aA.width+"px;height:"+aA.height+"px";R.coordsize=aA.coordsize;R.coordorigin=aA.coordorigin;var E=T("shape"),i=E.style;i.width=aA.width+"px";i.height=aA.height+"px";E.coordsize=this.coordsize;E.coordorigin=this.coordorigin;R[ao](E);var S=new ad(E,R,aA);S.isAbsolute=true;S.type="path";S.path=[];S.Path=aa;e&&M(S,{fill:"none",stroke:"#000",path:e});aA.canvas[ao](R);return S;};var M=function(aE,aI){aE.attrs=aE.attrs||{};var aG=aE.node,aJ=aE.attrs,aB=aG.style,R,aN=aE;for(var aC in aI){if(aI[F](aC)){aJ[aC]=aI[aC];}}aI.href&&(aG.href=aI.href);aI.title&&(aG.title=aI.title);aI.target&&(aG.target=aI.target);if(aI.path&&aE.type=="path"){aJ.path=aI.path;aG.path=ak(aJ.path);}if(aI.rotation!=null){aE.rotate(aI.rotation,true);}if(aI.translation){R=(aI.translation+aa)[r](a);aE.translate(R[0],R[1]);}if(aI.scale){R=(aI.scale+aa)[r](a);aE.scale(+R[0]||1,+R[1]||+R[0]||1,+R[2]||null,+R[3]||null);}if("clip-rect" in aI){var e=(aI["clip-rect"]+aa)[r](a);if(e[j]==4){e[2]=+e[2]+(+e[0]);e[3]=+e[3]+(+e[1]);var aD=aG.clipRect||z.createElement("div"),aM=aD.style,aA=aG.parentNode;aM.clip=Y.format("rect({1}px {2}px {3}px {0}px)",e);if(!aG.clipRect){aM.position="absolute";aM.top=0;aM.left=0;aM.width=aE.paper.width+"px";aM.height=aE.paper.height+"px";aA.parentNode.insertBefore(aD,aA);aD[ao](aA);aG.clipRect=aD;}}if(!aI["clip-rect"]){aG.clipRect&&(aG.clipRect.style.clip=aa);}}if(aE.type=="image"&&aI.src){aG.src=aI.src;}if(aE.type=="image"&&aI.opacity){aG.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(aI.opacity*100)+")";aB.filter=(aG.filterMatrix||aa)+(aG.filterOpacity||aa);}aI.font&&(aB.font=aI.font);aI["font-family"]&&(aB.fontFamily='"'+aI["font-family"][r](",")[0][aq](/^['"]+|['"]+$/g,aa)+'"');aI["font-size"]&&(aB.fontSize=aI["font-size"]);aI["font-weight"]&&(aB.fontWeight=aI["font-weight"]);aI["font-style"]&&(aB.fontStyle=aI["font-style"]);if(aI.opacity!=null||aI["stroke-width"]!=null||aI.fill!=null||aI.stroke!=null||aI["stroke-width"]!=null||aI["stroke-opacity"]!=null||aI["fill-opacity"]!=null||aI["stroke-dasharray"]!=null||aI["stroke-miterlimit"]!=null||aI["stroke-linejoin"]!=null||aI["stroke-linecap"]!=null){aG=aE.shape||aG;var aH=(aG.getElementsByTagName("fill")&&aG.getElementsByTagName("fill")[0]),aK=false;!aH&&(aK=aH=T("fill"));if("fill-opacity" in aI||"opacity" in aI){var i=((+aJ["fill-opacity"]+1||2)-1)*((+aJ.opacity+1||2)-1);i<0&&(i=0);i>1&&(i=1);aH.opacity=i;}aI.fill&&(aH.on=true);if(aH.on==null||aI.fill=="none"){aH.on=false;}if(aH.on&&aI.fill){var E=aI.fill.match(/^url\(([^\)]+)\)$/i);if(E){aH.src=E[1];aH.type="tile";}else{aH.color=Y.getRGB(aI.fill).hex;aH.src=aa;aH.type="solid";if(Y.getRGB(aI.fill).error&&(aN.type in {circle:1,ellipse:1}||(aI.fill+aa).charAt(0)!="r")&&b(aN,aI.fill)){aJ.fill="none";aJ.gradient=aI.fill;}}}aK&&aG[ao](aH);var S=(aG.getElementsByTagName("stroke")&&aG.getElementsByTagName("stroke")[0]),aL=false;!S&&(aL=S=T("stroke"));if((aI.stroke&&aI.stroke!="none")||aI["stroke-width"]||aI["stroke-opacity"]!=null||aI["stroke-dasharray"]||aI["stroke-miterlimit"]||aI["stroke-linejoin"]||aI["stroke-linecap"]){S.on=true;}(aI.stroke=="none"||S.on==null||aI.stroke==0||aI["stroke-width"]==0)&&(S.on=false);S.on&&aI.stroke&&(S.color=Y.getRGB(aI.stroke).hex);var i=((+aJ["stroke-opacity"]+1||2)-1)*((+aJ.opacity+1||2)-1);i<0&&(i=0);i>1&&(i=1);S.opacity=i;aI["stroke-linejoin"]&&(S.joinstyle=aI["stroke-linejoin"]||"miter");S.miterlimit=aI["stroke-miterlimit"]||8;aI["stroke-linecap"]&&(S.endcap={butt:"flat",square:"square",round:"round"}[aI["stroke-linecap"]]||"miter");aI["stroke-width"]&&(S.weight=(J(aI["stroke-width"])||1)*12/16);if(aI["stroke-dasharray"]){var aF={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};S.dashstyle=aF[aI["stroke-dasharray"]]||aa;}aL&&aG[ao](S);}if(aN.type=="text"){var aB=aN.paper.span.style;aJ.font&&(aB.font=aJ.font);aJ["font-family"]&&(aB.fontFamily=aJ["font-family"]);aJ["font-size"]&&(aB.fontSize=aJ["font-size"]);aJ["font-weight"]&&(aB.fontWeight=aJ["font-weight"]);aJ["font-style"]&&(aB.fontStyle=aJ["font-style"]);aN.node.string&&(aN.paper.span.innerHTML=(aN.node.string+aa)[aq](/</g,"&#60;")[aq](/&/g,"&#38;")[aq](/\n/g,"<br>"));aN.W=aJ.w=aN.paper.span.offsetWidth;aN.H=aJ.h=aN.paper.span.offsetHeight;aN.X=aJ.x;aN.Y=aJ.y+C(aN.H/2);switch(aJ["text-anchor"]){case"start":aN.node.style["v-text-align"]="left";aN.bbx=C(aN.W/2);break;case"end":aN.node.style["v-text-align"]="right";aN.bbx=-C(aN.W/2);break;default:aN.node.style["v-text-align"]="center";break;}}};var b=function(e,aC){e.attrs=e.attrs||{};var aD=e.attrs,aF=e.node.getElementsByTagName("fill"),aA="linear",aB=".5 .5";e.attrs.gradient=aC;aC=(aC+aa)[aq](/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,function(aH,aI,i){aA="radial";if(aI&&i){aI=J(aI);i=J(i);if(ap(aI-0.5,2)+ap(i-0.5,2)>0.25){i=Math.sqrt(0.25-ap(aI-0.5,2))+0.5;}aB=aI+X+i;}return aa;});aC=aC[r](/\s*\-\s*/);if(aA=="linear"){var E=aC.shift();E=-J(E);if(isNaN(E)){return null;}}var S=l(aC);if(!S){return null;}e=e.shape||e.node;aF=aF[0]||T("fill");if(S[j]){aF.on=true;aF.method="none";aF.type=(aA=="radial")?"gradientradial":"gradient";aF.color=S[0].color;aF.color2=S[S[j]-1].color;var aG=[];for(var R=0,aE=S[j];R<aE;R++){S[R].offset&&aG[c](S[R].offset+X+S[R].color);}aF.colors.value=aG[j]?aG[ae](","):"0% "+aF.color;if(aA=="radial"){aF.focus="100%";aF.focussize=aB;aF.focusposition=aB;}else{aF.angle=(270-E)%360;}}return 1;};var ad=function(S,aB,e){var aA=0,E=0,i=0,R=1;this[0]=S;this.id=Y._oid++;this.node=S;S.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=aB;this.paper=e;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};};ad[az].rotate=function(i,e,E){if(this.removed){return this;}if(i==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][ae](X);}return this._.rt.deg;}i=(i+aa)[r](a);if(i[j]-1){e=J(i[1]);E=J(i[2]);}i=J(i[0]);if(e!=null){this._.rt.deg=i;}else{this._.rt.deg+=i;}E==null&&(e=null);this._.rt.cx=e;this._.rt.cy=E;this.setBox(this.attrs,e,E);this.Group.style.rotation=this._.rt.deg;return this;};ad[az].setBox=function(aA,aB,S){if(this.removed){return this;}var E=this.Group.style,aC=(this.shape&&this.shape.style)||this.node.style;aA=aA||{};for(var aD in aA){if(aA[F](aD)){this.attrs[aD]=aA[aD];}}aB=aB||this._.rt.cx;S=S||this._.rt.cy;var aG=this.attrs,aJ,aI,aK,aF;switch(this.type){case"circle":aJ=aG.cx-aG.r;aI=aG.cy-aG.r;aK=aF=aG.r*2;break;case"ellipse":aJ=aG.cx-aG.rx;aI=aG.cy-aG.ry;aK=aG.rx*2;aF=aG.ry*2;break;case"rect":case"image":aJ=+aG.x;aI=+aG.y;aK=aG.width||0;aF=aG.height||0;break;case"text":this.textpath.v=["m",C(aG.x),", ",C(aG.y-2),"l",C(aG.x)+1,", ",C(aG.y-2)][ae](aa);aJ=aG.x-C(this.W/2);aI=aG.y-this.H/2;aK=this.W;aF=this.H;break;case"path":if(!this.attrs.path){aJ=0;aI=0;aK=this.paper.width;aF=this.paper.height;}else{var aE=H(this.attrs.path);aJ=aE.x;aI=aE.y;aK=aE.width;aF=aE.height;}break;default:aJ=0;aI=0;aK=this.paper.width;aF=this.paper.height;break;}aB=(aB==null)?aJ+aK/2:aB;S=(S==null)?aI+aF/2:S;var R=aB-this.paper.width/2,aH=S-this.paper.height/2;if(this.type=="path"||this.type=="text"){(E.left!=R+"px")&&(E.left=R+"px");(E.top!=aH+"px")&&(E.top=aH+"px");this.X=this.type=="text"?aJ:-R;this.Y=this.type=="text"?aI:-aH;this.W=aK;this.H=aF;(aC.left!=-R+"px")&&(aC.left=-R+"px");(aC.top!=-aH+"px")&&(aC.top=-aH+"px");}else{(E.left!=R+"px")&&(E.left=R+"px");(E.top!=aH+"px")&&(E.top=aH+"px");this.X=aJ;this.Y=aI;this.W=aK;this.H=aF;(E.width!=this.paper.width+"px")&&(E.width=this.paper.width+"px");(E.height!=this.paper.height+"px")&&(E.height=this.paper.height+"px");(aC.left!=aJ-R+"px")&&(aC.left=aJ-R+"px");(aC.top!=aI-aH+"px")&&(aC.top=aI-aH+"px");(aC.width!=aK+"px")&&(aC.width=aK+"px");(aC.height!=aF+"px")&&(aC.height=aF+"px");var aL=(+aA.r||0)/(al(aK,aF));if(this.type=="rect"&&this.arcsize!=aL&&(aL||this.arcsize)){var e=T(aL?"roundrect":"rect");e.arcsize=aL;this.Group[ao](e);this.node.parentNode.removeChild(this.node);this.node=e;this.arcsize=aL;this.attr(this.attrs);}}};ad[az].hide=function(){!this.removed&&(this.Group.style.display="none");return this;};ad[az].show=function(){!this.removed&&(this.Group.style.display="block");return this;};ad[az].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return H(this.attrs.path);}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H};};ad[az].remove=function(){this.node.parentNode.removeChild(this[0]);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var e in this){delete this[e];}this.removed=true;};ad[az].attr=function(){if(this.removed){return this;}if(arguments[j]==1&&Y.is(arguments[0],"string")){if(arguments[0]=="translation"){return this.translate();}if(arguments[0]=="rotation"){return this.rotate();}if(arguments[0]=="scale"){return this.scale();}return this.attrs[arguments[0]];}if(this.attrs&&arguments[j]==1&&Y.is(arguments[0],"array")){var e={};for(var E=0,R=arguments[0][j];E<R;E++){e[arguments[0][E]]=this.attrs[arguments[0][E]];}return e;}var S;if(arguments[j]==2){S={};S[arguments[0]]=arguments[1];}arguments[j]==1&&Y.is(arguments[0],"object")&&(S=arguments[0]);if(S){if(S.text&&this.type=="text"){this.node.string=S.text;}M(this,S);if(S.gradient&&({circle:1,ellipse:1}[F](this.type)||(S.gradient+aa).charAt(0)!="r")){b(this,S.gradient);}this.setBox(this.attrs);}return this;};ad[az].toFront=function(){!this.removed&&this.Group.parentNode[ao](this.Group);return this;};ad[az].toBack=function(){if(this.removed){return this;}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);}return this;};ad[az].insertAfter=function(e){if(this.removed){return this;}if(e.Group.nextSibling){e.Group.parentNode.insertBefore(this.Group,e.Group.nextSibling);}else{e.Group.parentNode[ao](this.Group);}return this;};ad[az].insertBefore=function(e){!this.removed&&e.Group.parentNode.insertBefore(this.Group,e.Group);return this;};var D=function(i,e,aC,aA){var S=T("group"),aB=T("oval"),E=aB.style;S.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";S.coordsize=i.coordsize;S.coordorigin=i.coordorigin;S[ao](aB);var R=new ad(aB,S,i);R.type="circle";M(R,{stroke:"#000",fill:"none"});R.attrs.cx=e;R.attrs.cy=aC;R.attrs.r=aA;R.setBox({x:e-aA,y:aC-aA,width:aA*2,height:aA*2});i.canvas[ao](S);return R;};var ai=function(i,aC,aB,aD,R,e){var S=T("group"),E=T(e?"roundrect":"rect"),aE=(+e||0)/(al(aD,R));E.arcsize=aE;S.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";S.coordsize=i.coordsize;S.coordorigin=i.coordorigin;S[ao](E);var aA=new ad(E,S,i);aA.type="rect";M(aA,{stroke:"#000"});aA.arcsize=aE;aA.setBox({x:aC,y:aB,width:aD,height:R,r:+e});i.canvas[ao](S);return aA;};var U=function(e,aD,aC,E,i){var S=T("group"),R=T("oval"),aB=R.style;S.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";S.coordsize=e.coordsize;S.coordorigin=e.coordorigin;S[ao](R);var aA=new ad(R,S,e);aA.type="ellipse";M(aA,{stroke:"#000"});aA.attrs.cx=aD;aA.attrs.cy=aC;aA.attrs.rx=E;aA.attrs.ry=i;aA.setBox({x:aD-E,y:aC-i,width:E*2,height:i*2});e.canvas[ao](S);return aA;};var k=function(i,e,aD,aC,aE,R){var S=T("group"),E=T("image"),aB=E.style;S.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";S.coordsize=i.coordsize;S.coordorigin=i.coordorigin;E.src=e;S[ao](E);var aA=new ad(E,S,i);aA.type="image";aA.attrs.src=e;aA.attrs.x=aD;aA.attrs.y=aC;aA.attrs.w=aE;aA.attrs.h=R;aA.setBox({x:aD,y:aC,width:aE,height:R});i.canvas[ao](S);return aA;};var K=function(i,aD,aC,aE){var S=T("group"),R=T("shape"),aB=R.style,aF=T("path"),e=aF.style,E=T("textpath");S.style.cssText="position:absolute;left:0;top:0;width:"+i.width+"px;height:"+i.height+"px";S.coordsize=i.coordsize;S.coordorigin=i.coordorigin;aF.v=Y.format("m{0},{1}l{2},{1}",C(aD),C(aC),C(aD)+1);aF.textpathok=true;aB.width=i.width;aB.height=i.height;E.string=aE+aa;E.on=true;R[ao](E);R[ao](aF);S[ao](R);var aA=new ad(E,S,i);aA.shape=R;aA.textpath=aF;aA.type="text";aA.attrs.text=aE;aA.attrs.x=aD;aA.attrs.y=aC;aA.attrs.w=1;aA.attrs.h=1;M(aA,{font:g.font,stroke:"none",fill:"#000"});aA.setBox();i.canvas[ao](S);return aA;};var aw=function(E,e){var i=this.canvas.style;this.width=J(E||this.width);this.height=J(e||this.height);i.width=this.width+"px";i.height=this.height+"px";i.clip="rect(0 "+this.width+"px "+this.height+"px 0)";this.coordsize=this.width+X+this.height;return this;};z.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!z.namespaces.rvml&&z.namespaces.add("rvml","urn:schemas-microsoft-com:vml");var T=function(e){return z.createElement("<rvml:"+e+' class="rvml">');};}catch(P){var T=function(e){return z.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}var p=function(){var R=Z[ax](null,arguments),i=R.container,aE=R.height,aF,E=R.width,aD=R.x,aC=R.y;if(!i){throw new Error("VML container not found.");}var aA={},aB=aA.canvas=z.createElement("div"),S=aB.style;E=J(E)||512;aE=J(aE)||342;aA.width=E;aA.height=aE;aA.coordsize=E+X+aE;aA.coordorigin="0 0";aA.span=z.createElement("span");aA.span.style.cssText="position:absolute;left:-9999px;top:-9999px;padding:0;margin:0;line-height:1;display:inline;";aB[ao](aA.span);S.cssText=Y.format("width:{0}px;height:{1}px;position:absolute;clip:rect(0 {0}px {1}px 0)",E,aE);if(i==1){z.body[ao](aB);S.left=aD+"px";S.top=aC+"px";i={style:{width:E,height:aE}};}else{i.style.width=E;i.style.height=aE;if(i.firstChild){i.insertBefore(aB,i.firstChild);}else{i[ao](aB);}}for(var e in ar){if(ar[F](e)){aA[e]=ar[e];}}aj.call(aA,aA,Y.fn);aA.clear=function(){aB.innerHTML=aa;};aA.raphael=Y;return aA;};ar.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var e in this){delete this[e];}};}if({"Apple Computer, Inc.":1,"Google Inc.":1}[navigator.vendor]){ar.safari=function(){var e=this.rect(-99,-99,this.width+99,this.height+99);setTimeout(function(){e.remove();});};}else{ar.safari=function(){};}var Q=(function(){if(z.addEventListener){return function(S,E,i,e){var R=function(aA){return i.call(e,aA);};S.addEventListener(E,R,false);return function(){S.removeEventListener(E,R,false);return true;};};}else{if(z.attachEvent){return function(aA,R,E,i){var S=function(aB){return E.call(i,aB||ab.event);};aA.attachEvent("on"+R,S);var e=function(){aA.detachEvent("on"+R,S);return true;};if(R=="mouseover"){aA.attachEvent("onmouseenter",S);return function(){aA.detachEvent("onmouseenter",S);return e();};}else{if(R=="mouseout"){aA.attachEvent("onmouseleave",S);return function(){aA.detachEvent("onmouseleave",S);return e();};}}return e;};}}})();for(var N=u[j];N--;){(function(e){ad[az][e]=function(i){if(Y.is(i,"function")){this.events=this.events||{};this.events[e]=this.events[e]||{};this.events[e][i]=this.events[e][i]||[];this.events[e][i][c](Q(this.shape||this.node,e,i,this));}return this;};ad[az]["un"+e]=function(i){var E=this.events;E&&E[e]&&E[e][i]&&E[e][i][j]&&E[e][i].shift()()&&!E[e][i][j]&&delete E[e][i];return this;};})(u[N]);}ad[az].hover=function(i,e){return this.mouseover(i).mouseout(e);};ar.circle=function(e,E,i){return D(this,e||0,E||0,i||0);};ar.rect=function(e,S,i,E,R){return ai(this,e||0,S||0,i||0,E||0,R||0);};ar.ellipse=function(e,R,E,i){return U(this,e||0,R||0,E||0,i||0);};ar.path=function(e){e&&!Y.is(e,"string")&&!Y.is(e[0],"array")&&(e+=aa);return m(Y.format[ax](Y,arguments),this);};ar.image=function(R,e,S,i,E){return k(this,R||"about:blank",e||0,S||0,i||0,E||0);};ar.text=function(e,E,i){return K(this,e||0,E||0,i||aa);};ar.set=function(e){arguments[j]>1&&(e=Array[az].splice.call(arguments,0,arguments[j]));return new G(e);};ar.setSize=aw;ad[az].scale=function(aJ,aI,R,E){if(aJ==null&&aI==null){return{x:this._.sx,y:this._.sy,toString:function(){return this.x+X+this.y;}};}aI=aI||aJ;!+aI&&(aI=aJ);var aN,aL,aM,aK,aZ=this.attrs;if(aJ!=0){var aG=this.getBBox(),aD=aG.x+aG.width/2,aA=aG.y+aG.height/2,aY=aJ/this._.sx,aX=aI/this._.sy;R=(+R||R==0)?R:aD;E=(+E||E==0)?E:aA;var aF=~~(aJ/Math.abs(aJ)),aC=~~(aI/Math.abs(aI)),aQ=this.node.style,a1=R+(aD-R)*aF*aY,a0=E+(aA-E)*aC*aX;switch(this.type){case"rect":case"image":var aE=aZ.width*aF*aY,aP=aZ.height*aC*aX,aH=aZ.r*al(aY,aX),aB=a1-aE/2,S=a0-aP/2;this.attr({width:aE,height:aP,x:aB,y:S,r:aH});break;case"circle":case"ellipse":this.attr({rx:aZ.rx*aY,ry:aZ.ry*aX,r:aZ.r*al(aY,aX),cx:a1,cy:a0});break;case"path":var aS=O(aZ.path),aT=true;for(var aV=0,aO=aS[j];aV<aO;aV++){var aR=aS[aV];if(aR[0].toUpperCase()=="M"&&aT){continue;}else{aT=false;}if(Y.svg&&aR[0].toUpperCase()=="A"){aR[aS[aV][j]-2]*=aY;aR[aS[aV][j]-1]*=aX;aR[1]*=aY;aR[2]*=aX;aR[5]=+(aF+aC?!!+aR[5]:!+aR[5]);}else{for(var aU=1,aW=aR[j];aU<aW;aU++){aR[aU]*=(aU%2)?aY:aX;}}}var e=H(aS),aN=a1-e.x-e.width/2,aL=a0-e.y-e.height/2;aS[0][1]+=aN;aS[0][2]+=aL;this.attr({path:aS});break;}if(this.type in {text:1,image:1}&&(aF!=1||aC!=1)){if(this.transformations){this.transformations[2]="scale("[au](aF,",",aC,")");this.node[o]("transform",this.transformations[ae](X));aN=(aF==-1)?-aZ.x-(aE||0):aZ.x;aL=(aC==-1)?-aZ.y-(aP||0):aZ.y;this.attr({x:aN,y:aL});aZ.fx=aF-1;aZ.fy=aC-1;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[au](aF,", M12=0, M21=0, M22=",aC,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");aQ.filter=(this.node.filterMatrix||aa)+(this.node.filterOpacity||aa);}}else{if(this.transformations){this.transformations[2]=aa;this.node[o]("transform",this.transformations[ae](X));aZ.fx=0;aZ.fy=0;}else{this.node.filterMatrix=aa;aQ.filter=(this.node.filterMatrix||aa)+(this.node.filterOpacity||aa);}}aZ.scale=[aJ,aI,R,E][ae](X);this._.sx=aJ;this._.sy=aI;}return this;};Y.easing_formulas={linear:function(e){return e;},"<":function(e){return ap(e,3);},">":function(e){return ap(e-1,3)+1;},"<>":function(e){e=e*2;if(e<1){return ap(e,3)/2;}e-=2;return(ap(e,3)+2)/2;},backIn:function(i){var e=1.70158;return i*i*((e+1)*i-e);},backOut:function(i){i=i-1;var e=1.70158;return i*i*((e+1)*i+e)+1;},elastic:function(E){if(E==0||E==1){return E;}var i=0.3,e=i/4;return ap(2,-10*E)*Math.sin((E-e)*(2*Math.PI)/i)+1;},bounce:function(R){var i=7.5625,E=2.75,e;if(R<(1/E)){e=i*R*R;}else{if(R<(2/E)){R-=(1.5/E);e=i*R*R+0.75;}else{if(R<(2.5/E)){R-=(2.25/E);e=i*R*R+0.9375;}else{R-=(2.625/E);e=i*R*R+0.984375;}}}return e;}};var x={length:0},at=function(){var aD=+new Date;for(var aO in x){if(aO!="length"&&x[F](aO)){var aT=x[aO];if(aT.stop){delete x[aO];x[j]--;continue;}var aB=aD-aT.start,aM=aT.ms,aL=aT.easing,aP=aT.from,aI=aT.diff,R=aT.to,aH=aT.t,aK=aT.prev||0,aC=aT.el,S=aT.callback,aJ={},E;if(aB<aM){var aA=Y.easing_formulas[aL]?Y.easing_formulas[aL](aB/aM):aB/aM;for(var aN in aP){if(aP[F](aN)){switch(L[aN]){case"number":E=+aP[aN]+aA*aM*aI[aN];break;case"colour":E="rgb("+[s(C(aP[aN].r+aA*aM*aI[aN].r)),s(C(aP[aN].g+aA*aM*aI[aN].g)),s(C(aP[aN].b+aA*aM*aI[aN].b))][ae](",")+")";break;case"path":E=[];for(var aR=0,aG=aP[aN][j];aR<aG;aR++){E[aR]=[aP[aN][aR][0]];for(var aQ=1,aS=aP[aN][aR][j];aQ<aS;aQ++){E[aR][aQ]=+aP[aN][aR][aQ]+aA*aM*aI[aN][aR][aQ];}E[aR]=E[aR][ae](X);}E=E[ae](X);break;case"csv":switch(aN){case"translation":var aF=aI[aN][0]*(aB-aK),aE=aI[aN][1]*(aB-aK);aH.x+=aF;aH.y+=aE;E=aF+X+aE;break;case"rotation":E=+aP[aN][0]+aA*aM*aI[aN][0];aP[aN][1]&&(E+=","+aP[aN][1]+","+aP[aN][2]);break;case"scale":E=[+aP[aN][0]+aA*aM*aI[aN][0],+aP[aN][1]+aA*aM*aI[aN][1],(2 in R[aN]?R[aN][2]:aa),(3 in R[aN]?R[aN][3]:aa)][ae](X);break;case"clip-rect":E=[];var aR=4;while(aR--){E[aR]=+aP[aN][aR]+aA*aM*aI[aN][aR];}break;}break;}aJ[aN]=E;}}aC.attr(aJ);aC._run&&aC._run.call(aC);}else{(aH.x||aH.y)&&aC.translate(-aH.x,-aH.y);R.scale&&(R.scale=R.scale+aa);aC.attr(R);Y.is(S,"function")&&S.call(aC);delete x[aO];x[j]--;aC.in_animation=null;}aT.prev=aB;}}Y.svg&&ar.safari();x[j]&&setTimeout(at);},s=function(e){return e>255?255:(e<0?0:e);};ad[az].animateWith=function(i,E,e,S,R){x[i.in_animation]&&(E.start=x[i.in_animation].start);return this.animate(E,e,S,R);};ad[az].onAnimation=function(e){this._run=e||null;return this;};ad[az].animate=function(R,e,aF,aL){if(Y.is(aF,"function")||!aF){aL=aF||null;}var aG={},aH={},aI={};for(var aE in R){if(R[F](aE)){if(L[F](aE)){aG[aE]=this.attr(aE);(aG[aE]==null)&&(aG[aE]=g[aE]);aH[aE]=R[aE];switch(L[aE]){case"number":aI[aE]=(aH[aE]-aG[aE])/e;break;case"colour":aG[aE]=Y.getRGB(aG[aE]);var aC=Y.getRGB(aH[aE]);aI[aE]={r:(aC.r-aG[aE].r)/e,g:(aC.g-aG[aE].g)/e,b:(aC.b-aG[aE].b)/e};break;case"path":var E=w(aG[aE],aH[aE]);aG[aE]=E[0];aH[aE]=E[1];aI[aE]=[];for(var aB=0,aK=aG[aE][j];aB<aK;aB++){aI[aE][aB]=[0];for(var S=1,aD=aG[aE][aB][j];S<aD;S++){aI[aE][aB][S]=(aH[aE][aB][S]-aG[aE][aB][S])/e;}}break;case"csv":var aJ=(R[aE]+aa)[r](a),aA=(aG[aE]+aa)[r](a);switch(aE){case"translation":aG[aE]=[0,0];aI[aE]=[aJ[0]/e,aJ[1]/e];break;case"rotation":aG[aE]=(aA[1]==aJ[1]&&aA[2]==aJ[2])?aA:[0,aJ[1],aJ[2]];aI[aE]=[(aJ[0]-aG[aE][0])/e,0,0];break;case"scale":R[aE]=aJ;aG[aE]=(aG[aE]+aa)[r](a);aI[aE]=[(aJ[0]-aG[aE][0])/e,(aJ[1]-aG[aE][1])/e,0,0];break;case"clip-rect":aG[aE]=(aG[aE]+aa)[r](a);aI[aE]=[];var aB=4;while(aB--){aI[aE][aB]=(aJ[aB]-aG[aE][aB])/e;}break;}aH[aE]=aJ;}}}}this.stop();this.in_animation=1;x[this.id]={start:R.start||+new Date,ms:e,easing:aF,from:aG,diff:aI,to:aH,el:this,callback:aL,t:{x:0,y:0}};++x[j]==1&&at();return this;};ad[az].stop=function(){delete x[this.id];this.in_animation=0;return this;};ad[az].translate=function(e,E){if(e==null){return{x:this._.tx,y:this._.ty};}this._.tx+=+e;this._.ty+=+E;switch(this.type){case"circle":case"ellipse":this.attr({cx:+e+this.attrs.cx,cy:+E+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+e+this.attrs.x,y:+E+this.attrs.y});break;case"path":var i=O(this.attrs.path);i[0][1]+=+e;i[0][2]+=+E;this.attr({path:i});break;}return this;};ad[az][af]=function(){return"Rapha\u00ebl\u2019s object";};Y.ae=x;var G=function(e){this.items=[];this[j]=0;if(e){for(var E=0,R=e[j];E<R;E++){if(e[E]&&(e[E].constructor==ad||e[E].constructor==G)){this[this.items[j]]=this.items[this.items[j]]=e[E];this[j]++;}}}};G[az][c]=function(){var S,e;for(var E=0,R=arguments[j];E<R;E++){S=arguments[E];if(S&&(S.constructor==ad||S.constructor==G)){e=this.items[j];this[e]=this.items[e]=S;this[j]++;}}return this;};G[az].pop=function(){delete this[this[j]--];return this.items.pop();};for(var q in ad[az]){if(ad[az][F](q)){G[az][q]=(function(e){return function(){for(var E=0,R=this.items[j];E<R;E++){this.items[E][e][ax](this.items[E],arguments);}return this;};})(q);}}G[az].attr=function(E,aB){if(E&&Y.is(E,"array")&&Y.is(E[0],"object")){for(var e=0,aA=E[j];e<aA;e++){this.items[e].attr(E[e]);}}else{for(var R=0,S=this.items[j];R<S;R++){this.items[R].attr[ax](this.items[R],arguments);}}return this;};G[az].animate=function(aA,E,aD,aC){(Y.is(aD,"function")||!aD)&&(aC=aD||null);var e=this.items[j],R=e,aB=this;if(aC){var S=function(){!--e&&aC.call(aB);};this.items[--R].animate(aA,E,aD||S,S);while(R--){this.items[R].animateWith(this.items[e-1],aA,E,aD||S,S);}}else{this.items[--R].animate(aA,E,aD);while(R--){this.items[R].animateWith(this.items[e-1],aA,E,aD);}}return this;};G[az].getBBox=function(){var e=[],aB=[],E=[],S=[];for(var R=this.items[j];R--;){var aA=this.items[R].getBBox();e[c](aA.x);aB[c](aA.y);E[c](aA.x+aA.width);S[c](aA.y+aA.height);}e=al[ax](0,e);aB=al[ax](0,aB);return{x:e,y:aB,width:d[ax](0,E)-e,height:d[ax](0,S)-aB};};Y.registerFont=function(i){if(!i.face){return i;}this.fonts=this.fonts||{};var R={w:i.w,face:{},glyphs:{}},E=i.face["font-family"];for(var aB in i.face){if(i.face[F](aB)){R.face[aB]=i.face[aB];}}if(this.fonts[E]){this.fonts[E][c](R);}else{this.fonts[E]=[R];}if(!i.svg){R.face["units-per-em"]=v(i.face["units-per-em"],10);for(var S in i.glyphs){if(i.glyphs[F](S)){var aA=i.glyphs[S];R.glyphs[S]={w:aA.w,k:{},d:aA.d&&"M"+aA.d[aq](/[mlcxtrv]/g,function(aC){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[aC]||"M";})+"z"};if(aA.k){for(var e in aA.k){if(aA[F](e)){R.glyphs[S].k[e]=aA.k[e];}}}}}}return i;};ar.getFont=function(aD,aE,E,S){S=S||"normal";E=E||"normal";aE=+aE||{normal:400,bold:700,lighter:300,bolder:800}[aE]||400;var aA=Y.fonts[aD];if(!aA){var R=new RegExp("(^|\\s)"+aD[aq](/[^\w\d\s+!~.:_-]/g,aa)+"(\\s|$)","i");for(var e in Y.fonts){if(Y.fonts[F](e)){if(R.test(e)){aA=Y.fonts[e];break;}}}}var aB;if(aA){for(var aC=0,aF=aA[j];aC<aF;aC++){aB=aA[aC];if(aB.face["font-weight"]==aE&&(aB.face["font-style"]==E||!aB.face["font-style"])&&aB.face["font-stretch"]==S){break;}}}return aB;};ar.print=function(aF,aE,aC,E,aJ){var aA=this.set(),aD=(aC+aa)[r](aa),e=0,aI=aa,S;Y.is(E,"string")&&(E=this.getFont(E));if(E){S=(aJ||16)/E.face["units-per-em"];for(var aB=0,aG=aD[j];aB<aG;aB++){var R=aB&&E.glyphs[aD[aB-1]]||{},aH=E.glyphs[aD[aB]];e+=aB?(R.w||E.w)+(R.k&&R.k[aD[aB]]||0):0;aH&&aH.d&&aA[c](this.path(aH.d).attr({fill:"#000",stroke:"none",translation:[e,0]}));}aA.scale(S,S,0,aE).translate(aF,(aJ||16)/2);}return aA;};Y.format=function(E){var i=Y.is(arguments[1],"array")?[0][au](arguments[1]):arguments,e=/\{(\d+)\}/g;E&&Y.is(E,"string")&&i[j]-1&&(E=E[aq](e,function(S,R){return i[++R]==null?aa:i[R];}));return E||aa;};Y.ninja=function(){var E=ab.Raphael,i;if(h.was){ab.Raphael=h.is;}else{try{delete ab.Raphael;}catch(R){ab.Raphael=i;}}return E;};Y.el=ad[az];return Y;})();
\ No newline at end of file
index 65a4206..ad6d6a7 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * Raphael 1.1 - JavaScript Vector Library
+/*!
+ * Raphael 1.2 - JavaScript Vector Library
  *
  * Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
@@ -30,6 +30,7 @@ window.Raphael = (function () {
         paper = {},
         events = ["click", "dblclick", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup"],
         E = "",
+        S = " ",
         has = "hasOwnProperty",
         proto = "prototype",
         setAttribute = "setAttribute",
@@ -52,26 +53,52 @@ window.Raphael = (function () {
         availableAttrs = {"clip-rect": "0 0 10e9 10e9", cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '10px "Arial"', "font-family": '"Arial"', "font-size": "10", "font-style": "normal", "font-weight": 400, gradient: 0, height: 0, href: "http://raphaeljs.com/", opacity: 1, path: "M0,0", r: 0, rotation: 0, rx: 0, ry: 0, scale: "1 1", src: "", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, target: "_blank", "text-anchor": "middle", title: "Raphael", translation: "0 0", width: 0, x: 0, y: 0},
         availableAnimAttrs = {"clip-rect": "csv", cx: nu, cy: nu, fill: "colour", "fill-opacity": nu, "font-size": nu, height: nu, opacity: nu, path: "path", r: nu, rotation: "csv", rx: nu, ry: nu, scale: "csv", stroke: "colour", "stroke-opacity": nu, "stroke-width": nu, translation: "csv", width: nu, x: nu, y: nu},
         rp = "replace";
-    R.version = "1.1";
+    R.version = "1.2";
     R.type = (win.SVGAngle || doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML");
     R.svg = !(R.vml = R.type == "VML");
-    R.idGenerator = 0;
+    R._id = 0;
+    R._oid = 0;
     R.fn = {};
     R.is = function (o, type) {
         type = (type + E).toLowerCase();
-        if ((type == "object" || type == "undefined") && typeof o == type) {
-            return true;
-        }
-        if (o == null && type == "null") {
-            return true;
-        }
-        return Object[proto][toString].call(o)[rp](/^\[object\s+|\]$/gi, E).toLowerCase() == type;
+        return ((type == "object" || type == "undefined") && typeof o == type) || (o == null && type == "null") || Object[proto][toString].call(o)[rp](/^\[object\s+|\]$/gi, E).toLowerCase() == type;
     };
     R.setWindow = function (newwin) {
         win = newwin;
         doc = win.document;
     };
     // colour utilities
+    var toHex = function (color) {
+        if (R.vml) {
+            // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/
+            toHex = cacher(function (color) {
+                var bod;
+                try {
+                    var document = new ActiveXObject("htmlfile");
+                    document.write("<body>");
+                    document.close();
+                    bod = document.body;
+                } catch(e) {
+                    bod = createPopup().document.body;
+                }
+                var range = bod.createTextRange();
+                bod.style.color = color;
+                var value = range.queryCommandValue("ForeColor");
+                value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);
+                return "#" + ("000000" + value[toString](16)).slice(-6);
+            });
+        } else {
+            var i = doc.createElement("i");
+            i.className = "Rapha\u00ebl colour picker";
+            i.style.cssText = "display:none";
+            doc.body[appendChild](i);
+            toHex = cacher(function (color) {
+                i.style.color = color;
+                return doc.defaultView.getComputedStyle(i, E).getPropertyValue("color");
+            });
+        }
+        return toHex(color);
+    };
     R.hsb2rgb = cacher(function (hue, saturation, brightness) {
         if (R.is(hue, "object") && "h" in hue && "s" in hue && "b" in hue) {
             brightness = hue.b;
@@ -145,12 +172,8 @@ window.Raphael = (function () {
                 hue = 4 + ((red - green) / delta);
             }
             hue /= 6;
-            if (hue < 0) {
-                hue += 1;
-            }
-            if (hue > 1) {
-                hue -= 1;
-            }
+            hue < 0 && hue++;
+            hue > 1 && hue--;
         }
         return {h: hue, s: saturation, b: brightness};
     }, R);
@@ -162,43 +185,41 @@ window.Raphael = (function () {
                 res += this[i][j];
                 j && j != jj - 1 && (res += ",");
             }
-            i != ii - 1 && (res += " ");
+            i != ii - 1 && (res += S);
         }
         return res[rp](/,(?=-)/g, E);
     };
     function cacher(f, scope, postprocessor) {
         function newf() {
             var arg = Array[proto].splice.call(arguments, 0, arguments[length]),
-                args = arg[join]("\u25ba");
-            newf.cache = newf.cache || {};
-            newf.count = newf.count || [];
-            if (args in newf.cache) {
-                return postprocessor ? postprocessor(newf.cache[args]) : newf.cache[args];
-            }
-            if (newf.count[length] >= 1e3) {
-                delete newf.cache[newf.count.shift()];
-            }
-            newf.count[push](args);
-            newf.cache[args] = f[apply](scope, arg);
-            return postprocessor ? postprocessor(newf.cache[args]) : newf.cache[args];
+                args = arg[join]("\u25ba"),
+                cache = newf.cache = newf.cache || {},
+                count = newf.count = newf.count || [];
+            if (cache[has](args)) {
+                return postprocessor ? postprocessor(cache[args]) : cache[args];
+            }
+            count[length] >= 1e3 && delete cache[count.shift()];
+            count[push](args);
+            cache[args] = f[apply](scope, arg);
+            return postprocessor ? postprocessor(cache[args]) : cache[args];
         }
         return newf;
     }
 
     R.getRGB = cacher(function (colour) {
-        var htmlcolors = {none: "none", aliceblue: "#f0f8ff", amethyst: "#96c", antiquewhite: "#faebd7", aqua: "#0ff", aquamarine: "#7fffd4", azure: "#f0ffff", beige: "#f5f5dc", bisque: "#ffe4c4", black: "#000", blanchedalmond: "#ffebcd", blue: "#00f", blueviolet: "#8a2be2", brown: "#a52a2a", burlywood: "#deb887", cadetblue: "#5f9ea0", chartreuse: "#7fff00", chocolate: "#d2691e", coral: "#ff7f50", cornflowerblue: "#6495ed", cornsilk: "#fff8dc", crimson: "#dc143c", cyan: "#0ff", darkblue: "#00008b", darkcyan: "#008b8b", darkgoldenrod: "#b8860b", darkgray: "#a9a9a9", darkgreen: "#006400", darkkhaki: "#bdb76b", darkmagenta: "#8b008b", darkolivegreen: "#556b2f", darkorange: "#ff8c00", darkorchid: "#9932cc", darkred: "#8b0000", darksalmon: "#e9967a", darkseagreen: "#8fbc8f", darkslateblue: "#483d8b", darkslategray: "#2f4f4f", darkturquoise: "#00ced1", darkviolet: "#9400d3", deeppink: "#ff1493", deepskyblue: "#00bfff", dimgray: "#696969", dodgerblue: "#1e90ff", firebrick: "#b22222", floralwhite: "#fffaf0", forestgreen: "#228b22", fuchsia: "#f0f", gainsboro: "#dcdcdc", ghostwhite: "#f8f8ff", gold: "#ffd700", goldenrod: "#daa520", gray: "#808080", green: "#008000", greenyellow: "#adff2f", honeydew: "#f0fff0", hotpink: "#ff69b4", indianred: "#cd5c5c", indigo: "#4b0082", ivory: "#fffff0", khaki: "#f0e68c", lavender: "#e6e6fa", lavenderblush: "#fff0f5", lawngreen: "#7cfc00", lemonchiffon: "#fffacd", lightblue: "#add8e6", lightcoral: "#f08080", lightcyan: "#e0ffff", lightgoldenrodyellow: "#fafad2", lightgreen: "#90ee90", lightgrey: "#d3d3d3", lightpink: "#ffb6c1", lightsalmon: "#ffa07a", lightsalmon: "#ffa07a", lightseagreen: "#20b2aa", lightskyblue: "#87cefa", lightslategray: "#789", lightsteelblue: "#b0c4de", lightyellow: "#ffffe0", lime: "#0f0", limegreen: "#32cd32", linen: "#faf0e6", magenta: "#f0f", maroon: "#800000", mediumaquamarine: "#66cdaa", mediumblue: "#0000cd", mediumorchid: "#ba55d3", mediumpurple: "#9370db", mediumseagreen: "#3cb371", mediumslateblue: "#7b68ee", mediumslateblue: "#7b68ee", mediumspringgreen: "#00fa9a", mediumturquoise: "#48d1cc", mediumvioletred: "#c71585", midnightblue: "#191970", mintcream: "#f5fffa", mistyrose: "#ffe4e1", moccasin: "#ffe4b5", navajowhite: "#ffdead", navy: "#000080", oldlace: "#fdf5e6", olive: "#808000", olivedrab: "#6b8e23", orange: "#ffa500", orangered: "#ff4500", orchid: "#da70d6", palegoldenrod: "#eee8aa", palegreen: "#98fb98", paleturquoise: "#afeeee", palevioletred: "#db7093", papayawhip: "#ffefd5", peachpuff: "#ffdab9", peru: "#cd853f", pink: "#ffc0cb", plum: "#dda0dd", powderblue: "#b0e0e6", purple: "#800080", red: "#f00", rosybrown: "#bc8f8f", royalblue: "#4169e1", saddlebrown: "#8b4513", salmon: "#fa8072", sandybrown: "#f4a460", seagreen: "#2e8b57", seashell: "#fff5ee", sienna: "#a0522d", silver: "#c0c0c0", skyblue: "#87ceeb", slateblue: "#6a5acd", slategray: "#708090", snow: "#fffafa", springgreen: "#00ff7f", steelblue: "#4682b4", tan: "#d2b48c", teal: "#008080", thistle: "#d8bfd8", tomato: "#ff6347", turquoise: "#40e0d0", violet: "#ee82ee", wheat: "#f5deb3", white: "#fff", whitesmoke: "#f5f5f5", yellow: "#ff0", yellowgreen: "#9acd32"},
-            res;
-        colour = htmlcolors[(colour + E).toLowerCase()] || colour;
-        if (!colour) {
+        if (!colour || !!((colour + E).indexOf("-") + 1)) {
             return {r: -1, g: -1, b: -1, hex: "none", error: 1};
         }
+        colour = colour + E;
         if (colour == "none") {
             return {r: -1, g: -1, b: -1, hex: "none"};
         }
-        var red,
+        !(({hs: 1, rg: 1}[has](colour.substring(0, 2)))) && (colour = toHex(colour));
+        var res,
+            red,
             green,
             blue,
-            rgb = (colour + E).match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i);
+            rgb = colour.match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i);
         if (rgb) {
             if (rgb[2]) {
                 blue = toInt(rgb[2].substring(5), 16);
@@ -244,11 +265,9 @@ window.Raphael = (function () {
             g = g[rp](rg, "0");
             b = b[rp](rg, "0");
             rgb.hex = "#" + r + g + b;
-            res = rgb;
-        } else {
-            res = {r: -1, g: -1, b: -1, hex: "none", error: 1};
+            return rgb;
         }
-        return res;
+        return {r: -1, g: -1, b: -1, hex: "none", error: 1};
     }, R);
     R.getColor = function (value) {
         var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},
@@ -257,9 +276,7 @@ window.Raphael = (function () {
         if (start.h > 1) {
             start.h = 0;
             start.s -= .2;
-            if (start.s <= 0) {
-                this.getColor.start = {h: 0, s: 1, b: start.b};
-            }
+            start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});
         }
         return rgb.hex;
     };
@@ -879,7 +896,7 @@ window.Raphael = (function () {
                 return null;
             }
             var el = $(type + "Gradient");
-            el.id = "r" + (R.idGenerator++)[toString](36);
+            el.id = "r" + (R._id++)[toString](36);
             type == "radial" ? $(el, {fx: fx, fy: fy}) : $(el, {x1: vector[0], y1: vector[1], x2: vector[2], y2: vector[3]});
             SVG.defs[appendChild](el);
             for (var i = 0, ii = dots[length]; i < ii; i++) {
@@ -921,7 +938,7 @@ window.Raphael = (function () {
                 },
                 node = o.node,
                 attrs = o.attrs,
-                rot = o.attr("rotation"),
+                rot = o.rotate(),
                 addDashes = function (o, value) {
                     value = dasharray[(value + E).toLowerCase()];
                     if (value) {
@@ -962,7 +979,7 @@ window.Raphael = (function () {
                             o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);
                             var el = $("clipPath"),
                                 rc = $("rect");
-                            el.id = "r" + (R.idGenerator++)[toString](36);
+                            el.id = "r" + (R._id++)[toString](36);
                             $(rc, {
                                 x: rect[0],
                                 y: rect[1],
@@ -1004,7 +1021,7 @@ window.Raphael = (function () {
                             break;
                         }
                     case "cx":
-                        node[setAttribute](att, value);
+                        node[setAttribute](att, round(value));
                         o.pattern && updatePosition(o);
                         break;
                     case "height":
@@ -1024,7 +1041,7 @@ window.Raphael = (function () {
                             break;
                         }
                     case "cy":
-                        node[setAttribute](att, value);
+                        node[setAttribute](att, round(value));
                         o.pattern && updatePosition(o);
                         break;
                     case "r":
@@ -1067,7 +1084,7 @@ window.Raphael = (function () {
                         if (isURL) {
                             var el = $("pattern"),
                                 ig = $("image");
-                            el.id = "r" + (R.idGenerator++)[toString](36);
+                            el.id = "r" + (R._id++)[toString](36);
                             $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse"});
                             $(ig, {x: 0, y:0});
                             ig.setAttributeNS(o.paper.xlink, "href", isURL[1]);
@@ -1139,7 +1156,7 @@ window.Raphael = (function () {
             }
             
             tuneText(o, params);
-            toInt(rot, 10) && o.rotate(rot, true);
+            toFloat(rot) && o.rotate(rot, true);
         };
         var leading = 1.2;
         var tuneText = function (el, params) {
@@ -1170,12 +1187,13 @@ window.Raphael = (function () {
             $(node, {y: a.y});
             var bb = el.getBBox(),
                 dif = a.y - (bb.y + bb.height / 2);
-            dif && $(node, {y: a.y + dif});
+            dif && isFinite(dif) && $(node, {y: a.y + dif});
         };
         var Element = function (node, svg) {
             var X = 0,
                 Y = 0;
             this[0] = node;
+            this.id = R._oid++;
             this.node = node;
             node.raphael = this;
             this.paper = svg;
@@ -1190,9 +1208,12 @@ window.Raphael = (function () {
             };
         };
         Element[proto].rotate = function (deg, cx, cy) {
+            if (this.removed) {
+                return this;
+            }
             if (deg == null) {
                 if (this._.rt.cx) {
-                    return [this._.rt.deg, this._.rt.cx, this._.rt.cy][join](" ");
+                    return [this._.rt.deg, this._.rt.cx, this._.rt.cy][join](S);
                 }
                 return this._.rt.deg;
             }
@@ -1220,15 +1241,15 @@ window.Raphael = (function () {
                 this.transformations[0] = E;
                 this.clip && $(this.clip, {transform: E});
             }
-            $(this.node, {transform: this.transformations[join](" ")});
+            $(this.node, {transform: this.transformations[join](S)});
             return this;
         };
         Element[proto].hide = function () {
-            this.node.style.display = "none";
+            !this.removed && (this.node.style.display = "none");
             return this;
         };
         Element[proto].show = function () {
-            this.node.style.display = "block";
+            !this.removed && (this.node.style.display = "");
             return this;
         };
         Element[proto].remove = function () {
@@ -1236,8 +1257,12 @@ window.Raphael = (function () {
             for (var i in this) {
                 delete this[i];
             }
+            this.removed = true;
         };
         Element[proto].getBBox = function () {
+            if (this.removed) {
+                return this;
+            }
             if (this.type == "path") {
                 return pathDimensions(this.attrs.path);
             }
@@ -1266,6 +1291,9 @@ window.Raphael = (function () {
             return bbox;
         };
         Element[proto].attr = function () {
+            if (this.removed) {
+                return this;
+            }
             if (arguments[length] == 1 && R.is(arguments[0], "string")) {
                 if (arguments[0] == "translation") {
                     return this.translate();
@@ -1295,16 +1323,22 @@ window.Raphael = (function () {
             return this;
         };
         Element[proto].toFront = function () {
-            this.node.parentNode[appendChild](this.node);
+            !this.removed && this.node.parentNode[appendChild](this.node);
             return this;
         };
         Element[proto].toBack = function () {
+            if (this.removed) {
+                return this;
+            }
             if (this.node.parentNode.firstChild != this.node) {
                 this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);
             }
             return this;
         };
         Element[proto].insertAfter = function (element) {
+            if (this.removed) {
+                return this;
+            }
             if (element.node.nextSibling) {
                 element.node.parentNode.insertBefore(this.node, element.node.nextSibling);
             } else {
@@ -1313,6 +1347,9 @@ window.Raphael = (function () {
             return this;
         };
         Element[proto].insertBefore = function (element) {
+            if (this.removed) {
+                return this;
+            }
             var node = element.node;
             node.parentNode.insertBefore(this.node, node);
             return this;
@@ -1460,7 +1497,7 @@ window.Raphael = (function () {
                 }
                 res[push](r);
             }
-            return res[join](" ");
+            return res[join](S);
         };
         
         R[toString] = function () {
@@ -1500,7 +1537,6 @@ window.Raphael = (function () {
             params.title && (node.title = params.title);
             params.target && (node.target = params.target);
             if (params.path && o.type == "path") {
-                // a.path = R.parsePathString(params.path);
                 a.path = params.path;
                 node.path = path2vml(a.path);
             }
@@ -1675,7 +1711,7 @@ window.Raphael = (function () {
                     if (pow(fx - .5, 2) + pow(fy - .5, 2) > .25) {
                         fy = Math.sqrt(.25 - pow(fx - .5, 2)) + .5;
                     }
-                    fxfy = fx + " " + fy;
+                    fxfy = fx + S + fy;
                 }
                 return E;
             });
@@ -1701,13 +1737,9 @@ window.Raphael = (function () {
                 fill.color2 = dots[dots[length] - 1].color;
                 var clrs = [];
                 for (var i = 0, ii = dots[length]; i < ii; i++) {
-                    dots[i].offset && clrs[push](dots[i].offset + " " + dots[i].color);
-                }
-                if (clrs[length] && fill.colors) {
-                    fill.colors.value = clrs[join](",");
-                } else {
-                    fill.colors.value = "0% " + fill.color;
+                    dots[i].offset && clrs[push](dots[i].offset + S + dots[i].color);
                 }
+                fill.colors.value = clrs[length] ? clrs[join](",") : "0% " + fill.color;
                 if (type == "radial") {
                     fill.focus = "100%";
                     fill.focussize = fxfy;
@@ -1724,6 +1756,7 @@ window.Raphael = (function () {
                 RotY = 0,
                 Scale = 1;
             this[0] = node;
+            this.id = R._oid++;
             this.node = node;
             node.raphael = this;
             this.X = 0;
@@ -1740,9 +1773,12 @@ window.Raphael = (function () {
             };
         };
         Element[proto].rotate = function (deg, cx, cy) {
+            if (this.removed) {
+                return this;
+            }
             if (deg == null) {
                 if (this._.rt.cx) {
-                    return [this._.rt.deg, this._.rt.cx, this._.rt.cy][join](" ");
+                    return [this._.rt.deg, this._.rt.cx, this._.rt.cy][join](S);
                 }
                 return this._.rt.deg;
             }
@@ -1770,6 +1806,9 @@ window.Raphael = (function () {
             return this;
         };
         Element[proto].setBox = function (params, cx, cy) {
+            if (this.removed) {
+                return this;
+            }
             var gs = this.Group.style,
                 os = (this.shape && this.shape.style) || this.node.style;
             params = params || {};
@@ -1865,20 +1904,22 @@ window.Raphael = (function () {
                     this.node.parentNode.removeChild(this.node);
                     this.node = o;
                     this.arcsize = arcsize;
-                    setFillAndStroke(this, this.attrs);
-                    this.setBox(this.attrs);
+                    this.attr(this.attrs);
                 }
             }
         };
         Element[proto].hide = function () {
-            this.Group.style.display = "none";
+            !this.removed && (this.Group.style.display = "none");
             return this;
         };
         Element[proto].show = function () {
-            this.Group.style.display = "block";
+            !this.removed && (this.Group.style.display = "block");
             return this;
         };
         Element[proto].getBBox = function () {
+            if (this.removed) {
+                return this;
+            }
             if (this.type == "path") {
                 return pathDimensions(this.attrs.path);
             }
@@ -1896,8 +1937,12 @@ window.Raphael = (function () {
             for (var i in this) {
                 delete this[i];
             }
+            this.removed = true;
         };
         Element[proto].attr = function () {
+            if (this.removed) {
+                return this;
+            }
             if (arguments[length] == 1 && R.is(arguments[0], "string")) {
                 if (arguments[0] == "translation") {
                     return this.translate();
@@ -1922,32 +1967,36 @@ window.Raphael = (function () {
                 params = {};
                 params[arguments[0]] = arguments[1];
             }
-            if (arguments[length] == 1 && R.is(arguments[0], "object")) {
-                params = arguments[0];
-            }
+            arguments[length] == 1 && R.is(arguments[0], "object") && (params = arguments[0]);
             if (params) {
-                if (params.gradient && (this.type in {circle: 1, ellipse: 1} || (params.gradient + E).charAt(0) != "r")) {
-                    addGradientFill(this, params.gradient);
-                }
                 if (params.text && this.type == "text") {
                     this.node.string = params.text;
                 }
                 setFillAndStroke(this, params);
+                if (params.gradient && ({circle: 1, ellipse: 1}[has](this.type) || (params.gradient + E).charAt(0) != "r")) {
+                    addGradientFill(this, params.gradient);
+                }
                 this.setBox(this.attrs);
             }
             return this;
         };
         Element[proto].toFront = function () {
-            this.Group.parentNode[appendChild](this.Group);
+            !this.removed && this.Group.parentNode[appendChild](this.Group);
             return this;
         };
         Element[proto].toBack = function () {
+            if (this.removed) {
+                return this;
+            }
             if (this.Group.parentNode.firstChild != this.Group) {
                 this.Group.parentNode.insertBefore(this.Group, this.Group.parentNode.firstChild);
             }
             return this;
         };
         Element[proto].insertAfter = function (element) {
+            if (this.removed) {
+                return this;
+            }
             if (element.Group.nextSibling) {
                 element.Group.parentNode.insertBefore(this.Group, element.Group.nextSibling);
             } else {
@@ -1956,7 +2005,7 @@ window.Raphael = (function () {
             return this;
         };
         Element[proto].insertBefore = function (element) {
-            element.Group.parentNode.insertBefore(this.Group, element.Group);
+            !this.removed && element.Group.parentNode.insertBefore(this.Group, element.Group);
             return this;
         };
 
@@ -2048,7 +2097,7 @@ window.Raphael = (function () {
             path.textpathok = true;
             ol.width = vml.width;
             ol.height = vml.height;
-            o.string = text;
+            o.string = text + E;
             o.on = true;
             el[appendChild](o);
             el[appendChild](path);
@@ -2074,7 +2123,7 @@ window.Raphael = (function () {
             cs.width = this.width + "px";
             cs.height = this.height + "px";
             cs.clip = "rect(0 " + this.width + "px " + this.height + "px 0)";
-            this.coordsize = this.width + " " + this.height;
+            this.coordsize = this.width + S + this.height;
             return this;
         };
         doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
@@ -2106,7 +2155,7 @@ window.Raphael = (function () {
             height = toFloat(height) || 342;
             res.width = width;
             res.height = height;
-            res.coordsize = width + " " + height;
+            res.coordsize = width + S + height;
             res.coordorigin = "0 0";
             res.span = doc.createElement("span");
             res.span.style.cssText = "position:absolute;left:-9999px;top:-9999px;padding:0;margin:0;line-height:1;display:inline;";
@@ -2136,9 +2185,7 @@ window.Raphael = (function () {
             }
             plugins.call(res, res, R.fn);
             res.clear = function () {
-                while (c.firstChild) {
-                    c.removeChild(c.firstChild);
-                }
+                c.innerHTML = E;
             };
             res.raphael = R;
             return res;
@@ -2214,17 +2261,22 @@ window.Raphael = (function () {
                 return this;
             };
             Element[proto]["un" + eventName] = function (fn) {
-                this.events &&
-                this.events[eventName] &&
-                this.events[eventName][fn] &&
-                this.events[eventName][fn][length] &&
-                this.events[eventName][fn].shift()() &&
-                !this.events[eventName][fn][length] &&
-                delete this.events[eventName][fn];
+                var e = this.events;
+                e &&
+                e[eventName] &&
+                e[eventName][fn] &&
+                e[eventName][fn][length] &&
+                e[eventName][fn].shift()() &&
+                !e[eventName][fn][length] &&
+                delete e[eventName][fn];
+                return this;
             };
 
         })(events[i]);
     }
+    Element[proto].hover = function (f_in, f_out) {
+        return this.mouseover(f_in).mouseout(f_out);
+    };
     paper.circle = function (x, y, r) {
         return theCircle(this, x || 0, y || 0, r || 0);
     };
@@ -2249,13 +2301,9 @@ window.Raphael = (function () {
         return new Set(itemsArray);
     };
     paper.setSize = setSize;
-    Element[proto].stop = function () {
-        clearTimeout(this.animation_in_progress);
-        return this;
-    };
     Element[proto].scale = function (x, y, cx, cy) {
         if (x == null && y == null) {
-            return {x: this._.sx, y: this._.sy, toString: function () { return this.x + " " + this.y; }};
+            return {x: this._.sx, y: this._.sy, toString: function () { return this.x + S + this.y; }};
         }
         y = y || x;
         !+y && (y = x);
@@ -2337,7 +2385,7 @@ window.Raphael = (function () {
             if (this.type in {text: 1, image:1} && (dirx != 1 || diry != 1)) {
                 if (this.transformations) {
                     this.transformations[2] = "scale("[concat](dirx, ",", diry, ")");
-                    this.node[setAttribute]("transform", this.transformations[join](" "));
+                    this.node[setAttribute]("transform", this.transformations[join](S));
                     dx = (dirx == -1) ? -a.x - (neww || 0) : a.x;
                     dy = (diry == -1) ? -a.y - (newh || 0) : a.y;
                     this.attr({x: dx, y: dy});
@@ -2352,7 +2400,7 @@ window.Raphael = (function () {
             } else {
                 if (this.transformations) {
                     this.transformations[2] = E;
-                    this.node[setAttribute]("transform", this.transformations[join](" "));
+                    this.node[setAttribute]("transform", this.transformations[join](S));
                     a.fx = 0;
                     a.fy = 0;
                 } else {
@@ -2360,7 +2408,7 @@ window.Raphael = (function () {
                     s.filter = (this.node.filterMatrix || E) + (this.node.filterOpacity || E);
                 }
             }
-            a.scale = [x, y, cx, cy][join](" ");
+            a.scale = [x, y, cx, cy][join](S);
             this._.sx = x;
             this._.sy = y;
         }
@@ -2427,17 +2475,118 @@ window.Raphael = (function () {
         }
     };
 
+    var animationElements = {length : 0},
+        animation = function () {
+            var Now = +new Date;
+            for (var l in animationElements) if (l != "length" && animationElements[has](l)) {
+                var e = animationElements[l];
+                if (e.stop) {
+                    delete animationElements[l];
+                    animationElements[length]--;
+                    continue;
+                }
+                var time = Now - e.start,
+                    ms = e.ms,
+                    easing = e.easing,
+                    from = e.from,
+                    diff = e.diff,
+                    to = e.to,
+                    t = e.t,
+                    prev = e.prev || 0,
+                    that = e.el,
+                    callback = e.callback,
+                    set = {},
+                    now;
+                if (time < ms) {
+                    var pos = R.easing_formulas[easing] ? R.easing_formulas[easing](time / ms) : time / ms;
+                    for (var attr in from) if (from[has](attr)) {
+                        switch (availableAnimAttrs[attr]) {
+                            case "number":
+                                now = +from[attr] + pos * ms * diff[attr];
+                                break;
+                            case "colour":
+                                now = "rgb(" + [
+                                    upto255(round(from[attr].r + pos * ms * diff[attr].r)),
+                                    upto255(round(from[attr].g + pos * ms * diff[attr].g)),
+                                    upto255(round(from[attr].b + pos * ms * diff[attr].b))
+                                ][join](",") + ")";
+                                break;
+                            case "path":
+                                now = [];
+                                for (var i = 0, ii = from[attr][length]; i < ii; i++) {
+                                    now[i] = [from[attr][i][0]];
+                                    for (var j = 1, jj = from[attr][i][length]; j < jj; j++) {
+                                        now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];
+                                    }
+                                    now[i] = now[i][join](S);
+                                }
+                                now = now[join](S);
+                                break;
+                            case "csv":
+                                switch (attr) {
+                                    case "translation":
+                                        var x = diff[attr][0] * (time - prev),
+                                            y = diff[attr][1] * (time - prev);
+                                        t.x += x;
+                                        t.y += y;
+                                        now = x + S + y;
+                                    break;
+                                    case "rotation":
+                                        now = +from[attr][0] + pos * ms * diff[attr][0];
+                                        from[attr][1] && (now += "," + from[attr][1] + "," + from[attr][2]);
+                                    break;
+                                    case "scale":
+                                        now = [+from[attr][0] + pos * ms * diff[attr][0], +from[attr][1] + pos * ms * diff[attr][1], (2 in to[attr] ? to[attr][2] : E), (3 in to[attr] ? to[attr][3] : E)][join](S);
+                                    break;
+                                    case "clip-rect":
+                                        now = [];
+                                        var i = 4;
+                                        while (i--) {
+                                            now[i] = +from[attr][i] + pos * ms * diff[attr][i];
+                                        }
+                                    break;
+                                }
+                                break;
+                        }
+                        set[attr] = now;
+                    }
+                    that.attr(set);
+                    that._run && that._run.call(that);
+                } else {
+                    (t.x || t.y) && that.translate(-t.x, -t.y);
+                    to.scale && (to.scale = to.scale + E);
+                    that.attr(to);
+                    R.is(callback, "function") && callback.call(that);
+                    delete animationElements[l];
+                    animationElements[length]--;
+                    that.in_animation = null;
+                }
+                e.prev = time;
+            }
+            R.svg && paper.safari();
+            animationElements[length] && setTimeout(animation);
+        },
+        upto255 = function (color) {
+            return color > 255 ? 255 : (color < 0 ? 0 : color);
+        };
+
+    Element[proto].animateWith = function (element, params, ms, easing, callback) {
+        animationElements[element.in_animation] && (params.start = animationElements[element.in_animation].start);
+        return this.animate(params, ms, easing, callback);
+    };
+    Element[proto].onAnimation = function (f) {
+        this._run = f || null;
+        return this;
+    };
     Element[proto].animate = function (params, ms, easing, callback) {
-        clearTimeout(this.animation_in_progress);
         if (R.is(easing, "function") || !easing) {
             callback = easing || null;
         }
         var from = {},
             to = {},
-            diff = {},
-            t = {x: 0, y: 0};
+            diff = {};
         for (var attr in params) if (params[has](attr)) {
-            if (attr in availableAnimAttrs) {
+            if (availableAnimAttrs[has](attr)) {
                 from[attr] = this.attr(attr);
                 (from[attr] == null) && (from[attr] = availableAttrs[attr]);
                 to[attr] = params[attr];
@@ -2496,82 +2645,25 @@ window.Raphael = (function () {
                 }
             }
         }
-        var start = +new Date,
-            prev = 0,
-            upto255 = function (color) {
-                return color > 255 ? 255 : color;
-            },
-            that = this;
-        (function tick() {
-            var time = new Date - start,
-                set = {},
-                now;
-            if (time < ms) {
-                var pos = R.easing_formulas[easing] ? R.easing_formulas[easing](time / ms) : time / ms;
-                for (var attr in from) if (from[has](attr)) {
-                    switch (availableAnimAttrs[attr]) {
-                        case "number":
-                            now = +from[attr] + pos * ms * diff[attr];
-                            break;
-                        case "colour":
-                            now = "rgb(" + [
-                                upto255(round(from[attr].r + pos * ms * diff[attr].r)),
-                                upto255(round(from[attr].g + pos * ms * diff[attr].g)),
-                                upto255(round(from[attr].b + pos * ms * diff[attr].b))
-                            ][join](",") + ")";
-                            break;
-                        case "path":
-                            now = [];
-                            for (var i = 0, ii = from[attr][length]; i < ii; i++) {
-                                now[i] = [from[attr][i][0]];
-                                for (var j = 1, jj = from[attr][i][length]; j < jj; j++) {
-                                    now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];
-                                }
-                                now[i] = now[i][join](" ");
-                            }
-                            now = now[join](" ");
-                            break;
-                        case "csv":
-                            switch (attr) {
-                                case "translation":
-                                    var x = diff[attr][0] * (time - prev),
-                                        y = diff[attr][1] * (time - prev);
-                                    t.x += x;
-                                    t.y += y;
-                                    now = x + " " + y;
-                                break;
-                                case "rotation":
-                                    now = +from[attr][0] + pos * ms * diff[attr][0];
-                                    from[attr][1] && (now += "," + from[attr][1] + "," + from[attr][2]);
-                                break;
-                                case "scale":
-                                    now = [+from[attr][0] + pos * ms * diff[attr][0], +from[attr][1] + pos * ms * diff[attr][1], (2 in params[attr] ? params[attr][2] : E), (3 in params[attr] ? params[attr][3] : E)][join](" ");
-                                break;
-                                case "clip-rect":
-                                    now = [];
-                                    var i = 4;
-                                    while (i--) {
-                                        now[i] = +from[attr][i] + pos * ms * diff[attr][i];
-                                    }
-                                break;
-                            }
-                            break;
-                    }
-                    set[attr] = now + E;
-                }
-                that.attr(set);
-                that.animation_in_progress = setTimeout(tick);
-                R.svg && paper.safari();
-            } else {
-                (t.x || t.y) && that.translate(-t.x, -t.y);
-                params.scale && (params.scale = params.scale + E);
-                that.attr(params);
-                clearTimeout(that.animation_in_progress);
-                R.svg && paper.safari();
-                (R.is(callback, "function")) && callback.call(that);
-            }
-            prev = time;
-        })();
+        this.stop();
+        this.in_animation = 1;
+        animationElements[this.id] = {
+            start: params.start || +new Date,
+            ms: ms,
+            easing: easing,
+            from: from,
+            diff: diff,
+            to: to,
+            el: this,
+            callback: callback,
+            t: {x: 0, y: 0}
+        };
+        ++animationElements[length] == 1 && animation();
+        return this;
+    };
+    Element[proto].stop = function () {
+        delete animationElements[this.id];
+        this.in_animation = 0;
         return this;
     };
     Element[proto].translate = function (x, y) {
@@ -2602,7 +2694,7 @@ window.Raphael = (function () {
     Element[proto][toString] = function () {
         return "Rapha\u00ebl\u2019s object";
     };
-    
+    R.ae = animationElements;
 
     // Set
     var Set = function (items) {
@@ -2657,9 +2749,7 @@ window.Raphael = (function () {
         return this;
     };
     Set[proto].animate = function (params, ms, easing, callback) {
-        if (R.is(easing, "function") || !easing) {
-            callback = easing || null;
-        }
+        (R.is(easing, "function") || !easing) && (callback = easing || null);
         var len = this.items[length],
             i = len,
             set = this;
@@ -2667,12 +2757,14 @@ window.Raphael = (function () {
             var collector = function () {
                 !--len && callback.call(set);
             };
+            this.items[--i].animate(params, ms, easing || collector, collector);
             while (i--) {
-                this.items[i].animate(params, ms, easing || collector, collector);
+                this.items[i].animateWith(this.items[len - 1], params, ms, easing || collector, collector);
             }
         } else {
+            this.items[--i].animate(params, ms, easing);
             while (i--) {
-                this.items[i].animate(params, ms, easing);
+                this.items[i].animateWith(this.items[len - 1], params, ms, easing);
             }
         }
         return this;
@@ -2785,8 +2877,9 @@ window.Raphael = (function () {
     };
 
     R.format = function (token) {
-        var args = R.is(arguments[1], "array") ? [0][concat](arguments[1]) : arguments;
-        token && R.is(token, "string") && args[length] - 1 && (token = token[rp](/\{(\d+)\}/g, function (str, i) {
+        var args = R.is(arguments[1], "array") ? [0][concat](arguments[1]) : arguments,
+            rg = /\{(\d+)\}/g;
+        token && R.is(token, "string") && args[length] - 1 && (token = token[rp](rg, function (str, i) {
             return args[++i] == null ? E : args[i];
         }));
         return token || E;