//>>built
define("dojox/fx/split","dojo/_base/lang dojo/dom dojo/_base/window dojo/_base/html dojo/dom-geometry dojo/dom-construct dojo/dom-attr dojo/_base/fx dojo/fx ./_base dojo/fx/easing dojo/_base/connect".split(" "),function(z,x,G,n,D,E,H,y,I,J,w,u){var v=z.getObject("dojox.fx");z.mixin(v,{_split:function(a){a.rows=a.rows||3;a.columns=a.columns||3;a.duration=a.duration||1E3;for(var c=a.node=x.byId(a.node),h=c.parentNode,p=G.body();h&&h!=p&&"static"==n.style(h,"position");)h=h.parentNode;var d=h!=p?D.position(h,
!0):{x:0,y:0};h=D.position(c,!0);var m=n.style(c,"height"),b=n.style(c,"width"),k=n.style(c,"borderLeftWidth")+n.style(c,"borderRightWidth"),f=n.style(c,"borderTopWidth")+n.style(c,"borderBottomWidth");p=Math.ceil(m/a.rows);var e=Math.ceil(b/a.columns),g=E.create(c.tagName,{style:{position:"absolute",padding:0,margin:0,border:"none",top:h.y-d.y+"px",left:h.x-d.x+"px",height:m+f+"px",width:b+k+"px",background:"none",overflow:a.crop?"hidden":"visible",zIndex:n.style(c,"zIndex")}},c,"after");d=[];k=
E.create(c.tagName,{style:{position:"absolute",border:"none",padding:0,margin:0,height:p+k+"px",width:e+f+"px",overflow:"hidden"}});f=0;for(m=a.rows;f<m;f++){b=0;for(var q=a.columns;b<q;b++){var l=z.clone(k),r=z.clone(c),t=f*p,A=b*e;r.style.filter="";H.remove(r,"id");n.style(l,{border:"none",overflow:"hidden",top:t+"px",left:A+"px"});n.style(r,{position:"static",opacity:"1",marginTop:-t+"px",marginLeft:-A+"px"});l.appendChild(r);g.appendChild(l);l=a.pieceAnimation(l,b,f,h);z.isArray(l)?d=d.concat(l):
d.push(l)}}c=I.combine(d);u.connect(c,"onEnd",c,function(){g.parentNode.removeChild(g)});a.onPlay&&u.connect(c,"onPlay",c,a.onPlay);a.onEnd&&u.connect(c,"onEnd",c,a.onEnd);return c},explode:function(a){var c=a.node=x.byId(a.node);a.rows=a.rows||3;a.columns=a.columns||3;a.distance=a.distance||1;a.duration=a.duration||1E3;a.random=a.random||0;a.fade||(a.fade=!0);"undefined"==typeof a.sync&&(a.sync=!0);a.random=Math.abs(a.random);a.pieceAnimation=function(p,d,m,b){var k=b.h/a.rows,f=b.w/a.columns,e=
2*a.distance,g=a.duration,q=p.style,l=parseInt(q.top),r=parseInt(q.left),t=0,A=0,F=0;a.random&&(t=Math.random()*a.random+Math.max(1-a.random,0),e*=t,g*=t,t=a.unhide&&a.sync||!a.unhide&&!a.sync?a.duration-g:0,A=Math.random()-.5,F=Math.random()-.5);m=(b.h-k)/2-k*m;d=(b.w-f)/2-f*d;b=Math.sqrt(Math.pow(d,2)+Math.pow(m,2));var B=parseInt(l-m*e+b*F),C=parseInt(r-d*e+b*A);e=y.animateProperty({node:p,duration:g,delay:t,easing:a.easing||(a.unhide?w.sinOut:w.circOut),beforeBegin:a.unhide?function(){a.fade&&
n.style(p,{opacity:"0"});q.top=B+"px";q.left=C+"px"}:void 0,properties:{top:a.unhide?{start:B,end:l}:{start:l,end:B},left:a.unhide?{start:C,end:r}:{start:r,end:C}}});return a.fade?(g=y.animateProperty({node:p,duration:g,delay:t,easing:a.fadeEasing||w.quadOut,properties:{opacity:a.unhide?{start:"0",end:"1"}:{start:"1",end:"0"}}}),a.unhide?[g,e]:[e,g]):e};var h=v._split(a);a.unhide?u.connect(h,"onEnd",null,function(){n.style(c,{opacity:"1"})}):u.connect(h,"onPlay",null,function(){n.style(c,{opacity:"0"})});
return h},converge:function(a){a.unhide=!0;return v.explode(a)},disintegrate:function(a){var c=a.node=x.byId(a.node);a.rows=a.rows||5;a.columns=a.columns||5;a.duration=a.duration||1500;a.interval=a.interval||a.duration/(a.rows+2*a.columns);a.distance=a.distance||1.5;a.random=a.random||0;"undefined"==typeof a.fade&&(a.fade=!0);var h=Math.abs(a.random),p=a.duration-(a.rows+a.columns)*a.interval;a.pieceAnimation=function(m,b,k,f){var e=m.style;b=Math.random()*(a.rows+a.columns)*a.interval*h+Math.max(1-
h,0)*(a.reverseOrder||0>a.distance?(b+k)*a.interval:(a.rows+a.columns-(b+k))*a.interval);var g={};a.unhide?(g.top={start:parseInt(e.top)-f.h*a.distance,end:parseInt(e.top)},a.fade&&(g.opacity={start:"0",end:"1"})):(g.top={end:parseInt(e.top)+f.h*a.distance},a.fade&&(g.opacity={end:"0"}));return y.animateProperty({node:m,duration:p,delay:b,easing:a.easing||(a.unhide?w.sinIn:w.circIn),properties:g,beforeBegin:a.unhide?function(){a.fade&&n.style(m,{opacity:"0"});e.top=g.top.start+"px"}:void 0})};var d=
v._split(a);a.unhide?u.connect(d,"onEnd",d,function(){n.style(c,{opacity:"1"})}):u.connect(d,"onPlay",d,function(){n.style(c,{opacity:"0"})});return d},build:function(a){a.unhide=!0;return v.disintegrate(a)},shear:function(a){var c=a.node=x.byId(a.node);a.rows=a.rows||6;a.columns=a.columns||6;a.duration=a.duration||1E3;a.interval=a.interval||0;a.distance=a.distance||1;a.random=a.random||0;"undefined"==typeof a.fade&&(a.fade=!0);var h=Math.abs(a.random),p=a.duration-(a.rows+a.columns)*Math.abs(a.interval);
a.pieceAnimation=function(m,b,k,f){var e=!(b%2),g=!(k%2);b=Math.random()*p*h+Math.max(1-h,0)*(a.reverseOrder?(a.rows+a.columns-(b+k))*a.interval:(b+k)*a.interval);var q={},l=m.style;a.fade&&(q.opacity=a.unhide?{start:"0",end:"1"}:{end:"0"});1==a.columns?e=g:1==a.rows&&(g=!e);k=parseInt(l.left);var r=parseInt(l.top),t=a.distance*f.w;f=a.distance*f.h;a.unhide?e==g?q.left=e?{start:k-t,end:k}:{start:k+t,end:k}:q.top=e?{start:r+f,end:r}:{start:r-f,end:r}:e==g?q.left=e?{end:k-t}:{end:k+t}:q.top=e?{end:r+
f}:{end:r-f};return y.animateProperty({node:m,duration:p,delay:b,easing:a.easing||w.sinInOut,properties:q,beforeBegin:a.unhide?function(){a.fade&&(l.opacity="0");e==g?l.left=q.left.start+"px":l.top=q.top.start+"px"}:void 0})};var d=v._split(a);a.unhide?u.connect(d,"onEnd",d,function(){n.style(c,{opacity:"1"})}):u.connect(d,"onPlay",d,function(){n.style(c,{opacity:"0"})});return d},unShear:function(a){a.unhide=!0;return v.shear(a)},pinwheel:function(a){var c=a.node=x.byId(a.node);a.rows=a.rows||4;
a.columns=a.columns||4;a.duration=a.duration||1E3;a.interval=a.interval||0;a.distance=a.distance||1;a.random=a.random||0;"undefined"==typeof a.fade&&(a.fade=!0);var h=a.duration-(a.rows+a.columns)*Math.abs(a.interval);a.pieceAnimation=function(d,m,b,k){var f=k.h/a.rows,e=k.w/a.columns,g=!(m%2),q=!(b%2);m=Math.random()*h*a.random+Math.max(1-a.random,0)*(0>a.interval?(a.rows+a.columns-(m+b))*a.interval*-1:(m+b)*a.interval);b={};var l=d.style;a.fade&&(b.opacity=a.unhide?{start:0,end:1}:{end:0});1==a.columns?
g=!q:1==a.rows&&(q=g);var r=parseInt(l.left),t=parseInt(l.top);g&&(q?b.top=a.unhide?{start:t+f*a.distance,end:t}:{start:t,end:t+f*a.distance}:b.left=a.unhide?{start:r+e*a.distance,end:r}:{start:r,end:r+e*a.distance});g!=q?b.width=a.unhide?{start:e*(1-a.distance),end:e}:{start:e,end:e*(1-a.distance)}:b.height=a.unhide?{start:f*(1-a.distance),end:f}:{start:f,end:f*(1-a.distance)};return y.animateProperty({node:d,duration:h,delay:m,easing:a.easing||w.sinInOut,properties:b,beforeBegin:a.unhide?function(){a.fade&&
n.style(d,"opacity",0);g?q?l.top=t+f*(1-a.distance)+"px":l.left=r+e*(1-a.distance)+"px":(l.left=r+"px",l.top=t+"px");g!=q?l.width=e*(1-a.distance)+"px":l.height=f*(1-a.distance)+"px"}:void 0})};var p=v._split(a);a.unhide?u.connect(p,"onEnd",p,function(){n.style(c,{opacity:"1"})}):u.connect(p,"play",p,function(){n.style(c,{opacity:"0"})});return p},unPinwheel:function(a){a.unhide=!0;return v.pinwheel(a)},blockFadeOut:function(a){var c=a.node=x.byId(a.node);a.rows=a.rows||5;a.columns=a.columns||5;a.duration=
a.duration||1E3;a.interval=a.interval||a.duration/(a.rows+2*a.columns);a.random=a.random||0;var h=Math.abs(a.random),p=a.duration-(a.rows+a.columns)*a.interval;a.pieceAnimation=function(m,b,k,f){return y.animateProperty({node:m,duration:p,delay:Math.random()*a.duration*h+Math.max(1-h,0)*(a.reverseOrder?(a.rows+a.columns-(b+k))*Math.abs(a.interval):(b+k)*a.interval),easing:a.easing||w.sinInOut,properties:{opacity:a.unhide?{start:"0",end:"1"}:{start:"1",end:"0"}},beforeBegin:a.unhide?function(){n.style(m,
{opacity:"0"})}:function(){m.style.filter=""}})};var d=v._split(a);a.unhide?u.connect(d,"onEnd",d,function(){n.style(c,{opacity:"1"})}):u.connect(d,"onPlay",d,function(){n.style(c,{opacity:"0"})});return d},blockFadeIn:function(a){a.unhide=!0;return v.blockFadeOut(a)}});return J});