(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,F,C){var E=F;var G=C;if(B.animationtype=="slide"){A(D[G]).slideUp(B.speed,function(){A(D[E]).slideDown(B.speed)})}else{if(B.animationtype=="fade"){A(D[G]).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((F+1)<D.length){F=F+1;C=F-1}else{F=0;C=D.length-1}}else{if(B.type=="random"){C=F;while(F==C){F=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,F,C)}),B.timeout)}})(jQuery);function removeFilter(A){if(A.style.removeAttribute){A.style.removeAttribute("filter")}};