/*=========================================================
// By Marcos Kuhns - HAIKU Learning Systems

// Based on jquery.innerfade.js
// Firma: Medienfreunde Hofmann & Baldes GbR
// Author: Torsten Baldes
// Web: http://medienfreunde.com
// and the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/
// and Ralf S. Engelschall http://trainofthoughts.org/
// ========================================================= */
(function(A){A.fn.innerfade=function(B){return this.each(function(){A.innerfade(this,B);});};A.fn.innerfadePlay=function(B){return this.each(function(){A.innerfade.change(this,1,true);});};A.fn.innerfadePause=function(B){return this.each(function(){A.innerfade.pause(this);});};A.fn.innerfadeNext=function(B){return this.each(function(){A.innerfade.change(this,1,false);});};A.fn.innerfadePrev=function(B){return this.each(function(){A.innerfade.change(this,-1,false);});};A.innerfade=function(B,D){var F={animationtype:"fade",speed:"normal",timeout:2000,containerheight:"auto",runningclass:"innerfade",children:null,controls:null},I,G,H,C;if(D){A.extend(F,D);}if(F.children===null){F.elements=A(B).children();}else{F.elements=A(B).children(F.children);}if(F.controls){C=F.controls;A(C).children(".prev").show();A(C).children(".pause").show();A(C).children(".next").show();}G=F.elements;if(G.length>1){A(B).css("position","relative").css("height",F.containerheight).addClass(F.runningclass);for(var E=0;E<G.length;E++){A(G[E]).css("z-index",String(G.length-E)).css("position","absolute").hide();}H=Math.floor(Math.random()*(G.length));H=F.current=(H+1)%G.length;F.timer=setTimeout(function(){A.innerfade.change(B,1,true);},F.timeout);B.innerfade=F;A(G[H]).show();}};A.innerfade.change=function(B,I,G){var D=B.innerfade,F=D.elements,C=D.controls,H=D.current,E;if((H+I)<0){H=F.length-1;E=0;}else{if((H+I)<F.length){H=H+I;E=H-I;}else{H=0;E=F.length-I;}}if(D.animationtype=="slide"){A(F[E]).slideUp(D.speed);A(F[H]).slideDown(D.speed);}else{if(D.animationtype=="fade"){A(F[E]).fadeOut(D.speed);A(F[H]).fadeIn(D.speed,function(){removeFilter(A(this)[0]);});}else{alert("Innerfade-animationtype must either be 'slide' or 'fade'");}}D.current=H;if(G){if(C){A(C).children(".play").hide();A(C).children(".pause").show();}D.timer=setTimeout((function(){A.innerfade.change(B,I,G);}),D.timeout);}else{A.innerfade.pause(B);}B.innerfade=D;};A.innerfade.pause=function(B){var D=B.innerfade,C=D.controls;if(C){A(C).children(".pause").hide();A(C).children(".play").show();}if(!isNaN(D.timer)){clearTimeout(D.timer);}D.timer=null;B.innerfade=D;};})(jQuery);function removeFilter(A){if(A.style.removeAttribute){A.style.removeAttribute("filter");}}