function showScrobbles(elem, username, number)
{
	var myScrobble = '<ul>';

var lastUrl = 'http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user='+username+'&api_key=0371009a655ec27b19f1348ad63002ac&limit='+number+'&format=json&callback=?'
	
	$.getJSON(lastUrl, function(data){ 
		
		$.each(data.recenttracks.track, function(i, item){

			if ($(this).attr("@attr")) {
				
			} else {
				myScrobble+='<li class="clearfix">';
				if ( item.image[0]['#text'] == '' ) {
					var albumart = '/static/images/noart.jpg';
				} else {
					var albumart = item.image[0]['#text'];
				}
				myScrobble+='<div class="thumb"><a href="'+item.url+'"><img src="'+albumart+'" alt="'+ item.album['#text']+'" title="'+ item.album['#text']+'"/></a></div><div class="details"><a href="'+item.url+'">'+item.artist['#text']+' - '+item.name+'</a><span>'+item.date['#text']+'</span></div></li>';
				
			}			
		})
		
		myScrobble+="</ul>";
		
		elem.children().fadeOut('fast',function() {
			
			elem.append(myScrobble);
			
		})
		
	})
}
	$(function() {
		$('.dataError').remove();
		$('#preloadscrob').show();
		showScrobbles($('#scrobbles'), 'erebusstyx', 3)
		
	});
