var iAnime=function(){this.items=[]};(function(){iAnime.effects=[];function F(I,H,G,J){I.style.left=G+"px";I.style.top=J+"px"}function B(){}function D(L){if(D[L]){return D[L]}var J=[];var K=L+1;for(var H=0;H<L;H++){K*=(H+1)}var G=K;var I=1;for(H=0;H<L;H++){G=G/(L+1-H);I=I*(H+1);J[H]=K/G/I}D[L]=J;return J}iAnime.prototype={_citems:0,_timer:0,paused:false,delay:33};iAnime.prototype.add=function(I){if(!I.duration){I.duration=1}if(I.id){I.element=document.getElementById(I.id)}if(I.element){I._sx=I.element.offsetLeft;I._sy=I.element.offsetTop;I._draw=F}else{I._draw=B}if(!("x" in I)){I.x=I._sx}if(!("y" in I)){I.y=I._sy}I._dx=I.x-I._sx;I._dy=I.y-I._sy;I._st=this.paused?this.pTime:(1*(new Date));if(I.effect&&iAnime.effects[I.effect]){I.move=(I._dx==0&&I._dy==0)?B:F;I._draw=iAnime.effects[I.effect];if(I._draw.init){I._draw.init.call(I)}}if(I.cp){var H=D(I.cp.length);I._cx=[];I._cy=[];for(var G=0;G<I.cp.length;G++){I._cx[G]=H[G]*(I.cp[G].x-I._sx);I._cy[G]=H[G]*(I.cp[G].y-I._sy)}}this.items[this._citems++]=I;I._draw(I.element,0,I._sx,I._sy);if(this.paused==false){if(this._timer==0){C(this)}}return I};function C(G){G._timer=setInterval(function(){A.call(G)},G.delay)}function E(G){clearInterval(G._timer);G._timer=0}iAnime.prototype.addSequence=function(H){if(H.length==0){return }var J=H.shift();if(J[0]){this.addSequence(J);this.addSequence(H)}else{var G=this;var I=J.onComplete;J.onComplete=function(){if(I){I(J)}G.addSequence(H)};this.add(J)}};iAnime.prototype.pause=function(I){if(I){if(!this.paused){if(this._timer){E(this)}this.pTime=1*(new Date)}}else{if(this.paused&&this._citems>0){var H=1*(new Date)-this.pTime;for(var G=this._citems-1;G>=0;G--){this.items[G]._st+=H}C(this)}}this.paused=I};function A(){var H=1*(new Date);for(var J=this._citems-1;J>=0;J--){var N=this.items[J];var O=(H-N._st)/N.duration;if(O<1){if(N._draw.ratio){O=N._draw.ratio(O)}if(N._cx){var K=(1-O);var G=O;for(var I=0;I<N._cx.length;I++){G*=K}var M=N._sx;var L=N._sy;for(I=0;I<N._cx.length;I++){M+=G*N._cx[I];L+=G*N._cy[I];G=G/K*O}M+=G*N._dx;L+=G*N._dy;N._draw(N.element,O,M,L)}else{N._draw(N.element,O,N._sx+N._dx*O,N._sy+N._dy*O)}}else{N._draw(N.element,1,N._sx+N._dx,N._sy+N._dy);this.items[J]=this.items[--this._citems];this.items[this._citems]=null;if(N.onComplete){N.onComplete()}}}if(this._citems==0){E(this)}}})();(function(){iAnime.effects.fadeout=function(F,E,D,G){this.move(F,E,D,G);iBrowse.setOpacity(F,1-E)};iAnime.effects.fadein=function(F,E,D,G){this.move(F,E,D,G);iBrowse.setOpacity(F,E)};iAnime.effects.show=function(F,E,D,G){this.move(F,E,D,G);F.style.visibility="visible"};iAnime.effects.hide=function(F,E,D,G){F.style.visibility="hidden";this.move(F,E,D,G)};iAnime.effects.blink=function(G,F,D,H){this.move(G,F,D,H);var E=Math.floor(F*((this.x_times-1)*2+1))%2;G.style.visibility=iAnime.effects.blink.visibility[E]};iAnime.effects.blink.visibility=["hidden","visible"];iAnime.effects.bounce=function(F,E,D,G){F.style.left=D+"px";F.style.top=G+"px"};iAnime.effects.bounce.ratio=function(E){if(E<0.66){return(E*E/0.66/0.66)}var D;if(E<0.88){D=2*(0.11-(E-0.77)*(E-0.77)/0.11)}else{if(E<0.96){D=(0.04-(E-0.92)*(E-0.92)/0.04)}else{D=(0.02-(E-0.98)*(E-0.98)/0.02)}}return 1-D};iAnime.effects.easein=function(F,E,D,G){F.style.left=D+"px";F.style.top=G+"px"};iAnime.effects.easein.ratio=function(D){return D*D};iAnime.effects.easeout=function(F,E,D,G){F.style.left=D+"px";F.style.top=G+"px"};iAnime.effects.easeout.ratio=function(D){return 1-(1-D)*(1-D)};iAnime.effects.easeinout=function(F,E,D,G){F.style.left=D+"px";F.style.top=G+"px"};iAnime.effects.easeinout.ratio=function(D){if(D<0.5){return D*D/0.5}return 1-(1-D)*(1-D)/0.5};iAnime.effects.elastic=function(F,E,D,G){F.style.left=D+"px";F.style.top=G+"px"};iAnime.effects.elastic.ratio=function(D){return 1-(1-D)*(1-D)*Math.cos(Math.PI*3.5*D)};iAnime.effects.jump=function(G,E,D,H){var F=(1-4*(E-0.5)*(E-0.5));G.style.left=D+this.j_x*F+"px";G.style.top=H+this.j_y*F+"px"};iAnime.effects.jump.init=function(){var D=Math.sqrt(this._dx*this._dx+this._dy*this._dy);this.j_x=-this._dy*this.x_height/D;this.j_y=this._dx*this.x_height/D};iAnime.effects.jumpbounce=function(G,E,D,H){var F;if(E<0.66){F=1-(E-0.33)*(E-0.33)/0.33/0.33}else{if(E<0.88){F=(1-(E-0.77)*(E-0.77)/0.11/0.11)/2}else{if(E<0.96){F=(1-(E-0.92)*(E-0.92)/0.04/0.04)/4}else{F=(1-(E-0.98)*(E-0.98)/0.02/0.02)/8}}}G.style.left=D+this.j_x*F+"px";G.style.top=H+this.j_y*F+"px"};iAnime.effects.jumpbounce.init=iAnime.effects.jump.init;iAnime.effects.settext=function(F,E,D,H){var G=this.text;iBrowse.setText(F,G.substr(0,Math.floor(G.length*E)));this.move(F,E,D,H)};iAnime.effects.style=function(G,F,D,H){this.move(G,F,D,H);for(var E in this.x_styles){this.x_styles[E](G,F)}};var B=[{match:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,push:function(L,I,H){var G=parseInt(I[1],16);var F=parseInt(H[1],16)-G;var E=parseInt(I[2],16);var D=parseInt(H[2],16)-E;var K=parseInt(I[3],16);var J=parseInt(H[3],16)-K;return function(N,M){N.style[L]="rgb("+Math.floor(G+M*F)+","+ +Math.floor(E+M*D)+","+ +Math.floor(K+M*J)+")"}}},{match:/([\d\.\-]+)([a-z]+)/,push:function(D,G,E){var I=parseInt(G[1]);var H=parseInt(E[1])-I;var F=G[2];return function(K,J){K.style[D]=(I+J*H)+F}}}];function A(D){return D.charAt(1).toUpperCase()}function C(D){return D.replace(/-[a-z]/g,A)}iAnime.effects.style.init=function(G){this.x_styles=[];for(var E in this.from){var I=this.from[E];var F=this.to[E];if(F==null){continue}for(var D in B){var J,H;J=I.match(B[D].match);H=F.match(B[D].match);if(J!=null&&H!=null){this.x_styles.push(B[D].push(C(E),J,H));break}}}}})();var iBrowse=function(){};(function(){var A=navigator.userAgent.toLowerCase();var B={userAgent:A,webkit:/webkit/.test(A),opera:/opera/.test(A),compatible:/compatible/.test(A),msie:/msie/.test(A),mozilla:/mozilla/.test(A)};B.msie=B.msie&&!B.opera;B.mozilla=B.mozilla&&!(B.compatible||B.webkit);iBrowse.env=B})();iBrowse.setOpacity=function(B,A){B.style.opacity=A};iBrowse.getWindowWidth=function(){return window.innerWidth};iBrowse.getWindowHeight=function(){return window.innerHeight};iBrowse.setText=function(A,B){A.innerText=B};iBrowse.setTextFF=function(A,B){A.textContent=B};(function(){if(iBrowse.env.mozilla){iBrowse.setText=iBrowse.setTextFF}})();iBrowse.setOpacityIE=function(B,A){B.style.filter="alpha(opacity="+A*100+")"};iBrowse.getWindowWidthIE=function(){return document.documentElement.clientWidth};iBrowse.getWindowHeightIE=function(){return document.documentElement.clientHeight};(function(){if(iBrowse.env.msie){iBrowse.setOpacity=iBrowse.setOpacityIE;iBrowse.getWindowWidth=iBrowse.getWindowWidthIE;iBrowse.getWindowHeight=iBrowse.getWindowHeightIE}})()