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