function pullLastTweet(username){
	var url = "http://twitter.com/status/user_timeline/" + username + ".json?count=3&callback=?";
	$.getJSON(url, function(data){
		$("header aside blockquote").html(data[0].text);
	});
};
function flickr(){
	var key = 'ca32e79d86792b9b2be5278b9670f174', page = 1;
	//var url = "http://api.flickr.com/services/rest/?method=flickr.interestingness.getList&api_key=" + key + "&per_page=16&extras=url_o,url_m,url_s&page=" + page + "&format=json&jsoncallback=?";
	var url = "http://api.flickr.com/services/feeds/photos_public.gne?id=25191627@N00&lang=en-us&format=json?&api_key=" + key + "&per_page=16&extras=url_o,url_m,url_s&page=" + page + "&format=json&jsoncallback=?";
	
	jQuery.getJSON(url, function(data){
		$.each(data.items, function(i, item){
			var href =  $("<a/>").attr("href", item.link).attr("title", item.title).attr({ target: "_blank" }).html($("<img/>").attr("src", item.media.m).attr("alt", item.title));
			$("<li>").html($("<figure />").html(href)).appendTo("#flickr ul");
		});
		
	});
};
var _config = {
	username: 'marveling_one',
	placeholder: 'lastfmrecords',
	//defaultthumb: 'http://cdn.last.fm/depth/catalogue/noimage/cover_85px.gif',
	count: 16,
	period: 'lovedtracks',
	refresh: 10,
	offset: -6
};
$(document).ready(function(){	
	if ($('body>footer').is(":visible")) {
		pullLastTweet('Emergence');
		flickr();
		//lastFmRecords.debug();
		lastFmRecords.init(_config);
	//$('#flickr a:visible').lightBox();
	//$('#lastfmrecords a:visible').lightBox();
	}
});




