google.setOnLoadCallback(function() {
//	thumbnail images
var feed = new google.feeds.Feed("http://coscorrones.blogspot.com/atom.xml");	//	use full URI when in Blogger

	feed.includeHistoricalEntries(); // tell the API we want to have old entries too
	feed.setNumEntries(25); // we want a maximum of ...
	feed.load(function(result) {
		if (result.error) {window.status = result.error.message; return;}
		
		$(result.feed.entries).each(function(j){
		var content = this.content.substr( this.content.indexOf('src="')+ 5);
			content = content.substr(0, content.indexOf('"'));
		
			if (content.indexOf('/tracker/')==-1) {
			var dd = $('<div></div>').appendTo('#box .items');
			var aa = $('<a></a>').appendTo( dd ).attr('href', this.link);
				
				$('<img />').attr('src', content).attr('title', this.title).appendTo( aa );
			}
		});
		
	// thumbnail scrollable 
		$("#thumbnails").scrollable({size: 5, clickable: false});
		
	//	link to overlay
		$('#portfolio').appendTo('h2.date-header:first').click( function() {
			pageTracker._trackPageview('/portfolio');
		});
	});
});
$(function(){ 
//	overlay box
// var api = $('#portfolio').overlay({api:true, closeOnClick:false, expose:{color:'#7572B7', closeOnClick:false, opacity:0.5}, target: '#box'});
	$('#portfolio').overlay({api:true, closeOnClick:false, expose:{closeOnClick:false, opacity:0.5}, target: '#box'});
});

