/// <reference path="jquery-1.4.1-vsdoc.js" />

var twitterScrollSpeed = 8000;

$(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 Us");   
          
        hidePermaLink();
    }); 
});

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);  
   }
}

function hidePermaLink(){
    var cnt = $(".BlogReadMore");
    
    var permalink = cnt.children(".BlogMoreLink:contains('PermaLink')").css("display", "none");
    
}
  
