// Menu Animation Effects Add-on Module (v 1.0)

// THIS FILE MAY NOT BE MODIFIED

// Copyright (C) 2008 WUI Labs. All rights reserved


function MFx(){var a=arguments.callee,H="auto",c="px",d="-10000px",I=1,f=2,g=3,h=4,J=5,j=6,k=7,K=[],m;a.createOutline=function(){var n=document.createElement("div");n.style.left=n.style.top=d;n.style.position="absolute";n.style.border="1px solid "+a.outlineColor;return n;};function o(p,q,L,s,M){p.style.clip="rect("+q+","+L+","+s+","+M+")";}function u(){if(m){clearInterval(m);m=0;}}this.stopInterval=function(p,outline){for(var v=0;v<K.length;++v){var w=K[v];if(p==w.p){K.pop(w);return;}}u();if(a.type==f&&outline)outline.style.left=outline.style.top=d;};this.trans=function(p,left,top,N,y,outline,z){if(m){K.push({p:p,left:left,top:top,N:N});return;}var A=a.type,inc=a.inc,B,C,D,E;if(!A)return;function F(){p.style.left=left+c;p.style.top=top+c;u();}function G(){if(K.length){var w=K.pop();p=w.p;left=w.left;top=w.top;N=w.N;}B=p.offsetWidth-(A==f?z*2:0);C=p.offsetHeight-(A==f?z*2:0);if(A==I){D=20;y=y?y:100;}else if(A==g||A==j){D=p.offsetWidth;E=p.offsetHeight;}else if(A==k){D=p.offsetWidth;E=0;}else D=E=0;}G();m=setInterval(function(){if(!m)return;if(A==I){if(K.length){a.setOpacityPtr(p,y);G();}else if(D==y)u();else{if(a.topLevelOnly&&!N)F();else{D+=a.IE?20:5;D=Math.min(D,y);a.setOpacityPtr(p,D);p.style.left=left+c;p.style.top=top+c;}}}else if(A==f){if(D==B&&E==C){if(K.length)G();else{outline.style.left=outline.style.top=d;p.style.left=left+c;p.style.top=top+c;u();}}else{if(a.topLevelOnly&&!N)F();else{D=Math.min(D+inc,B);E=Math.min(E+inc,C);outline.style.width=D+c;outline.style.height=E+c;outline.style.left=left+(B-D)/2+c;outline.style.top=top+(C-E)/2+c;}}}else if(A==g){if(!E){if(K.length)G();else u();}else{if(a.topLevelOnly&&!N)F();else{E=Math.max(E-inc,0);o(p,E+c,H,H,H);p.style.left=left+c;p.style.top=top-E+c;}}}else if(A==h){if(D==B){if(K.length)G();else u();}else{if(a.topLevelOnly&&!N)F();else{D=Math.min(D+inc,B);o(p,H,D+c,H,H);p.style.left=left+c;p.style.top=top+c;}}}else if(A==J){if(D==B&&E==C){if(K.length)G();else u();}else{if(a.topLevelOnly&&!N)F();else{D=Math.min(D+inc,B);E=Math.min(E+inc,C);o(p,H,D+c,E+c,H);p.style.left=left+c;p.style.top=top+c;}}}else if(A==j){if(!D){if(K.length)G();else u();}else{if(a.topLevelOnly&&!N)F();else{D=Math.max(D-inc,0);p.style.left=left+c;p.style.top=top+c;o(p,H,H,H,D+c);}}}else{if(!D&&E==C){if(K.length)G();else u();}else{if(a.topLevelOnly&&!N)F();else{D=Math.max(D-inc,0);E=Math.min(E+inc,C);o(p,H,H,E+c,D+c);p.style.left=left+c;p.style.top=top+c;}}}},a.delay);};}MFx.type=0;MFx.delay=MFx.inc=20;MFx.outlineColor="black";
