var Ticker2 /* :Object */ = { current /* :int */: 0, init /* :Function */ : function() /* :void */ { var divLatestNewsStories = document.getElementById("latest-news-stories"); if (!divLatestNewsStories) { return; } Ticker2.dts = divLatestNewsStories.getElementsByTagName("dt"); Ticker2.dds = divLatestNewsStories.getElementsByTagName("dd"); for(var i = 1; i < Ticker2.dts.length; i++) { new Effect.Parallel([ new Effect.Fade(Ticker2.dts[i], { duration : 0.1 }), new Effect.Fade(Ticker2.dds[i], { duration : 0.1 }) ]); } Ticker2.startTicker(); }, startTicker /* : Function */ : function() /* :void */ { Ticker2.interval = setInterval(Ticker2.doTicker, 4000); }, stopTicker /* : Function */ : function() /* :void */ { clearInterval(Ticker2.interval); }, doTicker /* : Function */ : function() /* :void */ { Ticker2.fadeCurrent(); Ticker2.incrementCurrent(); Ticker2.appearCurrent(); }, fadeCurrent /* : Function */ : function() /* :void */ { new Effect.Parallel([ new Effect.Fade(Ticker2.dts[Ticker2.current], { duration: 1.0, sync: true }), new Effect.Fade(Ticker2.dds[Ticker2.current], { duration: 1.0, sync: true }) ], { queue: "end" }); }, appearCurrent /* : Function */ : function() /* :void */ { new Effect.Parallel([ new Effect.Appear(Ticker2.dts[Ticker2.current], { duration: 1.0, sync: true }), new Effect.Appear(Ticker2.dds[Ticker2.current], { duration: 1.0, sync: true }) ], { queue: "end" }); }, incrementCurrent /* : Function */ : function() /* :void */ { Ticker2.current = (Ticker2.current + 1) % Ticker2.dts.length; } } addDOMLoadEvent(Ticker2.init);