$$('.blender').each(function(element) {
  // exclude spacer images
  var imgs = $(element).select('table img:not([src=clear.gif])');

  // fetch first image, and id
  var firstImgEl = $(imgs).first();
  var firstImgId = $(firstImgEl).identify();

  // create new image
  var firstImg = new Element('img', {
    'id': firstImgId,
    'src': $(firstImgEl).readAttribute('src'),
    'width': $(firstImgEl).readAttribute('width'),
    'height': $(firstImgEl).readAttribute('height')
  });
  // update the blender area with the first image
  $(element).update(firstImg);

  // remove first image, read file paths
  //imgs.shift();
  var srcs = imgs.invoke('readAttribute', 'src');

  // create blender instance
  var objBlender = new Blender(firstImgId, srcs, {
    fadeDuration: 1,
    displayDuration: 2,
    // this option will be set to true via TypoScript javascriptRenderObj, but
    // is deactivated during template development
    autoStart: true,
    attributes: {
      id: 'blender1Img',
      alt: 'Blaue Berge'
    }
  });
});
