function wswt() {

	$.get("http://" + window.location.hostname + "/what_song_was_that/view/feed.php?x=4",null,
			function(data, textStatus, XMLHttpRequest) {
				if(textStatus == 'success') {
				
					var count = 1;
					var recentlyPlayed = '';
					var nowPlaying = '';
					
					$(data).find("song").each( function() {
						if( count == 1 ) {
							nowPlaying = nowPlaying + $(this).find("title").text() + ' by ' + $(this).find("artist").text() + '<br />';
						} else {
							recentlyPlayed = recentlyPlayed + $(this).find("title").text() + ' by ' + $(this).find("artist").text() + '<br />';
						}
						count = count + 1;
					});
					
					$("#recently_played").html(recentlyPlayed);
					$("#now_playing").html(nowPlaying);
				} else {
					//TODO: remove this
					alert("FAIL");
				}
			},"xml"
		);
	setTimeout('wswt()',5000);
}
