function jsonFlickrApi(rsp) {
	if (rsp.stat != "ok"){
  	// If this executes, something broke!
  	return;
 	}
 	//variable "s" is going to contain 
 	//all the markup that is generated by the loop below
 	var s = "";

 	//this loop runs through every item and creates HTML that will display nicely on your page
 	//this example displays 10 photos because because variable i is set to 10
 	//you can change that number depending on how many photos you want to show
 	//to show all the photos, replace that number with rsp.photos.photo.length
 	for (var i=0; i < 15; i++) {
  	photo = rsp.photos.photo[i];

  	//notice that "s.jpg" is where you change the size of the image
  	t_url = 'http://farm'+ photo.farm +'.static.flickr.com/'+ photo.server +'/'+ 
  	photo.id +'_'+ photo.secret +'_m.jpg';

  	p_url = 'http://www.flickr.com/photos/'+ photo.owner +'/'+ photo.id;

  	s += '<li><a href="'+ p_url +'" title="'+ photo.title +'"><img alt="'+ photo.title +'" src="'+ t_url +'" /></a></li>';
 	}

 	//this tells the JavaScript to write everything in variable s onto the page
 	document.writeln("<ul class=\"photos-holiday\">"+s+"</ul>"); 
}

$(document).ready( function() {
   
    $("a[href^='http://www.flickr.com/'], a[href^='http://www.hulu.com/']").click( function() {
				window.open(this.href,'external'); 
        return false;
    });
});

function jsonFlickrFeed(o){
  var i=0;
  document.write('<ul class=\"photos-holiday\">');
  while(o.items[i] && i < 20){
    document.write('<li><a href="'+ o.items[i].link +'" title=\"' + o.items[i].title +'\"><img src=\"' + o.items[i].media.m + '\" alt=\"' + o.items[i].title +'\" /></a></li>')
    i++;
  }
  document.write('</ul>');
}