$(function(){
	$("#jquery-test").html("jQuery is loaded");
	/* This code is executed after the DOM has been completely loaded */
	
	$('nav a,footer a.up').click(function(e){
										  
		// If a link has been clicked, scroll the page to the link's hash target:
		
		$.scrollTo( this.hash || 0, 1000);
		e.preventDefault();
	});

	jQuery.getJSON('http://api.flickr.com/services/feeds/photoset.gne?api_key=71acf1b76b4b4b0d&perm=readset=72157626948542859&nsid=64611309@N03&lang=en-usformat=json&jsoncallback=?', function(data) {
    		console.info(data);
    
    		var my_items = [ ];
    
    		$.each(data.items, function(index, value) {
    			my_items.push( '<li><strong>Title: </strong>' + data.items[index].title + '<br />' + data.items[index].tags + '<br /><strong>Author: </strong>' + data.items[index].author + '<br /><img src="' + data.items[index].media.m + '"/></li>'  );
    			//console.log('index:' + index + ' value: ' + value );
    			//console.log( '<img src="' +data.items[index].media.m + '"/>');
    		});
   		
		 $('<ul/>', {
    			'class': 'my-new-list',
    			html: my_items.join('')
  		 }).appendTo('#pics');
});

});
