// autoload-stuff
window.addEvent('domready', function() {  

  $$('#rightBottom img, #rightTop img, #imgBottomRight img,  #middleBottomLeft img').each(function(img) {
    img.setProperty('width', '100');
    img.removeProperty('height');    

    var src = img.getProperty('src');
    var click = new Element('a', {
      'rel': 'lightbox[smallImages]',
      'class': 'clickMe',
      'href': src
    });
    click.injectInside(img.getParent());
    img.injectInside(click);
    
  });

  function heights() {
    // menuHeight = contentHeight, min-height IE Hackstuff
    var contentHeight = $('content').getSize().size.y;
    var menuHeight = $('menu').getSize().size.y;
    var rightHeight = $('right').getSize().size.y;
    
    // get the highest value  
    var maxOne = Math.max(menuHeight, contentHeight);
    var max = Math.max(maxOne, rightHeight);
    
    // and even weirder IE-Bug with totally absurd values
    $('middleTop').setStyle('height', max);
  }
  
  heights();
  heights.periodical(5000);

});