Event.observe(window,'load',init);

function init()
{
    var imageIndex = ((Math.random()*7)+1).ceil();
    var comments = $$('div#commentHolder img');
    comments.each(function(elem){
        if(elem.id != "randComment"+imageIndex){
            elem.hide();
        } else {
            elem.show();
        }
    });
    
    var i=0;
	
	new PeriodicalExecuter(function()
		{
		if(i == comments.length) i = 0;
		for(n=1;n<comments.length;n++){
		    if("randComment"+n != comments[i].id){
		        Effect.Fade('randComment'+n, { duration: 1 });
		    } else {
		        Effect.Appear(comments[i].id, { duration: 2 });
		    }
		}
		
		i++;
	},5);
    
}
