function initJScroll(p,c,cc,t,dur,wt){$j(p).show();$j(p+" a:first").addClass("active");var imH=(t=="height")?$j(c).height():$j(c).width();var imS=$j(cc+" div").size();var irH=imH*imS;$j(cc).css({t:irH});rotate=function(){var trID=$active.attr("rel")-1;var imRP=trID*imH;$j(p+" a").removeClass("active");$active.addClass("active");var mv=(t=="height")?{top:-imRP}:{left:-imRP};$j(cc).animate(mv,dur)};rotateSwitch=function(){play=setInterval(function(){$active=$j(p+" a.active").next();if($active.length===0){$active=$j(p+" a:first")}rotate()},wt)};rotateSwitch();$j(cc+" a").hover(function(){clearInterval(play)},function(){rotateSwitch()});$j(p+" a").click(function(){$active=$j(this);clearInterval(play);rotate();rotateSwitch();return false})}function initJFade(p,cc,dur,wt){$j(p).show();$j(p+" a:first").addClass("active");$prev=$j(cc+" div:first");$prev.addClass("active");slideSwitch=function(){play2=setInterval(function(){$active=$j(p+" a.active").next();if($active.length===0){$active=$j(p+" a:first")}change()},wt)};change=function(){$nxt=$j("#"+$active.attr("id").substr(1));$prev.addClass("active");$prev.addClass("last-active");$j(p+" a").removeClass("active");$active.addClass("active");$prev.css({opacity:1}).addClass("last-active").animate({opacity:0},dur);$nxt.css({opacity:0}).addClass("active").animate({opacity:1},dur);$prev=$nxt};slideSwitch();$j(cc+" a").hover(function(){clearInterval(play2)},function(){slideSwitch()});$j(p+" a").click(function(){$active=$j(this);clearInterval(play2);change();slideSwitch();return false})};


