function getLatestTweets() {
	var cutoff = new Date($('#tweets li:first .date').text());
	var query = Number(cutoff)/1000;
	//alert(Number(cutoff)/1000);
	$.ajax({
  		type: "GET",
  		url: "twitter.php",
  		data: ({date : query}),
  		success: function(data) {
  			$('#tweets').prepend(data);
  			$('#tweets li:first').slideDown('slow');
  			
  		}
  	});
}


$(document).ready(function(){
	//var timer = setInterval(getLatestTweets, 30000);
	
	var tweetTimer = setInterval(function() {
		$('#tweets li:last').hide();
		$('#tweets li:last').insertBefore('#tweets li:first');
		$('#tweets li:first').children().css('display','none');
		$('#tweets li:first').slideDown('slow', function() {
			$(this).children().fadeIn('slow');
			//$('#tweets li:first').fadeIn('slow');
		});
		
	}, 8000);
});
