(function(t){t.cjTextFx=function(I){function J(q,p){if(r.length)if(q)for(;r.length;)y(r[0]),r.shift();else for(var t=p.length,u;t--;)for(u=r.length;u--;)if(p[t]===r[u].object){y(r[u]);r.splice(u,1);break}}function y(q){clearTimeout(q.start);clearInterval(q.timer);for(var p=q.array;p.length;)t(p[0]).stop(!0),p.shift();p=t(q.object);p.unbind("click",q.linkHandler);q.restore&&(p.empty(),p.html(q.html));p.css("visibility","hidden")}var r=[];t.cjTextFx.animate=function(q,p){function y(a){for(var b in a)a.hasOwnProperty(b)&& (o[b]=a[b]);u()}function u(){D=o.animationType.toLowerCase()==="in"?!0:!1;h=o.onComplete;E=o.onStart;K=o.onCompleteParams;L=o.onStartParams;M=o.linkTarget;F=o.hyperlink;j=o.sequenceDelay;G=o.startDelay;m=o.offsetX;i=o.offsetY;v=o.animation;d=o.easing;g=o.speed}function N(){M==="_parent"?window.location=F:window.open(F)}function R(){E(L)}function l(){h(K)}function S(){a<n?(h&&a===k&&(b=l),e[a].css({position:"absolute",left:f[a]+m,top:0,visibility:"visible"}).animate({left:f[a],opacity:1},g,d,b),a++): clearInterval(c)}function T(){a>-1?(h&&a===0&&(b=l),e[a].css({position:"absolute",left:f[a]-m,top:0,visibility:"visible"}).animate({left:f[a],opacity:1},g,d,b),a--):clearInterval(c)}function U(){a>-1?(h&&a===0&&(b=l),e[a].animate({left:f[a]+m,opacity:0},g,d,b),a--):clearInterval(c)}function V(){a<n?(h&&a===k&&(b=l),e[a].animate({left:f[a]-m,opacity:0},g,d,b),a++):clearInterval(c)}function W(){a<n?(h&&a===k&&(b=l),e[a].css({position:"absolute",left:f[a],top:-i,visibility:"visible"}).animate({top:0, opacity:1},g,d,b),a++):clearInterval(c)}function X(){a>-1?(h&&a===0&&(b=l),e[a].css({position:"absolute",left:f[a],top:-i,visibility:"visible"}).animate({top:0,opacity:1},g,d,b),a--):clearInterval(c)}function Y(){a>-1?(h&&a===0&&(b=l),e[a].animate({top:-i,opacity:0},g,d,b),a--):clearInterval(c)}function Z(){a<n?(h&&a===k&&(b=l),e[a].animate({top:-i,opacity:0},g,d,b),a++):clearInterval(c)}function $(){a<n?(h&&a===k&&(b=l),e[a].css({position:"absolute",left:f[a],top:i,visibility:"visible"}).animate({top:0, opacity:1},g,d,b),a++):clearInterval(c)}function aa(){a>-1?(h&&a===0&&(b=l),e[a].css({position:"absolute",left:f[a],top:i,visibility:"visible"}).animate({top:0,opacity:1},g,d,b),a--):clearInterval(c)}function ba(){a>-1?(h&&a===0&&(b=l),e[a].animate({top:i,opacity:0},g,d,b),a--):clearInterval(c)}function ca(){a<n?(h&&a===k&&(b=l),e[a].animate({top:i,opacity:0},g,d,b),a++):clearInterval(c)}function da(){a<n?(h&&a===k&&(b=l),e[a].css({position:"absolute",left:f[a]+m,top:-i,visibility:"visible"}).animate({top:0, left:f[a],opacity:1},g,d,b),a++):clearInterval(c)}function ea(){a>-1?(h&&a===0&&(b=l),e[a].css({position:"absolute",left:f[a]+m,top:-i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a--):clearInterval(c)}function fa(){a>-1?(h&&a===0&&(b=l),e[a].animate({left:f[a]+m,top:-i,opacity:0},g,d,b),a--):clearInterval(c)}function ga(){a<n?(h&&a===k&&(b=l),e[a].animate({left:f[a]+m,top:-i,opacity:0},g,d,b),a++):clearInterval(c)}function ha(){h&&a===k&&(b=l);a<n?(e[a].css({position:"absolute", left:f[a]+m,top:i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a++):clearInterval(c)}function ia(){h&&a===0&&(b=l);a>-1?(e[a].css({position:"absolute",left:f[a]+m,top:i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a--):clearInterval(c)}function ja(){h&&a===0&&(b=l);a>-1?(e[a].animate({left:f[a]+m,top:i,opacity:0},g,d,b),a--):clearInterval(c)}function ka(){h&&a===k&&(b=l);a<n?(e[a].animate({left:f[a]+m,top:i,opacity:0},g,d,b),a++):clearInterval(c)}function la(){a< n?(h&&a===k&&(b=l),e[a].css({position:"absolute",left:f[a]-m,top:-i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a++):clearInterval(c)}function ma(){a>-1?(h&&a===0&&(b=l),e[a].css({position:"absolute",left:f[a]-m,top:-i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a--):clearInterval(c)}function na(){a>-1?(h&&a===0&&(b=l),e[a].animate({left:f[a]-m,top:-i,opacity:0},g,d,b),a--):clearInterval(c)}function oa(){a<n?(h&&a===k&&(b=l),e[a].animate({left:f[a]-m,top:-i, opacity:0},g,d,b),a++):clearInterval(c)}function pa(){h&&a===k&&(b=l);a<n?(e[a].css({position:"absolute",left:f[a]-m,top:i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a++):clearInterval(c)}function qa(){h&&a===0&&(b=l);a>-1?(e[a].css({position:"absolute",left:f[a]-m,top:i,visibility:"visible"}).animate({top:0,left:f[a],opacity:1},g,d,b),a--):clearInterval(c)}function ra(){h&&a===0&&(b=l);a>-1?(e[a].animate({left:f[a]-m,top:i,opacity:0},g,d,b),a--):clearInterval(c)}function sa(){h&& a===k&&(b=l);a<n?(e[a].animate({left:f[a]-m,top:i,opacity:0},g,d,b),a++):clearInterval(c)}function ta(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a],top:i,visibility:"visible"}).animate({top:0,opacity:1},g,d,b):e[a].css({position:"absolute",left:f[a],top:-i,visibility:"visible"}).animate({top:0,opacity:1},g,d,b),a++):clearInterval(c)}function ua(){a>-1?(h&&a===0&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a],top:i,visibility:"visible"}).animate({top:0,opacity:1},g, d,b):e[a].css({position:"absolute",left:f[a],top:-i,visibility:"visible"}).animate({top:0,opacity:1},g,d,b),a--):clearInterval(c)}function va(){a>-1?(h&&a===0&&(b=l),a%2===0?e[a].animate({top:i,opacity:0},g,d,b):e[a].animate({top:-i,opacity:0},g,d,b),a--):clearInterval(c)}function wa(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].animate({top:i,opacity:0},g,d,b):e[a].animate({top:-i,opacity:0},g,d,b),a++):clearInterval(c)}function xa(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a]+m,top:i, visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b):e[a].css({position:"absolute",left:f[a]+m,top:-i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b),a++):clearInterval(c)}function ya(){a>-1?(h&&a===0&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a]+m,top:i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b):e[a].css({position:"absolute",left:f[a]+m,top:-i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b),a--):clearInterval(c)}function za(){a> -1?(h&&a===0&&(b=l),a%2===0?e[a].animate({left:f[a]+m,top:i,opacity:0},g,d,b):e[a].animate({left:f[a]+m,top:-i,opacity:0},g,d,b),a--):clearInterval(c)}function Aa(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].animate({left:f[a]+m,top:i,opacity:0},g,d,b):e[a].animate({left:f[a]+m,top:-i,opacity:0},g,d,b),a++):clearInterval(c)}function Ba(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a]-m,top:i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b):e[a].css({position:"absolute", left:f[a]-m,top:-i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b),a++):clearInterval(c)}function Ca(){a>-1?(h&&a===0&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a]-m,top:i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b):e[a].css({position:"absolute",left:f[a]-m,top:-i,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b),a--):clearInterval(c)}function Da(){a>-1?(h&&a===0&&(b=l),a%2===0?e[a].animate({left:f[a]-m,top:i,opacity:0},g,d,b):e[a].animate({left:f[a]- m,top:-i,opacity:0},g,d,b),a--):clearInterval(c)}function Ea(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].animate({left:f[a]-m,top:i,opacity:0},g,d,b):e[a].animate({left:f[a]-m,top:-i,opacity:0},g,d,b),a++):clearInterval(c)}function Fa(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].css({position:"absolute",left:f[a]+Math.random()*m|0,top:Math.random()*-i|0,visibility:"visible"}).animate({left:f[a],top:0,opacity:1},g,d,b):e[a].css({position:"absolute",left:f[a]+Math.random()*-m|0,top:Math.random()*i|0,visibility:"visible"}).animate({left:f[a], top:0,opacity:1},g,d,b),a++):clearInterval(c)}function Ga(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].animate({left:f[a]+Math.random()*m|0,top:Math.random()*-i|0,opacity:0},g,d,b):e[a].animate({left:f[a]+Math.random()*-m|0,top:Math.random()*i|0,opacity:0},g,d,b),a++):clearInterval(c)}function Ha(){a<n?(h&&a===k&&(b=l),e[a].animate({left:f[a],top:0},g,d,b),a++):clearInterval(c)}function Ia(){a<n?(h&&a===k&&(b=l),a%2===0?e[a].animate({left:f[a]+Math.random()*m|0,top:Math.random()*-i|0}):e[a].animate({left:f[a]+ Math.random()*-m|0,top:Math.random()*i|0}),a++):clearInterval(c)}function O(){a<n?(h&&a===k&&(b=l),e[a].css({position:"absolute",left:f[a],top:0,visibility:"visible"}).animate({opacity:1},g,d,b),a++):clearInterval(c)}function Ja(){a>-1?(h&&a===0&&(b=l),e[a].css({position:"absolute",left:f[a],top:0,visibility:"visible"}).animate({opacity:1},g,d,b),a--):clearInterval(c)}function P(){a>-1?(h&&a===0&&(b=l),e[a].animate({opacity:0},g,d,b),a--):clearInterval(c)}function Ka(){a<n?(h&&a===k&&(b=l),e[a].animate({opacity:0}, g,d,b),a++):clearInterval(c)}function La(){a<n?(h&&a===k&&(b=l),A=e[a].height(),e[a].css({position:"absolute",left:f[a],top:0,height:0,visibility:"visible"}).animate({height:A,opacity:1},g,d,b),a++):clearInterval(c)}function Ma(){a>-1?(h&&a===0&&(b=l),A=e[a].height(),e[a].css({position:"absolute",left:f[a],top:0,height:0,visibility:"visible"}).animate({height:A,opacity:1},g,d,b),a--):clearInterval(c)}function Na(){a>-1?(h&&a===0&&(b=l),e[a].animate({height:0,opacity:0},g,d,b),a--):clearInterval(c)} function Oa(){a<n?(h&&a===k&&(b=l),e[a].animate({height:0,opacity:0},g,d,b),a++):clearInterval(c)}var K,L,h,M,F,s,D,b,Q,m,i,B,E,d,j,G,g,v,a,H,z,A,c,k,f,C,n,w,e,x,o={animation:1,animationType:"in",backwards:!1,easing:"easeOutQuint",sequenceDelay:100,startDelay:0,speed:1E3,offsetX:100,offsetY:50,color:"#000",linked:!1,hyperlink:null,linkTarget:null,onComplete:null,onStart:null,onCompleteParams:null,onStartParams:null,restoreHTML:!0};u();I&&y(I);p&&y(p);s=t(q);if(s.length)if(s.length>1)alert("divs to animate must have a unique id or class (cannot be grouped)"); else{J(!1,[q]);Q=s.offset().left|0;f=[];e=[];a=0;o.linked&&s.css("cursor","pointer").click(N);s.css({color:o.color,height:s.height(),visibility:"visible",display:"block"});H=s.html();w=H.replace(/<\/?[^>]+>/igm,"");w=w.replace(/^\s+|\s+$/g,"");s.empty();n=w.length;k=n-1;for(x=0;x<n;x++)z=w.charAt(x),z===" "&&(z="&nbsp;"),span=t("<span />").html(z).appendTo(s),v!==12&&D&&span.css({opacity:0,visibility:"hidden"}),e[x]=span;B=setTimeout(function(){var b=o.backwards,d=n;if(v===11||v===12||v===14){var g= [],h;for(h=0;h<n;h++)g[h]=e[h];for(e=[];g.length>0;)h=Math.random()*g.length|0,e[e.length]=g[h],g.splice(h,1)}for(;d--;)f[d]=e[d].offset().left-Q;if(D)switch(v){case 1:b?(a=k,c=setInterval(T,j)):c=setInterval(S,j);break;case 2:b?(a=k,c=setInterval(X,j)):c=setInterval(W,j);break;case 3:b?(a=k,c=setInterval(aa,j)):c=setInterval($,j);break;case 4:b?(a=k,c=setInterval(ea,j)):c=setInterval(da,j);break;case 5:b?(a=k,c=setInterval(ia,j)):c=setInterval(ha,j);break;case 6:b?(a=k,c=setInterval(ma,j)):c=setInterval(la, j);break;case 7:b?(a=k,c=setInterval(qa,j)):c=setInterval(pa,j);break;case 8:b?(a=k,c=setInterval(ua,j)):c=setInterval(ta,j);break;case 9:b?(a=k,c=setInterval(ya,j)):c=setInterval(xa,j);break;case 10:b?(a=k,c=setInterval(Ca,j)):c=setInterval(Ba,j);break;case 11:c=setInterval(Fa,j);break;case 12:for(d=n;d--;)d%2===0?e[d].css({position:"absolute",left:f[d]+Math.random()*m|0,top:Math.random()*-i|0}):e[d].css({position:"absolute",left:f[d]+Math.random()*-m|0,top:Math.random()*i|0});c=setInterval(Ha,j); break;case 13:b?(a=k,c=setInterval(Ja,j)):c=setInterval(O,j);break;case 14:c=setInterval(O,j);break;case 15:b?(a=k,c=setInterval(Ma,j)):c=setInterval(La,j);break;default:alert("A number between 1-15 is required for the animation property")}else{for(d=n;d--;)e[d].css({position:"absolute",left:f[d],top:0});switch(v){case 1:b?(a=k,c=setInterval(U,j)):c=setInterval(V,j);break;case 2:b?(a=k,c=setInterval(Y,j)):c=setInterval(Z,j);break;case 3:b?(a=k,c=setInterval(ba,j)):c=setInterval(ca,j);break;case 4:b? (a=k,c=setInterval(fa,j)):c=setInterval(ga,j);break;case 5:b?(a=k,c=setInterval(ja,j)):c=setInterval(ka,j);break;case 6:b?(a=k,c=setInterval(na,j)):c=setInterval(oa,j);break;case 7:b?(a=k,c=setInterval(ra,j)):c=setInterval(sa,j);break;case 8:b?(a=k,c=setInterval(va,j)):c=setInterval(wa,j);break;case 9:b?(a=k,c=setInterval(za,j)):c=setInterval(Aa,j);break;case 10:b?(a=k,c=setInterval(Da,j)):c=setInterval(Ea,j);break;case 11:c=setInterval(Ga,j);break;case 12:c=setInterval(Ia,j);break;case 13:b?(a=k, c=setInterval(P,j)):c=setInterval(Ka,j);break;case 14:a=k;c=setInterval(P,j);break;case 15:b?(a=k,c=setInterval(Na,j)):c=setInterval(Oa,j);break;default:alert("A number between 1-15 is required for the animation property")}}E&&(B=setTimeout(R,j));for(d=r.length;d--;)if(r[d].id===C){r[d].timer=c;r[d].start=B;break}C=o=null},G===0?100:G);C=Math.random();r[r.length]={object:q,id:C,html:H,start:B,array:e,linkHandler:N,restore:o.restoreHTML};x=w=z=s=null}else alert("name of div to animate could not be found")}; t.cjTextFx.remove=function(q,p){J(q,p)}}})(jQuery);
