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