window.addEvent('domready', function() {
	$$('.feature_tile a').setStyle('opacity', .7);
	
	$$('.feature_tile a').addEvents({
					'mouseenter': function(){
						this.set('tween', {
							duration: 500,
							transition: Fx.Transitions.Quad.easeOut
						}).tween('opacity', 1);
					},
					'mouseleave': function(){
						this.set('tween', {}).tween('opacity', .7);
					}
				});
	

	function moveTicker(){
		maxHeight = $$('#latest_news_ticker ul').getStyle('height');
		currentTop = $$('#latest_news_ticker ul').getStyle('top');
		$$('#latest_news_ticker ul').removeClass();
		maxHeight = parseInt(maxHeight);
		currentTop = parseInt(currentTop);
		lineHeight = 15;
		if((currentTop + maxHeight) == 15){
			nextTop = 0;
			$$('#latest_news_ticker ul').setStyle('top', (lineHeight));
			$$('#latest_news_ticker ul').set('tween', {
							duration: 1000,
							transition: Fx.Transitions.Quad.easeOut
			}).tween('top', 0);
		}else{	
			nextTop = currentTop - lineHeight;
			$$('#latest_news_ticker ul').set('tween', {
							duration: 1000,
							transition: Fx.Transitions.Quad.easeOut
			}).tween('top', (nextTop));			
			$$('#latest_news_ticker ul').setStyle('top',(nextTop));
		}
	}
	moveTicker.periodical(5000);
	    
	    
	   
});