

$(document).ready(function() {
	$("#twitter").getTwitter({
		userName: "DeanElmore",
		numTweets: 1,
		loaderText: "",
		slideIn: false,
		showHeading: false,
		headingText: "",
		showProfileLink: false,
		updateFn:  function(i, item) { 
				$("#twitter").append("<p>" + item.text + "</p><ul><li id='twitterWhen'>"+relative_created_at(item.created_at)+ " |</li><li><a href='http://twitter.com/DeanElmore'>Follow Kenn</a></li></ul>"); 

			    }
	});
});



$(document).ready(function() {
	$("#twitter_front").getTwitter({
		userName: "DeanElmore",
		numTweets: 1,
		loaderText: "",
		slideIn: false,
		showHeading: false,
		headingText: "",
		showProfileLink: false,
		updateFn:  function(i, item) { 				
				$("#twitter_front").append("<a href='http://twitter.com/DeanElmore'>" + item.text + "</a>");
				$("#twitter_front_when").append(relative_created_at(item.created_at)); 

			    }
	});
});





$(document).ready(function() {
	
	if ($("div.scrollable").length>0) {
	
	$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=29884803%40N04&lang=en-us&format=json&jsoncallback=?", function(data){
	  $.each(data.items, function(i,item){

	    	$("<img/>").attr("src", (item.media.m).replace("_m.jpg", "_s.jpg")).appendTo("#scroller").wrap("<a target='_blank' href='" + item.link + "'></a>");
	  });
	});
	

	$("div.scrollable").scrollable( {size:4, items:"#scroller", loop:true });
	
	}

	
});





function scrollDivRight(id) {
	var api = $("#"+id).scrollable(); 
	api.next();

}



function scrollDivLeft(id) {
	var api = $("#"+id).scrollable(); 
	api.prev();

}


