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