(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:2E3,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(var g=0;g<c.length;g++)b(c[g]).css("z-index",String(c.length-
g)).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 h=Math.floor(Math.random()*c.length);setTimeout(function(){do f=Math.floor(Math.random()*c.length);while(h==f);b.innerfade.next(c,a,f,h)},a.timeout);b(c[h]).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){e.animationtype=="slide"?(b(d[c]).slideUp(e.speed),b(d[a]).slideDown(e.speed)):e.animationtype=="fade"?(b(d[c]).fadeOut(e.speed),b(d[a]).fadeIn(e.speed,function(){removeFilter(b(this)[0])})):alert("Innerfade-animationtype must either be 'slide' or 'fade'");if(e.type=="sequence")a+1<d.length?(a+=1,c=a-1):(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")};
