
$(document).ready(function() {

    $.jGFeed('http://www.sharegeo.ac.uk/feed/rss_2.0/site',
    		function(feeds){
    		  var categories = new Array();
    		  // Check for errors
    		  if(!feeds){
    		    // there was an error
    		    return false;
    		  }
    		  // do whatever you want with feeds here
    		  for(var i=0; i<feeds.entries.length; i++){
    		    var entry = feeds.entries[i];
    		    // Entry title
                categories[categories.length] = entry;
    		  }
    		  outputShareGeoFeed(categories);
    		}, 5);
});

function outputShareGeoFeed(categories) {
    // Loop through all unique tags and write the cloud
    var html = "";

    $(categories).each(function(i) {
        html += "<li>" +(i+1)+". <a href=" + categories[i].link+">";
        html += categories[i].title + "</a><br/></li>";
    });
    $('#sharegeo_feed').append(html);
}
