function timedRefresh() {
  
  //count numtweets present
  var numTweets = $('.tweet').length;
  //alert(numTweets);
  //calculate timeout
  var timeoutPeriod = numTweets * 5000;
  //alert(timeoutPeriod);
  //alert("Just refreshed");
  setTimeout("location.reload(true);",timeoutPeriod);
}
$(function(){
      $('#tweets-container').vTicker({
        speed: 1500,
        pause: 5000,
        animation: 'fade',
        mousePause: false,
        showItems: 3
      });     
});

