(function ($) {
	$(document).ready(function(){
		
		if($('#tweets_room').length>0)
		{
			window.setInterval(function(){				
				  $.get(Drupal.settings.basePath+"twitjs?mode=home", {},
				   function(data){				   
				    $('#tweets_room').animate({opacity:0.8},500,function(){
				    	$('#tweets_room').html(data);
				    	$('#tweets_room').animate({opacity:1},500);
				    });
				   });
				},30000);
		}
		if($('#tweets_room_sb').length>0)
		{
			window.setInterval(function(){				
				  $.get(Drupal.settings.basePath+"twitjs?mode=sb", {},
				   function(data){				
				    $('#tweets_room').animate({opacity:0.8},500,function(){
				    	$('#tweets_room').html(data);
				    	$('#tweets_room').animate({opacity:1},500);
				    });
				   });
				},30000);
		}
	});
})(jQuery);;

