/*
 * DOMEffects 0.2.6, Copyright (c) 2008 Pelle Wessman, <http://code.google.com/p/domeffects>, MIT Style License.
 */
var DOMEffects=function(){var A="visibility:",C="opacity",B="getOpacityRule";
return{getOpacityRule:function(D){this[B]=window.ActiveXObject?function(E){return C+":"+E+";filter:progid:DXImageTransform.Microsoft.Alpha("+C+"="+(E*100)+");"
}:function(E){return(E!==0?A+"visible;":A+"hidden;")+C+":"+E+";"};return this[B](D)}}}();DOMAssistant.attach(function(){var A="q",N="f",J="t",L="duration",K="s",H="a",C="easing",E="c",F="value",M="unit",P="color",I=setTimeout,G=false;
function D(R,S,U,T){return U*R/T+S}function B(){return new Date().getTime()}function Q(S){var R=/#([a-f0-9]{1,2})([a-f0-9]{1,2})([a-f0-9]{1,2})|rgba?\((\d+)\D+(\d+)\D+(\d+)\D*\d*\)/i;
Q=function(T){if(T=R.exec(T)){return{r:T[1]?parseInt(T[1]+(T[1].length===1?T[1]:""),16):parseInt(T[4],10),g:T[1]?parseInt(T[2]+(T[2].length===1?T[2]:""),16):parseInt(T[5],10),b:T[1]?parseInt(T[3]+(T[3].length===1?T[3]:""),16):parseInt(T[6],10)}
}};return Q(S)}function O(T,X){T.fx[K]=X;T.fx[N]=[];var V,R,W,U=[],S;for(R in T.fx[A][0][H]){V=T.fx[A][0][H][R];
S=typeof V==="object";if(S&&V[M]==="color"){if(typeof V[F]==="string"){V[F]=Q(V[F])}fromValue=Q(T.getStyle(R));
T.fx[N][T.fx[N].length]=fromValue?fromValue:{r:0,g:0,b:0}}else{if(!S){W={};W[F]=V;W[M]="px";V=W}else{V[M]=V[M]!==undefined?V[M]:"px"
}fromValue=parseFloat(T.getStyle(R));T.fx[N][T.fx[N].length]=isNaN(fromValue)?0:fromValue}V[H]=R;U[U.length]=V
}T.fx[A][0][H]=U}return{stop:function(){var R=this;if(R.fx&&R.fx[J]){clearTimeout(R.fx[J]);R.fx=G}return R
},animate:function(R,T){var V=$$(this),S={};T=T?T:{};S[H]=R;S[E]=T.callback;S[L]=T[L]?T[L]:1000;S[C]=T[C]?T[C]:D;
if(V.fx){V.fx[A].push(S)}else{V.fx={};V.fx[A]=[S];O(V,B());var U=function(){var W=B()-V.fx[K],b=V.fx[A][0],a=b[L],Y=";",X=0,c,Z,d;
if(a<W){W=a}for(;X<V.fx[A][0][H].length;X++){c=V.fx[A][0][H][X];d=V.fx[N][X];if(c[M]===P){Y+=c[H]+":rgb("+Math.floor(b[C](W,d.r,c[F].r-d.r,a))+","+Math.floor(b[C](W,d.g,c[F].g-d.g,a))+","+Math.floor(b[C](W,d.b,c[F].b-d.b,a))+")"
}else{Z=b[C](W,d,c[F]-d,a);Y+=c[H]==="opacity"?DOMEffects.getOpacityRule(Z):c[H]+":"+Z+c[M]+";"}}V.style.cssText+=Y;
if(a===W){if(typeof V.fx[A][0][E]==="function"){V.fx[A][0][E].call(V)}V.fx[A].shift();if(V.fx[A].length===0){V.fx=G;
return }else{O(V,V.fx[K]+W)}}V.fx[J]=I(U,30)};V.fx[J]=I(U,30)}return V}}}());
DOMAssistant.attach({highlight:function(C){var E=$$(this),G=typeof C,B=G==="object",D="color",H=(B&&C.front)?D:"background-color",A={},F=G==="string"?C:((B&&C[D])?C[D]:"#ff9");
A[H]={value:(B&&C.original)?C.original:E.getStyle(H),unit:D};if(A[H].value==="transparent"||A[H].value==="rgba(0, 0, 0, 0)"){A[H].value="#fff"
}if(B&&!C.nostop){E.stop()}return E.setStyle(H,F).animate(A,B?C:{})}});
DOMAssistant.attach({show:function(A){A=A?A:{};
var B=$$(this);if(A.duration===0){B.setStyle(DOMEffects.getOpacityRule(1))}else{var C={};C.duration=A.duration;
C.easing=A.easing;C.callback=A.callback;B.animate({opacity:{value:1,unit:""}},C)}return B},hide:function(A){A=A?A:{};
var B=$$(this);if(A.duration===0){B.setStyle(DOMEffects.getOpacityRule(0))}else{var C={};C.duration=A.duration;
C.easing=A.easing;C.callback=A.remove?function(){B.remove()}:A.callback;B.animate({opacity:{value:0,unit:""}},C)
}return B}});
