﻿var twitterScrollSpeed = 10000;

$(document).ready(function(){
     
    $(window).load(function(){
        
        var twitter_timer = setInterval(function(){
                rotateTwitterFeed();
            }, twitterScrollSpeed); 
        
        $("#twtr-widget-1").hover(function(){
            clearInterval(twitter_timer);
            },function(){
                twitter_timer = setInterval(function(){
                rotateTwitterFeed();
            }, twitterScrollSpeed); 
            
            });
        
        $(".twtr-join-conv").text("Follow Me");        
    }); 
});

function rotateTwitterFeed(){

   if($(".twtr-tweets").length != 0){        
        var first = $(".twtr-tweet").first();
        var last = $(".twtr-tweet").last();         
        
        last.prependTo(last.parent())
        last.css("margin-top", -last.height());
        last.animate({marginTop: 0}, 1000);
                
        //last.prependTo(last.parent()).hide().slideDown(1000);  
   }
}
