$(document).ready(function(){ 
  var searchTerm = 'jrock2004';
  $.getJSON( "http://search.twitter.com/search.json?q=" + searchTerm + "+-%40jrock2004&rpp=6&callback=?", function(data) {
  $.each(data.results, function() {
      $('<div></div>')
        .hide()
        .append('<span><a href="http://www.twitter.com/' 
          + this.from_user + '">' + this.from_user 
          + '</a>&nbsp;' + this.text + '</span>') 
        .appendTo('#tweets')
        .fadeIn();
    });
  });
  
  $('#refreshTweet').click(function(){
    $('#tweets').empty();
	var searchTerm = 'jrock2004';
  	$.getJSON( "http://search.twitter.com/search.json?q=" + searchTerm + "+-%40jrock2004&rpp=6&callback=?", function(data) {
  		$.each(data.results, function() {
      		$('<div></div>')
        		.hide()
        		.append('<span><a href="http://www.twitter.com/' 
          		+ this.from_user + '">' + this.from_user 
          		+ '</a>&nbsp;' + this.text + '</span>') 
        		.appendTo('#tweets')
        		.fadeIn();
    	});
  	});
  });
});