// Slide show with images from ipernity,
// using Google feeds slide show.
function ipernitySlideShow(ipernityFeedUrl, element)
{
     var options =
     {
        displayTime: 10000,
        fullControlPanel : true,
        fullControlPanelSmallIcons : true,
        fullControlPanelCursor: true,
        pauseOnHover: false,
        scaleImages : true,
        transitionTime: 600,
        thumbnailUrlResolver : ipernityUrlResolver,
        linkTarget : google.feeds.LINK_TARGET_SELF
      };
      new GFslideShow(ipernityFeedUrl, element, options);
}

// private
function ipernityUrlResolver(entry)
{
    var thumbNodes = google.feeds.getElementsByTagNameNS(
                       entry.xmlNode,
                       GFslideShow.MRSS_THUMBNAIL_NS,
                       GFslideShow.MRSS_THUMBNAIL_TAG);
    if (thumbNodes && thumbNodes.length > 0)
    {
          var node = thumbNodes[0];
          var thumb = null;
          var thumb = node.getAttribute("url");
          if (!thumb)
          {
              thumb = node.firstChild.nodeValue;
          }
          if (thumb)
          {
              return thumb.replace(/\..\.jpg$/, ".m.jpg");
          }             
      }
      return null;
}
