//Preload Variables FeaturedNews = new Array(); FeaturedNews1 = new Array(); FeaturedNews2 = new Array(); FeaturedNews[0]='work up a sweat while improving your inner chi'; FeaturedNews1[0]='toronto life'; FeaturedNews2[0]=''; FeaturedNews[1]=''; FeaturedNews1[1]='best health magazine'; FeaturedNews2[1]=''; FeaturedNews[2]='It\'s that kind of attention to detail, to balance...'; FeaturedNews1[2]='toronto star'; FeaturedNews2[2]=''; FeaturedNews[3]='what a brilliant concept! pump it up and stretch it out!'; FeaturedNews1[3]='lifestyle boost'; FeaturedNews2[3]=''; FeaturedNews[4]='surprisingly, the hybrid makes perfect sense. '; FeaturedNews1[4]='blogTO'; FeaturedNews2[4]=''; FeaturedNews[5]='detox yoga, spinning and more on the menu...'; FeaturedNews1[5]='fashion magazine'; FeaturedNews2[5]=''; var AllNews = FeaturedNews.length - 1; var CurrentNews = -1; function TimedSwitch() { CurrentNews = CurrentNews + 1; if(CurrentNews > AllNews){ CurrentNews = 0; } $("#featurednews").animate({opacity: 0.1},700,'',function(){ document.getElementById('featurednews').innerHTML = FeaturedNews[CurrentNews]; document.getElementById('featurednews_ttyl').innerHTML = FeaturedNews1[CurrentNews]; document.getElementById('featurednews_url').innerHTML = FeaturedNews2[CurrentNews]; $("#featurednews").animate({opacity: 1.0},700); }); Timer=setTimeout("TimedSwitch()",10000); } $(document).ready(function(){ TimedSwitch(); });