    $(document).ready(function() {
      loadFeed("firstFeed", "firstRSSFeed");
      loadFeed("secondFeed", "secondRSSFeed");
      loadFeed("thirdFeed", "thirdRSSFeed");
     });

      function loadFeed(divId, key) {

        var content, rssAttrs;
        content = '';
  	    $.getJSON("/index/feeds/key/" + key + "?callback=feed", function(json) {
                rssAttrs = json.rss;

                content += "<h2>" + rssAttrs.channel.title + "</h2>";
                content += "<ul>";

             if (rssAttrs.channel.item.length > 0) {
                $.each(rssAttrs.channel.item, function(i, feedItem) {
                  content += "<li><a href='" + feedItem.link + "' title='" + feedItem.title + "'>" + feedItem.title + "</a></li>";
                });
              } else {
                  content += "<p>No items</p>";
              }

             content += "</ul>";

          $('#' + divId).html(content);
    		});
       }
