blob: 3f76487c3ec4d94ab59bb5ddb4021c9d861ffcd1 [file] [log] [blame]
/*
* Raphael 1.4.3 - JavaScript Vector Library
*
* Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
Raphael=function(){function m(){if(m.is(arguments[0],U)){for(var a=arguments[0],b=Aa[K](m,a.splice(0,3+m.is(a[0],O))),c=b.set(),d=0,f=a[o];d<f;d++){var e=a[d]||{};nb.test(e.type)&&c[E](b[e.type]().attr(e))}return c}return Aa[K](m,arguments)}m.version="1.4.3";var V=/[, ]+/,nb=/^(circle|rect|path|ellipse|text|image)$/,p="prototype",z="hasOwnProperty",C=document,X=window,La={was:Object[p][z].call(X,"Raphael"),is:X.Raphael};function G(){}var y="appendChild",K="apply",M="concat",Ba="createTouch"in C,s=
"",P=" ",H="split",Ma="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[H](P),Ca={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},Q="join",o="length",ca=String[p].toLowerCase,w=Math,Y=w.max,$=w.min,O="number",ea="string",U="array",N="toString",aa="fill",ob=Object[p][N],D=w.pow,E="push",ga=/^(?=[\da-f]$)/,Na=/^url\(['"]?([^\)]+?)['"]?\)$/i,pb=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\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,
F=w.round,W="setAttribute",A=parseFloat,da=parseInt,Da=" progid:DXImageTransform.Microsoft",pa=String[p].toUpperCase,qa={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",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},Ea={along:"along",blur:O,"clip-rect":"csv",cx:O,cy:O,fill:"colour","fill-opacity":O,"font-size":O,height:O,opacity:O,path:"path",r:O,rotation:"csv",rx:O,ry:O,scale:"csv",stroke:"colour","stroke-opacity":O,"stroke-width":O,translation:"csv",width:O,x:O,y:O},I="replace";m.type=X.SVGAngle||C.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure",
"1.1")?"SVG":"VML";if(m.type=="VML"){var ha=C.createElement("div");ha.innerHTML="<!--[if vml]><br><br><![endif]--\>";if(ha.childNodes[o]!=2)return m.type=null;ha=null}m.svg=!(m.vml=m.type=="VML");G[p]=m[p];m._id=0;m._oid=0;m.fn={};m.is=function(a,b){b=ca.call(b);return b=="object"&&a===Object(a)||b=="undefined"&&typeof a==b||b=="null"&&a==null||ca.call(ob.call(a).slice(8,-1))==b};m.setWindow=function(a){X=a;C=X.document};function ra(a){if(m.vml){var b=/^\s+|\s+$/g;ra=T(function(d){var f;d=(d+s)[I](b,
s);try{var e=new X.ActiveXObject("htmlfile");e.write("<body>");e.close();f=e.body}catch(g){f=X.createPopup().document.body}e=f.createTextRange();try{f.style.color=d;var h=e.queryCommandValue("ForeColor");h=(h&255)<<16|h&65280|(h&16711680)>>>16;return"#"+("000000"+h[N](16)).slice(-6)}catch(i){return"none"}})}else{var c=C.createElement("i");c.title="Rapha\u00ebl Colour Picker";c.style.display="none";C.body[y](c);ra=T(function(d){c.style.color=d;return C.defaultView.getComputedStyle(c,s).getPropertyValue("color")})}return ra(a)}
function qb(){return"hsb("+[this.h,this.s,this.b]+")"}function rb(){return this.hex}m.hsb2rgb=T(function(a,b,c){if(m.is(a,"object")&&"h"in a&&"s"in a&&"b"in a){c=a.b;b=a.s;a=a.h}var d;if(c==0)return{r:0,g:0,b:0,hex:"#000"};if(a>1||b>1||c>1){a/=255;b/=255;c/=255}d=~~(a*6);a=a*6-d;var f=c*(1-b),e=c*(1-b*a),g=c*(1-b*(1-a));a=[c,e,f,f,g,c,c][d];b=[g,c,c,e,f,f,g][d];d=[f,f,g,c,c,e,f][d];a*=255;b*=255;d*=255;c={r:a,g:b,b:d,toString:rb};a=(~~a)[N](16);b=(~~b)[N](16);d=(~~d)[N](16);a=a[I](ga,"0");b=b[I](ga,
"0");d=d[I](ga,"0");c.hex="#"+a+b+d;return c},m);m.rgb2hsb=T(function(a,b,c){if(m.is(a,"object")&&"r"in a&&"g"in a&&"b"in a){c=a.b;b=a.g;a=a.r}if(m.is(a,ea)){var d=m.getRGB(a);a=d.r;b=d.g;c=d.b}if(a>1||b>1||c>1){a/=255;b/=255;c/=255}var f=Y(a,b,c),e=$(a,b,c);d=f;if(e==f)return{h:0,s:0,b:f};else{var g=f-e;e=g/f;a=a==f?(b-c)/g:b==f?2+(c-a)/g:4+(a-b)/g;a/=6;a<0&&a++;a>1&&a--}return{h:a,s:e,b:d,toString:qb}},m);var sb=/,?([achlmqrstvxz]),?/gi,sa=/\s*,\s*/,tb={hs:1,rg:1};m._path2string=function(){return this.join(",")[I](sb,
"$1")};function T(a,b,c){function d(){var f=Array[p].slice.call(arguments,0),e=f[Q]("\u25ba"),g=d.cache=d.cache||{},h=d.count=d.count||[];if(g[z](e))return c?c(g[e]):g[e];h[o]>=1000&&delete g[h.shift()];h[E](e);g[e]=a[K](b,f);return c?c(g[e]):g[e]}return d}m.getRGB=T(function(a){if(!a||(a+=s).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1};if(a=="none")return{r:-1,g:-1,b:-1,hex:"none"};!(tb[z](a.substring(0,2))||a.charAt()=="#")&&(a=ra(a));var b,c,d,f,e;if(a=a.match(pb)){if(a[2]){d=da(a[2].substring(5),
16);c=da(a[2].substring(3,5),16);b=da(a[2].substring(1,3),16)}if(a[3]){d=da((e=a[3].charAt(3))+e,16);c=da((e=a[3].charAt(2))+e,16);b=da((e=a[3].charAt(1))+e,16)}if(a[4]){a=a[4][H](sa);b=A(a[0]);c=A(a[1]);d=A(a[2]);f=A(a[3])}if(a[5]){a=a[5][H](sa);b=A(a[0])*2.55;c=A(a[1])*2.55;d=A(a[2])*2.55;f=A(a[3])}if(a[6]){a=a[6][H](sa);b=A(a[0]);c=A(a[1]);d=A(a[2]);return m.hsb2rgb(b,c,d)}if(a[7]){a=a[7][H](sa);b=A(a[0])*2.55;c=A(a[1])*2.55;d=A(a[2])*2.55;return m.hsb2rgb(b,c,d)}a={r:b,g:c,b:d};b=(~~b)[N](16);
c=(~~c)[N](16);d=(~~d)[N](16);b=b[I](ga,"0");c=c[I](ga,"0");d=d[I](ga,"0");a.hex="#"+b+c+d;isFinite(A(f))&&(a.o=f);return a}return{r:-1,g:-1,b:-1,hex:"none",error:1}},m);m.getColor=function(a){a=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75};var b=this.hsb2rgb(a.h,a.s,a.b);a.h+=0.075;if(a.h>1){a.h=0;a.s-=0.2;a.s<=0&&(this.getColor.start={h:0,s:1,b:a.b})}return b.hex};m.getColor.reset=function(){delete this.start};var ub=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,
vb=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;m.parsePathString=T(function(a){if(!a)return null;var b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[];if(m.is(a,U)&&m.is(a[0],U))c=ta(a);c[o]||(a+s)[I](ub,function(d,f,e){var g=[];d=ca.call(f);e[I](vb,function(h,i){i&&g[E](+i)});if(d=="m"&&g[o]>2){c[E]([f][M](g.splice(0,2)));d="l";f=f=="m"?"l":"L"}for(;g[o]>=b[d];){c[E]([f][M](g.splice(0,b[d])));if(!b[d])break}});c[N]=m._path2string;return c});m.findDotsAtSegment=function(a,b,c,d,f,e,g,h,i){var j=1-i,l=
D(j,3)*a+D(j,2)*3*i*c+j*3*i*i*f+D(i,3)*g;j=D(j,3)*b+D(j,2)*3*i*d+j*3*i*i*e+D(i,3)*h;var n=a+2*i*(c-a)+i*i*(f-2*c+a),r=b+2*i*(d-b)+i*i*(e-2*d+b),q=c+2*i*(f-c)+i*i*(g-2*f+c),k=d+2*i*(e-d)+i*i*(h-2*e+d);a=(1-i)*a+i*c;b=(1-i)*b+i*d;f=(1-i)*f+i*g;e=(1-i)*e+i*h;h=90-w.atan((n-q)/(r-k))*180/w.PI;(n>q||r<k)&&(h+=180);return{x:l,y:j,m:{x:n,y:r},n:{x:q,y:k},start:{x:a,y:b},end:{x:f,y:e},alpha:h}};var va=T(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=ua(a);for(var b=0,c=0,d=[],f=[],e,g=0,h=a[o];g<h;g++){e=
a[g];if(e[0]=="M"){b=e[1];c=e[2];d[E](b);f[E](c)}else{b=wb(b,c,e[1],e[2],e[3],e[4],e[5],e[6]);d=d[M](b.min.x,b.max.x);f=f[M](b.min.y,b.max.y);b=e[5];c=e[6]}}a=$[K](0,d);e=$[K](0,f);return{x:a,y:e,width:Y[K](0,d)-a,height:Y[K](0,f)-e}});function ta(a){var b=[];if(!m.is(a,U)||!m.is(a&&a[0],U))a=m.parsePathString(a);for(var c=0,d=a[o];c<d;c++){b[c]=[];for(var f=0,e=a[c][o];f<e;f++)b[c][f]=a[c][f]}b[N]=m._path2string;return b}var Oa=T(function(a){if(!m.is(a,U)||!m.is(a&&a[0],U))a=m.parsePathString(a);
var b=[],c=0,d=0,f=0,e=0,g=0;if(a[0][0]=="M"){c=a[0][1];d=a[0][2];f=c;e=d;g++;b[E](["M",c,d])}g=g;for(var h=a[o];g<h;g++){var i=b[g]=[],j=a[g];if(j[0]!=ca.call(j[0])){i[0]=ca.call(j[0]);switch(i[0]){case "a":i[1]=j[1];i[2]=j[2];i[3]=j[3];i[4]=j[4];i[5]=j[5];i[6]=+(j[6]-c).toFixed(3);i[7]=+(j[7]-d).toFixed(3);break;case "v":i[1]=+(j[1]-d).toFixed(3);break;case "m":f=j[1];e=j[2];default:for(var l=1,n=j[o];l<n;l++)i[l]=+(j[l]-(l%2?c:d)).toFixed(3)}}else{b[g]=[];if(j[0]=="m"){f=j[1]+c;e=j[2]+d}i=0;for(l=
j[o];i<l;i++)b[g][i]=j[i]}j=b[g][o];switch(b[g][0]){case "z":c=f;d=e;break;case "h":c+=+b[g][j-1];break;case "v":d+=+b[g][j-1];break;default:c+=+b[g][j-2];d+=+b[g][j-1]}}b[N]=m._path2string;return b},0,ta),ka=T(function(a){if(!m.is(a,U)||!m.is(a&&a[0],U))a=m.parsePathString(a);var b=[],c=0,d=0,f=0,e=0,g=0;if(a[0][0]=="M"){c=+a[0][1];d=+a[0][2];f=c;e=d;g++;b[0]=["M",c,d]}g=g;for(var h=a[o];g<h;g++){var i=b[g]=[],j=a[g];if(j[0]!=pa.call(j[0])){i[0]=pa.call(j[0]);switch(i[0]){case "A":i[1]=j[1];i[2]=
j[2];i[3]=j[3];i[4]=j[4];i[5]=j[5];i[6]=+(j[6]+c);i[7]=+(j[7]+d);break;case "V":i[1]=+j[1]+d;break;case "H":i[1]=+j[1]+c;break;case "M":f=+j[1]+c;e=+j[2]+d;default:for(var l=1,n=j[o];l<n;l++)i[l]=+j[l]+(l%2?c:d)}}else{l=0;for(n=j[o];l<n;l++)b[g][l]=j[l]}switch(i[0]){case "Z":c=f;d=e;break;case "H":c=i[1];break;case "V":d=i[1];break;default:c=b[g][b[g][o]-2];d=b[g][b[g][o]-1]}}b[N]=m._path2string;return b},null,ta);function wa(a,b,c,d){return[a,b,c,d,c,d]}function Pa(a,b,c,d,f,e){var g=1/3,h=2/3;return[g*
a+h*c,g*b+h*d,g*f+h*c,g*e+h*d,f,e]}function Qa(a,b,c,d,f,e,g,h,i,j){var l=w.PI,n=l*120/180,r=l/180*(+f||0),q=[],k,t=T(function(J,fa,xa){var xb=J*w.cos(xa)-fa*w.sin(xa);J=J*w.sin(xa)+fa*w.cos(xa);return{x:xb,y:J}});if(j){x=j[0];k=j[1];e=j[2];B=j[3]}else{k=t(a,b,-r);a=k.x;b=k.y;k=t(h,i,-r);h=k.x;i=k.y;w.cos(l/180*f);w.sin(l/180*f);k=(a-h)/2;x=(b-i)/2;B=k*k/(c*c)+x*x/(d*d);if(B>1){B=w.sqrt(B);c=B*c;d=B*d}B=c*c;var L=d*d;B=(e==g?-1:1)*w.sqrt(w.abs((B*L-B*x*x-L*k*k)/(B*x*x+L*k*k)));e=B*c*x/d+(a+h)/2;var B=
B*-d*k/c+(b+i)/2,x=w.asin(((b-B)/d).toFixed(7));k=w.asin(((i-B)/d).toFixed(7));x=a<e?l-x:x;k=h<e?l-k:k;x<0&&(x=l*2+x);k<0&&(k=l*2+k);if(g&&x>k)x-=l*2;if(!g&&k>x)k-=l*2}l=k-x;if(w.abs(l)>n){q=k;l=h;L=i;k=x+n*(g&&k>x?1:-1);h=e+c*w.cos(k);i=B+d*w.sin(k);q=Qa(h,i,c,d,f,0,g,l,L,[k,q,e,B])}l=k-x;f=w.cos(x);e=w.sin(x);g=w.cos(k);k=w.sin(k);l=w.tan(l/4);c=4/3*c*l;l=4/3*d*l;d=[a,b];a=[a+c*e,b-l*f];b=[h+c*k,i-l*g];h=[h,i];a[0]=2*d[0]-a[0];a[1]=2*d[1]-a[1];if(j)return[a,b,h][M](q);else{q=[a,b,h][M](q)[Q]()[H](",");
j=[];h=0;for(i=q[o];h<i;h++)j[h]=h%2?t(q[h-1],q[h],r).y:t(q[h],q[h+1],r).x;return j}}function la(a,b,c,d,f,e,g,h,i){var j=1-i;return{x:D(j,3)*a+D(j,2)*3*i*c+j*3*i*i*f+D(i,3)*g,y:D(j,3)*b+D(j,2)*3*i*d+j*3*i*i*e+D(i,3)*h}}var wb=T(function(a,b,c,d,f,e,g,h){var i=f-2*c+a-(g-2*f+c),j=2*(c-a)-2*(f-c),l=a-c,n=(-j+w.sqrt(j*j-4*i*l))/2/i;i=(-j-w.sqrt(j*j-4*i*l))/2/i;var r=[b,h],q=[a,g];w.abs(n)>1000000000000&&(n=0.5);w.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=la(a,b,c,d,f,e,g,h,n);q[E](n.x);r[E](n.y)}if(i>
0&&i<1){n=la(a,b,c,d,f,e,g,h,i);q[E](n.x);r[E](n.y)}i=e-2*d+b-(h-2*e+d);j=2*(d-b)-2*(e-d);l=b-d;n=(-j+w.sqrt(j*j-4*i*l))/2/i;i=(-j-w.sqrt(j*j-4*i*l))/2/i;w.abs(n)>1000000000000&&(n=0.5);w.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=la(a,b,c,d,f,e,g,h,n);q[E](n.x);r[E](n.y)}if(i>0&&i<1){n=la(a,b,c,d,f,e,g,h,i);q[E](n.x);r[E](n.y)}return{min:{x:$[K](0,q),y:$[K](0,r)},max:{x:Y[K](0,q),y:Y[K](0,r)}}}),ua=T(function(a,b){var c=ka(a),d=b&&ka(b);a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};b={x:0,y:0,
bx:0,by:0,X:0,Y:0,qx:null,qy:null};function f(q,k){var t;if(!q)return["C",k.x,k.y,k.x,k.y,k.x,k.y];!(q[0]in{T:1,Q:1})&&(k.qx=k.qy=null);switch(q[0]){case "M":k.X=q[1];k.Y=q[2];break;case "A":q=["C"][M](Qa[K](0,[k.x,k.y][M](q.slice(1))));break;case "S":t=k.x+(k.x-(k.bx||k.x));k=k.y+(k.y-(k.by||k.y));q=["C",t,k][M](q.slice(1));break;case "T":k.qx=k.x+(k.x-(k.qx||k.x));k.qy=k.y+(k.y-(k.qy||k.y));q=["C"][M](Pa(k.x,k.y,k.qx,k.qy,q[1],q[2]));break;case "Q":k.qx=q[1];k.qy=q[2];q=["C"][M](Pa(k.x,k.y,q[1],
q[2],q[3],q[4]));break;case "L":q=["C"][M](wa(k.x,k.y,q[1],q[2]));break;case "H":q=["C"][M](wa(k.x,k.y,q[1],k.y));break;case "V":q=["C"][M](wa(k.x,k.y,k.x,q[1]));break;case "Z":q=["C"][M](wa(k.x,k.y,k.X,k.Y));break}return q}function e(q,k){if(q[k][o]>7){q[k].shift();for(var t=q[k];t[o];)q.splice(k++,0,["C"][M](t.splice(0,6)));q.splice(k,1);i=Y(c[o],d&&d[o]||0)}}function g(q,k,t,L,B){if(q&&k&&q[B][0]=="M"&&k[B][0]!="M"){k.splice(B,0,["M",L.x,L.y]);t.bx=0;t.by=0;t.x=q[B][1];t.y=q[B][2];i=Y(c[o],d&&
d[o]||0)}}for(var h=0,i=Y(c[o],d&&d[o]||0);h<i;h++){c[h]=f(c[h],a);e(c,h);d&&(d[h]=f(d[h],b));d&&e(d,h);g(c,d,a,b,h);g(d,c,b,a,h);var j=c[h],l=d&&d[h],n=j[o],r=d&&l[o];a.x=j[n-2];a.y=j[n-1];a.bx=A(j[n-4])||a.x;a.by=A(j[n-3])||a.y;b.bx=d&&(A(l[r-4])||b.x);b.by=d&&(A(l[r-3])||b.y);b.x=d&&l[r-2];b.y=d&&l[r-1]}return d?[c,d]:c},null,ta),Ra=T(function(a){for(var b=[],c=0,d=a[o];c<d;c++){var f={},e=a[c].match(/^([^:]*):?([\d\.]*)/);f.color=m.getRGB(e[1]);if(f.color.error)return null;f.color=f.color.hex;
e[2]&&(f.offset=e[2]+"%");b[E](f)}c=1;for(d=b[o]-1;c<d;c++)if(!b[c].offset){a=A(b[c-1].offset||0);e=0;for(f=c+1;f<d;f++)if(b[f].offset){e=b[f].offset;break}if(!e){e=100;f=d}e=A(e);for(e=(e-a)/(f-c+1);c<f;c++){a+=e;b[c].offset=a+"%"}}return b});function Sa(a,b,c,d){if(m.is(a,ea)||m.is(a,"object")){a=m.is(a,ea)?C.getElementById(a):a;if(a.tagName)return b==null?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:b,height:c}}else return{container:1,
x:a,y:b,width:c,height:d}}function Fa(a,b){var c=this;for(var d in b)if(b[z](d)&&!(d in a))switch(typeof b[d]){case "function":(function(f){a[d]=a===c?f:function(){return f[K](c,arguments)}})(b[d]);break;case "object":a[d]=a[d]||{};Fa.call(this,a[d],b[d]);break;default:a[d]=b[d];break}}function ia(a,b){a==b.top&&(b.top=a.prev);a==b.bottom&&(b.bottom=a.next);a.next&&(a.next.prev=a.prev);a.prev&&(a.prev.next=a.next)}function Ta(a,b){if(b.top!==a){ia(a,b);a.next=null;a.prev=b.top;b.top.next=a;b.top=
a}}function Ua(a,b){if(b.bottom!==a){ia(a,b);a.next=b.bottom;a.prev=null;b.bottom.prev=a;b.bottom=a}}function Va(a,b,c){ia(a,c);b==c.top&&(c.top=a);b.next&&(b.next.prev=a);a.next=b.next;a.prev=b;b.next=a}function Wa(a,b,c){ia(a,c);b==c.bottom&&(c.bottom=a);b.prev&&(b.prev.next=a);a.prev=b.prev;b.prev=a;a.next=b}function Xa(a){return function(){throw new Error("Rapha\u00ebl: you are calling to method \u201c"+a+"\u201d of removed object");}}var Ya=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(m.svg){G[p].svgns=
"http://www.w3.org/2000/svg";G[p].xlink="http://www.w3.org/1999/xlink";F=function(a){return+a+(~~a===a)*0.5};var v=function(a,b){if(b)for(var c in b)b[z](c)&&a[W](c,b[c]+s);else{a=C.createElementNS(G[p].svgns,a);a.style.webkitTapHighlightColor="rgba(0,0,0,0)";return a}};m[N]=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var Za=function(a,b){var c=v("path");b.canvas&&b.canvas[y](c);b=new u(c,b);b.type="path";ba(b,{fill:"none",stroke:"#000",path:a});return b},
ma=function(a,b,c){var d="linear",f=0.5,e=0.5,g=a.style;b=(b+s)[I](Ya,function(l,n,r){d="radial";if(n&&r){f=A(n);e=A(r);l=(e>0.5)*2-1;D(f-0.5,2)+D(e-0.5,2)>0.25&&(e=w.sqrt(0.25-D(f-0.5,2))*l+0.5)&&e!=0.5&&(e=e.toFixed(5)-1.0E-5*l)}return s});b=b[H](/\s*\-\s*/);if(d=="linear"){var h=b.shift();h=-A(h);if(isNaN(h))return null;h=[0,0,w.cos(h*w.PI/180),w.sin(h*w.PI/180)];var i=1/(Y(w.abs(h[2]),w.abs(h[3]))||1);h[2]*=i;h[3]*=i;if(h[2]<0){h[0]=-h[2];h[2]=0}if(h[3]<0){h[1]=-h[3];h[3]=0}}b=Ra(b);if(!b)return null;
i=a.getAttribute(aa);(i=i.match(/^url\(#(.*)\)$/))&&c.defs.removeChild(C.getElementById(i[1]));i=v(d+"Gradient");i.id="r"+(m._id++)[N](36);v(i,d=="radial"?{fx:f,fy:e}:{x1:h[0],y1:h[1],x2:h[2],y2:h[3]});c.defs[y](i);c=0;for(h=b[o];c<h;c++){var j=v("stop");v(j,{offset:b[c].offset?b[c].offset:!c?"0%":"100%","stop-color":b[c].color||"#fff"});i[y](j)}v(a,{fill:"url(#"+i.id+")",opacity:1,"fill-opacity":1});g.fill=s;g.opacity=1;return g.fillOpacity=1},Ga=function(a){var b=a.getBBox();v(a.pattern,{patternTransform:m.format("translate({0},{1})",
b.x,b.y)})},ba=function(a,b){var c={"":[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]},d=a.node,f=a.attrs,e=a.rotate();function g(k,t){if(t=c[ca.call(t)]){var L=k.attrs["stroke-width"]||"1";k={round:L,square:L,butt:0}[k.attrs["stroke-linecap"]||b["stroke-linecap"]]||0;for(var B=[],x=t[o];x--;)B[x]=t[x]*L+(x%2?1:-1)*k;v(d,{"stroke-dasharray":B[Q](",")})}}b[z]("rotation")&&(e=b.rotation);var h=
(e+s)[H](V);if(h.length-1){h[1]=+h[1];h[2]=+h[2]}else h=null;A(e)&&a.rotate(0,true);for(var i in b)if(b[z](i))if(qa[z](i)){var j=b[i];f[i]=j;switch(i){case "blur":a.blur(j);break;case "rotation":a.rotate(j,true);break;case "href":case "title":case "target":var l=d.parentNode;if(ca.call(l.tagName)!="a"){var n=v("a");l.insertBefore(n,d);n[y](d);l=n}l.setAttributeNS(a.paper.xlink,i,j);break;case "cursor":d.style.cursor=j;break;case "clip-rect":l=(j+s)[H](V);if(l[o]==4){a.clip&&a.clip.parentNode.parentNode.removeChild(a.clip.parentNode);
var r=v("clipPath");n=v("rect");r.id="r"+(m._id++)[N](36);v(n,{x:l[0],y:l[1],width:l[2],height:l[3]});r[y](n);a.paper.defs[y](r);v(d,{"clip-path":"url(#"+r.id+")"});a.clip=n}if(!j){(j=C.getElementById(d.getAttribute("clip-path")[I](/(^url\(#|\)$)/g,s)))&&j.parentNode.removeChild(j);v(d,{"clip-path":s});delete a.clip}break;case "path":if(a.type=="path")v(d,{d:j?(f.path=ka(j)):"M0,0"});break;case "width":d[W](i,j);if(f.fx){i="x";j=f.x}else break;case "x":if(f.fx)j=-f.x-(f.width||0);case "rx":if(i==
"rx"&&a.type=="rect")break;case "cx":h&&(i=="x"||i=="cx")&&(h[1]+=j-f[i]);d[W](i,F(j));a.pattern&&Ga(a);break;case "height":d[W](i,j);if(f.fy){i="y";j=f.y}else break;case "y":if(f.fy)j=-f.y-(f.height||0);case "ry":if(i=="ry"&&a.type=="rect")break;case "cy":h&&(i=="y"||i=="cy")&&(h[2]+=j-f[i]);d[W](i,F(j));a.pattern&&Ga(a);break;case "r":a.type=="rect"?v(d,{rx:j,ry:j}):d[W](i,j);break;case "src":a.type=="image"&&d.setAttributeNS(a.paper.xlink,"href",j);break;case "stroke-width":d.style.strokeWidth=
j;d[W](i,j);f["stroke-dasharray"]&&g(a,f["stroke-dasharray"]);break;case "stroke-dasharray":g(a,j);break;case "translation":j=(j+s)[H](V);j[0]=+j[0]||0;j[1]=+j[1]||0;if(h){h[1]+=j[0];h[2]+=j[1]}ya.call(a,j[0],j[1]);break;case "scale":j=(j+s)[H](V);a.scale(+j[0]||1,+j[1]||+j[0]||1,isNaN(A(j[2]))?null:+j[2],isNaN(A(j[3]))?null:+j[3]);break;case aa:if(l=(j+s).match(Na)){r=v("pattern");var q=v("image");r.id="r"+(m._id++)[N](36);v(r,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});v(q,{x:0,y:0});
q.setAttributeNS(a.paper.xlink,"href",l[1]);r[y](q);j=C.createElement("img");j.style.cssText="position:absolute;left:-9999em;top-9999em";j.onload=function(){v(r,{width:this.offsetWidth,height:this.offsetHeight});v(q,{width:this.offsetWidth,height:this.offsetHeight});C.body.removeChild(this);a.paper.safari()};C.body[y](j);j.src=l[1];a.paper.defs[y](r);d.style.fill="url(#"+r.id+")";v(d,{fill:"url(#"+r.id+")"});a.pattern=r;a.pattern&&Ga(a);break}l=m.getRGB(j);if(l.error){if(({circle:1,ellipse:1}[z](a.type)||
(j+s).charAt()!="r")&&ma(d,j,a.paper)){f.gradient=j;f.fill="none";break}}else{delete b.gradient;delete f.gradient;!m.is(f.opacity,"undefined")&&m.is(b.opacity,"undefined")&&v(d,{opacity:f.opacity});!m.is(f["fill-opacity"],"undefined")&&m.is(b["fill-opacity"],"undefined")&&v(d,{"fill-opacity":f["fill-opacity"]})}l[z]("o")&&v(d,{"fill-opacity":l.o/100});case "stroke":l=m.getRGB(j);d[W](i,l.hex);i=="stroke"&&l[z]("o")&&v(d,{"stroke-opacity":l.o/100});break;case "gradient":(({circle:1,ellipse:1})[z](a.type)||
(j+s).charAt()!="r")&&ma(d,j,a.paper);break;case "opacity":case "fill-opacity":if(f.gradient){if(l=C.getElementById(d.getAttribute(aa)[I](/^url\(#|\)$/g,s))){l=l.getElementsByTagName("stop");l[l[o]-1][W]("stop-opacity",j)}break}default:i=="font-size"&&(j=da(j,10)+"px");l=i[I](/(\-.)/g,function(k){return pa.call(k.substring(1))});d.style[l]=j;d[W](i,j);break}}yb(a,b);if(h)a.rotate(h.join(P));else A(e)&&a.rotate(e,true)},$a=1.2,yb=function(a,b){if(!(a.type!="text"||!(b[z]("text")||b[z]("font")||b[z]("font-size")||
b[z]("x")||b[z]("y")))){var c=a.attrs,d=a.node,f=d.firstChild?da(C.defaultView.getComputedStyle(d.firstChild,s).getPropertyValue("font-size"),10):10;if(b[z]("text")){for(c.text=b.text;d.firstChild;)d.removeChild(d.firstChild);b=(b.text+s)[H]("\n");for(var e=0,g=b[o];e<g;e++)if(b[e]){var h=v("tspan");e&&v(h,{dy:f*$a,x:c.x});h[y](C.createTextNode(b[e]));d[y](h)}}else{b=d.getElementsByTagName("tspan");e=0;for(g=b[o];e<g;e++)e&&v(b[e],{dy:f*$a,x:c.x})}v(d,{y:c.y});a=a.getBBox();(a=c.y-(a.y+a.height/2))&&
isFinite(a)&&v(d,{y:c.y+a})}},u=function(a,b){this[0]=a;this.id=m._oid++;this.node=a;a.raphael=this;this.paper=b;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!b.bottom&&(b.bottom=this);(this.prev=b.top)&&(b.top.next=this);b.top=this;this.next=null};u[p].rotate=function(a,b,c){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][Q](P);return this._.rt.deg}var d=this.getBBox();a=(a+s)[H](V);if(a[o]-
1){b=A(a[1]);c=A(a[2])}a=A(a[0]);if(b!=null)this._.rt.deg=a;else this._.rt.deg+=a;c==null&&(b=null);this._.rt.cx=b;this._.rt.cy=c;b=b==null?d.x+d.width/2:b;c=c==null?d.y+d.height/2:c;if(this._.rt.deg){this.transformations[0]=m.format("rotate({0} {1} {2})",this._.rt.deg,b,c);this.clip&&v(this.clip,{transform:m.format("rotate({0} {1} {2})",-this._.rt.deg,b,c)})}else{this.transformations[0]=s;this.clip&&v(this.clip,{transform:s})}v(this.node,{transform:this.transformations[Q](P)});return this};u[p].hide=
function(){!this.removed&&(this.node.style.display="none");return this};u[p].show=function(){!this.removed&&(this.node.style.display="");return this};u[p].remove=function(){if(!this.removed){ia(this,this.paper);this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=true}};u[p].getBBox=function(){if(this.removed)return this;if(this.type=="path")return va(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=true}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=
b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var d=0,f=this.node.getNumberOfChars();d<f;d++){var e=this.node.getExtentOfChar(d);e.y<b.y&&(b.y=e.y);e.y+e.height-b.y>b.height&&(b.height=e.y+e.height-b.y);e.x+e.width-b.x>b.width&&(b.width=e.x+e.width-b.x)}}a&&this.hide();return b};u[p].attr=function(a,b){if(this.removed)return this;if(a==null){a={};for(var c in this.attrs)if(this.attrs[z](c))a[c]=this.attrs[c];this._.rt.deg&&(a.rotation=this.rotate());(this._.sx!=1||this._.sy!=
1)&&(a.scale=this.scale());a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient;return a}if(b==null&&m.is(a,ea)){if(a=="translation")return ya.call(this);if(a=="rotation")return this.rotate();if(a=="scale")return this.scale();if(a==aa&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[a]}if(b==null&&m.is(a,U)){b={};c=0;for(var d=a.length;c<d;c++)b[a[c]]=this.attr(a[c]);return b}if(b!=null){c={};c[a]=b;ba(this,c)}else a!=null&&m.is(a,"object")&&
ba(this,a);return this};u[p].toFront=function(){if(this.removed)return this;this.node.parentNode[y](this.node);var a=this.paper;a.top!=this&&Ta(this,a);return this};u[p].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);Ua(this,this.paper)}return this};u[p].insertAfter=function(a){if(this.removed)return this;var b=a.node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):
b.parentNode[y](this.node);Va(this,a,this.paper);return this};u[p].insertBefore=function(a){if(this.removed)return this;var b=a.node;b.parentNode.insertBefore(this.node,b);Wa(this,a,this.paper);return this};u[p].blur=function(a){var b=this;if(+a!==0){var c=v("filter"),d=v("feGaussianBlur");b.attrs.blur=a;c.id="r"+(m._id++)[N](36);v(d,{stdDeviation:+a||1.5});c.appendChild(d);b.paper.defs.appendChild(c);b._blur=c;v(b.node,{filter:"url(#"+c.id+")"})}else{if(b._blur){b._blur.parentNode.removeChild(b._blur);
delete b._blur;delete b.attrs.blur}b.node.removeAttribute("filter")}};var ab=function(a,b,c,d){b=F(b);c=F(c);var f=v("circle");a.canvas&&a.canvas[y](f);a=new u(f,a);a.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"};a.type="circle";v(f,a.attrs);return a},bb=function(a,b,c,d,f,e){b=F(b);c=F(c);var g=v("rect");a.canvas&&a.canvas[y](g);a=new u(g,a);a.attrs={x:b,y:c,width:d,height:f,r:e||0,rx:e||0,ry:e||0,fill:"none",stroke:"#000"};a.type="rect";v(g,a.attrs);return a},cb=function(a,b,c,d,f){b=F(b);c=F(c);
var e=v("ellipse");a.canvas&&a.canvas[y](e);a=new u(e,a);a.attrs={cx:b,cy:c,rx:d,ry:f,fill:"none",stroke:"#000"};a.type="ellipse";v(e,a.attrs);return a},db=function(a,b,c,d,f,e){var g=v("image");v(g,{x:c,y:d,width:f,height:e,preserveAspectRatio:"none"});g.setAttributeNS(a.xlink,"href",b);a.canvas&&a.canvas[y](g);a=new u(g,a);a.attrs={x:c,y:d,width:f,height:e,src:b};a.type="image";return a},eb=function(a,b,c,d){var f=v("text");v(f,{x:b,y:c,"text-anchor":"middle"});a.canvas&&a.canvas[y](f);a=new u(f,
a);a.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:qa.font,stroke:"none",fill:"#000"};a.type="text";ba(a,a.attrs);return a},fb=function(a,b){this.width=a||this.width;this.height=b||this.height;this.canvas[W]("width",this.width);this.canvas[W]("height",this.height);return this},Aa=function(){var a=Sa[K](0,arguments),b=a&&a.container,c=a.x,d=a.y,f=a.width;a=a.height;if(!b)throw new Error("SVG container not found.");var e=v("svg");c=c||0;d=d||0;f=f||512;a=a||342;v(e,{xmlns:"http://www.w3.org/2000/svg",
version:1.1,width:f,height:a});if(b==1){e.style.cssText="position:absolute;left:"+c+"px;top:"+d+"px";C.body[y](e)}else b.firstChild?b.insertBefore(e,b.firstChild):b[y](e);b=new G;b.width=f;b.height=a;b.canvas=e;Fa.call(b,b,m.fn);b.clear();return b};G[p].clear=function(){for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null;(this.desc=v("desc"))[y](C.createTextNode("Created with Rapha\u00ebl"));a[y](this.desc);a[y](this.defs=v("defs"))};G[p].remove=function(){this.canvas.parentNode&&
this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=Xa(a)}}if(m.vml){var gb={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},zb=/([clmz]),?([^clmz]*)/gi,Ab=/-?[^,\s-]+/g,na=1000+P+1000,ja=10,oa={path:1,rect:1},Bb=function(a){var b=/[ahqstv]/ig,c=ka;(a+s).match(b)&&(c=ua);b=/[clmz]/g;if(c==ka&&!(a+s).match(b))return a=(a+s)[I](zb,function(i,j,l){var n=[],r=ca.call(j)=="m",q=gb[j];l[I](Ab,function(k){if(r&&n[o]==2){q+=n+gb[j=="m"?"l":"L"];n=[]}n[E](F(k*ja))});return q+n});b=c(a);
var d;a=[];for(var f=0,e=b[o];f<e;f++){c=b[f];d=ca.call(b[f][0]);d=="z"&&(d="x");for(var g=1,h=c[o];g<h;g++)d+=F(c[g]*ja)+(g!=h-1?",":s);a[E](d)}return a[Q](P)};m[N]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+this.version};Za=function(a,b){var c=R("group");c.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px";c.coordsize=b.coordsize;c.coordorigin=b.coordorigin;var d=R("shape"),f=d.style;f.width=
b.width+"px";f.height=b.height+"px";d.coordsize=na;d.coordorigin=b.coordorigin;c[y](d);d=new u(d,c,b);f={fill:"none",stroke:"#000"};a&&(f.path=a);d.isAbsolute=true;d.type="path";d.path=[];d.Path=s;ba(d,f);b.canvas[y](c);return d};ba=function(a,b){a.attrs=a.attrs||{};var c=a.node,d=a.attrs,f=c.style,e;e=(b.x!=d.x||b.y!=d.y||b.width!=d.width||b.height!=d.height||b.r!=d.r)&&a.type=="rect";var g=a;for(var h in b)if(b[z](h))d[h]=b[h];if(e){d.path=hb(d.x,d.y,d.width,d.height,d.r);a.X=d.x;a.Y=d.y;a.W=d.width;
a.H=d.height}b.href&&(c.href=b.href);b.title&&(c.title=b.title);b.target&&(c.target=b.target);b.cursor&&(f.cursor=b.cursor);"blur"in b&&a.blur(b.blur);if(b.path&&a.type=="path"||e)c.path=Bb(d.path);b.rotation!=null&&a.rotate(b.rotation,true);if(b.translation){e=(b.translation+s)[H](V);ya.call(a,e[0],e[1]);if(a._.rt.cx!=null){a._.rt.cx+=+e[0];a._.rt.cy+=+e[1];a.setBox(a.attrs,e[0],e[1])}}if(b.scale){e=(b.scale+s)[H](V);a.scale(+e[0]||1,+e[1]||+e[0]||1,+e[2]||null,+e[3]||null)}if("clip-rect"in b){e=
(b["clip-rect"]+s)[H](V);if(e[o]==4){e[2]=+e[2]+ +e[0];e[3]=+e[3]+ +e[1];h=c.clipRect||C.createElement("div");var i=h.style,j=c.parentNode;i.clip=m.format("rect({1}px {2}px {3}px {0}px)",e);if(!c.clipRect){i.position="absolute";i.top=0;i.left=0;i.width=a.paper.width+"px";i.height=a.paper.height+"px";j.parentNode.insertBefore(h,j);h[y](j);c.clipRect=h}}if(!b["clip-rect"])c.clipRect&&(c.clipRect.style.clip=s)}if(a.type=="image"&&b.src)c.src=b.src;if(a.type=="image"&&b.opacity){c.filterOpacity=Da+".Alpha(opacity="+
b.opacity*100+")";f.filter=(c.filterMatrix||s)+(c.filterOpacity||s)}b.font&&(f.font=b.font);b["font-family"]&&(f.fontFamily='"'+b["font-family"][H](",")[0][I](/^['"]+|['"]+$/g,s)+'"');b["font-size"]&&(f.fontSize=b["font-size"]);b["font-weight"]&&(f.fontWeight=b["font-weight"]);b["font-style"]&&(f.fontStyle=b["font-style"]);if(b.opacity!=null||b["stroke-width"]!=null||b.fill!=null||b.stroke!=null||b["stroke-width"]!=null||b["stroke-opacity"]!=null||b["fill-opacity"]!=null||b["stroke-dasharray"]!=null||
b["stroke-miterlimit"]!=null||b["stroke-linejoin"]!=null||b["stroke-linecap"]!=null){c=a.shape||c;f=c.getElementsByTagName(aa)&&c.getElementsByTagName(aa)[0];e=false;!f&&(e=f=R(aa));if("fill-opacity"in b||"opacity"in b){a=((+d["fill-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+m.getRGB(b.fill).o+1||2)-1);a<0&&(a=0);a>1&&(a=1);f.opacity=a}b.fill&&(f.on=true);if(f.on==null||b.fill=="none")f.on=false;if(f.on&&b.fill)if(a=b.fill.match(Na)){f.src=a[1];f.type="tile"}else{f.color=m.getRGB(b.fill).hex;f.src=
s;f.type="solid";if(m.getRGB(b.fill).error&&(g.type in{circle:1,ellipse:1}||(b.fill+s).charAt()!="r")&&ma(g,b.fill)){d.fill="none";d.gradient=b.fill}}e&&c[y](f);f=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0];e=false;!f&&(e=f=R("stroke"));if(b.stroke&&b.stroke!="none"||b["stroke-width"]||b["stroke-opacity"]!=null||b["stroke-dasharray"]||b["stroke-miterlimit"]||b["stroke-linejoin"]||b["stroke-linecap"])f.on=true;(b.stroke=="none"||f.on==null||b.stroke==0||b["stroke-width"]==
0)&&(f.on=false);a=m.getRGB(b.stroke);f.on&&b.stroke&&(f.color=a.hex);a=((+d["stroke-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+a.o+1||2)-1);h=(A(b["stroke-width"])||1)*0.75;a<0&&(a=0);a>1&&(a=1);b["stroke-width"]==null&&(h=d["stroke-width"]);b["stroke-width"]&&(f.weight=h);h&&h<1&&(a*=h)&&(f.weight=1);f.opacity=a;b["stroke-linejoin"]&&(f.joinstyle=b["stroke-linejoin"]||"miter");f.miterlimit=b["stroke-miterlimit"]||8;b["stroke-linecap"]&&(f.endcap=b["stroke-linecap"]=="butt"?"flat":b["stroke-linecap"]==
"square"?"square":"round");if(b["stroke-dasharray"]){a={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};f.dashstyle=a[z](b["stroke-dasharray"])?a[b["stroke-dasharray"]]:s}e&&c[y](f)}if(g.type=="text"){f=g.paper.span.style;d.font&&(f.font=d.font);d["font-family"]&&(f.fontFamily=d["font-family"]);d["font-size"]&&(f.fontSize=d["font-size"]);d["font-weight"]&&(f.fontWeight=d["font-weight"]);
d["font-style"]&&(f.fontStyle=d["font-style"]);g.node.string&&(g.paper.span.innerHTML=(g.node.string+s)[I](/</g,"&#60;")[I](/&/g,"&#38;")[I](/\n/g,"<br>"));g.W=d.w=g.paper.span.offsetWidth;g.H=d.h=g.paper.span.offsetHeight;g.X=d.x;g.Y=d.y+F(g.H/2);switch(d["text-anchor"]){case "start":g.node.style["v-text-align"]="left";g.bbx=F(g.W/2);break;case "end":g.node.style["v-text-align"]="right";g.bbx=-F(g.W/2);break;default:g.node.style["v-text-align"]="center";break}}};ma=function(a,b){a.attrs=a.attrs||
{};var c="linear",d=".5 .5";a.attrs.gradient=b;b=(b+s)[I](Ya,function(i,j,l){c="radial";if(j&&l){j=A(j);l=A(l);D(j-0.5,2)+D(l-0.5,2)>0.25&&(l=w.sqrt(0.25-D(j-0.5,2))*((l>0.5)*2-1)+0.5);d=j+P+l}return s});b=b[H](/\s*\-\s*/);if(c=="linear"){var f=b.shift();f=-A(f);if(isNaN(f))return null}var e=Ra(b);if(!e)return null;a=a.shape||a.node;b=a.getElementsByTagName(aa)[0]||R(aa);!b.parentNode&&a.appendChild(b);if(e[o]){b.on=true;b.method="none";b.color=e[0].color;b.color2=e[e[o]-1].color;a=[];for(var g=0,
h=e[o];g<h;g++)e[g].offset&&a[E](e[g].offset+P+e[g].color);b.colors&&(b.colors.value=a[o]?a[Q]():"0% "+b.color);if(c=="radial"){b.type="gradientradial";b.focus="100%";b.focussize=d;b.focusposition=d}else{b.type="gradient";b.angle=(270-f)%360}}return 1};u=function(a,b,c){this[0]=a;this.id=m._oid++;this.node=a;a.raphael=this;this.Y=this.X=0;this.attrs={};this.Group=b;this.paper=c;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!c.bottom&&(c.bottom=this);(this.prev=c.top)&&(c.top.next=this);c.top=this;this.next=
null};u[p].rotate=function(a,b,c){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][Q](P);return this._.rt.deg}a=(a+s)[H](V);if(a[o]-1){b=A(a[1]);c=A(a[2])}a=A(a[0]);if(b!=null)this._.rt.deg=a;else this._.rt.deg+=a;c==null&&(b=null);this._.rt.cx=b;this._.rt.cy=c;this.setBox(this.attrs,b,c);this.Group.style.rotation=this._.rt.deg;return this};u[p].setBox=function(a,b,c){if(this.removed)return this;var d=this.Group.style,f=this.shape&&this.shape.style||
this.node.style;a=a||{};for(var e in a)if(a[z](e))this.attrs[e]=a[e];b=b||this._.rt.cx;c=c||this._.rt.cy;var g=this.attrs,h;switch(this.type){case "circle":a=g.cx-g.r;e=g.cy-g.r;h=g=g.r*2;break;case "ellipse":a=g.cx-g.rx;e=g.cy-g.ry;h=g.rx*2;g=g.ry*2;break;case "image":a=+g.x;e=+g.y;h=g.width||0;g=g.height||0;break;case "text":this.textpath.v=["m",F(g.x),", ",F(g.y-2),"l",F(g.x)+1,", ",F(g.y-2)][Q](s);a=g.x-F(this.W/2);e=g.y-this.H/2;h=this.W;g=this.H;break;case "rect":case "path":if(this.attrs.path){g=
va(this.attrs.path);a=g.x;e=g.y;h=g.width;g=g.height}else{e=a=0;h=this.paper.width;g=this.paper.height}break;default:e=a=0;h=this.paper.width;g=this.paper.height;break}b=b==null?a+h/2:b;c=c==null?e+g/2:c;b=b-this.paper.width/2;c=c-this.paper.height/2;var i;d.left!=(i=b+"px")&&(d.left=i);d.top!=(i=c+"px")&&(d.top=i);this.X=oa[z](this.type)?-b:a;this.Y=oa[z](this.type)?-c:e;this.W=h;this.H=g;if(oa[z](this.type)){f.left!=(i=-b*ja+"px")&&(f.left=i);f.top!=(i=-c*ja+"px")&&(f.top=i)}else if(this.type==
"text"){f.left!=(i=-b+"px")&&(f.left=i);f.top!=(i=-c+"px")&&(f.top=i)}else{d.width!=(i=this.paper.width+"px")&&(d.width=i);d.height!=(i=this.paper.height+"px")&&(d.height=i);f.left!=(i=a-b+"px")&&(f.left=i);f.top!=(i=e-c+"px")&&(f.top=i);f.width!=(i=h+"px")&&(f.width=i);f.height!=(i=g+"px")&&(f.height=i)}};u[p].hide=function(){!this.removed&&(this.Group.style.display="none");return this};u[p].show=function(){!this.removed&&(this.Group.style.display="block");return this};u[p].getBBox=function(){if(this.removed)return this;
if(oa[z](this.type))return va(this.attrs.path);return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};u[p].remove=function(){if(!this.removed){ia(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=true}};u[p].attr=function(a,b){if(this.removed)return this;if(a==null){a={};for(var c in this.attrs)if(this.attrs[z](c))a[c]=this.attrs[c];
this._.rt.deg&&(a.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(a.scale=this.scale());a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient;return a}if(b==null&&m.is(a,ea)){if(a=="translation")return ya.call(this);if(a=="rotation")return this.rotate();if(a=="scale")return this.scale();if(a==aa&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[a]}if(this.attrs&&b==null&&m.is(a,U)){var d={};c=0;for(b=a[o];c<b;c++)d[a[c]]=this.attr(a[c]);
return d}if(b!=null){d={};d[a]=b}b==null&&m.is(a,"object")&&(d=a);if(d){if(d.text&&this.type=="text")this.node.string=d.text;ba(this,d);if(d.gradient&&({circle:1,ellipse:1}[z](this.type)||(d.gradient+s).charAt()!="r"))ma(this,d.gradient);(!oa[z](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};u[p].toFront=function(){!this.removed&&this.Group.parentNode[y](this.Group);this.paper.top!=this&&Ta(this,this.paper);return this};u[p].toBack=function(){if(this.removed)return this;if(this.Group.parentNode.firstChild!=
this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);Ua(this,this.paper)}return this};u[p].insertAfter=function(a){if(this.removed)return this;a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[y](this.Group);Va(this,a,this.paper);return this};u[p].insertBefore=function(a){if(this.removed)return this;a.Group.parentNode.insertBefore(this.Group,a.Group);Wa(this,a,this.paper);return this};var Cb=/ progid:\S+Blur\([^\)]+\)/g;
u[p].blur=function(a){var b=this.node.style,c=b.filter;c=c.replace(Cb,"");if(+a!==0){this.attrs.blur=a;b.filter=c+Da+".Blur(pixelradius="+(+a||1.5)+")";b.margin=Raphael.format("-{0}px 0 0 -{0}px",Math.round(+a||1.5))}else{b.filter=c;b.margin=0;delete this.attrs.blur}};ab=function(a,b,c,d){var f=R("group"),e=R("oval");f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";f.coordsize=na;f.coordorigin=a.coordorigin;f[y](e);e=new u(e,f,a);e.type="circle";ba(e,{stroke:"#000",
fill:"none"});e.attrs.cx=b;e.attrs.cy=c;e.attrs.r=d;e.setBox({x:b-d,y:c-d,width:d*2,height:d*2});a.canvas[y](f);return e};function hb(a,b,c,d,f){return f?m.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a+f,b,c-f*2,f,-f,d-f*2,f*2-c,f*2-d):m.format("M{0},{1}l{2},0,0,{3},{4},0z",a,b,c,d,-c)}bb=function(a,b,c,d,f,e){var g=hb(b,c,d,f,e);a=a.path(g);var h=a.attrs;a.X=h.x=b;a.Y=h.y=c;a.W=h.width=d;a.H=h.height=f;h.r=e;h.path=
g;a.type="rect";return a};cb=function(a,b,c,d,f){var e=R("group"),g=R("oval");e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";e.coordsize=na;e.coordorigin=a.coordorigin;e[y](g);g=new u(g,e,a);g.type="ellipse";ba(g,{stroke:"#000"});g.attrs.cx=b;g.attrs.cy=c;g.attrs.rx=d;g.attrs.ry=f;g.setBox({x:b-d,y:c-f,width:d*2,height:f*2});a.canvas[y](e);return g};db=function(a,b,c,d,f,e){var g=R("group"),h=R("image");g.style.cssText="position:absolute;left:0;top:0;width:"+
a.width+"px;height:"+a.height+"px";g.coordsize=na;g.coordorigin=a.coordorigin;h.src=b;g[y](h);h=new u(h,g,a);h.type="image";h.attrs.src=b;h.attrs.x=c;h.attrs.y=d;h.attrs.w=f;h.attrs.h=e;h.setBox({x:c,y:d,width:f,height:e});a.canvas[y](g);return h};eb=function(a,b,c,d){var f=R("group"),e=R("shape"),g=e.style,h=R("path"),i=R("textpath");f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";f.coordsize=na;f.coordorigin=a.coordorigin;h.v=m.format("m{0},{1}l{2},{1}",
F(b*10),F(c*10),F(b*10)+1);h.textpathok=true;g.width=a.width;g.height=a.height;i.string=d+s;i.on=true;e[y](i);e[y](h);f[y](e);g=new u(i,f,a);g.shape=e;g.textpath=h;g.type="text";g.attrs.text=d;g.attrs.x=b;g.attrs.y=c;g.attrs.w=1;g.attrs.h=1;ba(g,{font:qa.font,stroke:"none",fill:"#000"});g.setBox();a.canvas[y](f);return g};fb=function(a,b){var c=this.canvas.style;a==+a&&(a+="px");b==+b&&(b+="px");c.width=a;c.height=b;c.clip="rect(0 "+a+" "+b+" 0)";return this};var R;C.createStyleSheet().addRule(".rvml",
"behavior:url(#default#VML)");try{!C.namespaces.rvml&&C.namespaces.add("rvml","urn:schemas-microsoft-com:vml");R=function(a){return C.createElement("<rvml:"+a+' class="rvml">')}}catch(Kb){R=function(a){return C.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}Aa=function(){var a=Sa[K](0,arguments),b=a.container,c=a.height,d=a.width,f=a.x;a=a.y;if(!b)throw new Error("VML container not found.");var e=new G,g=e.canvas=C.createElement("div"),h=g.style;f=f||0;a=a||0;d=d||512;
c=c||342;d==+d&&(d+="px");c==+c&&(c+="px");e.width=1000;e.height=1000;e.coordsize=ja*1000+P+ja*1000;e.coordorigin="0 0";e.span=C.createElement("span");e.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";g[y](e.span);h.cssText=m.format("width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",d,c);if(b==1){C.body[y](g);h.left=f+"px";h.top=a+"px";h.position="absolute"}else b.firstChild?b.insertBefore(g,
b.firstChild):b[y](g);Fa.call(e,e,m.fn);return e};G[p].clear=function(){this.canvas.innerHTML=s;this.span=C.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[y](this.span);this.bottom=this.top=null};G[p].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=Xa(a);return true}}G[p].safari=/^Apple|^Google/.test(X.navigator.vendor)&&(!(X.navigator.userAgent.indexOf("Version/4.0")+
1)||X.navigator.platform.slice(0,2)=="iP")?function(){var a=this.rect(-99,-99,this.width+99,this.height+99);X.setTimeout(function(){a.remove()})}:function(){};function Db(){this.returnValue=false}function Eb(){return this.originalEvent.preventDefault()}function Fb(){this.cancelBubble=true}function Gb(){return this.originalEvent.stopPropagation()}var Hb=function(){if(C.addEventListener)return function(a,b,c,d){var f=Ba&&Ca[b]?Ca[b]:b;function e(g){if(Ba&&Ca[z](b))for(var h=0,i=g.targetTouches&&g.targetTouches.length;h<
i;h++)if(g.targetTouches[h].target==a){i=g;g=g.targetTouches[h];g.originalEvent=i;g.preventDefault=Eb;g.stopPropagation=Gb;break}return c.call(d,g)}a.addEventListener(f,e,false);return function(){a.removeEventListener(f,e,false);return true}};else if(C.attachEvent)return function(a,b,c,d){function f(g){g=g||X.event;g.preventDefault=g.preventDefault||Db;g.stopPropagation=g.stopPropagation||Fb;return c.call(d,g)}a.attachEvent("on"+b,f);function e(){a.detachEvent("on"+b,f);return true}return e}}();for(ha=
Ma[o];ha--;)(function(a){m[a]=u[p][a]=function(b){if(m.is(b,"function")){this.events=this.events||[];this.events.push({name:a,f:b,unbind:Hb(this.shape||this.node||C,a,b,this)})}return this};m["un"+a]=u[p]["un"+a]=function(b){for(var c=this.events,d=c[o];d--;)if(c[d].name==a&&c[d].f==b){c[d].unbind();c.splice(d,1);!c.length&&delete this.events;return this}return this}})(Ma[ha]);u[p].hover=function(a,b){return this.mouseover(a).mouseout(b)};u[p].unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};
u[p].drag=function(a,b,c){this._drag={};var d=this.mousedown(function(g){(g.originalEvent?g.originalEvent:g).preventDefault();this._drag.x=g.clientX;this._drag.y=g.clientY;this._drag.id=g.identifier;b&&b.call(this,g.clientX,g.clientY);Raphael.mousemove(f).mouseup(e)});function f(g){var h=g.clientX,i=g.clientY;if(Ba)for(var j=g.touches.length,l;j--;){l=g.touches[j];if(l.identifier==d._drag.id){h=l.clientX;i=l.clientY;(g.originalEvent?g.originalEvent:g).preventDefault();break}}else g.preventDefault();
a&&a.call(d,h-d._drag.x,i-d._drag.y,h,i)}function e(){d._drag={};Raphael.unmousemove(f).unmouseup(e);c&&c.call(d)}return this};G[p].circle=function(a,b,c){return ab(this,a||0,b||0,c||0)};G[p].rect=function(a,b,c,d,f){return bb(this,a||0,b||0,c||0,d||0,f||0)};G[p].ellipse=function(a,b,c,d){return cb(this,a||0,b||0,c||0,d||0)};G[p].path=function(a){a&&!m.is(a,ea)&&!m.is(a[0],U)&&(a+=s);return Za(m.format[K](m,arguments),this)};G[p].image=function(a,b,c,d,f){return db(this,a||"about:blank",b||0,c||0,
d||0,f||0)};G[p].text=function(a,b,c){return eb(this,a||0,b||0,c||s)};G[p].set=function(a){arguments[o]>1&&(a=Array[p].splice.call(arguments,0,arguments[o]));return new Z(a)};G[p].setSize=fb;G[p].top=G[p].bottom=null;G[p].raphael=m;function ib(){return this.x+P+this.y}u[p].resetScale=function(){if(this.removed)return this;this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};u[p].scale=function(a,b,c,d){if(this.removed)return this;if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:ib};b=b||a;!+b&&
(b=a);var f,e,g=this.attrs;if(a!=0){var h=this.getBBox(),i=h.x+h.width/2,j=h.y+h.height/2;f=a/this._.sx;e=b/this._.sy;c=+c||c==0?c:i;d=+d||d==0?d:j;h=~~(a/w.abs(a));var l=~~(b/w.abs(b)),n=this.node.style,r=c+(i-c)*f;j=d+(j-d)*e;switch(this.type){case "rect":case "image":var q=g.width*h*f,k=g.height*l*e;this.attr({height:k,r:g.r*$(h*f,l*e),width:q,x:r-q/2,y:j-k/2});break;case "circle":case "ellipse":this.attr({rx:g.rx*h*f,ry:g.ry*l*e,r:g.r*$(h*f,l*e),cx:r,cy:j});break;case "text":this.attr({x:r,y:j});
break;case "path":i=Oa(g.path);for(var t=true,L=0,B=i[o];L<B;L++){var x=i[L],J=pa.call(x[0]);if(!(J=="M"&&t)){t=false;if(J=="A"){x[i[L][o]-2]*=f;x[i[L][o]-1]*=e;x[1]*=h*f;x[2]*=l*e;x[5]=+!(h+l?!+x[5]:+x[5])}else if(J=="H"){J=1;for(var fa=x[o];J<fa;J++)x[J]*=f}else if(J=="V"){J=1;for(fa=x[o];J<fa;J++)x[J]*=e}else{J=1;for(fa=x[o];J<fa;J++)x[J]*=J%2?f:e}}}e=va(i);f=r-e.x-e.width/2;e=j-e.y-e.height/2;i[0][1]+=f;i[0][2]+=e;this.attr({path:i});break}if(this.type in{text:1,image:1}&&(h!=1||l!=1))if(this.transformations){this.transformations[2]=
"scale("[M](h,",",l,")");this.node[W]("transform",this.transformations[Q](P));f=h==-1?-g.x-(q||0):g.x;e=l==-1?-g.y-(k||0):g.y;this.attr({x:f,y:e});g.fx=h-1;g.fy=l-1}else{this.node.filterMatrix=Da+".Matrix(M11="[M](h,", M12=0, M21=0, M22=",l,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");n.filter=(this.node.filterMatrix||s)+(this.node.filterOpacity||s)}else if(this.transformations){this.transformations[2]=s;this.node[W]("transform",this.transformations[Q](P));g.fx=0;g.fy=0}else{this.node.filterMatrix=
s;n.filter=(this.node.filterMatrix||s)+(this.node.filterOpacity||s)}g.scale=[a,b,c,d][Q](P);this._.sx=a;this._.sy=b}return this};u[p].clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale;delete a.translation;return this.paper[this.type]().attr(a)};var jb=T(function(a,b,c,d,f,e,g,h,i){for(var j=0,l,n=0;n<1.001;n+=0.0010){var r=m.findDotsAtSegment(a,b,c,d,f,e,g,h,n);n&&(j+=D(D(l.x-r.x,2)+D(l.y-r.y,2),0.5));if(j>=i)return r;l=r}});function Ha(a,b){return function(c,d,f){c=ua(c);
for(var e,g,h,i,j="",l={},n=0,r=0,q=c.length;r<q;r++){h=c[r];if(h[0]=="M"){e=+h[1];g=+h[2]}else{i=Ib(e,g,h[1],h[2],h[3],h[4],h[5],h[6]);if(n+i>d){if(b&&!l.start){e=jb(e,g,h[1],h[2],h[3],h[4],h[5],h[6],d-n);j+=["C",e.start.x,e.start.y,e.m.x,e.m.y,e.x,e.y];if(f)return j;l.start=j;j=["M",e.x,e.y+"C",e.n.x,e.n.y,e.end.x,e.end.y,h[5],h[6]][Q]();n+=i;e=+h[5];g=+h[6];continue}if(!a&&!b){e=jb(e,g,h[1],h[2],h[3],h[4],h[5],h[6],d-n);return{x:e.x,y:e.y,alpha:e.alpha}}}n+=i;e=+h[5];g=+h[6]}j+=h}l.end=j;e=a?n:
b?l:m.findDotsAtSegment(e,g,h[1],h[2],h[3],h[4],h[5],h[6],1);e.alpha&&(e={x:e.x,y:e.y,alpha:e.alpha});return e}}var Ib=T(function(a,b,c,d,f,e,g,h){for(var i={x:0,y:0},j=0,l=0;l<1.01;l+=0.01){var n=la(a,b,c,d,f,e,g,h,l);l&&(j+=D(D(i.x-n.x,2)+D(i.y-n.y,2),0.5));i=n}return j}),kb=Ha(1),za=Ha(),Ia=Ha(0,1);u[p].getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return kb(this.attrs.path)}};u[p].getPointAtLength=function(a){if(this.type=="path")return za(this.attrs.path,
a)};u[p].getSubpath=function(a,b){if(this.type=="path"){if(w.abs(this.getTotalLength()-b)<1.0E-6)return Ia(this.attrs.path,a).end;b=Ia(this.attrs.path,b,1);return a?Ia(b,a).end:b}};m.easing_formulas={linear:function(a){return a},"<":function(a){return D(a,3)},">":function(a){return D(a-1,3)+1},"<>":function(a){a*=2;if(a<1)return D(a,3)/2;a-=2;return(D(a,3)+2)/2},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==
0||a==1)return a;var b=0.3,c=b/4;return D(2,-10*a)*w.sin((a-c)*2*w.PI/b)+1},bounce:function(a){var b=7.5625,c=2.75;if(a<1/c)a=b*a*a;else if(a<2/c){a-=1.5/c;a=b*a*a+0.75}else if(a<2.5/c){a-=2.25/c;a=b*a*a+0.9375}else{a-=2.625/c;a=b*a*a+0.984375}return a}};var S={length:0};function lb(){var a=+new Date;for(var b in S)if(b!="length"&&S[z](b)){var c=S[b];if(c.stop||c.el.removed){delete S[b];S[o]--}else{var d=a-c.start,f=c.ms,e=c.easing,g=c.from,h=c.diff,i=c.to,j=c.t,l=c.prev||0,n=c.el,r=c.callback,q=
{},k;if(d<f){r=m.easing_formulas[e]?m.easing_formulas[e](d/f):d/f;for(var t in g)if(g[z](t)){switch(Ea[t]){case "along":k=r*f*h[t];i.back&&(k=i.len-k);e=za(i[t],k);n.translate(h.sx-h.x||0,h.sy-h.y||0);h.x=e.x;h.y=e.y;n.translate(e.x-h.sx,e.y-h.sy);i.rot&&n.rotate(h.r+e.alpha,e.x,e.y);break;case O:k=+g[t]+r*f*h[t];break;case "colour":k="rgb("+[Ja(F(g[t].r+r*f*h[t].r)),Ja(F(g[t].g+r*f*h[t].g)),Ja(F(g[t].b+r*f*h[t].b))][Q](",")+")";break;case "path":k=[];e=0;for(var L=g[t][o];e<L;e++){k[e]=[g[t][e][0]];
for(var B=1,x=g[t][e][o];B<x;B++)k[e][B]=+g[t][e][B]+r*f*h[t][e][B];k[e]=k[e][Q](P)}k=k[Q](P);break;case "csv":switch(t){case "translation":k=h[t][0]*(d-l);e=h[t][1]*(d-l);j.x+=k;j.y+=e;k=k+P+e;break;case "rotation":k=+g[t][0]+r*f*h[t][0];g[t][1]&&(k+=","+g[t][1]+","+g[t][2]);break;case "scale":k=[+g[t][0]+r*f*h[t][0],+g[t][1]+r*f*h[t][1],2 in i[t]?i[t][2]:s,3 in i[t]?i[t][3]:s][Q](P);break;case "clip-rect":k=[];for(e=4;e--;)k[e]=+g[t][e]+r*f*h[t][e];break}break}q[t]=k}n.attr(q);n._run&&n._run.call(n)}else{if(i.along){e=
za(i.along,i.len*!i.back);n.translate(h.sx-(h.x||0)+e.x-h.sx,h.sy-(h.y||0)+e.y-h.sy);i.rot&&n.rotate(h.r+e.alpha,e.x,e.y)}(j.x||j.y)&&n.translate(-j.x,-j.y);i.scale&&(i.scale+=s);n.attr(i);delete S[b];S[o]--;n.in_animation=null;m.is(r,"function")&&r.call(n)}c.prev=d}}m.svg&&n&&n.paper&&n.paper.safari();S[o]&&X.setTimeout(lb)}function Ja(a){return Y($(a,255),0)}function ya(a,b){if(a==null)return{x:this._.tx,y:this._.ty,toString:ib};this._.tx+=+a;this._.ty+=+b;switch(this.type){case "circle":case "ellipse":this.attr({cx:+a+
this.attrs.cx,cy:+b+this.attrs.cy});break;case "rect":case "image":case "text":this.attr({x:+a+this.attrs.x,y:+b+this.attrs.y});break;case "path":var c=Oa(this.attrs.path);c[0][1]+=+a;c[0][2]+=+b;this.attr({path:c});break}return this}u[p].animateWith=function(a,b,c,d,f){S[a.id]&&(b.start=S[a.id].start);return this.animate(b,c,d,f)};u[p].animateAlong=mb();u[p].animateAlongBack=mb(1);function mb(a){return function(b,c,d,f){var e={back:a};m.is(d,"function")?(f=d):(e.rot=d);b&&b.constructor==u&&(b=b.attrs.path);
b&&(e.along=b);return this.animate(e,c,f)}}u[p].onAnimation=function(a){this._run=a||0;return this};u[p].animate=function(a,b,c,d){if(m.is(c,"function")||!c)d=c||null;var f={},e={},g={};for(var h in a)if(a[z](h))if(Ea[z](h)){f[h]=this.attr(h);f[h]==null&&(f[h]=qa[h]);e[h]=a[h];switch(Ea[h]){case "along":var i=kb(a[h]),j=za(a[h],i*!!a.back),l=this.getBBox();g[h]=i/b;g.tx=l.x;g.ty=l.y;g.sx=j.x;g.sy=j.y;e.rot=a.rot;e.back=a.back;e.len=i;a.rot&&(g.r=A(this.rotate())||0);break;case O:g[h]=(e[h]-f[h])/
b;break;case "colour":f[h]=m.getRGB(f[h]);i=m.getRGB(e[h]);g[h]={r:(i.r-f[h].r)/b,g:(i.g-f[h].g)/b,b:(i.b-f[h].b)/b};break;case "path":i=ua(f[h],e[h]);f[h]=i[0];j=i[1];g[h]=[];i=0;for(l=f[h][o];i<l;i++){g[h][i]=[0];for(var n=1,r=f[h][i][o];n<r;n++)g[h][i][n]=(j[i][n]-f[h][i][n])/b}break;case "csv":j=(a[h]+s)[H](V);i=(f[h]+s)[H](V);switch(h){case "translation":f[h]=[0,0];g[h]=[j[0]/b,j[1]/b];break;case "rotation":f[h]=i[1]==j[1]&&i[2]==j[2]?i:[0,j[1],j[2]];g[h]=[(j[0]-f[h][0])/b,0,0];break;case "scale":a[h]=
j;f[h]=(f[h]+s)[H](V);g[h]=[(j[0]-f[h][0])/b,(j[1]-f[h][1])/b,0,0];break;case "clip-rect":f[h]=(f[h]+s)[H](V);g[h]=[];for(i=4;i--;)g[h][i]=(j[i]-f[h][i])/b;break}e[h]=j}}this.stop();this.in_animation=1;S[this.id]={start:a.start||+new Date,ms:b,easing:c,from:f,diff:g,to:e,el:this,callback:d,t:{x:0,y:0}};++S[o]==1&&lb();return this};u[p].stop=function(){S[this.id]&&S[o]--;delete S[this.id];return this};u[p].translate=function(a,b){return this.attr({translation:a+" "+b})};u[p][N]=function(){return"Rapha\u00ebl\u2019s object"};
m.ae=S;function Z(a){this.items=[];this[o]=0;this.type="set";if(a)for(var b=0,c=a[o];b<c;b++)if(a[b]&&(a[b].constructor==u||a[b].constructor==Z)){this[this.items[o]]=this.items[this.items[o]]=a[b];this[o]++}}Z[p][E]=function(){for(var a,b,c=0,d=arguments[o];c<d;c++)if((a=arguments[c])&&(a.constructor==u||a.constructor==Z)){b=this.items[o];this[b]=this.items[b]=a;this[o]++}return this};Z[p].pop=function(){delete this[this[o]--];return this.items.pop()};for(var Ka in u[p])if(u[p][z](Ka))Z[p][Ka]=function(a){return function(){for(var b=
0,c=this.items[o];b<c;b++)this.items[b][a][K](this.items[b],arguments);return this}}(Ka);Z[p].attr=function(a,b){if(a&&m.is(a,U)&&m.is(a[0],"object")){b=0;for(var c=a[o];b<c;b++)this.items[b].attr(a[b])}else{c=0;for(var d=this.items[o];c<d;c++)this.items[c].attr(a,b)}return this};Z[p].animate=function(a,b,c,d){(m.is(c,"function")||!c)&&(d=c||null);var f=this.items[o],e=f,g,h=this,i;d&&(i=function(){!--f&&d.call(h)});c=m.is(c,ea)?c:i;for(g=this.items[--e].animate(a,b,c,i);e--;)this.items[e].animateWith(g,
a,b,c,i);return this};Z[p].insertAfter=function(a){for(var b=this.items[o];b--;)this.items[b].insertAfter(a);return this};Z[p].getBBox=function(){for(var a=[],b=[],c=[],d=[],f=this.items[o];f--;){var e=this.items[f].getBBox();a[E](e.x);b[E](e.y);c[E](e.x+e.width);d[E](e.y+e.height)}a=$[K](0,a);b=$[K](0,b);return{x:a,y:b,width:Y[K](0,c)-a,height:Y[K](0,d)-b}};Z[p].clone=function(a){a=new Z;for(var b=0,c=this.items[o];b<c;b++)a[E](this.items[b].clone());return a};m.registerFont=function(a){if(!a.face)return a;
this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)if(a.face[z](d))b.face[d]=a.face[d];if(this.fonts[c])this.fonts[c][E](b);else this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=da(a.face["units-per-em"],10);for(var f in a.glyphs)if(a.glyphs[z](f)){c=a.glyphs[f];b.glyphs[f]={w:c.w,k:{},d:c.d&&"M"+c.d[I](/[mlcxtrv]/g,function(g){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[g]||"M"})+"z"};if(c.k)for(var e in c.k)if(c[z](e))b.glyphs[f].k[e]=c.k[e]}}return a};
G[p].getFont=function(a,b,c,d){d=d||"normal";c=c||"normal";b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400;if(m.fonts){var f=m.fonts[a];if(!f){a=new RegExp("(^|\\s)"+a[I](/[^\w\d\s+!~.:_-]/g,s)+"(\\s|$)","i");for(var e in m.fonts)if(m.fonts[z](e))if(a.test(e)){f=m.fonts[e];break}}var g;if(f){e=0;for(a=f[o];e<a;e++){g=f[e];if(g.face["font-weight"]==b&&(g.face["font-style"]==c||!g.face["font-style"])&&g.face["font-stretch"]==d)break}}return g}};G[p].print=function(a,b,c,d,f,e){e=e||"middle";
var g=this.set(),h=(c+s)[H](s),i=0;m.is(d,c)&&(d=this.getFont(d));if(d){c=(f||16)/d.face["units-per-em"];var j=d.face.bbox.split(V);f=+j[0];e=+j[1]+(e=="baseline"?j[3]-j[1]+ +d.face.descent:(j[3]-j[1])/2);j=0;for(var l=h[o];j<l;j++){var n=j&&d.glyphs[h[j-1]]||{},r=d.glyphs[h[j]];i+=j?(n.w||d.w)+(n.k&&n.k[h[j]]||0):0;r&&r.d&&g[E](this.path(r.d).attr({fill:"#000",stroke:"none",translation:[i,0]}))}g.scale(c,c,f,e).translate(a-f,b-e)}return g};var Jb=/\{(\d+)\}/g;m.format=function(a,b){var c=m.is(b,
U)?[0][M](b):arguments;a&&m.is(a,ea)&&c[o]-1&&(a=a[I](Jb,function(d,f){return c[++f]==null?s:c[f]}));return a||s};m.ninja=function(){La.was?(Raphael=La.is):delete Raphael;return m};m.el=u[p];return m}();
if(window.Raphael){Raphael.shadow=function(J,I,L,D,Q){Q=Q||{};var G=Q.target||null,A=Q.shadow||Q.color||"#000",P=Q.size*10||-4,O=Q.offsetSize||5,N=Q.zindex||0,F=Q.radius||0,B,H,M=AJS.$('<div class="aui-shadow"></div>'),E=".5",C="3",K="absolute";L=L+P;D=D+P;if(G&&J==I&&J==0){J=AJS.$(G).offset().top;I=AJS.$(G).offset().left}if(AJS.$.browser.msie&&~~(AJS.$.browser.version)<9){A="#f0f0f0";O=3;E=".2"}M.css({position:K,left:I,top:J,zIndex:N,width:L,height:D});if(navigator.appVersion.indexOf("AppleWebKit")>-1&&navigator.appVersion.indexOf("Chrome")<0&&G){O=(Q.offsetSize||3)+"px";G.style.cssText+="-webkit-box-shadow: "+O+" "+O+" 5px "+A+";"}else{if(G){M.insertBefore(G);B=this(M[0],L+O+5,D+O+5,F)}else{B=this(J,I,L,D,F)}H=B.rect(O,O,L,D).attr({fill:A,stroke:A,blur:C,opacity:E});B.canvas.style.position="absolute"}return M}};
/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='http://10.20.160.198/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
jQuery.noConflict();
/*!
*
* This file has been modified to include a patch to Sortable as referenced here:
* http://github.com/jquery/jquery-ui/commit/a4488aff7c62f3e2db6f894b5f24cfd0adb8c6b7
* line: 117
*
* jQuery UI 1.8.1
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
jQuery.ui||function(c){c.ui={version:"1.8.1",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")=="hidden")return false;
b=b&&b=="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,f,g){return c.ui.isOverAxis(a,d,f)&&c.ui.isOverAxis(b,e,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,
PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||
/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==
undefined)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b||"area"==b?a.href||!isNaN(d):!isNaN(d))&&
!c(a)["area"==b?"parents":"closest"](":hidden").length},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}(jQuery);
;/*!
* jQuery UI Widget 1.8.1
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Widget
*/
(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype=
b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g=
b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();
this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f,
h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=
b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
;/*!
* jQuery UI Mouse 1.8.1
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Mouse
*
* Depends:
* jquery.ui.widget.js
*/
(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&
this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();
return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&
this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
;/*
* jQuery UI Draggable 1.8.1
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Draggables
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b=
this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();
d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,
b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment==
"parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&
a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),
10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():
f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])e=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+
this.offset.click.top;if(a.pageX-this.offset.click.left>this.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;e=this.originalPageX+
Math.round((e-this.originalPageX)/b.grid[0])*b.grid[0];e=this.containment?!(e-this.offset.click.left<this.containment[0]||e-this.offset.click.left>this.containment[2])?e:!(e-this.offset.click.left<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-
this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=
this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.1"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var g=d.data(this,"sortable");
if(g&&!g.options.disabled){c.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;
c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=
1;this.instance.currentItem=d(f).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;
this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=
this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","iframeFix",{start:function(){var a=
d(this).data("draggable").options;d(a.iframeFix===true?"iframe":a.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;
if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!=
"HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-
b.overflowOffset.left<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this,
width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,g=b.offset.left,n=g+c.helperProportions.width,m=b.offset.top,o=m+c.helperProportions.height,h=c.snapElements.length-1;h>=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e<g&&g<k+e&&j-e<m&&m<l+e||i-e<g&&g<k+e&&j-e<o&&o<l+e||i-e<n&&n<k+e&&j-e<m&&m<l+e||i-e<n&&n<k+e&&j-e<o&&
o<l+e){if(f.snapMode!="inner"){var p=Math.abs(j-o)<=e,q=Math.abs(l-m)<=e,r=Math.abs(i-n)<=e,s=Math.abs(k-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left}var t=
p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(j-m)<=e;q=Math.abs(l-o)<=e;r=Math.abs(i-g)<=e;s=Math.abs(k-n)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:j,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:l-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:i}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&
(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||q||r||s||t}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"),
10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery);
;/*
* jQuery UI Sortable 1.8.1
*
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Sortables
*
* Depends:
* jquery.ui.core.js
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
(function(d){d.widget("ui.sortable",d.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,
arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&&!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=
c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,
{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();
if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");
if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;else if(a.pageY-this.overflowOffset.top<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;if(this.overflowOffset.left+
this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;else if(a.pageX-this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}else{if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-b.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+
b.scrollSpeed);if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(b=this.items.length-1;b>=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0],e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,
c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset();c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==
document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",
null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):
d(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});return c.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},
_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?j:g<b+this.helperProportions.width/
2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b=d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();if(!b)return false;return this.floating?c&&c=="right"||a=="down"?2:1:a&&(a=="down"?2:1)},_intersectsWithSides:function(a){var b=
d.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&a||e=="left"&&!a:c&&(c=="down"&&b||c=="up"&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=
this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith();if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?
h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),
b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(a){this.items=[];this.containers=[this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var f=e.length-1;f>=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?
i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h<g;h++){i=d(e[h]);i.data("sortable-item",a);b.push({item:i,instance:a,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var b=this.items.length-1;b>=0;b--){var c=this.items[b],e=this.options.toleranceElement?d(this.options.toleranceElement,
c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=
this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f=d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-
parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],
this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=
1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<b){b=Math.abs(h-f);e=this.items[g]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,true):this._rearrange(a,null,this.containers[c].element,true);this._trigger("change",a,this._uiHash());this.containers[c]._trigger("change",
a,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}}},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a,this.currentItem])):b.helper=="clone"?this.currentItem.clone():this.currentItem;a.parents("body").length||d(b.appendTo!="parent"?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);if(a[0]==
this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(a[0].style.width==""||b.forceHelperSize)a.width(this.currentItem.width());if(a[0].style.height==""||b.forceHelperSize)a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||
0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;
if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=
d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:b.top+
this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],
this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var f=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(a.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;
if(a.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-
this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+
(d.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=this,g=this.counter;window.setTimeout(function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:function(a,b){this.reverting=false;var c=[];!this._noFinalSort&&
this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&c.push(function(f){this._trigger("receive",f,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||
this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(function(f){this._trigger("update",f,this._uiHash())});if(!d.ui.contains(this.element[0],this.currentItem[0])){b||c.push(function(f){this._trigger("remove",f,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",
g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",
this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(e=0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}return false}b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!b){for(e=
0;e<c.length;e++)c[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){d.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{version:"1.8.1"})})(jQuery);
;
jQuery.ui.draggable.prototype._mouseCapture=(function(A){return function(C){var B=A.call(this,C);if(B&&jQuery.browser.msie){C.stopPropagation()}return B}})(jQuery.ui.draggable.prototype._mouseCapture);
(function(){var _after=1;var _afterThrow=2;var _afterFinally=3;var _before=4;var _around=5;var _intro=6;var _regexEnabled=true;var _arguments="arguments";var _undef="undefined";var getType=(function(){var toString=Object.prototype.toString,toStrings={},nodeTypes={1:"element",3:"textnode",9:"document",11:"fragment"},types="Arguments Array Boolean Date Document Element Error Fragment Function NodeList Null Number Object RegExp String TextNode Undefined Window".split(" ");for(var i=types.length;i--;){var type=types[i],constructor=window[type];if(constructor){try{toStrings[toString.call(new constructor)]=type.toLowerCase()}catch(e){}}}return function(item){return item==null&&(item===undefined?_undef:"null")||item.nodeType&&nodeTypes[item.nodeType]||typeof item.length=="number"&&(item.callee&&_arguments||item.alert&&"window"||item.item&&"nodelist")||toStrings[toString.call(item)]}})();var isFunc=function(obj){return getType(obj)=="function"};var weaveOne=function(source,method,advice){var old=source[method];if(advice.type!=_intro&&!isFunc(old)){var oldObject=old;old=function(){var code=arguments.length>0?_arguments+"[0]":"";for(var i=1;i<arguments.length;i++){code+=","+_arguments+"["+i+"]"}return eval("oldObject("+code+");")}}var aspect;if(advice.type==_after||advice.type==_afterThrow||advice.type==_afterFinally){aspect=function(){var returnValue,exceptionThrown=null;try{returnValue=old.apply(this,arguments)}catch(e){exceptionThrown=e}if(advice.type==_after){if(exceptionThrown==null){returnValue=advice.value.apply(this,[returnValue,method])}else{throw exceptionThrown}}else{if(advice.type==_afterThrow&&exceptionThrown!=null){returnValue=advice.value.apply(this,[exceptionThrown,method])}else{if(advice.type==_afterFinally){returnValue=advice.value.apply(this,[returnValue,exceptionThrown,method])}}}return returnValue}}else{if(advice.type==_before){aspect=function(){advice.value.apply(this,[arguments,method]);return old.apply(this,arguments)}}else{if(advice.type==_intro){aspect=function(){return advice.value.apply(this,arguments)}}else{if(advice.type==_around){aspect=function(){var invocation={object:this,args:Array.prototype.slice.call(arguments)};return advice.value.apply(invocation.object,[{arguments:invocation.args,method:method,proceed:function(){return old.apply(invocation.object,invocation.args)}}])}}}}}aspect.unweave=function(){source[method]=old;pointcut=source=aspect=old=null};source[method]=aspect;return aspect};var search=function(source,pointcut,advice){var methods=[];for(var method in source){var item=null;try{item=source[method]}catch(e){}if(item!=null&&method.match(pointcut.method)&&isFunc(item)){methods[methods.length]={source:source,method:method,advice:advice}}}return methods};var weave=function(pointcut,advice){var source=typeof (pointcut.target.prototype)!=_undef?pointcut.target.prototype:pointcut.target;var advices=[];if(advice.type!=_intro&&typeof (source[pointcut.method])==_undef){var methods=search(pointcut.target,pointcut,advice);if(methods.length==0){methods=search(source,pointcut,advice)}for(var i in methods){advices[advices.length]=weaveOne(methods[i].source,methods[i].method,methods[i].advice)}}else{advices[0]=weaveOne(source,pointcut.method,advice)}return _regexEnabled?advices:advices[0]};jQuery.aop={after:function(pointcut,advice){return weave(pointcut,{type:_after,value:advice})},afterThrow:function(pointcut,advice){return weave(pointcut,{type:_afterThrow,value:advice})},afterFinally:function(pointcut,advice){return weave(pointcut,{type:_afterFinally,value:advice})},before:function(pointcut,advice){return weave(pointcut,{type:_before,value:advice})},around:function(pointcut,advice){return weave(pointcut,{type:_around,value:advice})},introduction:function(pointcut,advice){return weave(pointcut,{type:_intro,value:advice})},setup:function(settings){_regexEnabled=settings.regexMatch}}})();
(function(B){B.fn.ajaxSubmit=function(M){if(!this.length){A("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof M=="function"){M={success:M}}M=B.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},M||{});var O={};this.trigger("form-pre-serialize",[this,M,O]);if(O.veto){A("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(M.beforeSerialize&&M.beforeSerialize(this,M)===false){A("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var I=this.formToArray(M.semantic);if(M.data){M.extraData=M.data;for(var E in M.data){if(M.data[E] instanceof Array){for(var F in M.data[E]){I.push({name:E,value:M.data[E][F]})}}else{I.push({name:E,value:M.data[E]})}}}if(M.beforeSubmit&&M.beforeSubmit(I,this,M)===false){A("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[I,this,M,O]);if(O.veto){A("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var D=B.param(I);if(M.type.toUpperCase()=="GET"){M.url+=(M.url.indexOf("?")>=0?"&":"?")+D;M.data=null}else{M.data=D}var N=this,H=[];if(M.resetForm){H.push(function(){N.resetForm()})}if(M.clearForm){H.push(function(){N.clearForm()})}if(!M.dataType&&M.target){var K=M.success||function(){};H.push(function(P){B(M.target).html(P).each(K,arguments)})}else{if(M.success){H.push(M.success)}}M.success=function(S,Q){for(var R=0,P=H.length;R<P;R++){H[R].apply(M,[S,Q,N])}};var C=B("input:file",this).fieldValue();var L=false;for(var G=0;G<C.length;G++){if(C[G]){L=true}}if(M.iframe||L){if(B.browser.safari&&M.closeKeepAlive){B.get(M.closeKeepAlive,J)}else{J()}}else{B.ajax(M)}this.trigger("form-submit-notify",[this,M]);return this;function J(){var T=N[0];if(B(":input[name=submit]",T).length){alert('Error: Form elements must not be named "submit".');return }var R=B.extend({},B.ajaxSettings,M);var c=jQuery.extend(true,{},B.extend(true,{},B.ajaxSettings),R);var S="jqFormIO"+(new Date().getTime());var Y=B('<iframe id="'+S+'" name="'+S+'" />');var a=Y[0];if(B.browser.msie||B.browser.opera){a.src='javascript:false;document.write("");'}Y.css({position:"absolute",top:"-1000px",left:"-1000px"});var b={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;Y.attr("src","about:blank")}};var Z=R.global;if(Z&&!B.active++){B.event.trigger("ajaxStart")}if(Z){B.event.trigger("ajaxSend",[b,R])}if(c.beforeSend&&c.beforeSend(b,c)===false){c.global&&jQuery.active--;return }if(b.aborted){return }var Q=0;var V=0;var P=T.clk;if(P){var U=P.name;if(U&&!P.disabled){M.extraData=M.extraData||{};M.extraData[U]=P.value;if(P.type=="image"){M.extraData[name+".x"]=T.clk_x;M.extraData[name+".y"]=T.clk_y}}}setTimeout(function(){var f=N.attr("target"),d=N.attr("action");N.attr({target:S,method:"POST",action:R.url});if(!M.skipEncodingOverride){N.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(R.timeout){setTimeout(function(){V=true;W()},R.timeout)}var e=[];try{if(M.extraData){for(var g in M.extraData){e.push(B('<input type="hidden" name="'+g+'" value="'+M.extraData[g]+'" />').appendTo(T)[0])}}Y.appendTo("body");a.attachEvent?a.attachEvent("onload",W):a.addEventListener("load",W,false);T.submit()}finally{N.attr("action",d);f?N.attr("target",f):N.removeAttr("target");B(e).remove()}},10);function W(){if(Q++){return }a.detachEvent?a.detachEvent("onload",W):a.removeEventListener("load",W,false);var f=0;var g=true;try{if(V){throw"timeout"}var h,j;j=a.contentWindow?a.contentWindow.document:a.contentDocument?a.contentDocument:a.document;if(j.body==null&&!f&&B.browser.opera){f=1;Q--;setTimeout(W,100);return }b.responseText=j.body?j.body.innerHTML:null;b.responseXML=j.XMLDocument?j.XMLDocument:j;b.getResponseHeader=function(k){var e={"content-type":R.dataType};return e[k]};if(R.dataType=="json"||R.dataType=="script"){var d=j.getElementsByTagName("textarea")[0];b.responseText=d?d.value:b.responseText}else{if(R.dataType=="xml"&&!b.responseXML&&b.responseText!=null){b.responseXML=X(b.responseText)}}h=B.httpData(b,R.dataType)}catch(i){g=false;B.handleError(R,b,"error",i)}if(g){R.success(h,"success");if(Z){B.event.trigger("ajaxSuccess",[b,R])}}if(Z){B.event.trigger("ajaxComplete",[b,R])}if(Z&&!--B.active){B.event.trigger("ajaxStop")}if(R.complete){R.complete(b,g?"success":"error")}setTimeout(function(){Y.remove();b.responseXML=null},100)}function X(d,e){if(window.ActiveXObject){e=new ActiveXObject("Microsoft.XMLDOM");e.async="false";e.loadXML(d)}else{e=(new DOMParser()).parseFromString(d,"text/xml")}return(e&&e.documentElement&&e.documentElement.tagName!="parsererror")?e:null}}};B.fn.ajaxForm=function(C){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){B(this).ajaxSubmit(C);return false}).each(function(){B(":submit,input:image",this).bind("click.form-plugin",function(E){var D=this.form;D.clk=this;if(this.type=="image"){if(E.offsetX!=undefined){D.clk_x=E.offsetX;D.clk_y=E.offsetY}else{if(typeof B.fn.offset=="function"){var F=B(this).offset();D.clk_x=E.pageX-F.left;D.clk_y=E.pageY-F.top}else{D.clk_x=E.pageX-this.offsetLeft;D.clk_y=E.pageY-this.offsetTop}}}setTimeout(function(){D.clk=D.clk_x=D.clk_y=null},10)})})};B.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){B(":submit,input:image",this).unbind("click.form-plugin")})};B.fn.formToArray=function(N){var M=[];if(this.length==0){return M}var D=this[0];var H=N?D.getElementsByTagName("*"):D.elements;if(!H){return M}for(var I=0,K=H.length;I<K;I++){var E=H[I];var F=E.name;if(!F){continue}if(N&&D.clk&&E.type=="image"){if(!E.disabled&&D.clk==E){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}continue}var O=B.fieldValue(E,true);if(O&&O.constructor==Array){for(var G=0,C=O.length;G<C;G++){M.push({name:F,value:O[G]})}}else{if(O!==null&&typeof O!="undefined"){M.push({name:F,value:O})}}}if(!N&&D.clk){var J=D.getElementsByTagName("input");for(var I=0,K=J.length;I<K;I++){var L=J[I];var F=L.name;if(F&&!L.disabled&&L.type=="image"&&D.clk==L){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}}}return M};B.fn.formSerialize=function(C){return B.param(this.formToArray(C))};B.fn.fieldSerialize=function(D){var C=[];this.each(function(){var H=this.name;if(!H){return }var F=B.fieldValue(this,D);if(F&&F.constructor==Array){for(var G=0,E=F.length;G<E;G++){C.push({name:H,value:F[G]})}}else{if(F!==null&&typeof F!="undefined"){C.push({name:this.name,value:F})}}});return B.param(C)};B.fn.fieldValue=function(H){for(var G=[],E=0,C=this.length;E<C;E++){var F=this[E];var D=B.fieldValue(F,H);if(D===null||typeof D=="undefined"||(D.constructor==Array&&!D.length)){continue}D.constructor==Array?B.merge(G,D):G.push(D)}return G};B.fieldValue=function(C,I){var E=C.name,N=C.type,O=C.tagName.toLowerCase();if(typeof I=="undefined"){I=true}if(I&&(!E||C.disabled||N=="reset"||N=="button"||(N=="checkbox"||N=="radio")&&!C.checked||(N=="submit"||N=="image")&&C.form&&C.form.clk!=C||O=="select"&&C.selectedIndex==-1)){return null}if(O=="select"){var J=C.selectedIndex;if(J<0){return null}var L=[],D=C.options;var G=(N=="select-one");var K=(G?J+1:D.length);for(var F=(G?J:0);F<K;F++){var H=D[F];if(H.selected){var M=B.browser.msie&&!(H.attributes.value.specified)?H.text:H.value;if(G){return M}L.push(M)}}return L}return C.value};B.fn.clearForm=function(){return this.each(function(){B("input,select,textarea",this).clearFields()})};B.fn.clearFields=B.fn.clearInputs=function(){return this.each(function(){var D=this.type,C=this.tagName.toLowerCase();if(D=="text"||D=="password"||C=="textarea"){this.value=""}else{if(D=="checkbox"||D=="radio"){this.checked=false}else{if(C=="select"){this.selectedIndex=-1}}}})};B.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};B.fn.enable=function(C){if(C==undefined){C=true}return this.each(function(){this.disabled=!C})};B.fn.selected=function(C){if(C==undefined){C=true}return this.each(function(){var D=this.type;if(D=="checkbox"||D=="radio"){this.checked=C}else{if(this.tagName.toLowerCase()=="option"){var E=B(this).parent("select");if(C&&E[0]&&E[0].type=="select-one"){E.find("option").selected(false)}this.selected=C}}})};function A(){if(B.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);
(function(D){function C(G,E){function F(){E.tm=window.setTimeout(function(){E.loadedChars=""},700)}E.loadedChars=E.loadedChars+G;if(!E.tm){F()}else{clearTimeout(E.tm);F()}}function A(E){return !(this!==E.target&&(/textarea|select/i.test(E.target.nodeName)||E.target.type==="text"||E.target.type==="password"))}D.hotKeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",91:"meta",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",188:",",190:".",191:"/",224:"meta",219:"[",221:"]"},keypressKeys:["<",">","?"],shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"}};D.each(D.hotKeys.keypressKeys,function(E,F){D.hotKeys.shiftNums[F]=F});function B(F){var E,G;if(typeof F.data!=="string"){return }E=F.handler;G=F.data.toLowerCase().split(" ");F.loadedChars="";D(this).bind("keydown",function(I){var H;if(!A(I)){return }H=D.hotKeys.specialKeys[I.which];if((H==="alt"||I.altKey)){C("alt+",F)}if((H==="ctrl"||I.ctrlKey)&&!/ctrl\+/.test(F.loadedChars)){C("ctrl+",F)}if(((H!=="ctrl"&&!I.ctrlKey)&&(H==="meta"||I.metaKey))&&!/meta\+/.test(F.loadedChars)){C("meta+",F)}});F.handler=function(K){var J,I,L,H;if(!A(K)){return }I=D.hotKeys.specialKeys[K.which];L=String.fromCharCode(K.which).toLowerCase();H={};if(I){H[I]=true}if(K.shiftKey){H[F.loadedChars+D.hotKeys.shiftNums[L]||I]=true}else{H[F.loadedChars+L]=true}for(J=0,l=G.length;J<l;J++){if(H[G[J]]){F.loadedChars="";return E.apply(this,arguments)}else{if(G[J].charAt(F.loadedChars.length)===L){C(L,F)}}}}}D.each(["keydown","keyup","keypress"],function(){D.event.special[this]={add:B}})})(jQuery);
if(typeof jQuery!="undefined"){var AJS=(function(){var D=[];var C={version:"3.3.1",params:{},$:jQuery,log:function(E){if(typeof console!="undefined"&&console.log){console.log(E)}},I18n:{getText:function(E){return E}},stopEvent:function(E){E.stopPropagation();return false},include:function(E){if(!this.contains(D,E)){D.push(E);var F=document.createElement("script");F.src=E;this.$("body").append(F)}},toggleClassName:function(E,F){if(!(E=this.$(E))){return }E.toggleClass(F)},setVisible:function(F,E){if(!(F=this.$(F))){return }var G=this.$;G(F).each(function(){var H=G(this).hasClass("hidden");if(H&&E){G(this).removeClass("hidden")}else{if(!H&&!E){G(this).addClass("hidden")}}})},setCurrent:function(E,F){if(!(E=this.$(E))){return }if(F){E.addClass("current")}else{E.removeClass("current")}},isVisible:function(E){return !this.$(E).hasClass("hidden")},populateParameters:function(){var E=this;this.$(".parameters input").each(function(){var F=this.value,G=this.title||this.id;if(E.$(this).hasClass("list")){if(E.params[G]){E.params[G].push(F)}else{E.params[G]=[F]}}else{E.params[G]=(F.match(/^(tru|fals)e$/i)?F.toLowerCase()=="true":F)}})},toInit:function(F){var E=this;this.$(function(){try{F.apply(this,arguments)}catch(G){E.log("Failed to run init function: "+G)}});return this},indexOf:function(I,H,F){var G=I.length;if(F==null){F=0}else{if(F<0){F=Math.max(0,G+F)}}for(var E=F;E<G;E++){if(I[E]===H){return E}}return -1},contains:function(F,E){return this.indexOf(F,E)>-1},format:function(G){var E=/^((?:(?:[^']*'){2})*?[^']*?)\{(\d+)\}/,F=/'(?!')/g;AJS.format=function(K){var I=arguments,J="",H=K.match(E);while(H){K=K.substring(H[0].length);J+=H[1].replace(F,"")+(I.length>++H[2]?I[H[2]]:"");H=K.match(E)}return J+=K.replace(F,"")};return AJS.format.apply(AJS,arguments)},firebug:function(){var E=this.$(document.createElement("script"));E.attr("src","firebug-lite-compressed.js"/*tpa=http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js*/);this.$("head").append(E);(function(){if(window.firebug){firebug.init()}else{setTimeout(arguments.callee,0)}})()},clone:function(E){return AJS.$(E).clone().removeAttr("id")},alphanum:function(L,K){L=(L+"").toLowerCase();K=(K+"").toLowerCase();var G=/(\d+|\D+)/g,H=L.match(G),E=K.match(G),J=Math.max(H.length,E.length);for(var F=0;F<J;F++){if(F==H.length){return -1}if(F==E.length){return 1}var M=parseInt(H[F],10),I=parseInt(E[F],10);if(M==H[F]&&I==E[F]&&M!=I){return(M-I)/Math.abs(M-I)}if((M!=H[F]||I!=E[F])&&H[F]!=E[F]){return H[F]<E[F]?-1:1}}return 0},dim:function(){if(AJS.dim.dim){AJS.dim.dim.remove();AJS.dim.dim=null}else{AJS.dim.dim=AJS("div").css({width:"100%",height:AJS.$(document).height(),background:"#000",opacity:0.5,position:"absolute",top:0,left:0});AJS.$("body").append(AJS.dim.dim)}},onTextResize:function(F){if(typeof F=="function"){if(AJS.onTextResize["on-text-resize"]){AJS.onTextResize["on-text-resize"].push(function(G){F(G)})}else{var E=AJS("div");E.css({width:"1em",height:"1em",position:"absolute",top:"-9999em",left:"-9999em"});this.$("body").append(E);E.size=E.width();setInterval(function(){if(E.size!=E.width()){E.size=E.width();for(var G=0,H=AJS.onTextResize["on-text-resize"].length;G<H;G++){AJS.onTextResize["on-text-resize"][G](E.size)}}},0);AJS.onTextResize.em=E;AJS.onTextResize["on-text-resize"]=[function(G){F(G)}]}}},unbindTextResize:function(G){for(var E=0,F=AJS.onTextResize["on-text-resize"].length;E<F;E++){if(AJS.onTextResize["on-text-resize"][E]==G){return AJS.onTextResize["on-text-resize"].splice(E,1)}}},escape:function(E){return escape(E).replace(/%u\w{4}/gi,function(F){return unescape(F)})},filterBySearch:function(I,N,O){if(N==""){return[]}var G=this.$;var L=(O&&O.keywordsField)||"keywords";var K=(O&&O.ignoreForCamelCase)?"i":"";var H=(O&&O.matchBoundary)?"\\b":"";var F=(O&&O.splitRegex)||(/\s+/);var J=N.split(F);var E=[];G.each(J,function(){var Q=[new RegExp(H+this,"i")];if(/^([A-Z][a-z]*){2,}$/.test(this)){var P=this.replace(/([A-Z][a-z]*)/g,"\\b$1[^,]*");Q.push(new RegExp(P,K))}E.push(Q)});var M=[];G.each(I,function(){for(var R=0;R<E.length;R++){var P=false;for(var Q=0;Q<E[R].length;Q++){if(E[R][Q].test(this[L])){P=true;break}}if(!P){return }}M.push(this)});return M},drawLogo:function(H){options={};options=AJS.$.extend(H,options);var L=options.scaleFactor||1,K=options.fill||"#fff",J=options.stroke||"#000",G=400*L,E=40*L;strokeWidth=options.strokeWidth||1;if(AJS.$(".aui-logo").size()==0){AJS.$("body").append("<div id='aui-logo' class='aui-logo'><div>")}strokeWidth=options.strokeWidth||1,containerID=options.containerID||".aui-logo";var F=Raphael(containerID,G+50*L,E+100*L);var I=F.path("M 0,0 c 3.5433333,-4.7243333 7.0866667,-9.4486667 10.63,-14.173 -14.173,0 -28.346,0 -42.519,0 C -35.432667,-9.4486667 -38.976333,-4.7243333 -42.52,0 -28.346667,0 -14.173333,0 0,0 z m 277.031,28.346 c -14.17367,0 -28.34733,0 -42.521,0 C 245.14,14.173 255.77,0 266.4,-14.173 c -14.17267,0 -28.34533,0 -42.518,0 C 213.25167,0 202.62133,14.173 191.991,28.346 c -14.17333,0 -28.34667,0 -42.52,0 14.17333,-18.8976667 28.34667,-37.7953333 42.52,-56.693 -7.08667,-9.448667 -14.17333,-18.897333 -21.26,-28.346 -14.173,0 -28.346,0 -42.519,0 7.08667,9.448667 14.17333,18.897333 21.26,28.346 -14.17333,18.8976667 -28.34667,37.7953333 -42.52,56.693 -14.173333,0 -28.346667,0 -42.52,0 10.63,-14.173 21.26,-28.346 31.89,-42.519 -14.390333,0 -28.780667,0 -43.171,0 C 42.520733,1.330715e-4 31.889933,14.174867 21.26,28.347 c -42.520624,6.24e-4 -85.039187,-8.13e-4 -127.559,-0.001 11.220667,-14.961 22.441333,-29.922 33.662,-44.883 -6.496,-8.661 -12.992,-17.322 -19.488,-25.983 5.905333,0 11.810667,0 17.716,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 14.173333,0 28.346667,0 42.52,0 10.63,14.173333 21.26,28.346667 31.89,42.52 14.173333,0 28.3466667,0 42.52,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 14.1733333,0 28.3466667,0 42.52,0 10.63,14.173333 21.26,28.346667 31.89,42.52 14.390333,0 28.780667,0 43.171,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 42.51967,0 85.03933,0 127.559,0 10.63033,14.173333 21.26067,28.346667 31.891,42.52 14.17267,0 28.34533,0 42.518,0 -10.63,-14.173333 -21.26,-28.346667 -31.89,-42.52 14.17367,0 28.34733,0 42.521,0 14.17333,18.897667 28.34667,37.795333 42.52,56.693 -14.17333,18.8976667 -28.34667,37.7953333 -42.52,56.693 z");console.log(E);I.scale(L,-L,0,0);I.translate(120*L,E);I.attr("fill",K);I.attr("stroke",J);I.attr("stroke-width",strokeWidth)}};if(typeof AJS!="undefined"){for(var B in AJS){C[B]=AJS[B]}}var A=function(){var E=null;if(arguments.length&&typeof arguments[0]=="string"){E=arguments.callee.$(document.createElement(arguments[0]));if(arguments.length==2){E.html(arguments[1])}}return E};for(var B in C){A[B]=C[B]}return A})();AJS.$(function(){AJS.populateParameters()})}if(typeof console=="undefined"){console={messages:[],log:function(A){this.messages.push(A)},show:function(){alert(this.messages.join("\n"));this.messages=[]}}}else{console.show=function(){}}AJS.$.ajaxSettings.traditional=true;
AJS.bind=function(A,C,B){try{return jQuery(window).bind(A,C,B)}catch(D){AJS.log("error while binding: "+D.message)}};AJS.unbind=function(A,B){try{return jQuery(window).unbind(A,B)}catch(C){AJS.log("error while unbinding: "+C.message)}};AJS.trigger=function(A,C){try{return jQuery(window).trigger(A,C)}catch(B){AJS.log("error while triggering: "+B.message)}};
(function(){var E="AJS.conglomerate.cookie";function B(F,I){I=I||"";var H=new RegExp(F+"=([^|]+)"),G=I.match(H);return G&&G[1]}function A(F,H,J){var G=new RegExp("\\s*"+F+"=[^|]+(\\||$)");J=J||"";J=J.replace(G,"")+(J?"|":"");if(H){var I=F+"="+H;if(J.length+I.length<4020){J+=I}}return J}function D(F){var H=new RegExp(F+"=([^;]+)"),G=document.cookie.match(H);return G&&G[1]}function C(F,H,J){var G="";if(J){var I=new Date();I.setTime(+I+J*24*60*60*1000);G="; expires="+I.toGMTString()}document.cookie=F+"="+H+G+";path=/"}AJS.Cookie={save:function(G,H,F){var I=D(E);I=A(G,H,I);C(E,I,F||365)},read:function(G,F){var I=D(E);var H=B(G,I);if(H!=null){return H}return F},erase:function(F){this.save(F,"")}}})();
AJS.dim=function(A){if(!AJS.dim.dim){AJS.dim.dim=AJS("div").addClass("aui-blanket");if(AJS.$.browser.msie){AJS.dim.dim.css({width:"200%",height:Math.max(AJS.$(document).height(),AJS.$(window).height())+"px"})}AJS.$("body").append(AJS.dim.dim);if(AJS.$.browser.msie&&typeof AJS.hasFlash==="undefined"&&A===false){AJS.hasFlash=false;AJS.$("object, embed, iframe").each(function(){if(this.nodeName.toLowerCase()==="iframe"){if(AJS.$(this).contents().find("object, embed").length){AJS.hasFlash=true;return false}}else{AJS.hasFlash=true;return false}})}if(AJS.$.browser.msie&&(A!==false||AJS.hasFlash)){AJS.dim.shim=AJS.$('<iframe frameBorder="0" class="aui-blanket-shim" src="javascript:false;"/>');AJS.dim.shim.css({height:Math.max(AJS.$(document).height(),AJS.$(window).height())+"px"});AJS.$("body").append(AJS.dim.shim)}if(AJS.$.browser.msie&&parseInt(AJS.$.browser.version,10)<8){AJS.$("html").css("overflow","hidden")}else{AJS.$("body").css("overflow","hidden")}}};AJS.undim=function(){if(AJS.dim.dim){AJS.dim.dim.remove();AJS.dim.dim=null;if(AJS.dim.shim){AJS.dim.shim.remove()}if(AJS.$.browser.msie&&parseInt(AJS.$.browser.version,10)<8){AJS.$("html").css("overflow","")}else{AJS.$("body").css("overflow","")}if(AJS.$.browser.safari){var A=AJS.$(window).scrollTop();AJS.$(window).scrollTop(10+5*(A==10)).scrollTop(A)}}};AJS.popup=function(D){var G={width:800,height:600,closeOnOutsideClick:false,keypressListener:function(H){if(H.keyCode===27&&B.is(":visible")){E.hide()}}};if(typeof D!="object"){D={width:arguments[0],height:arguments[1],id:arguments[2]};D=AJS.$.extend({},D,arguments[3])}D=AJS.$.extend({},G,D);var B=AJS("div").addClass("aui-popup");if(D.id){B.attr("id",D.id)}var A=3000;AJS.$(".aui-dialog").each(function(){var H=AJS.$(this);A=(H.css("z-index")>A)?H.css("z-index"):A});var F=(function(I,H){D.width=(I=(I||D.width));D.height=(H=(H||D.height));B.css({marginTop:-Math.round(H/2)+"px",marginLeft:-Math.round(I/2)+"px",width:I,height:H,background:"#fff","z-index":parseInt(A,10)+2});return arguments.callee})(D.width,D.height);AJS.$("body").append(B);B.hide();B.enable();var C=AJS.$(".aui-blanket");var E={changeSize:function(H,I){if((H&&H!=D.width)||(I&&I!=D.height)){F(H,I)}this.show()},show:function(){var H=function(){var I=5;if(AJS.$.browser.msie&&~~(AJS.$.browser.version)<9){I=3}AJS.$(document).keydown(D.keypressListener);AJS.dim();C=AJS.$(".aui-blanket");if(C.size()!=0&&D.closeOnOutsideClick){C.click(function(){if(B.is(":visible")){E.hide()}})}B.show();if(!this.shadow){var J=B.offset();this.shadow=Raphael.shadow(J.top,J.left,D.width,D.height,{target:B[0],zindex:(B.css("z-index")-1)});this.shadow.css({position:"fixed",top:"50%",left:"50%",marginLeft:-(D.width/2-I)+"px",marginTop:-(D.height/2-I)+"px"})}AJS.popup.current=this;AJS.$(document).trigger("showLayer",["popup",this])};H.call(this);this.show=H},hide:function(){AJS.$(document).unbind("keydown",D.keypressListener);C.unbind();this.element.hide();if(this.shadow){this.shadow.remove();this.shadow=null}if(AJS.$(".aui-dialog:visible").size()==0){AJS.undim()}AJS.$(document).trigger("hideLayer",["popup",this]);AJS.popup.current=null;this.enable()},element:B,remove:function(){if(this.shadow){this.shadow.remove();this.shadow=null;this.shadowParent.remove();this.shadowParent=null}B.remove();this.element=null},disable:function(){if(!this.disabled){this.popupBlanket=AJS.$("<div class='dialog-blanket'> </div>").css({height:B.height(),width:B.width()});B.append(this.popupBlanket);this.disabled=true}},enable:function(){if(this.disabled){this.disabled=false;this.popupBlanket.remove();this.popupBlanket=null}}};return E};(function(){function A(J,H,G,I){if(!J.buttonpanel){J.addButtonPanel()}this.page=J;this.onclick=G;this._onclick=function(){G.call(this,J.dialog,J)};this.item=AJS("button",H).addClass("button-panel-button");if(I){this.item.addClass(I)}if(typeof G=="function"){this.item.click(this._onclick)}J.buttonpanel.append(this.item);this.id=J.button.length;J.button[this.id]=this}function B(K,I,H,J,G){if(!K.buttonpanel){K.addButtonPanel()}if(!G){G="#"}this.page=K;this.onclick=H;this._onclick=function(){H.call(this,K.dialog,K)};this.item=AJS("a",I).attr("href",G).addClass("button-panel-link");if(J){this.item.addClass(J)}if(typeof H=="function"){this.item.click(this._onclick)}K.buttonpanel.append(this.item);this.id=K.button.length;K.button[this.id]=this}function D(I,H){var G=I=="left"?-1:1;return function(M){var K=this.page[H];if(this.id!=((G==1)?K.length-1:0)){G*=(M||1);K[this.id+G].item[(G<0?"before":"after")](this.item);K.splice(this.id,1);K.splice(this.id+G,0,this);for(var J=0,L=K.length;J<L;J++){if(H=="panel"&&this.page.curtab==K[J].id){this.page.curtab=J}K[J].id=J}}return this}}function F(G){return function(){this.page[G].splice(this.id,1);for(var H=0,I=this.page[G].length;H<I;H++){this.page[G][H].id=H}this.item.remove()}}A.prototype.moveUp=A.prototype.moveLeft=D("left","button");A.prototype.moveDown=A.prototype.moveRight=D("right","button");A.prototype.remove=F("button");A.prototype.html=function(G){return this.item.html(G)};A.prototype.onclick=function(G){if(typeof G=="undefined"){return this.onclick}else{this.item.unbind("click",this._onclick);this._onclick=function(){G.call(this,page.dialog,page)};if(typeof G=="function"){this.item.click(this._onclick)}}};var E=function(M,N,G,L,J){if(!(G instanceof AJS.$)){G=AJS.$(G)}this.dialog=M.dialog;this.page=M;this.id=M.panel.length;this.button=AJS("button").html(N).addClass("item-button");if(J){this.button[0].id=J}this.item=AJS("li").append(this.button).addClass("page-menu-item");this.body=AJS("div").append(G).addClass("dialog-panel-body").css("height",M.dialog.height+"px");this.padding=10;if(L){this.body.addClass(L)}var I=M.panel.length,K=this;M.menu.append(this.item);M.body.append(this.body);M.panel[I]=this;var H=function(){var O;if(M.curtab+1){O=M.panel[M.curtab];O.body.hide();O.item.removeClass("selected");(typeof O.onblur=="function")&&O.onblur()}M.curtab=K.id;K.body.show();K.item.addClass("selected");(typeof K.onselect=="function")&&K.onselect();(typeof M.ontabchange=="function")&&M.ontabchange(K,O)};if(!this.button.click){AJS.log("atlassian-dialog:Panel:constructor - this.button.click false");this.button.onclick=H}else{this.button.click(H)}H();if(I==0){M.menu.css("display","none")}else{M.menu.show()}};E.prototype.select=function(){this.button.click()};E.prototype.moveUp=E.prototype.moveLeft=D("left","panel");E.prototype.moveDown=E.prototype.moveRight=D("right","panel");E.prototype.remove=F("panel");E.prototype.html=function(G){if(G){this.body.html(G);return this}else{return this.body.html()}};E.prototype.setPadding=function(G){if(!isNaN(+G)){this.body.css("padding",+G);this.padding=+G;this.page.recalcSize()}return this};var C=function(G,H){this.dialog=G;this.id=G.page.length;this.element=AJS("div").addClass("dialog-components");this.body=AJS("div").addClass("dialog-page-body");this.menu=AJS("ul").addClass("dialog-page-menu").css("height",G.height+"px");this.body.append(this.menu);this.curtab;this.panel=[];this.button=[];if(H){this.body.addClass(H)}G.popup.element.append(this.element.append(this.menu).append(this.body));G.page[G.page.length]=this};C.prototype.recalcSize=function(){var G=this.header?43:0;var J=this.buttonpanel?43:0;for(var I=this.panel.length;I--;){var H=this.dialog.height-G-J;this.panel[I].body.css("height",H-this.panel[I].padding*2);this.menu.css("height",H-parseFloat(this.menu.css("padding-top")))}};C.prototype.addButtonPanel=function(){this.buttonpanel=AJS("div").addClass("dialog-button-panel");this.element.append(this.buttonpanel)};C.prototype.addPanel=function(J,G,I,H){new E(this,J,G,I,H);this.recalcSize();return this};C.prototype.addHeader=function(H,G){if(this.header){this.header.remove()}this.header=AJS("h2").html(H||"").addClass("dialog-title");G&&this.header.addClass(G);this.element.prepend(this.header);this.recalcSize();return this};C.prototype.addButton=function(H,G,I){new A(this,H,G,I);this.recalcSize();return this};C.prototype.addLink=function(I,H,J,G){new B(this,I,H,J,G);this.recalcSize();return this};C.prototype.gotoPanel=function(G){this.panel[G.id||G].select()};C.prototype.getCurrentPanel=function(){return this.panel[this.curtab]};C.prototype.hide=function(){this.element.hide()};C.prototype.show=function(){this.element.show()};C.prototype.remove=function(){this.element.remove()};AJS.Dialog=function(I,G,J){var H={};if(!+I){H=Object(I);I=H.width;G=H.height;J=H.id}this.height=G||480;this.width=I||640;this.id=J;H=AJS.$.extend({},H,{width:this.width,height:this.height,id:this.id});this.popup=AJS.popup(H);this.popup.element.addClass("aui-dialog");this.page=[];this.curpage=0;new C(this)};AJS.Dialog.prototype.addHeader=function(H,G){this.page[this.curpage].addHeader(H,G);return this};AJS.Dialog.prototype.addButton=function(H,G,I){this.page[this.curpage].addButton(H,G,I);return this};AJS.Dialog.prototype.addLink=function(I,H,J,G){this.page[this.curpage].addLink(I,H,J,G);return this};AJS.Dialog.prototype.addSubmit=function(H,G){this.page[this.curpage].addButton(H,G,"button-panel-submit-button");return this};AJS.Dialog.prototype.addCancel=function(H,G){this.page[this.curpage].addLink(H,G,"button-panel-cancel-link");return this};AJS.Dialog.prototype.addButtonPanel=function(){this.page[this.curpage].addButtonPanel();return this};AJS.Dialog.prototype.addPanel=function(J,G,I,H){this.page[this.curpage].addPanel(J,G,I,H);return this};AJS.Dialog.prototype.addPage=function(G){new C(this,G);this.page[this.curpage].hide();this.curpage=this.page.length-1;return this};AJS.Dialog.prototype.nextPage=function(){this.page[this.curpage++].hide();if(this.curpage>=this.page.length){this.curpage=0}this.page[this.curpage].show();return this};AJS.Dialog.prototype.prevPage=function(){this.page[this.curpage--].hide();if(this.curpage<0){this.curpage=this.page.length-1}this.page[this.curpage].show();return this};AJS.Dialog.prototype.gotoPage=function(G){this.page[this.curpage].hide();this.curpage=G;if(this.curpage<0){this.curpage=this.page.length-1}else{if(this.curpage>=this.page.length){this.curpage=0}}this.page[this.curpage].show();return this};AJS.Dialog.prototype.getPanel=function(H,I){var G=(I==null)?this.curpage:H;if(I==null){I=H}return this.page[G].panel[I]};AJS.Dialog.prototype.getPage=function(G){return this.page[G]};AJS.Dialog.prototype.getCurrentPanel=function(){return this.page[this.curpage].getCurrentPanel()};AJS.Dialog.prototype.gotoPanel=function(I,H){if(H!=null){var G=I.id||I;this.gotoPage(G)}this.page[this.curpage].gotoPanel(typeof H=="undefined"?I:H)};AJS.Dialog.prototype.show=function(){this.popup.show();return this};AJS.Dialog.prototype.hide=function(){this.popup.hide();return this};AJS.Dialog.prototype.remove=function(){this.popup.hide();this.popup.remove()};AJS.Dialog.prototype.disable=function(){this.popup.disable();return this};AJS.Dialog.prototype.enable=function(){this.popup.enable();return this};AJS.Dialog.prototype.get=function(O){var H=[],N=this;var P='#([^"][^ ]*|"[^"]*")';var Q=":(\\d+)";var I="page|panel|button|header";var J="(?:("+I+")(?:"+P+"|"+Q+")?|"+P+")";var L=new RegExp("(?:^|,)\\s*"+J+"(?:\\s+"+J+")?\\s*(?=,|$)","ig");(O+"").replace(L,function(b,R,a,S,Y,X,U,c,Z){R=R&&R.toLowerCase();var T=[];if(R=="page"&&N.page[S]){T.push(N.page[S]);R=X;R=R&&R.toLowerCase();a=U;S=c;Y=Z}else{T=N.page}a=a&&(a+"").replace(/"/g,"");U=U&&(U+"").replace(/"/g,"");Y=Y&&(Y+"").replace(/"/g,"");Z=Z&&(Z+"").replace(/"/g,"");if(R||Y){for(var W=T.length;W--;){if(Y||(R=="panel"&&(a||(!a&&S==null)))){for(var V=T[W].panel.length;V--;){if(T[W].panel[V].button.html()==Y||T[W].panel[V].button.html()==a||(R=="panel"&&!a&&S==null)){H.push(T[W].panel[V])}}}if(Y||(R=="button"&&(a||(!a&&S==null)))){for(var V=T[W].button.length;V--;){if(T[W].button[V].item.html()==Y||T[W].button[V].item.html()==a||(R=="button"&&!a&&S==null)){H.push(T[W].button[V])}}}if(T[W][R]&&T[W][R][S]){H.push(T[W][R][S])}if(R=="header"&&T[W].header){H.push(T[W].header)}}}else{H=H.concat(T)}});var M={length:H.length};for(var K=H.length;K--;){M[K]=H[K];for(var G in H[K]){if(!(G in M)){(function(R){M[R]=function(){for(var S=this.length;S--;){if(typeof this[S][R]=="function"){this[S][R].apply(this[S],arguments)}}}})(G)}}}return M};AJS.Dialog.prototype.updateHeight=function(){var G=0;for(var H=0;this.getPanel(H);H++){if(this.getPanel(H).body.css({height:"auto",display:"block"}).outerHeight()>G){G=this.getPanel(H).body.outerHeight()}if(H!==this.page[this.curpage].curtab){this.getPanel(H).body.css({display:"none"})}}for(H=0;this.getPanel(H);H++){this.getPanel(H).body.css({height:G||this.height})}this.page[0].menu.height(G);this.height=G+87;this.popup.changeSize(undefined,G+87)};AJS.Dialog.prototype.getCurPanel=function(){return this.getPanel(this.page[this.curpage].curtab)};AJS.Dialog.prototype.getCurPanelButton=function(){return this.getCurPanel().button}})();
AJS.dropDown=function(L,E){var U=null,I=[],Q=false,H=AJS.$(document),C={item:"li:has(a)",activeClass:"active",alignment:"right",displayHandler:function(W){return W.name},escapeHandler:function(){this.hide("escape");return false},hideHandler:function(){},moveHandler:function(X,W){}};AJS.$.extend(C,E);C.alignment={left:"left",right:"right"}[C.alignment.toLowerCase()]||"left";if(L&&L.jquery){U=L}else{if(typeof L=="string"){U=AJS.$(L)}else{if(L&&L.constructor==Array){U=AJS("div").addClass("aui-dropdown").toggleClass("hidden",!!C.isHiddenByDefault);for(var P=0,K=L.length;P<K;P++){var J=AJS("ol");for(var O=0,S=L[P].length;O<S;O++){var M=AJS("li");var G=L[P][O];if(G.href){M.append(AJS("a").html("<span>"+C.displayHandler(G)+"</span>").attr({href:G.href}).addClass(G.className));AJS.$.data(AJS.$("a > span",M)[0],"properties",G)}else{M.html(G.html).addClass(G.className)}if(G.icon){M.prepend(AJS("img").attr("src",G.icon))}if(G.insideSpanIcon){M.children("a").prepend(AJS("span").attr("class","icon"))}AJS.$.data(M[0],"properties",G);J.append(M)}if(P==K-1){J.addClass("last")}U.append(J)}AJS.$("body").append(U)}else{throw new Error("AJS.dropDown function was called with illegal parameter. Should be AJS.$ object, AJS.$ selector or array.")}}}var F=function(){N(+1)};var T=function(){N(-1)};var N=function(Z){var Y=!Q,W=AJS.dropDown.current.$[0],X=AJS.dropDown.current.links,a=W.focused;Q=true;W.focused=(typeof W.focused=="number"?W.focused:-1);if(!AJS.dropDown.current){AJS.log("move - not current, aborting");return true}W.focused=W.focused+Z;if(W.focused<0){W.focused=X.length-1}if(W.focused>X.length-1){W.focused=0}C.moveHandler(AJS.$(X[W.focused]),Z<0?"up":"down");if(Y&&X.length){AJS.$(X[W.focused]).addClass(C.activeClass);Q=false}else{if(!X.length){Q=false}}};var V=function(Y){if(!AJS.dropDown.current){return true}var Z=Y.which,W=AJS.dropDown.current.$[0],X=AJS.dropDown.current.links;AJS.dropDown.current.cleanActive();switch(Z){case 40:F();break;case 38:T();break;case 27:return C.escapeHandler.call(AJS.dropDown.current,Y);case 13:if(W.focused>=0){if(!C.selectionHandler){if(AJS.$(X[W.focused]).attr("nodeName")!="a"){return AJS.$("a",X[W.focused]).trigger("focus")}else{return AJS.$(X[W.focused]).trigger("focus")}}else{return C.selectionHandler.call(AJS.dropDown.current,Y,AJS.$(X[W.focused]))}}return true;default:if(X.length){AJS.$(X[W.focused]).addClass(C.activeClass)}return true}Y.stopPropagation();Y.preventDefault();return false};var A=function(W){if(!((W&&W.which&&(W.which==3))||(W&&W.button&&(W.button==2))||false)){if(AJS.dropDown.current){AJS.dropDown.current.hide("click")}}};var D=function(W){return function(){if(!AJS.dropDown.current){return }AJS.dropDown.current.cleanFocus();this.originalClass=this.className;AJS.$(this).addClass(C.activeClass);AJS.dropDown.current.$[0].focused=W}};var R=function(W){if(W.button||W.metaKey||W.ctrlKey||W.shiftKey){return true}if(AJS.dropDown.current&&C.selectionHandler){C.selectionHandler.call(AJS.dropDown.current,W,AJS.$(this))}};var B=function(X){var W=false;if(X.data("events")){AJS.$.each(X.data("events"),function(Y,Z){AJS.$.each(Z,function(b,a){if(R===a){W=true;return false}})})}return W};U.each(function(){var W=this,Y=AJS.$(this),Z;var X={reset:function(){Z=AJS.$.extend(Z||{},{$:Y,links:AJS.$(C.item||"li:has(a)",W),cleanActive:function(){if(W.focused+1&&Z.links.length){AJS.$(Z.links[W.focused]).removeClass(C.activeClass)}},cleanFocus:function(){Z.cleanActive();W.focused=-1},moveDown:F,moveUp:T,moveFocus:V,getFocusIndex:function(){return(typeof W.focused=="number")?W.focused:-1}});Z.links.each(function(a){var b=AJS.$(this);if(!B(b)){b.hover(D(a),Z.cleanFocus);b.click(R)}});return arguments.callee}(),appear:function(a){if(a){Y.removeClass("hidden");Y.addClass("aui-dropdown-"+C.alignment)}else{Y.addClass("hidden")}},fade:function(a){if(a){Y.fadeIn("fast")}else{Y.fadeOut("fast")}},scroll:function(a){if(a){Y.slideDown("fast")}else{Y.slideUp("fast")}}};Z.addCallback=function(b,a){return AJS.$.aop.after({target:this,method:b},a)};Z.reset=X.reset();Z.show=function(a){this.alignment=C.alignment;A();AJS.dropDown.current=this;this.method=a||this.method||"appear";this.timer=setTimeout(function(){H.click(A)},0);H.keydown(V);if(C.firstSelected&&this.links[0]){D(0).call(this.links[0])}AJS.$(W.offsetParent).css({zIndex:2000});X[this.method](true);AJS.$(document).trigger("showLayer",["dropdown",AJS.dropDown.current])};Z.hide=function(a){this.method=this.method||"appear";AJS.$(Y.get(0).offsetParent).css({zIndex:""});this.cleanFocus();X[this.method](false);H.unbind("click",A).unbind("keydown",V);AJS.$(document).trigger("hideLayer",["dropdown",AJS.dropDown.current]);AJS.dropDown.current=null;return a};Z.addCallback("reset",function(){if(C.firstSelected&&this.links[0]){D(0).call(this.links[0])}});if(!AJS.dropDown.iframes){AJS.dropDown.iframes=[]}AJS.dropDown.createShims=function(){AJS.$("iframe").each(function(a){var b=this;if(!b.shim){b.shim=AJS.$("<div />").addClass("shim hidden").appendTo("body");AJS.dropDown.iframes.push(b)}});return arguments.callee}();Z.addCallback("show",function(){AJS.$(AJS.dropDown.iframes).each(function(){var a=AJS.$(this);if(a.is(":visible")){var b=a.offset();b.height=a.height();b.width=a.width();this.shim.css({left:b.left+"px",top:b.top+"px",height:b.height+"px",width:b.width+"px"}).removeClass("hidden")}})});Z.addCallback("hide",function(){AJS.$(AJS.dropDown.iframes).each(function(){this.shim.addClass("hidden")});C.hideHandler()});(function(){var a=function(){var b=this.$.offset();if(this.shadow){this.shadow.remove()}if(this.$.is(":visible")){this.shadow=Raphael.shadow(0,0,this.$.outerWidth(true),this.$.outerHeight(true),{target:this.$[0]});this.shadow.css("top",this.$.css("top"));if(this.alignment=="right"){this.shadow.css("left","")}else{this.shadow.css("left","0px")}}};Z.addCallback("reset",a);Z.addCallback("show",a);Z.addCallback("hide",function(){if(this.shadow){this.shadow.remove()}})})();if(AJS.$.browser.msie){(function(){var a=function(){if(this.$.is(":visible")){if(!this.iframeShim){this.iframeShim=AJS.$('<iframe class="dropdown-shim" src="javascript:false;" frameBorder="0" />').insertBefore(this.$)}this.iframeShim.css({display:"block",top:this.$.css("top"),width:this.$.outerWidth()+"px",height:this.$.outerHeight()+"px"});if(C.alignment=="left"){this.iframeShim.css({left:"0px"})}else{this.iframeShim.css({right:"0px"})}}};Z.addCallback("reset",a);Z.addCallback("show",a);Z.addCallback("hide",function(){if(this.iframeShim){this.iframeShim.css({display:"none"})}})})()}I.push(Z)});return I};AJS.dropDown.getAdditionalPropertyValue=function(D,A){var C=D[0];if(!C||(typeof C.tagName!="string")||C.tagName.toLowerCase()!="li"){AJS.log("AJS.dropDown.getAdditionalPropertyValue : item passed in should be an LI element wrapped by jQuery")}var B=AJS.$.data(C,"properties");return B?B[A]:null};AJS.dropDown.removeAllAdditionalProperties=function(A){};AJS.dropDown.Standard=function(H){var C=[],G,B={selector:".aui-dd-parent",dropDown:".aui-dropdown",trigger:".aui-dd-trigger"};AJS.$.extend(B,H);var F=function(I,L,K,J){AJS.$.extend(J,{trigger:I});L.addClass("dd-allocated");K.addClass("hidden");if(B.isHiddenByDefault==false){J.show()}J.addCallback("show",function(){L.addClass("active")});J.addCallback("hide",function(){L.removeClass("active")})};var A=function(K,I,L,J){if(J!=AJS.dropDown.current){L.css({top:I.outerHeight()});J.show();K.stopImmediatePropagation()}K.preventDefault()};if(B.useLiveEvents){var D=[];var E=[];AJS.$(B.trigger).live("click",function(L){var I=AJS.$(this);var N,M,J;var K;if((K=AJS.$.inArray(this,D))>=0){var O=E[K];N=O.parent;M=O.dropdown;J=O.ddcontrol}else{N=I.closest(B.selector);M=N.find(B.dropDown);if(M.length===0){return }J=AJS.dropDown(M,B)[0];if(!J){return }D.push(this);O={parent:N,dropdown:M,ddcontrol:J};F(I,N,M,J);E.push(O)}A(L,I,M,J)})}else{if(this instanceof AJS.$){G=this}else{G=AJS.$(B.selector)}G=G.not(".dd-allocated").filter(":has("+B.dropDown+")").filter(":has("+B.trigger+")");G.each(function(){var L=AJS.$(this),K=AJS.$(B.dropDown,this),I=AJS.$(B.trigger,this),J=AJS.dropDown(K,B)[0];AJS.$.extend(J,{trigger:I});F(I,L,K,J);I.click(function(M){A(M,I,K,J)});C.push(J)})}return C};AJS.dropDown.Ajax=function(C){var B,A={cache:true};AJS.$.extend(A,C||{});B=AJS.dropDown.Standard.call(this,A);AJS.$(B).each(function(){var D=this;AJS.$.extend(D,{getAjaxOptions:function(E){var F=function(G){if(A.formatResults){G=A.formatResults(G)}if(A.cache){D.cache.set(D.getAjaxOptions(),G)}D.refreshSuccess(G)};if(A.ajaxOptions){if(AJS.$.isFunction(A.ajaxOptions)){return AJS.$.extend(A.ajaxOptions.call(D),{success:F})}else{return AJS.$.extend(A.ajaxOptions,{success:F})}}return AJS.$.extend(E,{success:F})},refreshSuccess:function(E){this.$.html(E)},cache:function(){var E={};return{get:function(F){var G=F.data||"";return E[(F.url+G).replace(/[\?\&]/gi,"")]},set:function(F,G){var H=F.data||"";E[(F.url+H).replace(/[\?\&]/gi,"")]=G},reset:function(){E={}}}}(),show:function(E){return function(F){if(A.cache&&!!D.cache.get(D.getAjaxOptions())){D.refreshSuccess(D.cache.get(D.getAjaxOptions()));E.call(D)}else{AJS.$(AJS.$.ajax(D.getAjaxOptions())).throbber({target:D.$,end:function(){D.reset()}});E.call(D);D.shadow.hide();if(D.iframeShim){D.iframeShim.hide()}}}}(D.show),resetCache:function(){D.cache.reset()}});D.addCallback("refreshSuccess",function(){D.reset()})});return B};AJS.$.fn.dropDown=function(B,A){B=(B||"Standard").replace(/^([a-z])/,function(C){return C.toUpperCase()});return AJS.dropDown[B].call(this,A)};
(function(){AJS.icons=AJS.icons||{};AJS.icons.addIcon=function(B,C){AJS.icons[B]=function(E,D){return A(C,E,D)}};AJS.icons.addIcon.init=function(){var D=this.className.split(" "),B=D.length,C=this.className.match(/(^|\s)size-(\d+)(\s|$)/);C=C&&+C[2];while(B--){if(D[B]!="addIcon"&&D[B] in AJS.icons){AJS.icons[D[B]](this,C)}}};function A(E,C,B){B=B||24;var D=Raphael([C,B+1,B+1].concat(E));D.scale(B/24,B/24,0,0)}})();AJS.$(function(){AJS.$(".svg-icon").each(AJS.icons.addIcon.init)});AJS.icons.addIcon("generic",[{stroke:"none",fill:"#999",type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M22.465,8.464c1.944,1.944,1.944,5.126,0,7.07l-6.93,6.93c-1.944,1.945-5.126,1.945-7.07,0l-6.929-6.93c-1.945-1.943-1.945-5.125,0-7.07l6.929-6.93c1.944-1.944,5.126-1.944,7.07,0L22.465,8.464z"},{type:"path",stroke:"none",fill:"90-#999996-#a1a19f:20-#b8b8b7:70-#ccc",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M9.172,2.242L9.172,2.242l-6.929,6.93C1.491,9.923,1.077,10.927,1.077,12c0,1.072,0.414,2.076,1.166,2.828l6.929,6.93c0.751,0.752,1.756,1.166,2.828,1.166s2.076-0.414,2.828-1.166l6.93-6.93c0.751-0.752,1.165-1.756,1.165-2.828c0-1.072-0.414-2.076-1.165-2.828l-6.93-6.93C13.269,0.682,10.731,0.682,9.172,2.242z"},{type:"path",stroke:"none",fill:"270-#999996-#a1a19f:20-#b8b8b7:70-#ccc",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M7.181,5.869 7.181,17.95 16.974,17.95 16.974,9.205 13.638,5.869"},{type:"path",stroke:"none",fill:"#fff",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M12.724,9.619v-2.75H8.181V16.95h7.793v-6.832h-2.75C12.946,10.119,12.724,9.894,12.724,9.619zM13.724,7.369c0,0.521,0,1.32,0,1.75c0.428,0,1.229,0,1.75,0L13.724,7.369z"}]);AJS.icons.addIcon("error",[{type:"path",stroke:"none",fill:"#c00",path:"M7.857,22L2,16.143 2,7.857 7.857,1.999 16.143,1.999 22,7.857 22,16.143 16.143,22z"},{type:"path",stroke:"none",fill:"90-#c00-#d50909-#ed2121-#f33",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M8.271,2.999C7.771,3.5,3.501,7.77,3,8.271c0,0.708,0,6.748,0,7.457c0.501,0.5,4.771,4.77,5.271,5.271c0.708,0,6.749,0,7.457,0c0.501-0.502,4.771-4.771,5.271-5.271c0-0.709,0-6.749,0-7.457c-0.501-0.501-4.771-4.771-5.271-5.272C15.021,2.999,8.979,2.999,8.271,2.999z"},{type:"rect",x:5.318,y:9.321,fill:"270-#c00-#d50909-#ed2121-#f33",stroke:"none",width:13.363,height:5.356},{type:"rect",x:6.318,y:10.321,fill:"#fff",stroke:"none",width:11.363,height:3.356}]);AJS.icons.addIcon("success",[{type:"path",stroke:"none",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M22,18.801C22,20.559,20.561,22,18.799,22H5.201C3.439,22,2,20.559,2,18.801V5.199C2,3.44,3.439,2,5.201,2h13.598C20.561,2,22,3.44,22,5.199V18.801z",fill:"#393"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M5.201,3C3.987,3,3,3.986,3,5.199v13.602C3,20.014,3.987,21,5.201,21h13.598C20.013,21,21,20.014,21,18.801V5.199C21,3.986,20.013,3,18.799,3H5.201z",stroke:"none",fill:"90-#393-#33a23c-#3c6"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M10.675,12.158c-0.503-0.57-1.644-1.862-1.644-1.862l-3.494,2.833l3.663,5.313l4.503,1.205L17.73,4.624l-4.361-0.056C13.369,4.568,11.424,10.047,10.675,12.158z",stroke:"none",fill:"270-#393-#33a23c-#3c6"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M14.072,5.577 11.05,14.092 8.917,11.677 6.886,13.324 9.815,17.57 12.997,18.422 16.432,5.607",stroke:"none",fill:"#fff"}]);AJS.icons.addIcon("hint",[{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M22.465,8.464c1.944,1.944,1.944,5.126,0,7.07l-6.93,6.93c-1.944,1.945-5.126,1.945-7.07,0l-6.929-6.93c-1.945-1.943-1.945-5.125,0-7.07l6.929-6.93c1.944-1.944,5.126-1.944,7.07,0L22.465,8.464z",stroke:"none",fill:"#009898"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M9.172,2.242L9.172,2.242l-6.929,6.93C1.491,9.923,1.077,10.927,1.077,12c0,1.072,0.414,2.076,1.166,2.828l6.929,6.93c0.751,0.752,1.756,1.166,2.828,1.166s2.076-0.414,2.828-1.166l6.93-6.93c0.751-0.752,1.165-1.756,1.165-2.828c0-1.072-0.414-2.076-1.165-2.828l-6.93-6.93C13.269,0.682,10.731,0.682,9.172,2.242z",stroke:"none",fill:"270-#099-#00a2a2-#00baba-#0cc"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M12,5.077c-2.679,0-4.857,2.179-4.857,4.857c0,1.897,0.741,2.864,1.337,3.639c0.385,0.502,0.662,0.863,0.761,1.443l0.045,0.264v2.25c0,0.854,0.693,1.547,1.546,1.547h2.338c0.852,0,1.545-0.693,1.545-1.547v-2.254l0.044-0.258c0.1-0.582,0.377-0.943,0.762-1.443c0.596-0.777,1.338-1.743,1.338-3.641C16.857,7.255,14.679,5.077,12,5.077z",stroke:"none",fill:"270-#099-#00a2a2-#00baba-#0cc"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M10.227,14.849c-0.331-1.936-2.084-2.197-2.084-4.915c0-2.131,1.727-3.857,3.857-3.857c2.13,0,3.857,1.727,3.857,3.857c0,2.717-1.754,2.979-2.085,4.915H10.227z M10.285,15.849v1.682c0,0.301,0.246,0.547,0.546,0.547h2.338c0.3,0,0.545-0.246,0.545-0.547v-1.682H10.285z",stroke:"none",fill:"#fff"}]);AJS.icons.addIcon("info",[{type:"circle",cx:12,cy:12,r:10,stroke:"none",fill:"#06c"},{type:"path",path:"M3,12c0,4.962,4.037,9,9,9s9-4.038,9-9s-4.037-9-9-9S3,7.037,3,12z",stroke:"none",fill:"90-#06c-#006FD5-#0087ED-#0099FF"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M9.409,7.472c0,0.694,0.282,1.319,0.729,1.785c-0.288,0-0.729,0-0.729,0v9.425h5.182V9.257c0,0-0.44,0-0.729,0c0.446-0.466,0.729-1.09,0.729-1.785c0-1.429-1.162-2.591-2.591-2.591S9.409,6.043,9.409,7.472z",stroke:"none",fill:"270-#06c-#006FD5-#0087ED-#0099FF"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M13.591,10.257v7.425h-3.182v-7.425H13.591z M12,9.063c0.879,0,1.591-0.712,1.591-1.591S12.879,5.881,12,5.881s-1.591,0.712-1.591,1.591S11.121,9.063,12,9.063z",stroke:"none",fill:"#fff"}]);AJS.icons.addIcon("warning",[{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M8.595,4.368c1.873-3.245,4.938-3.245,6.811,0c1.873,3.245,4.938,8.554,6.812,11.798c1.874,3.244,0.342,5.898-3.405,5.898c-3.746,0-9.876,0-13.624,0c-3.746,0-5.278-2.654-3.405-5.898C3.656,12.922,6.721,7.613,8.595,4.368z",stroke:"none",fill:"#f90"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M9.461,4.868L2.649,16.666c-0.72,1.246-0.863,2.371-0.404,3.166s1.504,1.232,2.943,1.232h13.624c1.439,0,2.485-0.438,2.944-1.232s0.315-1.92-0.405-3.166L14.539,4.868C13.82,3.622,12.918,2.935,12,2.935S10.181,3.621,9.461,4.868z",stroke:"none",fill:"90-#f90-#ffa209-#ffba21-#fc3"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M9.274,6.187c0,0,0.968,9.68,0.986,9.862c-0.532,0.476-0.881,1.148-0.881,1.916c0,1.433,1.165,2.598,2.597,2.598c1.433,0,2.598-1.165,2.598-2.598c0-0.77-0.351-1.441-0.883-1.918c0.018-0.184,0.988-9.86,0.988-9.86H9.274z",stroke:"none",fill:"270-#f90-#ffa209-#ffba21-#fc3"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M11.177,15.171l-0.798-7.984h3.194l-0.8,7.984H11.177z M11.976,16.368c-0.882,0-1.597,0.716-1.597,1.597c0,0.883,0.715,1.598,1.597,1.598c0.881,0,1.598-0.715,1.598-1.598C13.573,17.084,12.856,16.368,11.976,16.368z",stroke:"none",fill:"#fff"}]);AJS.icons.addIcon("close",[{type:"path",path:"M15.535,12l4.95-4.95c0.977-0.977,0.977-2.559,0-3.536s-2.56-0.977-3.536,0L12,8.464l-4.95-4.95c-0.977-0.977-2.559-0.977-3.536,0s-0.977,2.559,0,3.536L8.464,12l-4.95,4.95c-0.977,0.977-0.977,2.559,0,3.535s2.559,0.977,3.536,0L12,15.535l4.949,4.949c0.977,0.977,2.56,0.977,3.536,0s0.977-2.559,0-3.535L15.535,12z",stroke:"none",fill:"#999"},{type:"path",path:"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/M18.718,20.217c-0.401,0-0.777-0.156-1.062-0.439L12,14.121l-5.657,5.656c-0.284,0.283-0.66,0.439-1.061,0.439c-0.4,0-0.777-0.156-1.061-0.439c-0.283-0.283-0.439-0.66-0.439-1.061s0.156-0.777,0.439-1.061L9.878,12L4.222,6.343c-0.283-0.284-0.439-0.66-0.439-1.061c0-0.4,0.156-0.777,0.439-1.061c0.284-0.283,0.66-0.439,1.061-0.439c0.401,0,0.777,0.156,1.061,0.439L12,9.878l5.656-5.657c0.284-0.283,0.66-0.439,1.062-0.439c0.4,0,0.776,0.156,1.061,0.439c0.283,0.284,0.439,0.66,0.439,1.061c0,0.401-0.156,0.777-0.439,1.061L14.121,12l5.657,5.657c0.283,0.283,0.439,0.66,0.439,1.061s-0.156,0.777-0.439,1.061C19.494,20.061,19.118,20.217,18.718,20.217L18.718,20.217z",stroke:"none",fill:"90-#999996-#a1a19f-#b8b8b7-#ccc"}]);
(function(A){AJS.InlineDialog=function(T,H,K,I){var R=A.extend(false,AJS.InlineDialog.opts,I);var E;var J;var b;var N=false;var S=false;var Z=false;var a;var P;var B=A('<div id="inline-dialog-'+H+'" class="aui-inline-dialog"><div class="contents"></div><div id="arrow-'+H+'" class="arrow"></div></div>');var G=A("#arrow-"+H,B);var Y=B.find(".contents");Y.css("width",R.width+"px");Y.mouseover(function(c){clearTimeout(J);B.unbind("mouseover")}).mouseout(function(){W()});var V=function(){if(!E){E={popup:B,hide:function(){W(0)},id:H,show:function(){Q()},reset:function(){var r;var g;var p;var h=-7;var k;var f;var q=P.target.offset();var l=parseInt(P.target.css("padding-left"))+parseInt(P.target.css("padding-right"));var n=P.target.width()+l;var d=q.left+n/2;var j=(window.pageYOffset||document.documentElement.scrollTop)+A(window).height();var c=10;function o(u,y,v,x,t,s,w){u.css({left:y,right:v,top:x});if(window.Raphael){if(!u.arrowCanvas){u.arrowCanvas=Raphael("arrow-"+H,16,16)}var z="M0,8L8,0,16,8";if(w){z="M0,8L8,16,16,8"}u.arrowCanvas.path(z).attr({fill:"#fff",stroke:"#bbb"})}G.css({position:"absolute",left:t,right:"auto",top:s})}p=q.top+P.target.height()+R.offsetY;r=q.left+R.offsetX;var e=q.top>B.height();var i=(p+B.height())<j;f=(!i&&e)||(R.onTop&&e);var m=A(window).width()-(r+R.width+c);if(f){p=q.top-B.height()-8;h=B.height()-9;if(AJS.$.browser.msie){h=B.height()-10}}k=d-r;if(R.isRelativeToMouse){if(m<0){g=c;r="auto";k=a.x-(A(window).width()-R.width)}else{r=a.x-20;g="auto";k=a.x-r}}else{if(m<0){g=c;r="auto";k=d-(A(window).width()-R.width)}else{if(R.width<=n/2){k=R.width/2;r=d-R.width/2}}}o(B,r,g,p,k,h,f);B.fadeIn(R.fadeTime,function(){});if(B.shadow){B.shadow.remove()}B.shadow=Raphael.shadow(0,0,Y.width(),Y.height(),{target:B[0]}).hide().fadeIn(R.fadeTime);if(AJS.$.browser.msie){if(A("#inline-dialog-shim-"+H).length==0){A(B).prepend(A('<iframe class = "inline-dialog-shim" id="inline-dialog-shim-'+H+'" frameBorder="0" src="javascript:false;"></iframe>'))}A("#inline-dialog-shim-"+H).css({width:Y.outerWidth(),height:Y.outerHeight()})}}}}return E};var Q=function(){if(B.is(":visible")){return }b=setTimeout(function(){if(!Z||!S){return }A(T).addClass("active");N=true;F();AJS.InlineDialog.current=V();AJS.$(document).trigger("showLayer",["inlineDialog",V()]);V().reset()},R.showDelay)};var W=function(c){S=false;if(N){c=(c==null)?R.hideDelay:c;clearTimeout(J);clearTimeout(b);if(c!=null){J=setTimeout(function(){U();A(T).removeClass("active");B.fadeOut(R.fadeTime,function(){R.hideCallback.call(B[0].popup)});B.shadow.remove();B.shadow=null;B.arrowCanvas.remove();B.arrowCanvas=null;N=false;S=false;AJS.$(document).trigger("hideLayer",["inlineDialog",V()]);AJS.InlineDialog.current=null;if(!R.cacheContent){Z=false;O=false}},c)}}};var X=function(f,c){R.upfrontCallback.call({popup:B,hide:function(){W(0)},id:H,show:function(){Q()}});B.each(function(){if(typeof this.popup!="undefined"){this.popup.hide()}});if(R.closeOthers){AJS.$(".aui-inline-dialog").each(function(){this.popup.hide()})}if(!f){a={x:T.offset().left,y:T.offset().top};P={target:T}}else{a={x:f.pageX,y:f.pageY};P={target:A(f.target)}}if(!N){clearTimeout(b)}S=true;var d=function(){O=false;Z=true;R.initCallback.call({popup:B,hide:function(){W(0)},id:H,show:function(){Q()}});Q()};if(!O){O=true;if(A.isFunction(K)){K(Y,c,d)}else{AJS.$.get(K,function(g,e,h){Y.html(R.responseHandler(g,e,h));Z=true;R.initCallback.call({popup:B,hide:function(){W(0)},id:H,show:function(){Q()}});Q()})}}clearTimeout(J);if(!N){Q()}return false};B[0].popup=V();var O=false;var M=false;var L=function(){if(!M){A(R.container).append(B);M=true}};if(R.onHover){if(R.useLiveEvents){A(T).live("mousemove",function(c){L();X(c,this)}).live("mouseout",function(){W()})}else{A(T).mousemove(function(c){L();X(c,this)}).mouseout(function(){W()})}}else{if(!R.noBind){if(R.useLiveEvents){A(T).live("click",function(c){L();X(c,this);return false}).live("mouseout",function(){W()})}else{A(T).click(function(c){L();X(c,this);return false}).mouseout(function(){W()})}}}var D=false;var C=H+".inline-dialog-check";var F=function(){if(!D){A("body").bind("click."+C,function(d){var c=A(d.target);if(c.closest("#inline-dialog-"+H+" .contents").length===0){W(0)}});D=true}};var U=function(){if(D){A("body").unbind("click."+C)}D=false};B.show=function(c){if(c){c.stopPropagation()}L();X(null,this)};B.hide=function(){W(0)};B.refresh=function(){if(N){V().reset()}};B.getOptions=function(){return R};return B};AJS.InlineDialog.opts={onTop:false,responseHandler:function(C,B,D){return C},closeOthers:true,isRelativeToMouse:false,onHover:false,useLiveEvents:false,noBind:false,fadeTime:100,hideDelay:10000,showDelay:0,width:300,offsetX:0,offsetY:10,container:"body",cacheContent:true,hideCallback:function(){},initCallback:function(){},upfrontCallback:function(){}}})(jQuery);
AJS.warnAboutFirebug=function(B){if(!AJS.Cookie.read("COOKIE_FB_WARNING")&&window.console&&window.console.firebug){if(!B){B="Firebug is known to cause performance problems with Atlassian products. Try disabling it, if you notice any issues."}var A=AJS.$("<div id='firebug-warning'><p>"+B+"</p><a class='close'>Close</a></div>");AJS.$(".close",A).click(function(){A.slideUp("fast");AJS.Cookie.save("COOKIE_FB_WARNING","true")});A.prependTo(AJS.$("body"))}};
AJS.inlineHelp=function(){AJS.$(".icon-inline-help").click(function(){var A=AJS.$(this).siblings(".field-help");if(A.hasClass("hidden")){A.removeClass("hidden")}else{A.addClass("hidden")}})};
(function(){AJS.messages={setup:function(){AJS.messages.createMessage("generic");AJS.messages.createMessage("error");AJS.messages.createMessage("warning");AJS.messages.createMessage("info");AJS.messages.createMessage("success");AJS.messages.createMessage("hint");AJS.messages.makeCloseable()},makeCloseable:function(A){AJS.$(A||"div.aui-message.closeable").each(function(){var C=AJS.$(this),B=AJS.$('<span class="aui-icon icon-close"></span>').click(function(){C.closeMessage()});C.append(B);B.each(AJS.icons.addIcon.init)})},template:'<div class="aui-message {type} {closeable} {shadowed}"><p class="title"><span class="aui-icon icon-{type}"></span><strong>{title}</strong></p>{body}</div><!-- .aui-message -->',createMessage:function(A){AJS.messages[A]=function(B,C){if(!C){C=B;B="#aui-message-bar"}C.closeable=(C.closeable==false)?false:true;C.shadowed=(C.shadowed==false)?false:true;AJS.$(B).append(AJS.template(this.template).fill({type:A,closeable:C.closeable?"closeable":"",shadowed:C.shadowed?"shadowed":"",title:C.title||"","body:html":C.body||""})).find(".svg-icon:empty").each(AJS.icons.addIcon.init);C.closeable&&AJS.messages.makeCloseable(AJS.$(B).find("div.aui-message.closeable"))}}};AJS.$.fn.closeMessage=function(){var A=AJS.$(this);if(A.hasClass("aui-message","closeable")){A.trigger("messageClose",[this]).remove()}};AJS.$(function(){AJS.messages.setup()})})();
(function(){AJS.tables=AJS.tables||{};AJS.tables.rowStriping=function(){var B=AJS.$("http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/table.aui");for(var A=0,C=B.length;A<C;A++){AJS.$("tbody tr:odd",B[A]).addClass("zebra")}};AJS.$(AJS.tables.rowStriping)})();
(function(){var B,E,C=/#.*/,D="active-tab",A="active-pane";AJS.tabs={setup:function(){B=AJS.$("div.aui-tabs");for(var F=0,G=B.length;F<G;F++){E=AJS.$("ul.tabs-menu",B[F]);AJS.$("a",E).click(function(H){AJS.tabs.change(AJS.$(this),H);H&&H.preventDefault()})}},change:function(G,H){var F=AJS.$(G.attr("href").match(C)[0]);F.addClass(A).siblings().removeClass(A);G.parent("li.menu-item").addClass(D).siblings().removeClass(D);G.trigger("tabSelect",{tab:G,pane:F})}};AJS.$(AJS.tabs.setup)})();
AJS.template=(function(G){var K=/\{([^\}]+)\}/g,D=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,M=/[<>"'&]/g,H=/([^\\])'/g,F=function(Q,P,R,N){var O=R;P.replace(D,function(U,T,S,W,V){T=T||W;if(O){if(T+":html" in O){O=O[T+":html"];N=true}else{if(T in O){O=O[T]}}if(V&&typeof O=="function"){O=O()}}});if(O==null||O==R){O=Q}O=String(O);if(!N){O=E.escape(O)}return O},I=function(N){return"&#"+N.charCodeAt()+";"},C=function(N){this.template=this.template.replace(K,function(P,O){return F(P,O,N,true)});return this},L=function(N){this.template=this.template.replace(K,function(P,O){return F(P,O,N)});return this},B=function(){return this.template};var E=function(O){function N(){return N.template}N.template=String(O);N.toString=N.valueOf=B;N.fill=L;N.fillHtml=C;return N},A={},J=[];E.load=function(N){N=String(N);if(!A.hasOwnProperty(N)){J.length>=1000&&delete A[J.shift()];J.push(N);A[N]=G("script[title='"+N.replace(H,"$1\\'")+"']")[0].text}return this(A[N])};E.escape=function(N){return String(N).replace(M,I)};return E})(window.jQuery);
AJS.whenIType=function(D){var A,E=function(F){F=F.toString();jQuery(document).bind("keypress",F,function(){if(!AJS.popup.current&&A){A()}});jQuery(document).bind("keypress keyup",F,function(G){G.preventDefault()})},B=function(F){var H=jQuery(F),I=H.attr("title")||"",G=D.split("");if(H.data("kbShortcutAppended")){C(H,G,I);return }I+=" ( "+AJS.params.keyType+" '"+G.shift()+"'";jQuery.each(G,function(){I+=" "+AJS.params.keyThen+" '"+this+"'"});I+=" )";H.attr("title",I);H.data("kbShortcutAppended",true)},C=function(G,F,H){H=H.replace(/\)$/," OR ");H+="'"+F.shift()+"'";jQuery.each(F,function(){H+=" "+AJS.params.keyThen+" '"+this+"'"});H+=" )";G.attr("title",H)};E(D);return{moveToNextItem:function(F){A=function(){var H,G=jQuery(F),I=jQuery(F+".focused");if(!A.blurHandler){jQuery(document).one("keypress",function(J){if(J.keyCode===jQuery.ui.keyCode.ESCAPE&&I){I.removeClass("focused")}})}if(I.length===0){I=jQuery(F).eq(0)}else{I.removeClass("focused");H=jQuery.inArray(I.get(0),G);if(H<G.length-1){H=H+1;I=G.eq(H)}else{I.removeClass("focused");I=jQuery(F).eq(0)}}if(I&&I.length>0){I.addClass("focused");I.moveTo();I.find("a:first").focus()}}},moveToPrevItem:function(F){A=function(){var H,G=jQuery(F),I=jQuery(F+".focused");if(!A.blurHandler){jQuery(document).one("keypress",function(J){if(J.keyCode===jQuery.ui.keyCode.ESCAPE&&I){I.removeClass("focused")}})}if(I.length===0){I=jQuery(F+":last")}else{I.removeClass("focused");H=jQuery.inArray(I.get(0),G);if(H>0){H=H-1;I=G.eq(H)}else{I.removeClass("focused");I=jQuery(F+":last")}}if(I&&I.length>0){I.addClass("focused");I.moveTo();I.find("a:first").focus()}}},click:function(F){B(F);A=function(){var G=jQuery(F);if(G.length>0){G.click()}}},goTo:function(F){A=function(){window.location.href=F}},followLink:function(F){B(F);A=function(){var G=jQuery(F);if(G.length>0&&G.attr("nodeName").toLowerCase()==="a"){window.location.href=G.attr("href")}}},execute:function(F){A=function(){F()}},moveToAndClick:function(F){B(F);A=function(){var G=jQuery(F);if(G.length>0){G.click();G.moveTo()}}},moveToAndFocus:function(F){B(F);A=function(){var G=jQuery(F);if(G.length>0){G.focus();G.moveTo()}}},or:function(F){E(F);return this}}};jQuery(document).bind("iframeAppended",function(B,A){jQuery(A).load(function(){var C=jQuery(A).contents();C.bind("keyup keydown keypress",function(D){if(jQuery.browser.safari&&D.type==="keypress"){return }if(!jQuery(D.target).is(":input")){jQuery(document).trigger(D)}})})});AJS.whenIType.fromJSON=function(A){if(A){jQuery.each(A,function(C,D){var B=D.op,E=D.param;jQuery.each(D.keys,function(){if(B==="execute"){E=new Function(E)}AJS.whenIType(this)[B](E)})})}};
AJS.toInit(function(D){if(D.browser.msie){var F=D(".aui-toolbar .toolbar-group");F.each(function(G,H){D(H).children(":first").addClass("first");D(H).children(":last").addClass("last")});if(parseInt(D.browser.version,10)==7){function B(){D(".aui-toolbar button").closest(".toolbar-item").addClass("contains-button")}function C(){D(".aui-toolbar .toolbar-split-right").each(function(J,M){var K=D(M),N=K.closest(".aui-toolbar"),G=N.find(".toolbar-split-left"),I=N.data("leftWidth"),L=N.data("rightWidth");if(!I){I=G.outerWidth();N.data("leftWidth",I)}if(!L){L=0;D(".toolbar-item",M).each(function(P,Q){L+=D(Q).outerWidth()});N.data("rightWidth",L)}var O=N.width(),H=O-I;if(O>L&&L>H){G.addClass("force-split")}else{G.removeClass("force-split")}})}function E(){F.each(function(G,H){var I=0;D(H).children(".toolbar-item").each(function(K,J){I+=D(this).outerWidth()});D(this).width(I)})}E();B();var A=false;D(window).resize(function(){if(A!==false){clearTimeout(A)}A=setTimeout(C,200)})}}});
(function(A){A.fn.autocomplete=function(B,C,K){K=typeof C=="function"?C:(typeof K=="function"?K:function(){});C=!isNaN(Number(C))?C:3;var J=this;J[0].lastSelectedValue=J.val();var H=A(document.createElement("ol"));var D=J.offset();var G=parseInt(A("body").css("border-left-width"));H.css({position:"absolute",width:J.outerWidth()-2+"px"});H.addClass("autocompleter");this.after(H);H.css({margin:(Math.abs(this.offset().left-H.offset().left)>=Math.abs(this.offset().top-H.offset().top))?J.outerHeight()+"px 0 0 -"+J.outerWidth()+"px":"-1px 0 0 0"});H.hide();function F(){H.hide();A(document).unbind("click",F)}function E(){var L=J.val();if(L.length>=C&&L!=J[0].lastQuery&&L!=J[0].lastSelectedValue){A.getJSON(B+encodeURI(L),function(P){var R="";L=L.toLowerCase();var U=L.split(" ");for(var Q=0,W=P.length;Q<W;Q++){var S=false;if(P[Q].fullName&&P[Q].username){var V=P[Q].fullName+" ("+P[Q].username+")";var M=P[Q].fullName.split(" ");for(var O=0,T=M.length;O<T;O++){for(var N=0;N<U.length;N++){if(M[O].toLowerCase().indexOf(U[N])==0){M[O]="<strong>"+M[O].substring(0,U[N].length)+"</strong>"+M[O].substring(U[N].length);S=true}}}if(!S){for(var N=0;N<U.length;N++){if(P[Q].username&&P[Q].username.toLowerCase().indexOf(U[N])==0){P[Q].username="<strong>"+P[Q].username.substring(0,U[N].length)+"</strong>"+P[Q].username.substring(U[N].length)}}}P[Q].fullName=M.join(" ");R+="<li><span>"+P[Q].fullName+"</span> <span class='username-in-autocomplete-list'>("+P[Q].username+")</span><i class='fullDetails'>"+V+"</i><i class='username'>"+P[Q].username+"</i><i class='fullName'>"+P[Q].fullName+"</i></li>"}if(P[Q].status){R+="<li>"+P[Q].status+"</li>"}}H.html(R);A("li",H).click(function(Y){Y.stopPropagation();var X=A("i.fullDetails",this).html();I(X)}).hover(function(){A(".focused").removeClass("focused");A(this).addClass("focused")},function(){});A(document).click(F);H.show()});J[0].lastQuery=L}else{if(L.length<C){F()}}}J.keydown(function(M){var L=this;if(this.timer){clearTimeout(this.timer)}var N={"40":function(){var O=A(".focused").removeClass("focused").next();if(O.length){O.addClass("focused")}else{A(".autocompleter li:first").addClass("focused")}},"38":function(){var O=A(".focused").removeClass("focused").prev();if(O.length){O.addClass("focused")}else{A("li:last",H).addClass("focused")}},"27":function(){F()},"13":function(){var O=A(".focused i.fullDetails").html();I(O)},"9":function(){this[13]();setTimeout(function(){L.focus()},0)}};if(H.css("display")!="none"&&M.keyCode in N){M.preventDefault();N[M.keyCode]()}this.timer=setTimeout(E,300)});function I(N){var M=J.val();if(N){J[0].lastSelectedValue=N;J.val(N);var L={input:J,originalValue:M,value:N,fullName:A(".focused i.fullName").text(),username:A(".focused i.username").text()};K(L);F()}}}})(jQuery);
jQuery.fn.isDirty=function(){var B,A=[];window.onbeforeunload=function(){var C=window.onbeforeunload;if(B!==false){jQuery.each(A,function(){if(this.initVal!==AJS.$(this).val()){B=true;return false}})}if(B){window.onbeforeunload=null;window.setTimeout(function(){jQuery(document).bind("mousemove",function(){window.onbeforeunload=C;jQuery(document).unbind("mousemove",arguments.callee)})},1000);B=void (0);return AJS.params.dirtyMessage||""}};return function(D){if(this.length===0){return }function C(F){var E=jQuery(this);jQuery.fn.isDirty.fieldInFocus=E;if(jQuery.inArray(this,A)===-1){this.initVal=E.val();A.push(this);E.die(F.type,C)}}jQuery(":not(:input)").live("click",function(){delete jQuery.fn.isDirty.fieldInFocus});jQuery(":input[type != hidden]",this.selector).bind("keydown",C).bind("keypress",C).bind("click",C);jQuery(D.ignoreUnloadFromElems).live("mousedown",function(){B=false});this.each(function(){this.onsubmit=function(E){return function(){B=false;if(E){return E.apply(this,arguments)}}}(this.onsubmit);AJS.$(this).submit(function(){B=false})});return this}}();
(function(A){A.fn.progressBar=function(I,L){var C=this;var F={height:"1em",showPercentage:true};var B=A.extend(F,L);var J=C.attr("id")+"-incomplete-bar";var D=C.attr("id")+"-complete-bar";var K=C.attr("id")+"-percent-complete-text";if(A("#"+J).length==0){var E=A(document.createElement("div"));E.attr("id",J);E.css({width:"90%",border:"solid 1px #ccc","float":"left","margin-right":"http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/0.5em"});E.addClass("progress-background-color");var G=A(document.createElement("div"));G.attr("id",D);G.addClass("progress-fill-color");G.css({height:B.height,width:I+"%"});var H=A(document.createElement("span"));H.attr("id",K);H.addClass("percent-complete-text");H.html(I+"%");E.append(G);C.append(E);if(B.showPercentage){C.append(H)}}else{A("#"+D).css("width",I+"%");A("#"+K).html(I+"%")}}})(jQuery);
(function(A){if(document.selection){var B=function(C){return C.replace(/\u000D/g,"")};A.fn.selection=function(F){var E=this[0];this.focus();if(!E){return false}if(F==null){return document.selection.createRange().text}else{var D=E.scrollTop;var C=document.selection.createRange();C.text=F;C.select();E.focus();E.scrollTop=D}};A.fn.selectionRange=function(C,F){var G=this[0];this.focus();var I=document.selection.createRange();if(C==null){var K=this.val(),J=K.length,E=I.duplicate();E.moveToElementText(G);E.setEndPoint("StartToEnd",I);var D=J-B(E.text).length;E.setEndPoint("StartToStart",I);var H=J-B(E.text).length;if(D!=H&&K.charAt(D+1)=="\n"){D+=1}return{end:D,start:H,text:K.substring(H,D),textBefore:K.substring(0,H),textAfter:K.substring(D)}}else{I.moveToElementText(G);I.collapse(true);I.moveStart("character",C);I.moveEnd("character",F-C);I.select()}}}else{A.fn.selection=function(E){var D=this[0];if(!D){return false}if(E==null){if(D.setSelectionRange){return D.value.substring(D.selectionStart,D.selectionEnd)}else{return false}}else{var C=D.scrollTop;if(!!D.setSelectionRange){var F=D.selectionStart;D.value=D.value.substring(0,F)+E+D.value.substring(D.selectionEnd);D.selectionStart=F;D.selectionEnd=F+E.length}D.focus();D.scrollTop=C}};A.fn.selectionRange=function(F,C){if(F==null){var D={start:this[0].selectionStart,end:this[0].selectionEnd};var E=this.val();D.text=E.substring(D.start,D.end);D.textBefore=E.substring(0,D.start);D.textAfter=E.substring(D.end);return D}else{this[0].selectionStart=F;this[0].selectionEnd=C}}}A.fn.wrapSelection=function(C,D){this.selection(C+this.selection()+(D||""))}})(jQuery);
jQuery.fn.throbber=function(A){return function(){var C=[],B={isLatentThreshold:100,minThrobberDisplay:200,loadingClass:"loading"};A(document).ajaxComplete(function(E,D){A(C).each(function(F){if(D===this.get(0)){this.hideThrobber();C.splice(F,1)}})});return function(F){var E,G,D=function(I,H){D.t=setTimeout(function(){clearTimeout(D.t);D.t=undefined;I()},H)};F=A.extend(B,F||{});if(!F.target){return this}G=jQuery(F.target);C.push(A.extend(this,{showThrobber:function(){D(function(){if(!E){G.addClass(F.loadingClass);D(function(){if(E){E()}},F.minThrobberDisplay)}},F.isLatentThreshold)},hideThrobber:function(){E=function(){G.removeClass(F.loadingClass);if(F.end){F.end()}};if(!D.t){E()}}}));this.showThrobber();return this}}()}(jQuery);
jQuery.noConflict();
AJS.$.ajaxSetup({traditional:true});AJS.isIE6=!window.XMLHttpRequest;AJS.applyPngFilter=function(a,c,b){if(!AJS.isIE6){return false}c=c||a.src;b=b||"scale";a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+"', sizingMethod='"+b+"')";return true};
(function(d){AJS.Data=d.extend({},AJS.Data,{get:function(g){var f=d("meta[name=ajs-"+g+"]");return f.length?f.attr("content"):undefined},getBoolean:function(f){return this.get(f)==="true"}});AJS.logError=function(h,f){var g=[];for(prop in f){g.push(prop+": "+f[prop])}AJS.log(h+g.join(", "))};AJS.toInit=function(f){d(function(){try{f.apply(this,arguments)}catch(g){AJS.logError("Failed to run init function: ",g)}});return this};if(AJS.Data.getBoolean("log-rendered")){var e=AJS.log,c=d('<div id="ajs-log" class="log"><h3>AJS Log</h3>\n</div>'),b=d("head"),a;c.toggleClass("hidden",!AJS.Data.getBoolean("log-visible"));AJS.log=function(g){var h=(typeof(g)==="undefined")?"undefined":g;if(a){if(c.next().length!=0){a.append(c)}}else{var f=document.createElement("script");f.type="text/x-log";f.text=h;b.append(f)}c.append(d("<p></p>").text("\n"+h));e(g)};AJS.toInit(function(){a=d("body");a.append(c)})}})(AJS.$);
AJS.ConfluenceDialog=function(a){var b;a=a||{};a=jQuery.extend({},{keypressListener:function(c){if(c.keyCode===27){if(!jQuery(".aui-dropdown",b.popup.element).is(":visible")){if(typeof a.onCancel=="function"){a.onCancel()}else{b.hide()}}}else{if(c.keyCode===13){if(!jQuery(".aui-dropdown",b.popup.element).is(":visible")){var d=c.target.nodeName&&c.target.nodeName.toLowerCase();if(d!="textarea"&&typeof a.onSubmit=="function"){a.onSubmit()}}}}},width:865,height:530},a);b=new AJS.Dialog(a);jQuery.aop.around({target:b,method:"addButton"},function(c){if(c.arguments[0]){c.arguments[0]=AJS.I18n.getText(c.arguments[0])}return c.proceed()});return b};AJS.toInit(function(a){a(document).bind("showLayer",AJS.Confluence.runBinderComponents);AJS.Dialog.prototype.addHelpText=function(c,b){if(!c){return}var f=c;if(b){f=AJS.template(c).fill(b).toString()}var e=this.page[this.curpage];if(!e.buttonpanel){e.addButtonPanel()}var d=a("<div class='dialog-tip'></div>").html(f);e.buttonpanel.append(d)}});
Raphael.spinner=function(k,f,h){var o=h||"#fff",n=f*13/60,s=f*35/60,p=f,d=p+n,c=p+n,m=Raphael(k,p*2+n*2,p*2+n*2),l=[],e=[],u=2*Math.PI/12,j={stroke:o,"stroke-width":n,"stroke-linecap":"round"};for(var q=0;q<12;q++){var g=u*q-Math.PI/2,b=Math.cos(g),a=Math.sin(g);e[q]=q/12;l[q]=m.path([["M",d+s*b,c+s*a],["L",d+p*b,c+p*a]]).attr(j)}var t;(function v(){e.unshift(e.pop());for(var r=0;r<12;r++){l[r].attr("opacity",e[r])}m.safari();t=setTimeout(v,80)})();return function(){clearTimeout(t);m.remove()}};
AJS.REST = (function($) {
var baseUrl = "/rest/prototype/1/";
AJS.safeHTML = function (html) {
return html.replace(/[<>&"']/g, function (symbol) {
return "&#" + symbol.charCodeAt() + ";";
});
};
/**
* Converts a single object in REST format into an object in the format expected by AJS.dropDown.
*/
var getDropdownObjectForRestResult = function (result) {
if (!result) {
AJS.log("REST result is null");
return null;
}
if (!result.link || !$.isArray(result.link)) {
AJS.log("No link for result with title: " + result.title);
return null;
}
if (!result.title) {
AJS.log("No title for result with id: " + result.id);
return null;
}
var obj = {
href : encodeURI(AJS.REST.findLink(result.link)),
name : AJS.safeHTML(result.title),
spaceName: AJS.safeHTML(AJS.REST.findSpaceName(result)),
restObj : result
};
if (result.thumbnailLink) {
var versionQuery = result.version ? "?version="+result.version + "&modificationDate=" : "";
obj.icon = result.thumbnailLink.href + versionQuery;
} else {
obj.className = result.iconClass || "content-type-" + result.type + (result.type == "space" ? "desc" : "");
}
return obj;
};
return {
getBaseUrl: function() {
return baseUrl;
},
/**
* Iterates through the links array to find the first matching link of the given type and rel.
* @param links typically the link field on a REST JSON object
* @param type type of link. Defaults to "text/html" if not defined.
* @param rel relationship of the link. Defaults to "alternate".
*/
findLink: function(links, type, rel) {
if (!type) type = "text/html";
if (!rel) rel = "alternate";
if (AJS.$.isArray(links)) {
for (var i=0,ii=links.length; i<ii; i++) {
var link = links[i];
if (link.type == type && link.rel == rel) {
return link.href;
}
}
}
return "#";
},
findSpaceName: function(restObj){
if (restObj.space){
return restObj.space.name;
}
return "";
},
/**
* Converts a matrix in REST format into a matrix in the format expected by AJS.dropDown.
*
* @param restMatrix matrix of objects in Confluence REST format
* @return matrix of objects in Confluence drop-down format
*/
convertFromRest: function (restMatrix) {
var matrix = [], catArray, obj;
for (var i = 0, len = restMatrix.length; i < len; i++) {
catArray = [];
for (var j = 0, len2 = restMatrix[i].length; j < len2; j++) {
obj = getDropdownObjectForRestResult(restMatrix[i][j]);
obj && catArray.push(obj);
}
catArray.length && matrix.push(catArray);
}
return matrix;
},
/**
* Given an ContentEntityObject's REST data construct the alias, destination, href and wiki-markup.
*
* @param data - the content data in REST format
*/
wikiLink : function (data) {
var alias = data.title,
destination = data.wikiLink.slice(1, -1); // remove the [ and ]
// CONF-18940 strip off the space key and page title if linking to an attachment on the current page
if (data.type == "attachment" && data.space && data.space.key == AJS.params.spaceKey &&
data.ownerId == AJS.params.attachmentSourceContentId) {
destination = destination.substring(destination.indexOf("^"));
}
var wikiMarkup = (alias != destination ? (alias + "|") : "") + destination;
AJS.log("tinymce.confluence.Autocompleter.Manager.makeLinkDetails =>" + wikiMarkup);
return {
alias : alias,
destination : destination,
href : this.findLink(data.link),
wikiMarkup : wikiMarkup
};
},
/**
* Converts an object in REST format into a matrix containing the REST data.
*
* @async - called from an AJAX callback method
* @param restObj object in Confluence REST format
*/
makeRestMatrixFromData: function (restObj, suggestionField) {
var restMatrix = [];
var resultArr = eval("restObj." + suggestionField);
if (resultArr && resultArr.length)
restMatrix.push(resultArr);
return restMatrix;
},
/**
* Converts an object in REST format into a matrix containing the search REST data.
*
* @async - called from an AJAX callback method
* @param restObj object in Confluence REST format
* @param suggestionField - the name of the field in the resObj that stores the suggestion. If null, "group" is used.
* The "group" is the field used for in the /search/name REST service.
*/
makeRestMatrixFromSearchData: function(restObj, suggestionField) {
var restMatrix = [];
suggestionField = suggestionField || "group";
var resultArr = eval("restObj." + suggestionField);
if (resultArr) {
var set = {
content: [],
attachment: [],
userinfo: [],
spacedesc: [],
page: [],
blogpost: [],
comment: [],
personalspacedesc: [],
mail: []
};
for (var i = 0, ii = resultArr.length; i < ii; i++) {
var group = resultArr[i];
set[group.name] && set[group.name].push(group.result);
}
// This line determines the order that the search sections appear. Don't change this unless you have to.
restMatrix = restMatrix.concat(set.content, set.attachment, set.userinfo, set.spacedesc, set.page, set.blogpost, set.comment, set.personalspacedesc, set.mail);
}
else {
log("makeRestMatrixFromData", "WARNING: Unknown rest object", restObj);
}
return restMatrix;
}
};
})(AJS.$);
var JSON=JSON||{};(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());
(function(a){AJS.Confluence={getContextPath:function(){return AJS.Data.get("context-path")},getBuildNumber:function(){return AJS.Data.get("build-number")},runBinderComponents:function(){AJS.log("AJS.Confluence: run binder components");for(var b in AJS.Confluence.Binder){if(AJS.Confluence.Binder.hasOwnProperty(b)){try{AJS.Confluence.Binder[b]()}catch(c){AJS.log("Exception in initialising of component '"+b+"': "+c.message)}}}},placeFocus:function(){AJS.Confluence.Binder.placeFocus()}};AJS.Confluence.Binder={placeFocus:function(){var c,b=-1;AJS.$("input[data-focus]").each(function(){var e=AJS.$(this),d=e.attr("data-focus");if(d>b){b=d;c=e}});c&&c.focus()}};AJS.toInit(function(){AJS.Confluence.runBinderComponents()})})(AJS.$);
AJS.Confluence.cacheManager=function(c){var a={},b=[],c=c||30;return{get:function(d){return a[d]},put:function(d,e){a[d]=e;b.push(d);if(b.length>c){delete a[b.shift()]}},clear:function(){a={};b=[]}}};
(function(e){var d=function(g){AJS.log("InputDrivenDropDown: truncating text");var i=g.$.closest(".aui-dd-parent").width(),h=20;e("a span:not(.icon)",g.$).each(function(){var k=e(this),j=AJS("var","&#8230;"),m=j.width(),l=false;k.wrapInner(e("<em>"));e("em",k).each(function(){var n=e(this);n.show();if(this.offsetLeft+this.offsetWidth+m>i-h){var u=this.childNodes,t=false;for(var p=u.length-1;p>=0;p--){var q=u[p],o=1,s=(q.nodeType==3)?"nodeValue":"innerHTML",r=q[s];do{if(o<=r.length){q[s]=r.substr(0,r.length-o++)}else{break}}while(this.offsetLeft+this.offsetWidth+m>i-h);if(o<=r.length){t=true;break}}if(t){l=true}else{n.hide()}}});if(l){k.append(j);this.elpss=j}})};var b=function(g,m){if(!m.length||!m[0]){return}AJS.log("InputDrivenDropDown: highlighting tokens");for(var j=0,k=m.length;j<k;j++){var h=m[j];m[j]=h?h.replace(/[\.\*\+\?\|\(\)\[\]{}\\]/g,"\\$"):""}var l=new RegExp("("+m.join("|")+")","gi");e("li a:not(.dropdown-prevent-highlight) span",g.$).each(function(){var n=e(this),i=n.html().replace(l,"<strong>$1</strong>");n.html(i)})};var c=function(g){AJS.log("InputDrivenDropDown: add space names");e("a span:not(.icon)",g.$).each(function(){var j=e(this);var h;try{h=AJS.dropDown.getAdditionalPropertyValue(j,"spaceName")}catch(i){AJS.log("Problem getting space name: "+i.message)}var k=j.text();if(h){k+=" ("+AJS("i").html(h).text()+")"}j.attr("title",k)})};var f=function(k,h){var j=k.options,i=k.dd;if(i){i.hide();i.$.remove()}j.ajsDropDownOptions=j.ajsDropDownOptions||{};if(j.ajsDropDownOptions&&!j.ajsDropDownOptions.alignment){j.ajsDropDownOptions.alignment="left"}j.ajsDropDownOptions.selectionHandler=j.ajsDropDownOptions.selectionHandler||function(m,l){if(m.type!="click"){m.preventDefault();e("a",l).click();document.location=e("a",l).attr("href")}};var g=k.dd=AJS.dropDown(h.matrix,j.ajsDropDownOptions)[0];if(j.ajsDropDownOptions&&j.ajsDropDownOptions.className){g.$.addClass(j.ajsDropDownOptions.className)}if(j.dropdownPlacement){j.dropdownPlacement(g.$)}else{AJS.log("No dropdownPlacement function specified. Appending dropdown to the body.");e("body").append(g.$)}b(g,h.queryTokens||[h.query]);d(g);c(g);if(j.dropdownPostprocess){j.dropdownPostprocess(g.$)}g.show(k._effect);if(typeof j.onShow=="function"){j.onShow.call(g,g.$)}return g};function a(h,g){this._effect="appear";this._timer=null;this.id=h;this.options=g;this.inactive=false;this.busy=false;this.cacheManager=AJS.Confluence.cacheManager()}a.prototype.clearCache=function(){this.cacheManager.clear()};a.prototype.change=function(i,h){var g=this;if(i!=g._value){g._value=i;g.busy=false;clearTimeout(g._timer);if(h||(/\S{2,}/).test(i)){var j=g.cacheManager.get(i);if(j){f(g,j)}else{g.busy=true;g._timer=setTimeout(function(){g.options.getDataAndRunCallback.call(g,i,g.show)},200)}}else{g.dd&&g.dd.hide()}}};a.prototype.hide=function(){this.dd&&this.dd.hide()};a.prototype.remove=function(){var g=this.dd;if(g){this.hide();g.$.remove()}this.inactive=true;this.options.onDeath&&this.options.onDeath()};a.prototype.show=function(h,j,i){if(this.inactive){AJS.log("Quick search abandoned before server response received, ignoring. "+this);return}var g={matrix:h,query:j,queryTokens:i};this.cacheManager.put(j,g);f(this,g);this.busy=false};AJS.inputDrivenDropdown=function(g){return new a("inputdriven-dropdown",g)}})(jQuery);
(function(a){a.fn.quicksearch=function(f,i,e){if(i){e.onShow=i}e.makeParams=e.makeParams||function(j){return{query:j}};var c=function(l){var m=l.statusMessage;var k;if(m){k=[[{html:l.statusMessage,className:"error"}]]}else{if(e.makeRestMatrixFromData){var j=e.makeRestMatrixFromData(l);k=AJS.REST.convertFromRest(j);if(e.addDropdownData){k=e.addDropdownData(k)}}else{k=l.contentNameMatches}}return k};var d,h;if(typeof f=="function"){h=f(),d=function(k){var j=f();if(j!=h){h=j;k.clearCache()}return j}}else{d=function(){return f}}e.getDataAndRunCallback=e.getDataAndRunCallback||function(m,n){var l=this,k=d(l,m),j=AJS.Data.get("context-path")||"";AJS.$.ajax({type:"GET",dataType:"json",url:j+k,data:e.makeParams(m),success:function(p,q){a(window).trigger("quicksearch.ajax-success",{url:k,json:p,resultStatus:q});var o=c(p);n.call(l,o,m,p.queryTokens)},global:false,timeout:5000,error:function(r,p,q){a(window).trigger("quicksearch.ajax-error",{url:k,xmlHttpRequest:r,resultStatus:p,errorThrown:q});if(p=="timeout"){var o=c({statusMessage:"Timeout",query:m});n.call(l,o,null)}}})};var g=AJS.inputDrivenDropdown(e),b=a(this);b.keyup(function(j){if(j.which==13||j.which==9){return}!b.hasClass("placeholded")&&g.change(this.value)});b.quickSearchControl=g;return b}})(jQuery);
AJS.Confluence.Binder.placeholder=function(){var b=AJS.$;var a=document.createElement("input");if("placeholder" in a){return}b("input[placeholder][data-placeholder-bound!=true],input.default-text[data-placeholder-bound!=true]").each(function(){var e=b(this).attr("data-placeholder-bound","true"),c=e.attr("placeholder")||e.attr("data-default-text"),d=function(){if(!b.trim(e.val()).length){e.val(c).addClass("placeholded").trigger("reset.placeholder");e.trigger("reset.default-text")}};d();e.blur(d).focus(function(){if(e.hasClass("placeholded")){e.val("");e.removeClass("placeholded")}})})};AJS.Confluence.Binder.inputDefaultText=AJS.Confluence.Binder.placeholder;
AJS.Confluence.Binder.insertOnEvent=function(){var a=AJS.$;a(".insert-on-event[data-inserter-bound!=true]").each(function(){var f=a(this).attr("data-inserter-bound","true"),e=a(f.attr("data-target"))[0],c=f.attr("data-event"),d=f.attr("data-insert-position"),b=f.attr("data-insert-unique-key");if(e&&c&&d){a(self).bind(c,function(j,i){if(e==i.target){if(b){var g=i.content[b],h={};a(".key-holder",d).each(function(){h[a(this).attr("data-key")]=true});if(g in h){return}}a(d).append(AJS.template(f.text()).fill(i.content))}})}})};
AJS.Confluence.Binder.autocompleteUser=function(b){b=b||document.body;var c=AJS.$;var a=function(e){if(!e||!e.result){throw new Error("Invalid JSON format")}var d=[];d.push(e.result);return d};c("input.autocomplete-user[data-autocomplete-user-bound!=true]",b).each(function(){var f=c(this).attr("data-autocomplete-user-bound","true").attr("autocomplete","off");var e=f.attr("data-max")||10,h=f.attr("data-alignment")||"left",g=f.attr("data-dropdown-target"),d=null;if(g){d=c(g)}else{d=c("<div></div>");f.after(d)}d.addClass("aui-dd-parent autocomplete");f.quicksearch(AJS.REST.getBaseUrl()+"search/user.json",function(){f.trigger("open.autocomplete-user")},{makeParams:function(i){return{"max-results":e,query:i}},dropdownPlacement:function(i){d.append(i)},makeRestMatrixFromData:a,addDropdownData:function(i){if(!i.length){var j=f.attr("data-none-message");if(j){i.push([{name:j,className:"no-results",href:"#"}])}}return i},ajsDropDownOptions:{alignment:h,displayHandler:function(i){if(i.restObj&&i.restObj.username){return i.name+" ("+i.restObj.username+")"}return i.name},selectionHandler:function(n,k){if(k.find(".search-for").length){f.trigger("selected.autocomplete-user",{searchFor:f.val()});return}if(k.find(".no-results").length){this.hide();n.preventDefault();return}var i=c("span:eq(0)",k).data("properties"),o=i.restObj.username,l=f.attr("data-target"),m=l&&c(l),j=f.attr("data-template")||"{username}";f.val(AJS.template(j).fillHtml(i.restObj));m&&m.val(o);f.trigger("selected.autocomplete-user",{content:i.restObj});this.hide();n.preventDefault()}}})})};
(function(){var b=AJS.$;var a=function(f){if(!f||!f.group){throw new Error("Invalid JSON format")}var e=[];for(var g=0,h=f.group.length;g<h;g++){e.push(f.group[g].result)}return e};var d=function(o,i,f,g){var n=b(o),s="data-autocomplete-content-bound";if(n.attr(s)){return}if(typeof i=="string"){i=[i]}n.attr(s,"true").attr("autocomplete","off");var p=i.join(","),h=n.attr("data-max")||10,m=n.attr("data-alignment")||"left",l=n.attr("data-spacekey"),k=n.attr("data-none-message"),r=n.attr("data-template")||f,e=n.attr("data-target"),j=n.attr("data-dropdown-target"),q=null;if(j){q=b(j)}else{q=b("<div></div>");n.after(q)}q.addClass("aui-dd-parent autocomplete");n.quicksearch(AJS.REST.getBaseUrl()+"search/name.json",null,{onShow:function(){n.trigger("open.autocomplete-content",{contentTypes:i})},makeParams:function(u){var t={"max-results":h,type:p,query:u};if(l){t.spaceKey=l}return t},dropdownPlacement:function(t){q.append(t)},makeRestMatrixFromData:a,addDropdownData:function(t){if(!t.length){if(k){t.push([{name:k,className:"no-results",href:"#"}])}}return t},ajsDropDownOptions:{alignment:m,displayHandler:g,selectionHandler:function(w,u){if(u.find(".search-for").length){n.trigger("selected.autocomplete-content",{contentTypes:i,searchFor:n.val()});return}if(u.find(".no-results").length){AJS.log("no results selected");this.hide();w.preventDefault();return}var t=u.data("properties");n.val(AJS.template(r).fillHtml(t.restObj));if(e){var v=AJS.template(f).fillHtml(t.restObj);b(e).val(v)}n.trigger("selected.autocomplete-content",{contentTypes:i,content:t.restObj,selection:u});this.hide();w.preventDefault()}}})};AJS.Confluence.Binder.autocompleteSpace=function(e){e=e||document.body;b("input.autocomplete-space",e).each(function(){d(this,["spacedesc","personalspacedesc"],"{name}",function(f){return f.name})})};AJS.Confluence.Binder.autocompleteAttachment=function(e){e=e||document.body;b("input.autocomplete-attachment",e).each(function(){d(this,"attachment","{fileName}",function(f){var g=(f.restObj&&f.restObj.fileName)||f.name;if(f.restObj&&f.restObj.space&&f.restObj.space.title){g+=" ("+f.restObj.space.title+")"}return g})})};var c=function(e){return(e.restObj&&e.restObj.title)||e.name};AJS.Confluence.Binder.autocompletePage=function(e){e=e||document.body;b("input.autocomplete-page",e).each(function(){d(this,"page","{title}",c)})};AJS.Confluence.Binder.autocompleteBlogpost=function(e){e=e||document.body;b("input.autocomplete-blogpost",e).each(function(){d(this,"blogpost","{title}",c)})};AJS.Confluence.Binder.autocompleteConfluenceContent=function(e){e=e||document.body;b("input.autocomplete-confluence-content",e).each(function(){d(this,["page","blogpost"],"{title}",c)})}})();
AJS.Confluence.Binder.userHover=(function(){var e=[],b=AJS.Confluence.getContextPath(),d=AJS.$;var a=function(h){var g=e[h],f={username:g,target:this};d(self).trigger("http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/hover-user.open",f);d(".ajs-menu-bar",this).ajsMenu();d(".follow-icon, .unfollow-icon",this).each(function(){var i=d(this).click(function(k){if(i.hasClass("waiting")){return}var j=i.hasClass("unfollow-icon")?"/unfollowuser.action":"/followuser.action";i.addClass("waiting");AJS.safe.post(b+j+"?username="+g+"&mode=blank",function(){i.removeClass("waiting");i.parent().toggleClass("follow-item").toggleClass("unfollow-item");d(self).trigger("hover-user.follow",f)});return AJS.stopEvent(k)})})};var c=["span.user-hover-trigger","a.confluence-userlink","img.confluence-userlink","a.userLogoLink"].join(", ");return function(){d(c).filter("[data-user-hover-bound!=true]").each(function(){var g=d(this),h=g.attr("data-username");g.attr("title","").attr("data-user-hover-bound","true");d("img",g).attr("title","");var f=d.inArray(h,e);if(f==-1){e.push(h);f=d.inArray(h,e)}d(this).addClass("userlink-"+f)});d.each(e,function(f){AJS.contentHover(d(".userlink-"+f),f,b+"/users/userinfopopup.action?username="+e[f],a)})}})();
AJS.Confluence.Binder.comments=function(){var c=AJS.$;if(c(window).data("comments-bound")){AJS.log("Currently, this comment binding can only be done once per page");return}var b=function(j){var h=function(l,k){return{animate:function(m){l.style.height=AJS.animation.interpolate(m,48,24,k)+"px";l.style.width=l.style.height;l.style.marginLeft=AJS.animation.interpolate(m,0,12,k)+"px"},onFinish:function(){l.style.height="";l.style.width="";l.style.marginLeft=""}}};var f=function(l,k){return{start:1,end:0,reverse:k,animate:function(m){l.style.opacity=m;l.style.filter="alpha(opacity="+(m*100)+")"},onFinish:function(){l.style.opacity="";l.style.filter="alpha(opacity="+(k?100:0)+")"}}};var i=function(l,k){if(!k){l.originalHeight=jQuery(l).height()}return{start:l.originalHeight||50,end:0,reverse:k,animate:function(m){l.style.height=m+"px"},onFinish:function(){l.style.height=""}}};var e=jQuery(j).find(".comment-body")[0];var g=j.className.indexOf("collapsed")>=0;return AJS.animation.combine([h(jQuery(j).parent().find(".comment-user-logo img, .comment-user-logo .replacement")[0],g),f(e,g),f(jQuery(j).find(".excerpt")[0],!g),i(e,g),{onFinish:function(){if(g){jQuery(j).removeClass("collapsed")}else{jQuery(j).addClass("collapsed")}}}])};var d=function(){var e=this;c(e).unbind("click");AJS.animation.add(b(c(e).parent()[0]));AJS.animation.add({onFinish:function(){c(e).click(d)}});AJS.animation.start()};if(AJS.isIE6){c(".logo.anonymous").each(function(){var e=document.createElement("div");e.className="replacement";AJS.applyPngFilter(e,this.src);c(this).replaceWith(e)});c(".comment-actions .comment-permalink a").each(function(){c(this).addClass("filtered");var f=c(this).css("background-image").replace(/^url\(\"?|\"?\)$/g,"");var e=f.replace("light","dark");AJS.applyPngFilter(this,f);this.style.cursor="pointer";this.style.background="none";c(this).hover(function(){AJS.applyPngFilter(this,e)},function(){AJS.applyPngFilter(this,f)})})}c("#comments-section .comment:odd").addClass("odd");c(".comment-action-remove a").click(function(){if(confirm(AJS.params.deleteCommentConfirmMessage)){this.href=this.href+"&confirm=yes";return true}return false});var a=function(e){c("#page-comments").toggleClass("hidden",!e);c(".comments-show-hide").toggleClass("comments-showing",e);c(".icon.comments-show-hide").toggleClass("icon-section-closed",!e);c(".icon.comments-show-hide").toggleClass("icon-section-opened",e)};c(".comments-show-hide").click(function(){a(!c(this).hasClass("comments-showing"));return false})};
(function(d){var b=function(h,j){var f=d(".aui-tip-parent");f=AJS.$('<div class="aui-tip-parent"></div>');var l=-11,g=h.height();if(AJS.$.browser.msie){l=(parseInt(AJS.$.browser.version,10)<8)?-5:-13}var e=j?14:6;h.prepend(f).css({zIndex:3001});var i=Raphael(f[0],12,e),k=i.path("M0,6l6-6,6,6").attr({fill:"#f0f0f0",stroke:"#e2e2e2"});i.canvas.style.zIndex=3000;tip=i;if(j){k.rotate(180);k.clone().translate(3,2).attr({fill:"#000",stroke:"#000",opacity:".2"}).toBack();l=l+h.outerHeight()+10}f.css({top:l,left:10});return i};var c=function(e){return Raphael.shadow(0,0,e.outerWidth(true),e.outerHeight(true),{radius:5,target:e[0],offset:2})};var a=function(f,e){e=e||{};setTimeout(function(){var j=AJS.Editor.Adapter.offset(f.anchor),o=f.panel.width()+j.left-d(window).width()+10,r=7,g=0,h=d(f.anchor).outerHeight(),n,i=j.left-(o>0?o:0)-g;if(f.options.shouldFlip){n=j.top-r-f.panel.outerHeight()-4}else{n=j.top+r+h}if(f.options.anchorIframe){var q=d(f.options.anchorIframe),m=q.offset().top+q.height();n=Math.min(n,m)}f.panel.find(".aui-tip-parent").css({left:Math.abs(j.left-i)+10});var l={top:n,left:i},p=f.panel.add(f.shadow),k=function(){f.shadow.css("left",f.panel.position().left-1)};e.animate?p.animate(l,e.animateDuration,k):(function(){p.css(l);k()})()},e.delay||0)};AJS.Confluence.PropertyPanel={current:null,createFromButtonModel:function(m,f,l,p){var e=AJS("div").attr({"class":"panel-buttons"});for(var h=0,o=l.length;h<o;h++){if(!l[h]){continue}var k=l[h],j=k.html||'<span class="icon"></span><span class="panel-button-text">'+(k.text||"")+"</span>",g=[];k.className&&g.push(k.className);k.disabled&&g.push("disabled");k.selected&&g.push("selected");!l[h+1]&&g.push("last");!l[h-1]&&g.push("first");var n=AJS("a").attr({href:l[h].href||"#","class":g.join(" ")}).html(j);l[h].tooltip&&n.attr("title",l[h].tooltip);if(k.disabled){n.attr("title",k.disabledText);n.disable();n.click(function(i){return AJS.stopEvent(i)})}else{l[h].click&&(function(q,i,r){i.click(function(s){q.click(i,r);return AJS.stopEvent(s)})})(l[h],n,f)}e.append(n)}return this.create(m,f,e,p)},create:function(i,f,h,m){m=m||{};AJS.Editor.Adapter.storeCurrentSelectionState();var k=d("#property-panel"),e;k.length&&this.destroy();k=AJS("div").addClass("aui-property-panel-parent").addClass(i+"-panel").attr("id","property-panel").appendTo("body");e=AJS("div").addClass("aui-property-panel").append(h);k.append(e).css({top:0,left:-10000});var g=this;h.find(".last:last").css({margin:0});var l=c(k),j=b(k,m.shouldFlip);this.current={anchor:f,panel:k,hasAnchorChanged:function(n){return n&&g.hasAnchorChanged(n)},snapToElement:function(n){a(this,n)},shadow:l,tip:j,options:m,updating:true};a(this.current);e=this.current;AJS.$(document).bind("keydown.property-panel.escape",function(n){if(n.keyCode===27){AJS.Confluence.PropertyPanel.destroy()}});AJS.$(document).bind("click.property-panel",function(n){if(!AJS.$(n.target).closest("#property-panel").length){AJS.Confluence.PropertyPanel.destroy()}});AJS.trigger("created.property-panel",this.current);this.current.updating=false;return this.current},destroy:function(){if(!this.current){AJS.log("PropertyPanel.destroy: called with no current PropertyPanel, returning");return}if(this.current.updating){AJS.log("PropertyPanel.destroy: called while updating, returning");return}AJS.trigger("destroyed.property-panel",this.current);AJS.$(document).unbind(".property-panel");this.current.panel.remove();this.current.shadow.remove();this.current=null},hasAnchorChanged:function(e){var f=this.current;if(f&&d(f.anchor)[0]==d(e)[0]){return(!f.options.originalHeight||(f.options.originalHeight==d(e).height()))}return false}}})(AJS.$);
AJS.toInit(function(a){AJS.applySearchPlaceholders=function(c){var b=a(".quick-search-query, input[type=search]",c);if(!b.length){return}b.each(function(){$searchBox=a(this);$searchBox.data("quicksearch",{placeholder:$searchBox.attr("placeholder")||$searchBox.closest("form").find("input[type='submit']").val(),placeholded:true})});if(!a.browser.safari){b.val(b.data("quicksearch").placeholder);b.addClass("placeholded");b.focus(function(){var d=a(this);if(d.data("quicksearch").placeholded){d.data("quicksearch").placeholded=false;d.val("");d.removeClass("placeholded")}});b.blur(function(){var d=a(this);if(d.data("quicksearch").placeholder&&(/^\s*$/).test(d.val())){d.val(d.data("quicksearch").placeholder);d.data("quicksearch").placeholded=true;d.addClass("placeholded")}})}else{b.each(function(){this.type="search"});b.attr("results",10);b.attr("placeholder",b.data("quicksearch").placeholder);b.val("")}};AJS.applySearchPlaceholders();a("#messageContainer .confluence-messages").each(function(){var b=this;if(!getCookie(b.id)){a(b).show();a(".message-close-button",b).click(function(){a(b).slideUp();setCookie(b.id,true)})}})});AJS.General={getContextPath:AJS.Confluence.getContextPath};(function(){var a={};AJS.I18n={keys:{},get:function(d,b,c){if(a[d]){if(typeof b=="function"){b(AJS.I18n.keys)}return}AJS.$.ajax({url:AJS.Confluence.getContextPath()+"/rest/prototype/1/i18n/"+d,data:{locale:AJS.params.userLocale},dataType:"json",success:function(e){AJS.I18n.load(e);a[d]=true;if(typeof b=="function"){b(e)}},error:function(e,f){AJS.log("Error loading I18n for "+d+":"+f);if(typeof c=="function"){c(f)}}})},load:function(b){AJS.$.extend(AJS.I18n.keys,b)},getText:function(b,c){var d=AJS.params["i18n."+b]||AJS.I18n.keys[b]||b;if(!c){return d}if(arguments.length==2&&c instanceof Array){c.unshift(d)}else{c=Array.prototype.slice.call(arguments,0);c[0]=d}return AJS.format.apply(AJS,c)}}})();jQuery.fn.selectableEffects=function(a,b,c){var e=jQuery,d=e(this);if(c){d.data("properties",c)}d.click(function(g){var f=e(this);if(b){b(this,f.data("properties"))}a.find(".selected").removeClass("selected");f.addClass("selected");return AJS.stopEvent(g)});d.hover(function(){e(this).addClass("hover")},function(){e(this).removeClass("hover")})};
AJS.html=function(a){var b=new String(a);b.isHtml=true;return b};AJS.toInit(function(b){var a={};AJS.loadTemplateScripts=function(e){e=e||document;b("script",e).each(function(){if(this.type=="text/x-template"){a[this.title]=AJS.html(this.text)}})};AJS.loadTemplateScripts();AJS.getTemplate=function(e){return a[e]};var d={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"};AJS.escapeEntities=function(e){if(e==null){return e}if(e.isHtml){return""+e}return(""+e).replace(/[&<>'"]/g,function(f){return d[f]||f})};function c(f){var e=arguments;return f.replace(/\{(\d+)\}/g,function(j,g){var h=e[parseInt(g,10)+1];return h!=null?h:j})}AJS.renderTemplate=function(e,f){if(!AJS.getTemplate(e)){return""}if(!b.isArray(f)){f=Array.prototype.slice.call(arguments,1)}var j=AJS.getTemplate(e).toString();var h=[j];for(var g=0;g<f.length;g++){h.push(AJS.escapeEntities(f[g]))}return c.apply(this,h)};AJS.loadTemplatesFromUrl=function(e,f){b.ajax({url:e,data:{locale:AJS.params.userLocale},dataType:"html",success:function(g){var h=AJS("div").append(g);AJS.loadTemplateScripts(h);f&&f()}})}});
AJS.menuShowCount=0;jQuery.fn.ajsMenu=function(a){a=a||{};var b=jQuery;var d=null;var c=function(f){if(typeof AJS.dropDownTimer!="undefined"&&AJS.dropDownHider){clearTimeout(AJS.dropDownTimer);delete AJS.dropDownTimer;AJS.dropDownHider();AJS.dropDownHider=null}};b(".ajs-button",this).each(function(){b(this).mouseover(c)});b(".ajs-menu-item",this).each(function(){var g=this,e=b(this),k=b(".ajs-drop-down",g);if(!k.length){return}k=k[0];k.hidden=true;k.focused=-1;k.hide=function(){if(!this.hidden){e.toggleClass("opened");b(g.parentNode).toggleClass("menu-bar-open");var n=b("a",this);b(this).toggleClass("assistive");this.hidden=true;b(document).unbind("click",this.fhide).unbind("keydown",this.fmovefocus).unbind("keypress",this.blocker);if(this.focused+1){b(n[this.focused]).removeClass("active")}this.focused=-1}};k.show=function(){if(typeof this.hidden=="undefined"||this.hidden){var n=this,r=b(this);r.toggleClass("assistive");e.toggleClass("opened");b(g.parentNode).toggleClass("menu-bar-open");this.hidden=false;this.timer=setTimeout(function(){b(document).click(n.fhide)},1);b(document).keydown(n.fmovefocus).keypress(n.blocker);var o=b("a",n);o.each(function(t){var s=this.parentNode.parentNode;b(this).hover(function(u){if(s.focused+1){b(o[s.focused].parentNode).removeClass("active")}b(this.parentNode).addClass("active");s.focused=t},function(u){if(s.focused+1){b(o[s.focused].parentNode).removeClass("active")}s.focused=-1})});var q=(window.pageYOffset||document.documentElement.scrollTop);var p=q+b(window).height();r.removeClass("above");if(!a.isFixedPosition){if(r.offset().top+r.height()>p){r.addClass("above");if(r.offset().top<q){r.removeClass("above")}}}}};k.fmovefocus=function(n){k.movefocus(n)};k.fhide=function(n){k.hide(n)};k.blocker=function(n){var o=n.which;if(o==40||o==38){return false}};k.movefocus=function(p){var s=p.which,o=this.getElementsByTagName("a"),r=this.focused,n=(s==9),q;do{switch(s){case 40:case 9:if(p.shiftKey){this.focused--}else{this.focused++}break;case 38:this.focused--;break;case 27:this.hide();return false;default:return true}q=(this.focused<0||this.focused>o.length-1)}while(!q&&b(o[this.focused].parentNode).hasClass("assistive"));if(n&&q){if(r!=-1){b(o[r].parentNode).removeClass("active")}this.focused=-1;this.hide();return false}else{if(!n){if(this.focused<0){this.focused=o.length-1}else{if(this.focused>o.length-1){this.focused=0}}}}if(r>=0){b(o[r].parentNode).removeClass("active")}o[this.focused].focus();b(o[this.focused].parentNode).addClass("active");p.stopPropagation();p.preventDefault();return false};k.show();clearTimeout(k.timer);var h=b(k),f=h.offset();k.hide();var j=b(".trigger",g);if(j.length){var l=function(){clearTimeout(AJS.dropDownTimer);delete AJS.dropDownTimer;AJS.dropDownHider();AJS.dropDownHider=null;k.show()};var m=function(o){var n=typeof AJS.dropDownTimer!="undefined";d=k;if(n){l()}else{AJS.dropDownShower=function(){k.show();delete AJS.dropDownShowerTimer};AJS.dropDownShowerTimer=setTimeout(AJS.dropDownShower,o)}};var i=function(n){var o=typeof AJS.dropDownShowerTimer!="undefined";if(o){clearTimeout(AJS.dropDownShowerTimer);delete AJS.dropDownShowerTimer}if(typeof AJS.dropDownTimer!="undefined"){clearTimeout(AJS.dropDownTimer);delete AJS.dropDownHider}AJS.dropDownHider=function(){k.hide();delete AJS.dropDownTimer};AJS.dropDownTimer=setTimeout(AJS.dropDownHider,n)};e.mouseover(function(){m(500)});e.mouseout(function(){i(300)});j.click(function(){if(k.hidden){k.show()}else{k.hide()}})}})};AJS.toInit(function(d){var b=["action-view-source-link","view-user-history-link"];for(var e=b.length;e--;){d("#"+b[e]).click(function(i){window.open(this.href,(this.id+"-popupwindow").replace(/-/g,"_"),"width=600, height=400, scrollbars, resizable");i.preventDefault();return false})}var f=function(i,m){var n=d("#ajax-error");if(n.length==0){d("#com-atlassian-confluence").prepend("<div id='ajax-error'></div>");n=d("#ajax-error")}n.append("<span class='error'>"+i+"<a class='close'>Close</a></span>");n.find("a.close").click(function(){var o=d(this).parent();d(o).slideUp(1000,function(){d(o).remove();if(d("#ajax-error").children(".error").length==0){d("#ajax-error").remove()}});return false});m.removeClass("waiting")};d("#page-favourite").click(function(n){var m=d(this);if(m.hasClass("waiting")){return AJS.stopEvent(n)}m.addClass("waiting");var i=AJS.Confluence.getContextPath()+"/json/addfavourite.action";if(m.hasClass("selected")){i=AJS.Confluence.getContextPath()+"/json/removefavourite.action"}AJS.safeAjax({url:i,type:"POST",dataType:"json",data:{entityId:AJS.params.pageId},success:function(p){if(p.actionErrors){for(var o=0;o<p.actionErrors.length;o++){f(p.actionErrors,m)}return}if(p.errorMessage){f(p.errorMessage,m);return}m.removeClass("waiting");m.toggleClass("selected");m.toggleClass("ie-page-favourite-selected")},error:function(o){f("Server error while updating favourite",m)}});return AJS.stopEvent(n)});var k=d("#page-watch"),l=d("#page-unwatch"),h=d(k.parent("li")),j=d(l.parent("li"));if(k.hasClass("inactive")){h.addClass("assistive")}if(l.hasClass("inactive")){j.addClass("assistive")}var g=function(i,m,n){m.addClass("waiting");AJS.safe.ajax({url:i,type:"POST",dataType:"json",data:{entityId:AJS.params.pageId},success:function(p){if(p.actionErrors){for(var o=0;o<p.actionErrors.length;o++){f(p.actionErrors,m)}return}if(p.errorMessage){f(p.errorMessage,m);return}m.removeClass("waiting");m.toggleClass("inactive");n.toggleClass("inactive");m.parent("li").toggleClass("assistive");n.parent("li").toggleClass("assistive")},error:function(o){m.removeClass("waiting");f("Server error while updating favourite",menuItem)}})};k.click(function(i){g(AJS.Confluence.getContextPath()+"/pages/startwatching.action",k,l);k.addClass("waiting");return AJS.stopEvent(i)});l.click(function(i){g(AJS.Confluence.getContextPath()+"/pages/stopwatching.action",l,k);l.addClass("waiting");return AJS.stopEvent(i)});var a=d("#action-menu-link"),c=d("#add-menu-link");if(a.length){a.next().addClass("most-right-menu-item")}else{if(c.length){c.next().addClass("most-right-menu-item")}}d(".ajs-menu-bar").ajsMenu({isFixedPosition:true})});AJS.$(function(a){a("#header-menu-bar .ajs-menu-item").each(function(){var c=a(this),d=a(".ajs-drop-down",this),b=c.width();if(b>d.width()){d.width(b.valueOf()+50);AJS.log("Dropdown width override occurred")}})});
jQuery.fn.simpleScrollTo=function(c){var e=jQuery;var a=e(this[0]);var b=e(c).position().top;var d=b+e(c).outerHeight()-a.outerHeight();if(b<0){a.scrollTop(a.scrollTop()+b)}else{if(d>0){a.scrollTop(a.scrollTop()+d)}}return this};
AJS.toInit(function(a){a("a#websudo-drop.drop-non-websudo").click(function(){a.getJSON(a(this).attr("href"),function(){a("li#confluence-message-websudo-message").slideUp()});return false})});
AJS.PagePermissions=AJS.PagePermissions||{};AJS.$.fn.disable=function(a){return this.each(function(){var b=AJS.$(this);var c=b.attr("disabled","disabled").addClass("disabled").attr("id");if(c){AJS.$("label[for="+c+"]",b.parent()).addClass("disabled")}})};AJS.$.fn.enable=function(a){return this.each(function(){var b=AJS.$(this);var c=b.attr("disabled","").removeClass("disabled").attr("id");if(c){AJS.$("label[for="+c+"]",b.parent()).removeClass("disabled")}})};AJS.toInit(function(e){var h="user",t="group";var k=e("#confluence-context-path").attr("content");var o=!!e("#permissions-show-hide-link").length;var a=null;var l=null;var r=null;var n={addNames:function(v,x){var w=this;var u=v.replace(/\s*,\s*/g,",").split(",");var y=e("#waitImage");y.show();var z={name:u,type:x||"",pageId:AJS.params.parentPageId,spaceKey:AJS.params.spaceKeyDecoded};e.getJSON(k+"/pages/getentities.action",z,function(F){y.hide();for(var E=0,A=F.length;E<A;E++){var C=F[E].entity;var B=F[E].report;w.addEntity(F[E]);var D=e.inArray(C.name,u);u.splice(D,1)}l.validator.handleNonExistentEntityNames(u)})},addEntity:function(w){if(!w){return}var v=w.entity;var u=w.report;var y=l.getPermissionType();if(l.validator.isDuplicateEntityForType(v,y)){r.highlightEntityRow(v,y);return}var x={entity:v,view:true,edit:true,report:u};r.addRow(x,y);r.changedByUser();r.highlightEntityRow(v,y);l.nameField.removeFromNameInput(v.name)},makePermissionStrings:function(){var u=r.makePermissionMap(false);return{viewPermissionsUsers:u.user.view.join(","),editPermissionsUsers:u.user.edit.join(","),viewPermissionsGroups:u.group.view.join(","),editPermissionsGroups:u.group.edit.join(",")}},refreshLayout:function(){var z=e("#page-permissions-tables");var y=e("#update-page-restrictions-dialog");var w=y.outerHeight();var u=y.find("h2").outerHeight();var B=y.find(".dialog-button-panel").outerHeight();var x=w-(u+B);var A=e("#page-permissions-editor-form").outerHeight();var v=x-A;e("#update-page-restrictions-dialog .dialog-panel-body").height(x);z.height(v)}};e.extend(AJS.PagePermissions,{addUserPermissions:function(u){n.addNames(u,h)},addGroupPermissions:function(u){n.addNames(u,t)},makePermissionStrings:n.makePermissionStrings});function f(w){r.allowEditing(w.userCanEditRestrictions);r.resetInherited();if(!n.permissionsEdited){r.resetDirect()}if(!w){return}for(var x=0,z=w.permissions.length;x<z;x++){var F=w.permissions[x];var B=F[0].toLowerCase();var u=F[1];var D=F[2];var v=(u==h)?w.users[D]:w.groups[D];var E=F[3];var C=F[4];var y=+E&&E!=AJS.params.pageId;if(n.permissionsEdited&&!y){continue}var A={owningId:E,entity:v.entity,report:v.report};A[B]=true;A.owningTitle=C;A.inherited=y;r.addRow(A,B)}r.saveBackup();r.refresh()}function i(){var B=r.makePermissionMap(true);var v=e("#permissions-view-summary");var z=[].concat(B.group.view).concat(B.user.view);if(z.length){v.find(".summary-content").text(z.join(", "))}AJS.setVisible(v,z.length);var x=e("#permissions-edit-summary");var u=[].concat(B.group.edit).concat(B.user.edit);if(u.length){x.find(".summary-content").text(u.join(", "))}AJS.setVisible(x,u.length);n.permissionsEdited=false;var A=n.makePermissionStrings();for(var w in A){var y=A[w];e("#"+w).val(y);if(n.originalPermissions[w]!=y){n.permissionsEdited=true}}}function q(){l.validator.resetValidationErrors();r.clearHighlight();a.hide();window.scrollTo(n.bookmark.scrollX,n.bookmark.scrollY)}function g(){var v=e(".permissions-update-button").disable();if(o){i();AJS.setVisible("#page-permissions-unsaved-changes-msg",n.permissionsEdited);v.enable();q()}else{var u=n.makePermissionStrings();u.pageId=AJS.params.pageId;e("#waitImage").show();AJS.safe.post(k+"/pages/setpagepermissions.action",u,function(w){e("#waitImage").hide();AJS.setVisible("#content-metadata-page-restrictions",w.hasPermissions);v.enable();q()},"json")}}function d(){q();if(o){r.restoreBackup()}}function p(){a=AJS.ConfluenceDialog({width:865,height:530,id:"update-page-restrictions-dialog",onCancel:d});a.addHeader("Page Restrictions");a.addPanel("Page Permissions Editor",AJS.renderTemplate("page-permissions-div"));a.addButton("Save",g,"permissions-update-button");a.addCancel("Close",d);a.popup.element.find(".dialog-title").append(AJS.template.load("page-restrictions-help-link"));l=AJS.PagePermissions.Controls(n);var u=e("#page-permissions-table").bind("changed",s);r=AJS.PagePermissions.Table(u);n.table=r}function j(u){n.bookmark={scrollX:document.documentElement.scrollLeft,scrollY:document.documentElement.scrollTop};b();l.setVisible(u.userCanEditRestrictions);AJS.setVisible(".permissions-update-button",u.userCanEditRestrictions);a.show();n.refreshLayout()}function c(y,v){var w=(v&&e("#newSpaceKey").val())||AJS.params.spaceKeyDecoded;var u=(v&&e("#parentPageString").val())||"";var x={pageId:AJS.params.pageId,parentPageId:AJS.params.parentPageId,parentPageTitle:u,spaceKey:w};if(AJS.params.newPage){x.draftId=AJS.params.contentId}e("#waitImage").show();e.getJSON(k+"/pages/getpagepermissions.action",x,function(z){e("#waitImage").hide();f(z);y(z)})}function m(u){a||p();c(j,u)}function s(){e(".permissions-update-button").enable();e(".button-panel-cancel-link").text("Cancel")}function b(){e(".permissions-update-button").disable();e(".button-panel-cancel-link").text("Close")}e("#content-metadata-page-restrictions, #action-page-permissions-link").click(function(u){m(false);u.preventDefault()});e("#permissions-show-hide-link").click(function(u){m(true);u.preventDefault()});if(o){n.originalPermissions={viewPermissionsUsers:e("#viewPermissionsUsers").val(),editPermissionsUsers:e("#editPermissionsUsers").val(),viewPermissionsGroups:e("#viewPermissionsGroups").val(),editPermissionsGroups:e("#editPermissionsGroups").val()}}});
AJS.PagePermissions.Table=function(b){var d=AJS.$,c=this;var a=false;this.refresh=function(){var h=b.find(".view-permission-row");var g=b.find(".edit-permission-row");var i=h.length>0;var f=g.length>0;AJS.setVisible("#page-permissions-no-views",!i);AJS.setVisible("#page-permissions-no-edits",!f);b.each(function(){d(".view-permission-row .page-permissions-marker-cell span",this).removeClass("first-of-type").filter(":first").addClass("first-of-type");d(".edit-permission-row .page-permissions-marker-cell span",this).removeClass("first-of-type").filter(":first").addClass("first-of-type")});c.clearHighlight()};this.saveBackup=function(){this.copy=b.children().clone(true)};this.restoreBackup=function(){b.children().remove();b.append(this.copy)};this.addCount=0;this.makePermissionMap=function(g){var f={user:{view:[],edit:[]},group:{view:[],edit:[]}};b.find("tr.view-permission-row, tr.edit-permission-row").each(function(){var l=d(this);var i=l.is(".user-permission")?"user":"group";var k=l.is(".view-permission-row")?"view":"edit";var j=(g&&(i=="user"))?"display-name":"name";var h=l.find(".permission-entity-"+j).text();f[i][k].push(h)});return f};this.makePermissionMapForCheckboxes=function(g){var f={user:{view:[],edit:[]},group:{view:[],edit:[]}};b.find("tr.view-permission-row").each(function(){var m=d(this);var i=!!m.find(".view-permission-cell input").attr("checked");var l=!!m.find(".edit-permission-cell input").attr("checked");if(i||l){var j=m.hasClass("user-permission")?"user":"group";var k=(g&&(j=="user"))?"display-name":"name";var h=m.find(".permission-entity-"+k).text();if(i&&(g||!m.hasClass("readonly-permission"))){f[j].view.push(h)}if(l){f[j].edit.push(h)}}});return f};var e=function(i,f){var h=i.find("td.permission-entity");var g=contextPath+(f.profilePictureDownloadPath||"/images/icons/"+f.type+"_16.gif");h.find("img").attr("src",g);h.find(".permission-entity-name").text(f.name);if(f.type=="group"){h.find(".permission-entity-name-wrap").hide()}h.find(".permission-entity-display-name").text(f.fullName||f.name);var j=h.find("span.entity-container");if(f.type=="user"){j.addClass("content-hover user-hover-trigger").attr("data-username",f.name)}};this.addRow=function(q,l){var i=q.entity;var h=d(AJS.renderTemplate("permissions-row-template"));h.addClass(i.type+"-permission");h.addClass(l+"-permission-row");if(l=="edit"){h.find(".page-permissions-marker-cell span").text("Editing restricted to:")}e(h,i);var j=!a||q.inherited||q.readOnly;if(j){h.addClass("readonly-permission")}var m=h.find(".remove-permission-link");if(j||!a){m.remove()}else{m.attr("id","remove-permission-"+this.addCount++);m.click(function(s){d(this).closest("tr").remove();c.changedByUser();return AJS.stopEvent(s)})}if(q.inherited){var n=d(".page-permissions-table[owningTitle='"+AJS.escape(q.owningTitle)+"']");if(!n.length){var g=d(AJS.renderTemplate("page-inherited-permissions-table-div-template"));n=g.find("table");n.attr("owningTitle",AJS.escape(q.owningTitle));var k=g.find(".page-inherited-permissions-table-desc");var o=k.find("a"),f=AJS.Confluence.getContextPath()+"/pages/viewpage.action?pageId="+q.owningId;o.attr("href",f).attr("target","_blank").text(q.owningTitle).addClass("page-perms-owningTitle");var r=d("#content-title");var p=r.length?r.val():AJS.params.pageTitle;k.find("span").addClass(".page-perms-inherited-this-page").text(p);d("#page-inherited-permissions-tables").append(g)}n.append(h);d("#page-inherited-permissions-table-div").removeClass("hidden")}else{if(l=="view"){d("#page-permissions-no-edits").before(h)}else{b.append(h)}}AJS.Confluence.runBinderComponents()};this.changedByUser=function(){b.trigger("changed");c.clearHighlight();c.refresh()};this.resetDirect=function(){b.find("tr:not(.marker-row)").remove();c.addCount=0};this.resetInherited=function(){d("#page-inherited-permissions-tables div").remove()};b.click(function(f){c.clearHighlight()});d("#page-inherited-permissions-table-desc").click(function(){d(".page-inheritance-togglable").toggleClass("hidden");d(".icon",this).toggleClass("twisty-open").toggleClass("twisty-closed")});this.highlightEntityRow=function(f,h){var g=b.find("."+h+"-permission-row").filter(function(){return d(".permission-entity-name",this).text()==f.name});d("#page-permissions-tables").simpleScrollTo(g);g.addClass("highlighted-permission")};this.clearHighlight=function(){d("tr.highlighted-permission").removeClass("highlighted-permission")};this.allowEditing=function(f){a=f};return this};
AJS.PagePermissions.Controls=function(b){var d=AJS.$;var c={handleNonExistentEntityNames:function(g){if(!g||!g.length){return}var f=g.join(", ");var h="Unknown user or group:"+" "+f;d("#page-permissions-error-div").find("div").text(h).end().removeClass("hidden");b.refreshLayout()},isDuplicateEntityForType:function(f,h){var g=d("#page-permissions-table ."+h+"-permission-row .permission-entity-name").filter(function(){return d(this).text()==f.name});return g.length>0},resetValidationErrors:function(){d("#page-permissions-error-div").addClass("hidden");b.refreshLayout()}};var a=(function(){var f=d("#page-permissions-names-input");var i=d("#page-permissions-names-hidden");var h=f.val();var g="input-placeholder";f.keypress(function(j){if(j.keyCode==Event.KEY_RETURN){e();f.focus();return false}return true});f.quicksearch("/json/contentnamesearch.action?type=userinfo",null,{dropdownPostprocess:function(j){d("http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/ol.last",j).remove();if(d("ol",j).length==0){j.append(AJS.renderTemplate("permissions-username-no-suggestion-template"))}},dropdownPlacement:function(k){var j=AJS("div");j.addClass("page-perms-name-dropdown-wrapper aui-dd-parent");j.append(k);f.after(j)},ajsDropDownOptions:{selectionHandler:function(l,k){if(k.hasClass("message")){return}var j=d.data(k.find("span")[0],"properties");var m=j.href.substr(j.href.lastIndexOf("/")+2);i.val(unescape(m.replace(/\+/g," ")));f.val("");e();this.hide();l.preventDefault()}}});f.focus(function(){if(f.hasClass(g)){f.removeClass(g).val("")}var l=f.next(".aui-dd-parent");if(!l.length){return}l.show();var j=f.offset().left;if(l.offset().left!=j){l.css("margin-left",0);var n=j-l.offset().left;l.css("margin-left",n+"px")}var m=f.offset().top+f.outerHeight();if(l.offset().top!=m){l.css("margin-top",0);var k=m-l.offset().top;l.css("margin-top",k+"px")}l.css({width:f.outerWidth()});l.hide()});f.blur(function(){if(f.val()==""){f.addClass(g).val(h)}});return{getValue:function(){var j=i.val();if(j){i.val("")}else{j=f.val();if(j==h){j=""}}return j},addPlaceholder:function(){f.addClass(g).val(h)},removeFromNameInput:function(m){if(!m){return}var l=f.val();if(!l){return}var j=l.split(",");for(var k=0;k<j.length;k++){j[k]=d.trim(j[k])}j=d.grep(j,function(n){return n!=""&&n!=m});if(j.length){f.val(j.join(", "))}else{if(document.activeElement==f[0]){f.val("")}else{this.addPlaceholder()}}}}})();var e=function(){c.resetValidationErrors();b.table.clearHighlight();var f=a.getValue();if(!f){return}b.addNames(f)};d("#page-permissions-choose-me").click(function(f){c.resetValidationErrors();b.addNames(d(this).find(".remote-user-name").text());return AJS.stopEvent(f)});d("#permissions-error-div-close").click(function(f){c.resetValidationErrors();return AJS.stopEvent(f)});d("#add-typed-names").click(e);return{validator:c,nameField:a,setVisible:function(f){AJS.setVisible("#page-permissions-editor-form",f);AJS.setVisible(".remove-permission-link",f);if(f){a.addPlaceholder()}},isShowing:function(){return !d("#page-permissions-editor-form").hasClass("hidden")},getPermissionType:function(){return !!d("#restrictViewRadio:checked").length?"view":"edit"}}};
AJS.toInit(function(e){if(!AJS.params.linkToThisPageLink){return}var d=new AJS.Dialog(600,210,"link-page-popup").addHeader(AJS.params.linkToThisPageHeading).addPanel(AJS.params.linkToThisPageHeading,"<form id='link-page-popup-form' class='aui'><fieldset></fieldset></form>").addCancel(AJS.params.linkToThisPageClose,function(g){f(g)});if(Confluence.KeyboardShortcuts.enabled||AJS.Data.get("use-keyboard-shortcuts")=="true"){d.addHelpText(AJS.params.shortcutDialogTip,{shortcut:"k"})}var a=function(g){if(g.which==27){f(d)}};var b=[{label:AJS.params.linkToThisPageLink,id:"link",value:e("link[rel=canonical]").attr("href")},{label:AJS.params.linkToThisPageTinyLink,id:"tiny-link",value:e("link[rel=shortlink]").attr("href")},{label:AJS.params.linkToThisPageWikiMarkup,id:"wiki-markup",value:e("meta[name=wikilink]").attr("content")}];e.each(b,function(){e("#link-page-popup-form fieldset").append(AJS.format("<div class='field-group'><label for=''link-popup-field-{0}''>{1}:</label><input id=''link-popup-field-{0}'' readonly=''readonly'' value='''' class=''text'' type=''text''></div>",this.id,this.label)).find("input:last").val(this.value)});var f=function(g){g.hide();e(document).unbind("keydown",a)};e("#link-to-page-link").click(function(g){if(!e("#link-to-page-fields")[0]){alert("Due to customisations made to this space's layout, Confluence is unable to load the links dialog. For details on how to correct this, please visit the 'Upgrading Custom Layouts' page in our Confluence Documentation, or contact your administrators.");return}e(this).parents(".ajs-drop-down")[0].hide();d.show();e(document).keydown(a);e("#link-page-popup-form #link-popup-field-tiny-link").select();return AJS.stopEvent(g)});var c=e("#link-page-popup-form fieldset input.text");c.focus(function(){e(this).select()});c.mouseup(function(g){g.preventDefault()})});
AJS.moreLinkClickHandler=function(B){var A=AJS.$(this),C=A.attr("href"),D=A.closest(".more-link-container");if(!D.length){throw new Error("Could not find more link container when one was expected.")}AJS.$(".waiting-image",D).removeClass("hidden");AJS.$(".more-link-text",A).hide();AJS.$.get(C,function(E){$context=AJS.$(E);D.replaceWith($context);AJS.$(".more-link",$context).click(AJS.moreLinkClickHandler);if(AJS.PageGadget&&AJS.PageGadget.contentsUpdated){AJS.PageGadget.contentsUpdated()}});return AJS.stopEvent(B)};
AJS.toInit(function(A){A(".more-link").click(AJS.moreLinkClickHandler)});
AJS.toInit(function(A){A("select.content-filter").change(function(){A(".filter-control .waiting-image").removeClass("hidden");var B=A(this);A.get(AJS.params.changesUrl,{contentType:A(this).val()},function(E){var D=A(E);var C=B.parent();C.parent().siblings(".results-container").children("ul").html(D);A(".waiting-image",C).addClass("hidden");A(".more-link",D).click(AJS.moreLinkClickHandler)})})});
AJS.toInit(function(e){var b="http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/com.atlassian.confluence.sidebar.hide",d=e("#personal-info-sidebar"),a=d.height(),c=e("#content");function f(){d.toggleClass("collapsed");c.toggleClass("sidebar-collapsed");d.trigger("toggled")}if(getCookie(b)=="true"){f()}e(".sidebar-collapse").click(function(g){f();setCookie(b,d.hasClass("collapsed"));return AJS.stopEvent(g)}).height(a)});
AJS.toInit(function(a){a(".confluence-thumbnail-link").click(function(c){var b=this.className.match(/(^|\s)(\d+)x(\d+)(\s|$)/);window.open(this.href,"thumbnail_popup","width="+(+b[2]+20)+",height="+(+b[3]+20)+",menubar=no,status=no,toolbar=no");return AJS.stopEvent(c)})});
AJS.toInit(function(b){var d=b("#version-comment");if(d.length){var a=b("#show-version-comment");var c=b("#hide-version-comment");a.click(function(f){a.hide();c.show();d.show();return AJS.stopEvent(f)});c.click(function(f){c.hide();a.show();d.hide();return AJS.stopEvent(f)})}});
AJS.toInit(function(a){if(!a("#add-labels-form").length){return}a(".show-labels-editor").click(function(){AJS.safe.ajax({url:AJS.params.contextPath+"/json/suggestlabelsactivity.action",data:{entityIdString:AJS.params.pageId},success:AJS.Labels.suggestedLabelsCallback,error:AJS.Labels.suggestedLabelsErrorHandler,dataType:"json"});a("#labelsString").val("");a("#labels-section").addClass("open");AJS.setVisible(".show-labels-editor",false);AJS.setVisible("a.hide-labels-editor",true);a("#labelsString").get(0).focus();return false});a(".hide-labels-editor").click(function(){AJS.Labels.labelOperationError("");a("#errorSpan").html("");a("#labels-section").removeClass("open");AJS.Labels.addLabelFromInput();AJS.setVisible("a.hide-labels-editor",false);AJS.setVisible(".show-labels-editor",true);if(a("#labelsList").children().length==0&&a("#labelsString").val()==""){AJS.setVisible("#labels-section-title-none",true)}else{AJS.setVisible("#labels-section-title-none",false)}return false});a("#add-labels-form").submit(AJS.Labels.addLabelFromInput);a(".labels-editor .add-labels").click(AJS.Labels.addLabelFromInput);a(".labels-editor .remove-label").click(AJS.Labels.removeLabel);a("#labelsString").keydown(function(b){if(b.which==13&&!AJS.dropDown.current){AJS.Labels.addLabelFromInput();AJS.setVisible("#labels-section-title-none",false);return AJS.stopEvent(b)}})});
jQuery(function(b){function a(c){return b("script[title='"+c+"']")[0].text}b("#manage-watchers-menu-item").click(function(i){i.preventDefault();var d="manage-watchers-dialog";var j=new AJS.ConfluenceDialog({width:865,height:530,id:d,onCancel:function(){j.hide().remove()}});j.addHeader("Manage Watchers");j.addPanel("default",AJS.template.load(d).toString());j.addCancel("Close",function(){j.hide().remove()});j.show();var f=b("#"+d);f.find(".dialog-title").append(AJS.template.load("manage-watchers-help-link"));if(Confluence.KeyboardShortcuts.enabled||AJS.Data.get("use-keyboard-shortcuts")==="true"){j.addHelpText(AJS.params.shortcutDialogTip,{shortcut:"w"})}f.find("input:visible, button:visible").each(function(e){b(this).attr("tabindex",e+1)});AJS.applySearchPlaceholders(f);f.bind("remove-list-item.manage-watchers",function(q,p){var n=p.item,o=p.list,r=p.username;n.addClass("removing");AJS.safe.ajax({dataType:"json",type:"POST",url:AJS.params.contextPath+"/json/removewatch.action",data:{pageId:AJS.params.pageId,username:r},error:function(){alert("Failed to remove watcher. Refresh page to see latest status.");n.removeClass("removing")},success:function(){n.slideUp().remove();f.trigger("list-updated.manage-watchers",{list:o})}})});f.bind("list-updated.manage-watchers",function(q,p){var o=p.list;var n=b("li.watch-user",o).length>0;if(!n){o.find(".no-users").removeClass("hidden");return}o.find(".no-users").addClass("hidden");AJS.Confluence.Binder.userHover();o.find(".confluence-userlink").each(function(){b(this).click(function(r){r.preventDefault()})})});f.bind("list-data-retrieved.manage-watchers",function(q,p){var o=p.list,n=p.watchers;o.find(".watch-user").remove();if(n&&n.length){b.each(n,function(){var s=this.name;var r={username:s,fullName:this.fullName,url:AJS.params.contextPath+"/display/~"+this.name,iconUrl:AJS.params.contextPath+this.profilePictureDownloadPath};var e=b(AJS.template(a("manage-watchers-user")).fill(r).toString());o.append(e);e.find(".remove-watch").click(function(){f.trigger("remove-list-item.manage-watchers",{username:s,item:e,list:o})})})}o.find(".loading").hide();f.trigger("list-updated.manage-watchers",{list:o})});var g=f.find(".page-watchers .user-list");var l=f.find(".space-watchers .user-list");AJS.safe.ajax({url:AJS.params.contextPath+"/json/listwatchers.action",dataType:"json",data:{pageId:AJS.params.pageId},error:function(){alert("Failed to retrieve watchers.")},success:function(e){f.trigger("list-data-retrieved.manage-watchers",{list:g,watchers:e.pageWatchers});f.trigger("list-data-retrieved.manage-watchers",{list:l,watchers:e.spaceWatchers})}});var m=f.find("form");var k=m.find("#add-watcher-user");var c=m.find("#add-watcher-username");var h=(function(){var e=m.find("> .status");return{clear:function(){e.addClass("hidden").removeClass("loading error").text("")},loading:function(n){e.addClass("loading").removeClass("hidden error").html(n)},error:function(n){e.addClass("error").removeClass("hidden loading").text(n)}}})();m.ajaxForm({beforeSerialize:function(){if(c.val()==""){c.val(k.val())}},beforeSubmit:function(){k.blur().attr("disabled","disabled");g.addClass("updating");h.loading("Adding watcher&hellip;")},dataType:"json",error:function(n,e){alert("Failed to add watcher: "+e)},success:function(e){c.val("");k.attr("disabled","").val("").focus();g.removeClass("updating");if(e.actionErrors&&e.actionErrors.length){h.error(e.actionErrors[0]);return}f.trigger("list-data-retrieved.manage-watchers",{list:g,watchers:e.pageWatchers});h.clear()}});AJS.Confluence.Binder.autocompleteUser();k.bind("selected.autocomplete-user",function(o,n){m.submit()});k.focus();return false})});
AJS.toInit(function(c){var f,j;var a=function(l){if(l.homePage){var m="Home page";return'<span class="child-display"><span class="icon icon-home-page" title="'+m+'">'+m+':</span> <a href="'+AJS.params.contextPath+l.href+'">'+l.text+"</a></span>"}else{var k=l.recentlyUpdated?"icon icon-recently-updated-page":"icon icon-page";return'<span class="child-display"><span class="'+k+'" title="Page">Page:</span> <a href="'+AJS.params.contextPath+l.href+'">'+l.text+"</a></span>"}};var e=function(m){var k=c("#page-children:not(.children-loaded)");g();if(m&&k.length){if(m.errorMessage){k.html("<span class='error'>"+m.errorMessage+"</span>");return}var l=[];c.each(m,function(n,o){l.push(a(o))});k.html(l.join(""));k.addClass("children-loaded")}};var g=function(){if(j){j();j=null}f.addClass("hidden")};var b=function(k){AJS.safe.ajax({url:AJS.params.contextPath+"/json/pagechildrenstoresettings.action",type:"POST",data:{pageId:AJS.params.pageId,showChildren:k},success:function(){},error:function(m,l){AJS.log("Failed to store the user 'showChildren' user setting: "+l)}})};var i=function(){var k=c("#page-children:not(.children-loaded)");if(k.length){f=c("<div class='throbber'></div>");k.append(f);j=Raphael.spinner(f[0],10,"#666");AJS.safe.ajax({url:AJS.params.contextPath+"/json/pagechildren.action",type:"POST",data:{pageId:AJS.params.pageId,showChildren:true},success:e,error:function(o,n,m){var l="Could not load child pages.";g();k.html("<span class='error'>"+l+"</span>");AJS.log("Error retrieving child pages: "+n)}})}else{b(true)}};var d=function(){c("#page-children").hide();b(false)};var h=function(){c("#page-children").show();if(c("#children-section:not(.children-showing)").length){i()}else{b(true)}};c("#children-section a.children-show-hide").each(function(){c(this).click(function(l){var k=c("#children-section");if(k.hasClass("children-showing")){d();k.removeClass("children-showing").addClass("children-hidden")}else{h();k.removeClass("children-hidden").addClass("children-showing")}return AJS.stopEvent(l)})})});
(function(){var a=jQuery.ajax;AJS.safe={ajax:function(b){if(b.data&&typeof b.data=="object"){b.data.atl_token=jQuery("#atlassian-token").attr("content");return a(b)}},get:function(){jQuery.ajax=AJS.safe.ajax;try{return jQuery.get.apply(jQuery,arguments)}finally{jQuery.ajax=a}},getScript:function(b,c){return AJS.safe.get(b,null,c,"script")},getJSON:function(b,c,d){return AJS.safe.get(b,c,d,"json")},post:function(b,d,e,c){jQuery.ajax=AJS.safe.ajax;try{return jQuery.post.apply(jQuery,arguments)}finally{jQuery.ajax=a}}}})();AJS.safeAjax=function(a){return AJS.safe.ajax(a)};
jQuery.fn.searchResultsGrid=function(a,e,l,c){var f=jQuery,g=this;if(!e.results||e.results.length==0){var n=AJS.format(c.noSearchResults,AJS.escapeEntities(a));g.html("<div class='no-results'>"+n+"</div>");return}g.html(AJS.getTemplate("searchResultsGrid").toString());var k=e.startIndex+1,h=e.startIndex+e.results.length;var j=AJS.format(c.resultsCount,k,h,e.total,AJS.escapeEntities(a));g.prepend(AJS.renderTemplate("searchResultsGridCount",AJS.html(j)));for(var d=0;d<e.results.length;d++){var m=e.results[d];var b=f(AJS.renderTemplate("searchResultsGridRow",[m.title,m.url,m.type,m.spaceName,m.spaceKey,m.friendlyDate,m.date]));b.selectableEffects(g,l.select,m);g.find("table").append(b)}f(".search-result:first",g).click()};
(function(a){a.ui=a.ui||{};a.fn.extend({spinner:function(b){if(!this.is(".ui-spinner")){return new a.ui.spinner(this,b||{})}}});a.ui.spinner=function(e,k){this.anchor=e;var g=AJS.params.staticResourceUrlPrefix||contextPath;this.images=k.images||[g+"/images/ddtree/black spinner/1.png",g+"/images/ddtree/black spinner/2.png",g+"/images/ddtree/black spinner/3.png",g+"/images/ddtree/black spinner/4.png",g+"/images/ddtree/black spinner/5.png",g+"/images/ddtree/black spinner/6.png",g+"/images/ddtree/black spinner/7.png",g+"/images/ddtree/black spinner/8.png",g+"/images/ddtree/black spinner/9.png",g+"/images/ddtree/black spinner/10.png",g+"/images/ddtree/black spinner/11.png",g+"/images/ddtree/black spinner/12.png"];this.width=k.width||"16px";this.height=k.height||k.width||"16px";this.hide=function(){this.anchor.hide();this.stop()};this.show=function(){this.start();this.anchor.show()};this.fadeIn=function(){this.anchor.fadeIn.apply(this.anchor,arguments)};this.fadeOut=function(){this.anchor.fadeOut.apply(this.anchor,arguments)};this.moveTo=function(i,l){this.anchor.css("top",l);this.anchor.css("left",i)};this.putInBox=function(n){var l=n.x||n.x1,o=n.y||n.y1,m=(typeof n.width=="undefined")?n.x2-n.x1:n.width,i=(typeof n.height=="undefined")?n.y2-n.y1:n.height;this.moveTo(l+Math.round((m-this.offsetWidth)/2),o+Math.round((i-this.offsetHeight)/2))};this.start=function(){if(!this.timer){this.timer=setInterval(b,100)}return this.timer};this.stop=function(){clearInterval(this.timer);this.timer=null};this.divs=[];for(var d=0,j=this.images.length;d<j;d++){var c=document.createElement("div");if(!AJS.applyPngFilter(c,this.images[d])){var f=document.createElement("img");f.src=this.images[d];f.style.width=this.width;f.style.height=this.height;c.appendChild(f)}c.style.width=this.width;c.style.height=this.height;this.anchor.append(c);if(!this.offsetWidth){this.offsetWidth=c.offsetWidth;this.offsetHeight=c.offsetHeight}this.divs.push(a(c).hide())}this.frame=0;this.direction=1;var h=this;var b=function(){h.divs[h.frame].hide();h.frame+=h.direction;if(h.frame>=h.divs.length){h.frame=0}if(h.frame<0){h.frame=h.divs.length-1}h.divs[h.frame].show()};this.anchor.css("position","absolute")}})(jQuery);
(function(b){b.ui=b.ui||{};b.fn.extend({tree:function(c){if(!this.is(".ui-tree")){return new b.ui.tree(this,c)}}});var a=function(c){c.preventDefault()};b.ui.tree=function(f,h){var e=f,t=this,F=false,g=arguments;if(!(/^[ou]l$/i.test(e[0].tagName))){F=true;if(!h.url){return false}e.html("<ul></ul>");e=b("ul",e)}var v=e[0];e.addClass("ui-tree");var n={list:e,visibleNodes:[],dim:e.offset(),points:[],win:b(window),timer:null,prev:0,events:{grab:function(){},click:function(){},drag:function(){},drop:function(){},append:function(){},insertabove:function(){},insertbelow:function(){},load:function(){},nodeover:function(){},nodeout:function(){},onready:function(){},order:function(){},orderUndo:function(){},remove:function(){},preview:function(){}}};this.options=h;this.expandPath=function(i,L){L=L||function(){};if(i.length){var K=1,J,H,I=function(){if(K<i.length){for(var M in i[K]){J=t.findNodeBy(M,i[K][M]);if(J){break}}K++;J.open(I)}else{L()}};for(H in i[0]){J=this.findNodeBy(H,i[0][H]);break}if(!J){return}J.open(I)}else{L()}};this.reload=function(H){if(F){e.remove()}for(var I in H){this.options[I]=H[I]}return new g.callee(f,this.options)};this.append=function(i){var H=x(i);e.append(H);c.call(H);o()};this.unhighlight=function(){e.find("li.highlighted").each(function(i,H){b(this).removeClass("highlighted")})};function k(O,N){O=(O+"").toLowerCase();N=(N+"").toLowerCase();var J=/(\d+|\D+)/g,K=O.match(J),H=N.match(J),M=Math.max(K.length,H.length);for(var I=0;I<M;I++){if(I==K.length){return -1}if(I==H.length){return 1}var P=parseInt(K[I],10),L=parseInt(H[I],10);if(P==K[I]&&L==H[I]&&P!=L){return(P-L)/Math.abs(P-L)}if((P!=K[I]||L!=H[I])&&K[I]!=H[I]){return K[I]<H[I]?-1:1}}return 0}function u(I){this[0]=I[0];this.$=I;this.text=I.find("span").text();this.href=I.find("a").attr("href");this.linkClass=I.find("a").attr("class");this.nodeClass=I.attr("class");this.open=function(J){return n.visibleNodes[this[0].num].open(J)};this.insertChild=function(J){J.$&&(J=J[0]);n.visibleNodes[this[0].num].append(J)};this.reorder=function(){n.visibleNodes[this[0].num].order(k)};this.close=function(){n.visibleNodes[this[0].num].close()};this.getAttribute=function(J){return this[0][J]};this.setAttribute=function(J,K){this[0][J]=K};this.highlight=function(){this.$.addClass("highlighted")};this.unhighlight=function(){this.$.removeClass("highlighted")};this.makeDraggable=function(){this.setAttribute("undraggable",false);this.$.removeClass("undraggable")};this.makeUndraggable=function(){this.setAttribute("undraggable",true);this.$.addClass("undraggable")};this.makeClickable=function(K){this.setAttribute("unclickable",false);this.$.removeClass("unclickable");var L=this[0].getElementsByTagName("a");var J;if(K){J=b(L[0])}else{J=b(L)}J.unbind("click",a);J.click(n.events.click)};this.makeUnclickable=function(K){this.setAttribute("unclickable",true);this.$.addClass("unclickable");var L=this[0].getElementsByTagName("a");var J;if(K){J=b(L[0])}else{J=b(L)}J.click(a);J.unbind("click",n.events.click)};this.setText=function(J){this.text=J;this[0].text=J;this.$.find("span").text(J)};this.getParent=function(){if(this.$.parent(":not(.ui-tree)").length){var J=this.$.parent().parent();if(J.length){return new u(b(J[0]))}}return null};this.append=function(L){var K=this.$.find("ul");if(!K.length){if(this[0].toBeLoaded){var M=this;this.open(function(){M.append(L)});return false}this.$.append("<ul></ul>");K=this.$.find("ul")}var J=x(L);K.append(J);c.call(J);if(typeof this[0].closed=="undefined"){this.$.addClass("closed");this[0].closed=true;K.hide()}o()};this.below=function(J){var K=x(J);this.$.after(K);c.call(K);o()};this.above=function(J){var K=x(J);this.$.before(K);c.call(K);o()};this.remove=function(){this.$.remove();o()};this.reload=function(){if(this[0].getElementsByTagName("ul").length){this[0].removeChild(this[0].getElementsByTagName("ul")[0]);this.$.removeClass("opened").addClass("closed");this[0].closed=true;n.visibleNodes[this[0].num].open()}};this.order=function(O){var L=b("ul",this.$),J=this[0];J.ordered=true;if(L.length){var K=[];J.oldorder=[];b("li",this.$).each(function(){K.push(this);J.oldorder.push(this)});function P(R,Q){return O(b(R).find("span").html(),b(Q).find("span").html())}K.sort(P);J.order=K;for(var M=0,N=K.length;M<N;M++){L.append(K[M])}}o()};this.orderUndo=function(){this[0].ordered=false;var J=b("ul",this.$);if(this[0].oldorder&&J.length){for(var K=0,L=this[0].oldorder.length;K<L;K++){J.append(this[0].oldorder[K])}}this[0].oldorder=null;o()};this.setOrdered=function(J){this[0].ordered=J;b("a.abc:first",this).css("display",J?"none":"block");b("a.rollback:first",this).css("display","none")};if(t.options.parameters&&t.options.parameters.length){for(var i=0,H=t.options.parameters.length;i<H;i++){if(I[0][t.options.parameters[i]]){this[t.options.parameters[i]]=I[0][t.options.parameters[i]]}}}}this.findNodeBy=function(I,M){var K=[],H=v.getElementsByTagName("li");for(var J=0,L=H.length;J<L;J++){if(H[J][I]==M){K.push(new u(b(H[J])))}}if(K.length==0){return null}else{if(K.length==1){return K[0]}else{return K}}};if(h.url){var r=document.createElement("div");r.className="tree-spinner";if(h.spinnerId){r.id=h.spinnerId}b("body").append(r);n.spinner=b(r).spinner();n.spinner.hide()}for(var y in n.events){if(typeof h[y]=="function"){n.events[y]=h[y]}}function z(i){return !(i.tagName.toLowerCase()=="li"&&b("li:not(.tree-helper)",i).length<1)}function d(i){this.$li=b(i);this.height=this.$li.height()}d.prototype.append=function(i){if(this.$li[0]==i){return false}if(this.$li[0].toBeLoaded){var J=this;this.load(function(){J.append(i)});return false}if(this.$li[0].tagName.toLowerCase()=="li"){var I=b("ul:first",this.$li);var H=i.parentNode.parentNode;b(".rollback:first",H).css("display","none");if(I.length){I.append(i);if(this.$li[0].ordered){this.order(k)}}else{I=document.createElement("ul");I.appendChild(i);this.$li[0].appendChild(I);this.$li.addClass("opened");b(".click-zone:first",this.$li).css("display","inline");b(".rollback:first",this.$li).css("display","none")}if(!z(H)){n.visibleNodes[H.num].notaFolderAnymore()}setTimeout(o,0);n.events.append.call({source:i,target:this.$li[0]})}};d.prototype.below=function(i){var H=i.parentNode.parentNode;this.$li.after(i);b(".rollback:first",H).css("display","none");if(z(H)){if(!b(i.parentNode).hasClass("ui-tree")&&!i.parentNode.parentNode.undraggable){i.parentNode.parentNode.ordered=false;b(".abc:first",i.parentNode.parentNode).css("display","block");b(".rollback:first",i.parentNode.parentNode).css("display","none")}}else{n.visibleNodes[H.num].notaFolderAnymore()}setTimeout(o,0);n.events.insertbelow.call({source:i,target:this.$li[0]})};d.prototype.above=function(i){var H=i.parentNode.parentNode;this.$li.before(i);b(".rollback:first",H).css("display","none");if(z(H)){if(!b(i.parentNode).hasClass("ui-tree")&&!i.parentNode.parentNode.undraggable){i.parentNode.parentNode.ordered=false;b(".abc:first",i.parentNode.parentNode).css("display","block");b(".rollback:first",i.parentNode.parentNode).css("display","none")}}else{n.visibleNodes[H.num].notaFolderAnymore()}setTimeout(o,0);n.events.insertabove.call({source:i,target:this.$li[0]})};d.prototype.order=function(M){var H=this.$li[0];H.ordered=true;var J=b("ul:first",this.$li);if(J.length){var I=[];H.oldorder=[];b("li",this.$li).each(function(){if(this.parentNode.parentNode==H){I.push(this);H.oldorder.push(this)}});function N(O,i){var Q=b("span",O).text().replace(/^\s+|\s+$/g,""),P=b("span",i).text().replace(/^\s+|\s+$/g,"");return M(Q,P)}I.sort(N);H.order=I;for(var K=0,L=I.length;K<L;K++){J.append(I[K])}}o()};d.prototype.orderUndo=function(){var H=this.$li[0];H.ordered=false;var I=b("ul:first",this.$li);if(H.oldorder&&I.length&&I[0].parentNode==H){for(var J=0,K=H.oldorder.length;J<K;J++){I.append(H.oldorder[J])}}H.oldorder=null;H.oldor=null;o()};d.prototype.open=function(H){H=H||function(){};if(this.$li.hasClass("closed")){var i=b("ul:has(li)",this.$li);if(i.length){i.show();this.closed=false;this.$li.removeClass("closed").addClass("opened");o();H(true);return true}else{return this.load(H)}}H(false);return false};d.prototype.close=function(H){H=H||function(){};var i=this.$li.contents().filter("ul:has(li)");if(i.length){i.hide();this.closed=true;this.$li.removeClass("opened").addClass("closed");n.visibleNodes.splice(this.$li[0].num+1,i[0].getElementsByTagName("li").length);o();H()}};d.prototype.load=function(P){var H=t.options.url;if(!H){return false}P=P||function(){};this.$li[0].toBeLoaded=false;this.$li[0].closed=true;var J={};if(h.parameters&&h.parameters.length){for(var K=0,Q=h.parameters.length;K<Q;K++){J[h.parameters[K]]=(this.$li[0][h.parameters[K]]||"")}}var I=this,N=this.$li[0].getElementsByTagName("span")[0],O=N.offsetWidth,M=Math.round(b(N).offset().left);I.loading=true;n.spinner.putInBox({x:M+O,y:this.top,width:25,height:n.H});n.spinner.show();var L=function(V){var T=b("ul",I.$li);if(!T.length){T=document.createElement("ul");I.$li[0].appendChild(T);T=b(T)}I.ordered=(typeof V[0].position!="number");for(var S=0,U=V.length;S<U;S++){var R=x(V[S]);T[0].appendChild(R);c.call(R)}T.hide();I.open(P);n.events.load();n.spinner.hide();I.$li[0].ordered=I.ordered;b(".abc:first",I.$li[0]).css("display",I.ordered||R.undraggable?"none":"block");b(".rollback:first",I.$li[0]).css("display","none")};b.ajax({url:H,type:"GET",dataType:"json",data:J,success:L});return true};d.prototype.notaFolderAnymore=function(){this.$li.removeClass("closed").removeClass("opened");b(".click-zone:first",this.$li).hide();b(".abc:first",this.$li).css("display","none");b(".rollback:first",this.$li).css("display","none");var i=this.$li[0].getElementsByTagName("ul");this.closed=false;if(i.length){this.$li[0].removeChild(i[0])}};function m(i){var H=n.points[i];if(typeof H!="undefined"){return{visibleNode:n.visibleNodes[H.num],where:H.where,top:H.top}}else{return{visibleNode:new d(v),where:"append",top:n.dim.top}}}function j(){var L={y:0,num:0};n.points=[];for(var I=0,K=n.visibleNodes.length;I<K;I++){var N=n.visibleNodes[I].$li.offset(),O=Math.round(N.top);n.visibleNodes[I].top=O;n.visibleNodes[I].left=Math.round(N.left);if(L.y){var M=(O-L.y)/4;for(var J=L.y;J<O;J++){var H=(J-L.y<M)?"above":(J-L.y<M*3)?"append":"below";n.points[J]={num:L.num,where:H,top:L.y}}}if(I==K-1){var M=(n.visibleNodes[I].height)/4;for(var J=O;J<O+n.visibleNodes[I].height;J++){var H=(J-O<M)?"above":(J-O<M*3)?"append":"below";n.points[J]={num:I,where:H,top:O}}}L.y=O;L.num=I}}function o(){n.visibleNodes=[];var H=b("li:visible",v);for(var I=0,J=H.length;I<J;I++){if(!b(H[I]).hasClass("tree-helper")){H[I].num=n.visibleNodes.length;n.visibleNodes.push(new d(H[I]))}}j()}this.updateVisibleNodes=o;var B=function(){var i={distance:3,helper:"clone",opacity:0.7,cursorAt:{top:n.H/2,left:30},stop:function(L,K){clearInterval(n.timer);clearTimeout(n.opentimer);n.opentimer=null;var I=m(n.prev);I.visibleNode.$li.removeClass("over").removeClass("above").removeClass("append").removeClass("below");I.visibleNode.$li.next().removeClass("over").removeClass("above").removeClass("append").removeClass("below");n.win.unbind("keypress",n.escape);delete n.escape;if(i.revert){i.revert=false;return false}I=m(L.pageY);var J=I.visibleNode.$li[0],H=true;while(J!=v){if(J==this){H=false;break}J=J.parentNode}H=H&&!(I.where=="above"&&I.visibleNode.$li.prev()[0]==this)&&!(I.where=="append"&&I.visibleNode.$li[0]==this.parentNode.parentNode);if(H){I.visibleNode[I.where](this);n.events.drop.call({position:I.where,source:this,target:I.visibleNode.$li[0]})}},start:function(J,H){var I=this;H.helper.append("<strong></strong>").addClass("tree-helper").find(".button-panel").remove();n.events.grab.call(I);if(this.undraggable){H.helper.addClass("no");i.revert=true}n.escape=function(M){if(M.keyCode==27){var K=m(n.prev);K.visibleNode.$li.removeClass("over").removeClass("above").removeClass("append").removeClass("below");K.visibleNode.$li.next().removeClass("over").removeClass("above").removeClass("append").removeClass("below");var L=H.helper.clone();H.helper.before(L);L.animate({left:Math.round(b(I).offset().left)+"px",top:Math.round(b(I).offset().top)+"px",opacity:0},"slow","swing",function(){L.remove()});H.helper.css("display","none");i.revert=true}};n.win.keypress(n.escape)},drag:function(N,M){var H=m(n.prev);H.visibleNode.$li.removeClass("above").removeClass("append").removeClass("below");H.visibleNode.$li.next().removeClass("above").removeClass("append").removeClass("below");if(!i.revert||n.out){n.prev=N.pageY;var K=m(n.prev);if(K.visibleNode.$li[0]==v){i.revert=true;n.out=true;return}else{if(n.out){n.out=false;i.revert=false}}if(K.visibleNode!=H.visibleNode){n.events.nodeout.call(H.visibleNode.$li);if(n.opentimer){clearTimeout(n.opentimer);n.opentimer=false}}n.events.nodeover.call({element:K.visibleNode.$li,position:K.where});var J=K.where,I=K.visibleNode.$li.next();if(J=="below"&&I.length&&!I.hasClass("tree-helper")){I.addClass("above")}else{m(n.prev).visibleNode.$li.addClass(J)}if(K.where=="append"&&(K.visibleNode.closed||K.visibleNode.$li[0].toBeLoaded)&&!n.opentimer){n.opentimer=(function(O){return setTimeout(function(){O.visibleNode.$li.removeClass("append");O.visibleNode.open(function(){n.opentimer=false})},500)})(K)}var L=arguments.callee;if(n.win.height()-N.pageY+n.win.scrollTop()<30){clearInterval(n.timer);n.timer=setInterval(function(){window.scrollBy(0,4);M.helper.css("top",parseInt(M.helper.css("top"))+4+"px");L({pageY:N.pageY+4},M)},n.win.height()-N.pageY+n.win.scrollTop())}else{if(n.win.scrollTop()>0&&(N.pageY-n.win.scrollTop())<30){clearInterval(n.timer);n.timer=setInterval(function(){window.scrollBy(0,-4);L({pageY:N.pageY-4},M);M.helper.css("top",parseInt(M.helper.css("top"))-4+"px")},N.pageY-n.win.scrollTop())}else{if(n.timer){clearInterval(n.timer)}}}n.events.drag.call({element:this,left:N.pageX,top:N.pageY})}}};return i};function c(){var i=b(this);if(t.options.undraggable){i.mousedown(a)}else{i.draggable(B());i[0].undraggable=i.hasClass("undraggable")}var H=b(this.getElementsByTagName("a")[0]);if(t.options.unclickable){i.addClass("unclickable");H.click(a)}else{H.click(n.events.click)}if(t.options.oninsert){t.options.oninsert.call(new u(i),H)}}b.ui.tree.callNumber=0;var q=function(i){if(n.visibleNodes[this.parentNode.num].loading){return}if(b(this.parentNode).hasClass("closed")){n.visibleNodes[this.parentNode.num].open()}else{n.visibleNodes[this.parentNode.num].close()}return false},s=function(i){if(!b(i.target).hasClass("tree-helper")){b(".button-panel:first",this).addClass("hover")}return false},E=function(i){if(!b(i.target).hasClass("tree-helper")){b(".button-panel:first",this).removeClass("hover")}return false},D=function(){var i=n.visibleNodes[this.parentNode.parentNode.num];i.order(k);n.events.order.call({source:i.$li[0]});b(this).hide();b("a.rollback",this.parentNode).show();return false},w=function(H){var i=n.visibleNodes[this.parentNode.parentNode.num];i.orderUndo();n.events.orderUndo.call({source:i.$li[0],orderedChildren:b("ul:first",i.$li[0]).children()});b(this).hide();b("http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/a.abc",this.parentNode).show();return false},G=function(H){H.preventDefault();var i=n.visibleNodes[this.parentNode.parentNode.num];n.events.preview.call({source:preview,node:i.$li[0]})},A=function(H){H.preventDefault();var i=n.visibleNodes[this.parentNode.parentNode.num];n.events.remove.call({source:i.$li[0]})};function x(I){var S=document.createElement("li");S.className=I.nodeClass;if(t.options.parameters&&t.options.parameters.length){for(var K=0,L=t.options.parameters.length;K<L;K++){if(I[t.options.parameters[K]]){S[t.options.parameters[K]]=I[t.options.parameters[K]]}}}if(t.options.nodeId){S.id="node-"+I[t.options.nodeId]}var Q=document.createElement("a"),R=document.createElement("span"),J=document.createElement("i");J.className="decorator";Q.href=I.href;R.appendChild(document.createTextNode(I.text));Q.appendChild(R);Q.appendChild(J);Q.className=I.linkClass;var M=document.createElement("div");b(M).addClass("click-zone");b(M).click(q);b(S).mouseover(s).mouseout(E);S.appendChild(M);S.appendChild(Q);var i=document.createElement("div");i.className="button-panel";S.appendChild(i);var P=document.createElement("a");P.className="abc";P.title="Sort Alphabetically";i.appendChild(P);var H=document.createElement("a");H.className="rollback";H.title="Undo Sorting";i.appendChild(H);b(P).click(D);b(H).click(w);if(t.options.isAdministrator){var N=document.createElement("a");N.className="preview-node";N.title="Preview";i.appendChild(N);b(N).click(G);var T=document.createElement("a");T.className="remove-node";T.title="Delete";i.appendChild(T);b(T).click(A)}b(P).css("display","none");b(H).css("display","none");var O=b(S);if(O.hasClass("opened")){O.removeClass("opened").addClass("closed");S.closed=true}else{if(O.hasClass("closed")){S.toBeLoaded=true}else{b(M).css("display","none")}}return S}var p=e.contents().filter("li");if(p.length>0){n.H=p.height();p.each(c);o();n.events.onready.call(this)}else{var l=t.options.initUrl||t.options.url;if(!l){return false}n.spinner.putInBox({x:n.dim.left,y:n.dim.top,width:16,height:16});n.spinner.show();var C=++b.ui.tree.callNumber;b.getJSON(l,function(L){var K=+new Date;for(var I=0,J=L.length;I<J;I++){var H=x(L[I]);v.appendChild(H);if(I==0){n.H=b(H).height()}c.call(H)}o();n.spinner.hide();if(C==b.ui.tree.callNumber){n.events.onready.call(this);b.ui.tree.callNumber=0}})}n.offset=v.offsetTop;setInterval(function(){if(v.offsetTop!=n.offset){j();n.offset=v.offsetTop}},10);return this}})(jQuery);
jQuery.fn.movePageOrdering=function(i,j,g,e){var f=jQuery;var c=f("#confluence-context-path").attr("content");var b=f("#orderingPlaceHolder",this);b.addClass("loading").html(AJS.renderTemplate("movePagePanelLoading"));b.load(c+"/panels/reorderpage.action",{panelName:"reorder",spaceKey:i,title:j,movedPageId:AJS.params.pageId,pageTitle:g},function(){b.removeClass("loading");h(b,e);a(f(".siblings",b))});var d=function(m,o){var l;var n=m.prevAll("li.sibling")[0];if(n){l="below"}else{l="above";n=m.nextAll("li.sibling")[0]}if(n){AJS.log("Reorder: positionIndicator = "+l+" and target = "+n.innerHTML);var k=f("i",n).text();o(k,l)}};var h=function(k,p){var m=f(".dropper",k),o=f(".target",m);var l=0;f("li",m).each(function(q){!q&&f(this).before(f('<li class="leading">&nbsp;</li>'));f(this).after(f('<li class="leading">&nbsp;</li>'))});var n=o.next();f(".leading",m).hover(function(q){f(this).addClass("here")},function(){f(this).removeClass("here")}).click(function(){d(f(this),p);var q=this;o.hide(150,function(){q!=n[0]&&f(q).after(n).after(o);o.show(150)})})};var a=function(k){var m=f(".target",k);if(m.length){var l=m.position().top;var n=k.height();if(l<0||l>n){k.scrollTop(k.scrollTop()+l-n/3)}}}};
jQuery.fn.shortenUntil=function(d){var b=jQuery;var c=0;while(!d()&&c<this.length){var a=b(this[c]).text();if(a=="\u2026"){c++;continue}b(this[c]).text(a.replace(/[^\u2026]\u2026?$/,"\u2026"))}return this};jQuery.fn.renderBreadcrumbs=function(j){var f=jQuery,d=this,h=[],g=0,l=j.length-1;var a=j[g];var b=a.url.indexOf("~")>=0?"personalspacedesc":"spacedesc";h.push(AJS.renderTemplate("movePageBreadcrumb",a.title,a.url,(g==l?"last content-type-"+b:""),a.title));while(g++<l){var k=j[g];h.push(AJS.renderTemplate("movePageBreadcrumb",k.title,k.url,(g==l?"last content-type-"+j.type:""),k.title))}var e=function(){return d.width()<d.closest(".breadcrumbs-container").width()};this.html(h.join(""));var c=f("li a span",this);c.each(function(i){if(i!=0&&i!=l){f(this).shortenUntil(e)}});f(c.get(0)).shortenUntil(e);f(c.get(l)).shortenUntil(e);return this};AJS.toInit(function(d){var b=d("#confluence-context-path").attr("content");function a(e){for(var f=1;f<e.length;f++){if(e[f].title==AJS.params.pageTitle){return false}}return true}if(!AJS.MoveDialog){AJS.MoveDialog={}}var c={};AJS.MoveDialog.getBreadcrumbs=function(f,h,e){var g=f.userName?f.userName:(f.pageId?(f.pageId+":"+f.fileName):(f.spaceKey+":"+f.title+":"+f.postingDay+":"+f.fileName));if(g in c){h(c[g],"success");return}d.ajax({type:"GET",dataType:"json",data:f,url:b+"/pages/breadcrumb.action",error:e||function(){},success:function(j,k){if(!j||!j.breadcrumbs){e(j,k);return}var i=d.makeArray(j.breadcrumbs);while(i[0]&&(/dashboard.action$/.test(i[0].url)||(j.type!="userinfo"&&/peopledirectory.action$/.test(i[0].url)))){i.shift()}i.type=j.type;c[g]=i;h(i,k)}})};AJS.MoveDialog.Breadcrumbs=function(g){var e=0;function f(k,j,i){g.renderBreadcrumbs(j);var h=k!=AJS.params.spaceKey||a(j);if(h){i.clearErrors();d(i.moveButton).attr("disabled","")}else{i.error(AJS.params.movePageDialogInvalidLocation);d("li:last-child",g).addClass("warning")}}return{update:function(i,h){g.html(AJS.renderTemplate("movePageBreadcrumbLoading"));var j=e+=1;var k=function(){if(j!=e){AJS.log("Breadcrumb response for ");AJS.log(i);AJS.log(" is stale, ignoring.");return true}return false};AJS.MoveDialog.getBreadcrumbs(i,function(l,m){if(k()){return}if(m!="success"||!l){g.html(AJS.renderTemplate("movePageBreadcrumbError",m));return}f(i.spaceKey,l,h)},function(l){if(k()){return}g.html(AJS.renderTemplate("movePageBreadcrumbError"));if(l.status==404){h.error(AJS.params.movePageDialogLocationNotFound)}})}}}});
jQuery.fn.movePageAutocomplete=function(d,c,b,a){var f=jQuery;var e=a;AJS.log(d);return f(this).quicksearch(d,null,{dropdownPostprocess:function(g){f("> ol.last",g).remove();if(!f("> ol",g).length){f(g).append(AJS.renderTemplate(b))}f("> ol:last-child",g).addClass("last");f("a",g).attr("tabindex","-1")},dropdownPlacement:function(g){f(c).append(g)},ajsDropDownOptions:{selectionHandler:function(h,g){if(g){this.hide("selected");e(h,g);h.preventDefault()}}}})};jQuery.fn.movePageLocation=function(c){var f=jQuery;var b=f(this);var e=f("#new-space",b);var d=f("#new-space-key",b);var a=f("#new-parent-page",b);var g=function(){if(e.val()==""){e.val(AJS.params.spaceName);d.val(AJS.params.spaceKey)}c.clearErrors();c.select(d.val(),e.val(),a.val())};a.blur(g).focus(function(){c.clearErrors();AJS.dropDown.current&&AJS.dropDown.current.hide()});e.blur(g).focus(function(){AJS.dropDown.current&&AJS.dropDown.current.hide()});e.movePageAutocomplete("/json/contentnamesearch.action?type=spacedesc&type=personalspacedesc",f(".new-space-dropdown",b),"movePageNoMatchingSpaces",function(j,i){var h=i.find("span").data("properties");d.val(h.spaceKey);e.val(AJS("span").html(h.name).text());a.val("");g();a.focus()});a.movePageAutocomplete(function(){return"/json/contentnamesearch.action?type=page&spaceKey="+d.val()},f(".new-parent-page-dropdown",b),"movePageNoMatchingPages",function(i,h){var j=AJS("span").html(h.find("span").data("properties").name).text();a.val(j);g();window.setTimeout(function(){c.moveButton.focus()},50)})};
jQuery.fn.movePageSearch=function(b){var h=jQuery;var c=h("#confluence-context-path").attr("content");var a=this;var e=h("input[type=button]",a);var g=h("input.search-query",a);var f=h(".search-space",a);var d=h(".search-results",a);h([f[0],g[0]]).keydown(function(i){if(i.which==13){e.click()}});h([g[0],d[0]]).keydown(function(j){function i(n){var l=h(".search-result",a);var m=h(".search-result.selected",a);var k=l.index(m)+n;if(k<0){k=l.length-1}if(k>=l.length){k=0}l.eq(k).click()}if(j.which==38){i(-1)}else{if(j.which==40){i(1)}}});e.click(function(){b.clearErrors();var i=g.val();if(i==""){d.empty();return}d.html(AJS.getTemplate("movePageSearchResultsLoading").toString());h.ajax({type:"GET",dataType:"json",data:{queryString:i,where:f.val(),types:["spacedesc","personalspacedesc","page"]},url:c+"/json/search.action",error:function(){b.error(AJS.params.movePageDialogSearchError)},success:function(k,j){if(j!="success"){b.error(AJS.params.movePageDialogSearchError);return}var l={select:function(m,n){if(n.type=="page"){b.select(n.spaceKey,n.spaceName,n.title,n.id)}else{b.select(n.spaceKey,n.spaceName)}}};d.searchResultsGrid(i,k,h(b).extend(l),{noSearchResults:AJS.params.movePageDialogSearchNoResults,resultsCount:AJS.params.movePageDialogSearchResultCount})}})})};
jQuery.fn.movePageHistory=function(b){var e=jQuery;var c=e("#confluence-context-path").attr("content");var a=this;var d=e(".search-results",a);e(d).keydown(function(g){function f(k){var i=e(".search-result",a);var j=e(".search-result.selected",a);var h=i.index(j)+k;if(h<0){h=i.length-1}if(h>=i.length){h=0}i.eq(h).click()}if(g.which==38){f(-1)}else{if(g.which==40){f(1)}}});d.html(AJS.getTemplate("movePageHistoryLoading").toString());e.ajax({type:"GET",dataType:"json",data:{types:["spacedesc","personalspacedesc","page"]},url:c+"/json/history.action",error:function(){b.error(AJS.params.movePageDialogHistoryError)},success:function(g,f){if(f!="success"){b.error(AJS.params.movePageDialogHistoryError);return}if(!g.history||g.history.length==0){d.html("<div class='no-results'>"+AJS.params.movePageDialogHistoryNoResults+"</div>");return}d.html(AJS.getTemplate("searchResultsGrid").toString());e.each(g.history,function(){var i=this;if(i.id==AJS.params.pageId){return}var h=AJS.$(AJS.renderTemplate("searchResultsGridRow",[i.title,c+i.url,i.type,i.spaceName,i.spaceKey,i.friendlyDate,i.date]));e(h).click(function(j){if(i.type=="page"){b.select(i.spaceKey,i.spaceName,i.title,i.id)}else{b.select(i.spaceKey,i.spaceName)}d.find(".selected").removeClass("selected");e(this).addClass("selected");return AJS.stopEvent(j)});e(h).hover(function(){e(this).addClass("hover")},function(){e(this).removeClass("hover")});d.find("table").append(h)});if(e(".search-result",d).length==0){d.html("<div class='no-results'>"+AJS.params.movePageDialogHistoryNoResults+"</div>")}}})};
jQuery.fn.movePageBrowse=function(m,j,b,l,d,f){var e=jQuery;var c=e("#confluence-context-path").attr("content");var a=this;var g=e(".tree",a);g.addClass("loading").html(AJS.renderTemplate("movePagePanelLoading"));var o,k=function(){g.removeClass("rendering").addClass("expanding");e("#parent-selection-tree .dialog-button-panel").remove();h(AJS.params.spaceKey,d,function(r){if(r&&d!=""){var p=o.findNodeBy("text",d);if(p){p.$.find("> a").addClass("current-parent")}}if(r&&AJS.params.pageTitle!=""){var q=o.findNodeBy("text",AJS.params.pageTitle);if(q){q.makeUnclickable();if(AJS.params.pageTitle!=f){q.setText(f)}}}h(j,l,function(v){if(v){var u=o.findNodeBy("text",l);if(u){u.$.find("> a").addClass("highlighted");var s=u.$.position().top;var t=g.height();if(s<0||s>t){g.scrollTop(g.scrollTop()+s-t/3)}}}g.removeClass("expanding")})})};var i=function(p){p.preventDefault();e("a.highlighted",g).removeClass("highlighted");e(this).addClass("highlighted");j=e("#chosenSpaceKey").val();b=e("#chosenSpaceKey option:selected").text();l=e(this).hasClass("root-node")?"":e(this).find("span").text();m.select(j,b,l)};var n=function(){e("select#chosenSpaceKey").val(j).change(function(){var q=e(this).val();var p=e(this).find("option:selected").text();e("#tree-root-node-item a").text(p).toggleClass("highlighted",j==q&&l=="").toggleClass("current-parent",AJS.params.spaceKey==q&&d=="");g.addClass("rendering");o=o.reload({initUrl:c+"/pages/children.action?spaceKey="+encodeURIComponent(q)+"&node=root"})});e("#tree-root-div").html(AJS.renderTemplate("movePageBrowsePanelSpace",b)).find("a").click(i).toggleClass("highlighted",l=="").toggleClass("current-parent",AJS.params.spaceKey==j&&d=="")};var h=function(q,p,r){if(q!=e("#chosenSpaceKey").val()){r(false);return}console.log("before breadcrumbs");AJS.MoveDialog.getBreadcrumbs({spaceKey:q,title:p},function(s){var t=e.map(s.slice(1),function(u){return{text:u.title}});console.log("before expandPath");o.expandPath(t,function(){console.log("expandPath callback");r(true)})},function(){m.error("Could not retrieve tree expansion information.");r(false)})};g.load(c+"/panels/browsepagelocation.action",{panelName:"browse",dialogMode:"view",spaceKey:j,parentPageString:l,pageId:AJS.params.pageId},function(){g.removeClass("loading").addClass("rendering");n();o=e("#parent-selection-tree").tree({url:c+"/pages/children.action",initUrl:c+"/pages/children.action?spaceKey="+encodeURIComponent(j)+"&node=root",parameters:["pageId","text"],undraggable:true,spinnerId:"move-page-dialog-spinner",nodeId:"pageId",click:i,onready:k,oninsert:function(){var p=this.$;if(p.parents("li:first").attr("unclickable")){this.makeUnclickable()}}});AJS.MoveDialog.tree=o})};
AJS.toInit(function(c){var d=function(t){t=c.extend({spaceKey:AJS.params.spaceKey,spaceName:AJS.params.spaceName,parentPageTitle:AJS.params.parentPageTitle,title:AJS.params.movePageDialogViewPageTitle,buttonName:AJS.params.movePageDialogMoveButton,moveHandler:function(u){AJS.log("No move handler defined. Closing dialog.");u.remove()},cancelHandler:function(u){u.remove()},pageTitleAccessor:function(){return AJS.params.pageTitle}},t);var s={spaceKey:t.spaceKey,spaceName:t.spaceName,parentPageTitle:t.parentPageTitle};var o=t.spaceKey;var h=t.spaceName;var p=t.parentPageTitle;var q="";var k="";var e=function(u,v){q=u;k=v};var i=AJS.ConfluenceDialog({width:800,height:590,id:"move-page-dialog"});i.addHeader(t.title);i.addPanel(AJS.params.movePageDialogLocationPanel,AJS.renderTemplate("movePageDialog"),"location-panel","location-panel-id");i.addPanel(AJS.params.movePageDialogSearchPanel,AJS.renderTemplate("movePageSearchPanel"),"search-panel","search-panel-id");i.addPanel(AJS.params.movePageDialogHistoryPanel,AJS.renderTemplate("movePageHistoryPanel"),"history-panel","history-panel-id");i.addPanel(AJS.params.movePageDialogBrowsePanel,AJS.renderTemplate("movePageBrowsePanel"),"browse-panel","browse-panel-id");i.get("panel:0")[0].onselect=function(){c("#new-space-key").val(o);c("#new-space").val(h);c("#new-parent-page").val(p).select()};i.get("panel:1")[0].onselect=function(){c("#move-page-dialog .search-panel .search-results .selected").removeClass("selected");c("#move-page-dialog input.search-query").focus()};i.get("panel:0").select();gotoReorderPage=function(v){v.nextPage();var u=c("#move-page-dialog");c(".ordering-panel",u).movePageOrdering(o,p,t.pageTitleAccessor(),e)};moveFunction=function(v){var x=c("#new-space:visible").val();var w=c("#new-space-key").val();var u=c("#new-parent-page:visible").val();if(x&&(x!=h||w!=o||u!=p)){AJS.MoveDialog.getBreadcrumbs({spaceKey:w,pageTitle:u},function(){t.moveHandler(v,w,x,u,q,k,m)},function(y){c("#new-parent-breadcrumbs").html(AJS.renderTemplate("movePageBreadcrumbError"));if(y.status==404){r.error(AJS.params.movePageDialogLocationNotFound)}})}else{t.moveHandler(v,o,h,p,q,k,m)}};executeMove=function(u){if(c("#reorderCheck")[0].checked){gotoReorderPage(u)}else{moveFunction(u)}};i.addButton(t.buttonName,executeMove,"move-button");i.addCancel(AJS.I18n.getText("http://10.20.160.198/wiki/s/en/2166/34/26/_/download/superbatch/js/cancel.name"),t.cancelHandler);i.popup.element.find(".dialog-title").append(AJS.template.load("move-help-link"));i.addPage().addHeader(t.title).addPanel(AJS.params.movePageDialogOrderingTitle,AJS.renderTemplate("orderingPagePanel"),"ordering-panel","ordering-panel-id").addLink(AJS.params.movePageDialogBackButton,function(u){u.prevPage()},"dialog-back-link").addButton(AJS.params.movePageDialogMoveAndOrderButton,moveFunction,"reorder-button").addCancel(AJS.params.movePageDialogCancelButton,t.cancelHandler);var g=i.get("button#"+t.buttonName)[0].item;c("button.move-button").before(AJS.renderTemplate("reorderCheckbox"));i.gotoPage(0);i.show();var n=c("#move-page-dialog");c(".location-panel .location-info",n).appendTo(c(".dialog-page-body:first",n));c(".dialog-button-panel:visible",n).prepend(AJS.renderTemplate("movePageErrors"));var f=new AJS.MoveDialog.Breadcrumbs(c("#new-parent-breadcrumbs"));function m(u){if(!u||u.length==0){c("#move-errors").addClass("hidden");c(g).attr("disabled","");return}if(!c.isArray(u)){u=[u]}c("#move-errors").text(u[0]).attr("title",u.join("\n")).removeClass("hidden");i.gotoPage(0)}var r={moveButton:g,clearErrors:function(){m([])},error:m,select:function(w,v,u){AJS.log("select: "+[w,v,u].join());o=w;h=v;p=u||"";c(g).attr("disabled","disabled");f.update({spaceKey:o,title:p},r)}};var j=AJS.params.parentPageTitle!=""?AJS.params.parentPageTitle:AJS.params.fromPageTitle;var l=new AJS.MoveDialog.Breadcrumbs(c("#current-parent-breadcrumbs"));l.update({spaceKey:AJS.params.spaceKey,title:j},r);c(".location-panel",n).movePageLocation(r);c(".search-panel",n).movePageSearch(r);c(".history-panel",n).movePageHistory(r);i.get("panel:2")[0].onselect=function(){c(".history-panel",n).movePageHistory(r)};i.get("panel:3")[0].onselect=function(){AJS.log("browse: "+[o,h,p].join());c(".browse-panel",n).movePageBrowse(r,o,h,p,j,t.pageTitleAccessor())};c("#new-parent-page").select();return n};var b=function(g,f,h,e){var i={pageId:AJS.params.pageId,spaceKey:g};if(h){i.position=e;i.targetId=h}else{if(f!=""){i.targetTitle=f;i.position="append"}else{i.position="topLevel"}}return i};function a(i,k,e,l,n,f,h){i=i.popup.element;i.addClass("waiting");c("button",i).attr("disabled","disabled");var g=c("<div class='throbber'></div>");i.append(g);var m=Raphael.spinner(g[0],100,"#666");function j(o){h(o);i.removeClass("waiting");m();c("button",i).attr("disabled","")}c.ajax({url:contextPath+"/pages/movepage.action",type:"GET",dataType:"json",data:new b(k,l,n,f),error:function(){j(AJS.params.movePageDialogMoveFailed)},success:function(o){var p=[].concat(o.validationErrors||[]).concat(o.actionErrors||[]).concat(o.errorMessage||[]);if(p.length>0){j(p);return}window.location.href=contextPath+o.page.url+(o.page.url.indexOf("?")>=0?"&":"?")+"moved=true"}})}c("#action-move-page-dialog-link").click(function(f){f.preventDefault();if(c("#move-page-dialog").length>0){c("#move-page-dialog, body > .shadow, body > .aui-blanket").remove()}new d({moveHandler:a});return false});c("#edit-move-page-dialog-link").click(function(f){f.preventDefault();if(c("#move-page-dialog").length>0){c("#move-page-dialog, body > .shadow, body > .aui-blanket").remove()}new d({spaceKey:c("#newSpaceKey").val(),spaceName:c("#space_content").text(),parentPageTitle:c("#parentPageString").val(),buttonName:AJS.params.movePageDialogMoveButton,title:AJS.params.movePageDialogEditPageTitle,moveHandler:function(j,g,k,l,i,h,e){c("#space_content").text(k);c("#newSpaceKey").val(g);c("#parentPageString").val(l);c("#parent_content").text(l);if(l!=""){c("#position").val("append");c("#parent_info").removeClass("hidden")}else{c("#parent_info").addClass("hidden");c("#position").val("topLevel")}if(i){c("#targetId").val(i);c("#position").val(h)}j.remove()},pageTitleAccessor:function(){return c("#content-title").val()}});return false})});
var AJS=AJS||{};AJS.animation={running:[],queue:[],timer:null,duration:300,period:20,add:function(a){this.queue.push(a)},start:function(){if(this.timer!=null){return}this.running=this.queue;this.queue=[];jQuery.each(this.running,function(){if(this.onStart){this.onStart()}});var c=this;var b=new Date().getTime();var a=b+this.duration;this.timer=setInterval(function(){var d=new Date().getTime();var e=(d-b)/(a-b);if(e<=1){c.animate(e)}if(e>=1&&c.timer!=null){c.finish()}},this.period);return this.timer},finish:function(){clearInterval(this.timer);jQuery.each(this.running,function(){if(this.onFinish){this.onFinish()}});this.running=[];this.timer=null;if(this.queue.length>0){this.start()}},animate:function(a){jQuery.each(this.running,function(){if(this.animate){this.animate(AJS.animation.interpolate(a,this.start,this.end,this.reverse))}})},interpolate:function(d,c,a,b){if(typeof c!="undefined"&&typeof a!="undefined"){if(b){return a+d*(c-a)}else{return c+d*(a-c)}}return d},combine:function(a){return{animations:a,append:function(b){this.animations.push(b);return this},onStart:function(){jQuery.each(this.animations,function(){if(this.onStart){this.onStart()}})},onFinish:function(){jQuery.each(this.animations,function(){if(this.onFinish){this.onFinish()}})},animate:function(b){jQuery.each(this.animations,function(){if(this.animate){this.animate(AJS.animation.interpolate(b,this.start,this.end,this.reverse))}})}}}};
AJS.toInit(function(a){a("#ellipsis").click(function(){try{a(".hidden-crumb",a("#breadcrumbs")).removeClass("hidden-crumb");a(this).addClass("hidden-crumb")}catch(b){AJS.log(b)}})});
AJS.toInit(function(c){var a=function(f){return function(g){f.closest("form").find(".quick-nav-drop-down").append(g)}};var b=c("#quick-search-query"),e=c("#space-blog-search-query"),d=c("#confluence-space-key");b.quicksearch("/json/contentnamesearch.action",null,{dropdownPlacement:a(b)});if(e.length&&d.length){e.quicksearch("/json/contentnamesearch.action?type=blogpost&spaceKey="+AJS("i").html(d.attr("content")).text(),null,{dropdownPlacement:a(e)})}});
(function(a){AJS.contentHover=function(j,i,d,f,m){var b=a.extend(false,AJS.contentHover.opts,m);var h,l,c=a("#content-hover-"+i);if(!c.length){a(b.container).append(a('<div id="content-hover-'+i+'" class="ajs-content-hover"><div class="contents"></div></div>'));c=a("#content-hover-"+i);h=c.find(".contents");h.css("width",b.width+"px").mouseover(function(){clearTimeout(e.hideDelayTimer);c.unbind("mouseover")}).mouseout(function(){g()})}else{h=c.find(".contents")}var e=c[0];var k=function(){if(c.is(":visible")){return}e.showTimer=setTimeout(function(){if(!e.contentLoaded||!e.shouldShow){return}e.beingShown=true;var p=a(window),n=l.x-3,r=l.y+15;if(n+b.width+30>p.width()){c.css({right:"20px",left:"auto"})}else{c.css({left:n+"px",right:"auto"})}var o=(window.pageYOffset||document.documentElement.scrollTop)+p.height();if((r+c.height())>o){r=o-c.height()-5;c.mouseover(function(){clearTimeout(e.hideDelayTimer)}).mouseout(function(){g()})}c.css({top:r+"px"});var q=a("#content-hover-shadow").appendTo(c).show();c.fadeIn(b.fadeTime,function(){e.beingShown=false});q.css({width:h.outerWidth()+32+"px",height:h.outerHeight()+25+"px"});a(".b",q).css("width",h.outerWidth()-26+"px");a(".l, .r",q).css("height",h.outerHeight()-21+"px")},b.showDelay)};var g=function(){e.beingShown=false;e.shouldShow=false;clearTimeout(e.hideDelayTimer);clearTimeout(e.showTimer);clearTimeout(e.loadTimer);e.contentLoading=false;e.shouldLoadContent=false;e.hideDelayTimer=setTimeout(function(){c.fadeOut(b.fadeTime)},b.hideDelay)};a(j).mousemove(function(n){l={x:n.pageX,y:n.pageY};if(!e.beingShown){clearTimeout(e.showTimer)}e.shouldShow=true;if(!e.contentLoaded){if(e.contentLoading){if(e.shouldLoadContent){var o=(l.x-e.initialMousePosition.x)*(l.x-e.initialMousePosition.x)+(l.y-e.initialMousePosition.y)*(l.y-e.initialMousePosition.y);if(o>(b.mouseMoveThreshold*b.mouseMoveThreshold)){e.contentLoading=false;e.shouldLoadContent=false;clearTimeout(e.loadTimer);return}}}else{e.initialMousePosition=l;e.shouldLoadContent=true;e.contentLoading=true;e.loadTimer=setTimeout(function(){if(!e.shouldLoadContent){return}h.load(d,function(){e.contentLoaded=true;e.contentLoading=false;f.call(c,i);k()})},b.loadDelay)}}clearTimeout(e.hideDelayTimer);if(!e.beingShown){k()}}).mouseout(function(){g()});h.click(function(n){n.stopPropagation()});a("body").click(function(){e.beingShown=false;clearTimeout(e.hideDelayTimer);clearTimeout(e.showTimer);c.hide()});return c};AJS.contentHover.opts={fadeTime:100,hideDelay:500,showDelay:700,loadDelay:50,width:300,mouseMoveThreshold:10,container:"body"};AJS.toInit(function(){a("body").append(a('<div id="content-hover-shadow"><div class="tl"></div><div class="tr"></div><div class="l"></div><div class="r"></div><div class="bl"></div><div class="br"></div><div class="b"></div></div>'));a("#content-hover-shadow").hide()})})(jQuery);if(typeof AJS.followCallbacks=="undefined"){AJS.followCallbacks=[]}if(typeof AJS.favouriteCallbacks=="undefined"){AJS.favouriteCallbacks=[]}AJS.toInit(function(a){a(self).bind("hover-user.follow",function(f,d){for(var b=0,c=AJS.followCallbacks.length;b<c;b++){AJS.followCallbacks[b](d.username)}})});
AJS.Labels=(function(a){return{operationInProgress:false,updateStatus:function(b){a("#labelOperationStatus").html(b);if(b!=""){a("#waitImageAndStatus").addClass("open")}else{a("#waitImageAndStatus").removeClass("open")}},startOperation:function(b){AJS.Labels.operationInProgress=true;a("#errorSpan").html("");AJS.Labels.labelOperationError("");AJS.Labels.updateStatus(b)},finishOperation:function(){AJS.Labels.updateStatus("");AJS.Labels.operationInProgress=false},handleError:function(b){AJS.Labels.operationInProgress=false;AJS.Labels.updateStatus("");a("#errorSpan").html(b)},labelOperationError:function(b){a("#labelOperationErrorMessage").html(b);if(b!=""){AJS.setVisible("#labelOperationErrorContainer",true)}else{AJS.setVisible("#labelOperationErrorContainer",false)}},addLabelFromInput:function(){return AJS.Labels.addLabel(a("#labelsString").val())},addLabel:function(b){if(a("#labelsString").val()!=""){AJS.setVisible("#labels-section-title-none",false)}if(!AJS.Labels.operationInProgress&&b&&b!=""){AJS.Labels.startOperation("Adding label...");var c={entityIdString:AJS.params.pageId,labelString:b};AJS.safe.ajax({type:"POST",url:AJS.params.contextPath+"/json/addlabelactivity.action",data:c,success:AJS.Labels.addLabelCallback,error:AJS.Labels.addLabelErrorHandler,dataType:"json"})}return false},addLabelCallback:function(b){if(b.success){a("#labelsList").html(a("#labelsList").html()+b.response);a(".labels-editor .remove-label").unbind("click");a(".labels-editor .remove-label").click(AJS.Labels.removeLabel);a("#labelsString").val("")}else{AJS.Labels.labelOperationError(b.response)}a("#labelsString").focus();AJS.safe.ajax({url:AJS.params.contextPath+"/json/suggestlabelsactivity.action",data:{entityIdString:AJS.params.pageId},success:AJS.Labels.suggestedLabelsCallback,error:AJS.Labels.suggestedLabelsErrorHandler,dataType:"json"});AJS.Labels.finishOperation()},addLabelErrorHandler:function(){AJS.Labels.handleError("[41a] Error connecting to the server. The labels have not been updated.")},removeLabel:function(){if(!AJS.Labels.operationInProgress){AJS.Labels.startOperation("Removing label ...");var c=AJS.$(this).parent().attr("id").replace(/^label-/,"");var b={entityIdString:AJS.params.pageId,labelIdString:c};AJS.safe.ajax({type:"POST",url:AJS.params.contextPath+"/json/removelabelactivity.action",data:b,success:AJS.Labels.removeLabelCallback(c),error:AJS.Labels.removeLabelErrorHandler,dataType:"json"})}return false},removeLabelCallback:function(b){return function(c){if(c.success){var d=a("#label-"+b);d.fadeOut("normal",function(){d.remove();if(a("#labelsList").children().length==0){AJS.setVisible("#labels-section-title-none",true)}})}else{AJS.Labels.labelOperationError(c.response)}AJS.Labels.finishOperation()}},removeLabelErrorHandler:function(b){var c="Error connecting to the server. The labels have not been updated";if(b){c+=": "+b}AJS.Labels.handleError(c)},suggestedLabelsCallback:function(b){if(!b.success){return}a("#suggestedLabelsSpan").html(b.response);a("#suggestedLabelsSpan .suggested-label").click(function(d){var f=a("#labelsString").val();if(f.length>0){f+=" "}f+=a(this).text();a("#labelsString").val(f);var c=this;if(a(this).parent().find("a").length==1){c=a(this).parent()}a(c).fadeOut(function(){a(this).remove()});d.preventDefault()})},suggestedLabelsErrorHandler:function(b){var c="Error finding suggested labels. The labels have not been updated";if(b){c+=": "+b}AJS.Labels.handleError(c)},bindAutocomplete:function(){var g=a("#labelsString"),f=g.parents("#add-labels-form").length;if(!g.length){return}var d=function(h){a("#labelsAutocompleteList").append(h)};var e=function(p){if(p.find("a.label-suggestion").length){var q=a("span",p);var m=a.data(q[0],"properties");if(f){AJS.Labels.addLabel(m.name)}else{var o=g.val();var n=AJS.Labels.queryTokens;var s=-1,k="";for(var l=0;l<n.length;l++){k=n[l];var j=o.lastIndexOf(k);if(j>s){s=j}}if(s!=-1){var r=o.substr(0,s);var h=o.substr(s+k.length).match(/^\s+/);if(h){r+=h[0]}g.val(r+m.name)}else{g.val(m.name)}}}};var b=function(){if(!a("#labelsAutocompleteList .label-suggestion").length){this.hide()}else{if(!f){var k=a("#labelsAutocompleteList a.label-suggestion");for(var h=0,j=k.length;h<j;h++){k.get(h).href="#"}}}};var c="/labels/autocompletelabel.action";a(window).bind("quicksearch.ajax-success",function(i,h){if(h.url==c){AJS.Labels.queryTokens=(h.json&&h.json.queryTokens)||[];return false}});a(window).bind("quicksearch.ajax-error",function(i,h){if(h.url==c){AJS.Labels.queryTokens=[];return false}});g.quicksearch(c,b,{makeParams:function(h){return{query:h,contentId:AJS.params.pageId||""}},dropdownPlacement:d,ajsDropDownOptions:{selectionHandler:function(i,h){e(h);this.hide();i.preventDefault()}}})},TagExtractor:function(b,c){this.tagPrefix=b;this.extractFromUrls=c;this.TAG_END=" ";this.parseTagsTo=function(j,g){var i=function(l,n){var m=l;while(m>0){switch(n[m]){case"/":case"&":return true;case" ":return false;default:m--}}return false};var f=0;while(f<j.length){var e=j.indexOf(this.tagPrefix,f);if(e==-1){return}if(!this.extractFromUrls&&i(e,j)){f=e+1}else{var h=e+this.tagPrefix.length;var d=j.indexOf(this.TAG_END,h);var k=j.indexOf(this.tagPrefix,h);if(k!=-1&&(d==-1||k<d)){d=k}if(d==-1){d=j.length}if(d!=e+this.tagPrefix.length){g(j.substring(h,d),h,d)}f=d}}}}}})(AJS.$);AJS.toInit(function(){AJS.Labels.bindAutocomplete()});
AJS.toInit(function(c){var b=function(d){c("#labels_div").toggleClass("hidden");c("#labels_info").toggleClass("hidden");if(c("#labels_div").hasClass("hidden")){c("#labels_info").html(c("#labelsString").val().toLowerCase());c("#labels_edit_link").html("Edit")}else{AJS.safe.ajax({url:AJS.Data.get("context-path")+"/json/suggestlabelsactivity.action",data:{entityIdString:AJS.params.pageId},success:AJS.Labels.suggestedLabelsCallback,error:AJS.Labels.suggestedLabelsErrorHandler,dataType:"json"});c("#labels_edit_link").html("Done")}if(d){d.preventDefault()}};var a=c("#labelsShowing");if(a.length&&a.val()=="true"){b()}c("#labels_edit_link").click(b)});
AJS.toInit(function(g){function d(i){return g.trim(i).length==0}var c,f=140;function e(){var i=new AJS.Dialog(650,200,"update-user-status-dialog");var j=i.popup.element;i.addHeader(AJS.params.statusDialogHeading||"What are you working on?");i.addPanel("Set Status","<form class='aui update-status'><fieldset><legend class='assistive'>Status Update</legend><label for='status-text' class='assistive'>"+AJS.params.statusDialogAccessibilityLabel+"</label><textarea name='status-text' id='status-text'></textarea><span id='update-status-chars-left'>"+f+"</span><div id='dialog-current-status' class='current-user-latest-status'>"+(AJS.params.statusDialogLatestLabel||"Latest:")+" <span class='status-text'></span></div></fieldset></form>");i.addButton(AJS.params.statusDialogUpdateButtonLabel||"Update",a,"status-update-button");i.addCancel(AJS.params.statusDialogCancelButtonLabel||"Cancel",function(k){k.hide()});j.find(".dialog-button-panel").append("<span class='error-message'></span>");i.setError=function(k){g("#update-user-status-dialog .error-message").html(k)};if(Confluence.KeyboardShortcuts.enabled||AJS.Data.get("use-keyboard-shortcuts")==="true"){i.addHelpText(AJS.params.shortcutDialogTip,{shortcut:"s"})}return i}function b(i){g(".current-user-latest-status .status-text").html(i.text);g(".current-user-latest-status a[id^=view]").each(function(){var k=g(this),j=k.attr("href");k.attr("href",j.replace(/\d+$/,i.id)).text(i.friendlyDate).attr("title",new Date(i.date).toLocaleString())})}function h(){g.getJSON(AJS.Confluence.getContextPath()+"/status/current.action",function(i){if(i.errorMessage!=null){c.setError(i.errorMessage)}else{b(i)}})}var a=function(){var i=g("#update-user-status-dialog #status-text").attr("disabled","disabled").attr("readonly","readonly").blur();var j=i.val();g(".status-update-button").attr("disabled","disabled");if(j.length>f||d(j)){return false}AJS.safe.ajax({url:AJS.Confluence.getContextPath()+"/status/update.action",type:"POST",dataType:"json",data:{text:j},success:function(k){if(k.errorMessage!=null){c.setError(k.errorMessage)}else{b(k);i.val("");setTimeout(function(){c.hide()},1000)}},error:function(m,l,k){AJS.log("Error updating status: "+l);AJS.log(k);c.setError("There was an error - "+k)}})};g("#set-user-status-link").click(function(k){var j=g(this).parents(".ajs-drop-down")[0];j&&j.hide();if(typeof c=="undefined"){c=e();var l=g("#update-status-chars-left");var i=g(".status-update-button").attr("disabled","disabled");g("#update-user-status-dialog form.update-status #status-text").keydown(function(m){if(m.which==13){a()}}).bind("blur focus change "+(g.browser.mozilla?"paste input":"keyup"),function(){var m=f-g(this).val().length;l.removeClass("over-limit").removeClass("close-to-limit").text(m);i.removeAttr("disabled");if(d(g(this).val())){i.attr("disabled","disabled")}if(m<0){l.addClass("over-limit").html("&minus;"+-m);i.attr("disabled","disabled")}else{if(m<20){l.addClass("close-to-limit")}}});g("#update-user-status-dialog form.update-status").submit(function(m){a();return AJS.stopEvent(m)})}c.setError("");h();c.show();g("#update-user-status-dialog #status-text").removeAttr("readonly").removeAttr("disabled").focus();return AJS.stopEvent(k)})});
var GADGET_DIRECTORY = null;
GadgetDirectory = function() {};
GadgetDirectory.prototype = {
dlg: null,
gadget_list: null,
showDialog: function() {
//Create the dialog
this.dlg.addHeader(GADGET_DIRECTORY.translations.header);
this.dlg.addCancel(GADGET_DIRECTORY.translations.closeButton, function(dlg) {dlg.hide();});
AJS.$(".throbber").hide();
this.dlg.getCurrentPanel().html(this.buildPanel());
},
buildPanel: function() {
return AJS.$("<div/>").addClass("directory-panel").append(this.buildDirectoryHelp()).append(this.buildDirectoryList());
},
buildDirectoryHelp: function() {
var helpPanel = AJS.$("<div/>").addClass("directory-help");
AJS.$("<h3/>").addClass("directory-help-title").html(GADGET_DIRECTORY.translations.helpTitle1).appendTo(helpPanel);
AJS.$("<p/>").addClass("directory-help-text").html(GADGET_DIRECTORY.translations.helpBody1).appendTo(helpPanel);
AJS.$("<h3/>").addClass("directory-help-title").html(GADGET_DIRECTORY.translations.helpTitle2).appendTo(helpPanel);
AJS.$("<p/>").addClass("directory-help-text").html(GADGET_DIRECTORY.translations.helpBody2).appendTo(helpPanel);
AJS.$("<p/>").html(GADGET_DIRECTORY.translations.moreInfo).appendTo(helpPanel);
return helpPanel;
},
buildDirectoryList: function() {
if (!GADGET_DIRECTORY.gadget_list)
return AJS.$("<div/>").addClass("no-gadgets").html("No gadgets found.");
var directory_list = AJS.$("<ol/>").addClass("macro-list");
AJS.$.each(GADGET_DIRECTORY.gadget_list, function(i, gadget_item) {
var directory_item = AJS.$("<li/>").attr("id", "macro-" + gadget_item.title.split(' ').join('')).addClass("macro-list-item");
var title = AJS.$("<h3/>").addClass("macro-title").html(gadget_item.title);
var gadgetUrl = AJS.$("<p/>").append(AJS.$("<span/>").append(AJS.$("<a/>").addClass("macro-uri").attr("href", gadget_item.url).attr("target", "_blank").attr("title", gadget_item.url).html(GADGET_DIRECTORY.translations.gadgetUrl)));
var author = AJS.$("<p/>").addClass("macro-author");
if (gadget_item.author) {
author.html("By " + gadget_item.author);
} else {
author.html(GADGET_DIRECTORY.translations.noAuthor);
}
var description = AJS.$("<p/>").addClass("macro-desc");
if (gadget_item.description) {
description.html(gadget_item.description);
} else {
description.html(GADGET_DIRECTORY.translations.noDescription);
}
if (gadget_item.thumbnail) {
var thumbnail = AJS.$("<img/>").addClass("macro-icon").attr({
height: 60,
width: 120,
alt: "",
src: gadget_item.thumbnail
});
directory_item.append(thumbnail);
}
directory_item.append(title);
directory_item.append(gadgetUrl);
directory_item.append(author);
directory_item.append(description);
directory_list.append(directory_item);
});
return directory_list;
},
buildThrobber: function() {
var throbber = AJS.$("<div/>").addClass("throbber");
Raphael.spinner(throbber[0], 60, "#666");
return throbber;
},
loadDirectory: function() {
AJS.$(document).keyup(function (e) {
if (e.keyCode == 27) {
GADGET_DIRECTORY.dlg.hide();
AJS.$(document).unbind("keyup", arguments.callee);
return AJS.stopEvent(e);
}
});
if (this.dlg) {
this.dlg.show();
} else {
this.dlg = new AJS.Dialog(865, 530, "gadget-directory-dialog");
this.dlg.addPanel("", "panel1");
this.dlg.getCurrentPanel().html(this.buildThrobber());
this.dlg.getCurrentPanel().setPadding(0);
this.dlg.getCurrentPanel().body.css("overflow", "hidden");
this.dlg.show();
AJS.$.ajax({
url: contextPath + "/rest/gadget/1.0/published/gadgetsdirectory",
type: "GET",
dataType: "json",
success: function(data) {
if (data.directoryList)
GADGET_DIRECTORY.gadget_list = data.directoryList;
GADGET_DIRECTORY.translations = data.translations;
GADGET_DIRECTORY.showDialog();
},
error: function() {
GADGET_DIRECTORY.dlg.getCurrentPanel().html(AJS.$("<div/>").addClass("loading-error").html("An error has occurred while trying to load the gadget directory."));
},
timeout: 12000
});
}
}
};
AJS.toInit(function ($)
{
GADGET_DIRECTORY = new GadgetDirectory();
AJS.$("#gadget-directory-link").click(function (e) {
GADGET_DIRECTORY.loadDirectory();
e.preventDefault();
});
});
function placeFocus(){if(document.location.hash||document.getElementById("editpageform")||document.getElementById("createpageform")||document.getElementById("upload-attachments")||document.getElementById("addcomment")){return}var l="";var a=window.location.search.substring(1);var f=a.split("&");for(var d=0;d<f.length;d++){var m=f[d].split("=")[0];var h=f[d].split("=")[1];if(m=="autofocus"&&(h!=null&&h.length>0)){l="'"+h+"'"}}var c=false;for(var d=0;d<document.forms.length;d++){var k=document.forms[d].elements;if(document.forms[d].id!="quick-search"&&document.forms[d].id!="space-blog-quick-search"&&document.forms[d].name!="inlinecommentform"){for(var b=0;b<k.length;b++){if((k[b].type=="text"||k[b].type=="password"||k[b].type=="textarea")&&!k[b].disabled&&!(k[b].style.display=="none")){try{if(l!=null&&l.length>0){if(k[b].id==l){k[b].focus();c=true;break}}else{k[b].focus();c=true;break}}catch(g){}}}}if(c){break}}}function setCookie(b,g,i,f,h,j,e,a){var d=b+"="+escape(g);if(i){var c=new Date(i,f,h);d+="; expires="+c.toGMTString()}if(j){d+="; path="+escape(j)}else{d+="; path=/"}if(e){d+="; domain="+escape(e)}if(a){d+="; secure"}document.cookie=d}function getCookie(b){var a=document.cookie.match(b+"=(.*?)(;|$)");if(a){return(unescape(a[1]))}else{return null}}function highlight(a){new Effect.Highlight(a,{endcolor:"#f0f0f0"})};
AJS.toInit(function ($) {
var whatsNewMenuItem = $("#whats-new-menu-link"),
throbber, iframe, popup, timeoutDiv, killSpinner, timeout,
/**
* Called when the user clicks on the "Don't show again checkbox or its label, stores a flag against the user to
* not auto-show the What's New dialog on first visit of session.
*/
toggleDontShow = function (e) {
var isShownForUser = !$(this).attr('checked');
var url = AJS.Data.get("context-path") + "/plugins/whatsnew/set.action";
var data = {
isShownForUser: isShownForUser
};
AJS.log("whatsnew > toggleDontShow > setting isShownForUser to: " + data.isShownForUser);
AJS.safe.post(url, data, function (data, status) {
AJS.log("whatsnew > toggleDontShow > isShownForUser set to: " + data.isShownForUser);
});
},
// When the iframe content has loaded a page-loaded.whats-new event will be
// triggered on the parent frame AJS object. At this point, hide the loading
// div and display the iframe.
iframeReadyStateChanged = function () {
// Load already cancelled
if (!iframe) return;
timeout && clearTimeout(timeout);
hideThrobber();
AJS.setVisible(iframe, true);
},
createDialog = function (isShownForUser) {
var dialog = new AJS.ConfluenceDialog({
width: 855,
height: 545,
id: "whats-new-dialog",
onCancel: function () {
dialog.hide().remove();
timeout && clearTimeout(timeout);
}
});
// getText and format separately so that js-i18n-transformer will work
var headingPattern = "What\u2019s New in Confluence {0}";
var minorVersion = AJS.Data.get("version-number").match(/^\d+\.\d+/);
var header = AJS.format(headingPattern, minorVersion);
dialog.addHeader(header);
dialog.addPanel("default", AJS.renderTemplate("whats-new-dialog-panel"));
dialog.addCancel("Close", function () {
dialog.hide().remove();
timeout && clearTimeout(timeout);
});
popup = dialog.popup.element;
if (AJS.Data.get("remote-user")) {
dialog.page[dialog.curpage].buttonpanel.append(AJS.renderTemplate("whats-new-dialog-tip-panel"));
popup.find('#dont-show-whats-new').change(toggleDontShow).attr('checked', isShownForUser ? '' : 'checked');
}
iframe = popup.find("iframe");
var src = AJS.Data.get("whats-new-iframe-src-override");
if (typeof(src) == "undefined") {
src = whatsNewMenuItem[0].href;
}
iframe[0].src = src;
iframe.load(iframeReadyStateChanged);
timeoutDiv = popup.find(".whats-new-timeout");
return dialog;
},
hideThrobber = function () {
if (killSpinner) {
killSpinner();
killSpinner = null;
}
throbber.addClass("hidden");
},
/**
* Creates and shows the what's new dialog after checking the user's settings..
*/
showWhatsNewDialog = function () {
var url = AJS.Data.get("context-path") + "/plugins/whatsnew/get.action";
$.getJSON(url, function (settings) {
var templateUrl = AJS.Data.get("static-resource-url-prefix") + "/download/resources/com.atlassian.confluence.whatsnew:whats-new-resources/whats-new.html";
AJS.loadTemplatesFromUrl(templateUrl, function () {
createDialog(settings.isShownForUser).show();
// If the iframe takes too long to load, show a timeout message
throbber = popup.find(".whats-new-throbber.hidden");
throbber.removeClass("hidden");
killSpinner = Raphael.spinner(throbber[0], 80, "#666");
timeout = setTimeout(function () {
iframe = null;
hideThrobber();
AJS.setVisible(timeoutDiv, true);
}, 10000);
});
});
};
// Show the dialog if the user selects the menu item.
whatsNewMenuItem.click(function (e) {
e.preventDefault();
showWhatsNewDialog();
});
// If dialog should show automatically on page load, show it now.
AJS.Data.getBoolean("show-whats-new") && showWhatsNewDialog();
});