	var user = 'pascalereynaud7';
	var album = 'masdesfigues';
	
	function startGallery() {
		var myGallery = new gallery($('myGallery'), {
			timed: true,
			showArrows: false,
			showCarousel: false,
			showInfopane: false,
			embedLinks: false,
			delay: 3000
		});
	}
	
	function addDiv(item)
	{
		var title = item.title.$t;// the filename
		var imgId = item.gphoto$id.$t;// the file id
		
		var targetURL     = item.content.src;//useful for downloading image
		var pictureURL    = item.content.src; //288
		var pictureURL2   = item.content.src + '?imgmax=72';
		var commentCount  = item.gphoto$commentCount.$t;
		var description   = item.media$group.media$description.$t;// Picasa Web photo caption
		//var keywords      = item.media$group.media$keywords.$t;// Picasa Web photo caption
		var description2      = "";
		
		// title
		title = "<a href='http://picasaweb.google.com/" + user + "/" + album + "/photo#" + imgId + "'>" + title + "</a>";
		
		var strHtml =	"<h3>" + title + "</h3>" + 
				"<p>" + description2 + "</p>" +
				"<a href='" + targetURL + "' title='open image' class='open'></a>" +
				"<img src='" + pictureURL + "' class='full' />" +
				"<img src='" + pictureURL2 + "' class='thumbnail' />";
			
				
		newDiv = document.createElement("div");
		newDiv.className = "imageElement";
		newDiv.innerHTML = strHtml;

		$('myGallery').appendChild(newDiv);
	}
	
	function renderer(data)
	{
		for (var i = 0; i < data.feed.entry.length; i++)
		{
			var item = data.feed.entry[i];
			addDiv(item);
		}
		startGallery();
	}
	/*window.addEvent('domready', function()
	{
			var script = 'http://picasaweb.google.com/data/feed/api/user/' + user + '/album/' + album + '?kind=photo&alt=json-in-script&callback=renderer&access=public&start-index=1';
			var myScript = new Asset.javascript(script, {id: 'picasa'});
	});*/