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