var currentComment = 0;

function onLoadFunction() {
  setInterval(rotateComments, '4000'); 
}

function rotateComments() {
  var comments = $$('#rotateComments div');
  $(comments[currentComment]).fade({ duration: 0.5, queue: { position: 'end', scope: 'rotateComments' }});
  
  newComment = Math.floor(Math.random() * comments.length);
  while (newComment == currentComment) {
    newComment =  Math.floor(Math.random() * comments.length);
  }
  currentComment = newComment;
  $(comments[newComment]).appear({ duration: 0.5, queue: { position: 'end', scope: 'rotateComments' }});
}
