(function(A){A.fn.innerfade=function(B){return this.each(function(){A.innerfade(this,B);});};A.innerfade=function(B,C){var E={animationtype:"fade",speed:"normal",type:"sequence",timeout:2000,containerheight:"auto",runningclass:"innerfade",children:null};if(C){A.extend(E,C);}if(E.children===null){var G=A(B).children();}else{var G=A(B).children(E.children);}if(G.length>1){A(B).css("position","relative").css("height",E.containerheight).addClass(E.runningclass);for(var D=0;D<G.length;D++){A(G[D]).css("z-index",String(G.length-D)).css("position","absolute").hide();}if(E.type=="sequence"){setTimeout(function(){A.innerfade.next(G,E,1,0);},E.timeout);A(G[0]).show();}else{if(E.type=="random"){var F=Math.floor(Math.random()*(G.length));setTimeout(function(){do{H=Math.floor(Math.random()*(G.length));}while(F==H);A.innerfade.next(G,E,H,F);},E.timeout);A(G[F]).show();}else{if(E.type=="random_start"){E.type="sequence";var H=Math.floor(Math.random()*(G.length));setTimeout(function(){A.innerfade.next(G,E,(H+1)%G.length,H);},E.timeout);A(G[H]).show();}else{alert("Innerfade-Type must either be 'sequence', 'random' or 'random_start'");}}}}};A.innerfade.next=function(D,B,E,C){if(B.animationtype=="slide"){A(D[C]).slideUp(B.speed);A(D[E]).slideDown(B.speed);}else{if(B.animationtype=="fade"){A(D[C]).fadeOut(B.speed);A(D[E]).fadeIn(B.speed,function(){removeFilter(A(this)[0]);});}else{alert("Innerfade-animationtype must either be 'slide' or 'fade'");}}if(B.type=="sequence"){if((E+1)<D.length){E=E+1;C=E-1;}else{E=0;C=D.length-1;}}else{if(B.type=="random"){C=E;while(E==C){E=Math.floor(Math.random()*D.length);}}else{alert("Innerfade-Type must either be 'sequence', 'random' or 'random_start'");}}setTimeout((function(){A.innerfade.next(D,B,E,C);}),B.timeout);};})(jQuery);function removeFilter(A){if(A.style.removeAttribute){A.style.removeAttribute("filter");}}