var jsonFeedUrl = 'http://api.flickr.com/services/feeds/photos_public.gne?id=40765860@N02&lang=en-us&format=json&jsoncallback=?';

function SetupSlideshow(){
	//Get the feed and insert into DOM
	$.getJSON(jsonFeedUrl, 
		function(data){
		  $.each(data.items, 
				  function(i,item){
				    var images = $("<img/>").attr("src", item.media.m).css("width", "238px").css("border", "0px");
				    images.appendTo("#Slideshow").wrap("<a target='_blank' href='" + item.link + "'></a>");
				    
				    $('#Slideshow').cycle({
						fx: 'fade',
						random: 1,
						speed: 3000, //transition speed
						timeout: 10000  //time pic is up
					});
				    
				  });
		});
}

//Set up some images for hover growth
$(document).ready(function() {
	   // put all your jQuery goodness in here.
	SetupSlideshow();

});

