window.addEvent('domready', function() {

});

var index = 0;

var doRefresh = function() 
{
	index++;
	
	if( index > 4 )
		index = 1;

	for( i = 0 ; i < 4 ; i++ )
	{
		var div = $('score_charity_' + index );
		
		if( !$defined(div) )
			continue;
		
		if( div.getSize().y > 12 )
		{
			var myEffect = new Fx.Morph(div,{duration: 3000, transition: Fx.Transitions.linear});
			
			if( div.getStyle('top').toInt() == 0 )
				myEffect.start({'top': 12 - div.getSize().y });
			else
				myEffect.start({'top': 0});
				
			break;
		}
		
		index++;
	}
}

doRefresh.periodical(3000);	