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