// stuff with mootools
window.addEvent('domready', function()
{

  // get the lightbox attached
  var links = $$("a").filter(function(el)
  {
    return el.rel && el.rel.test(/^lightbox/i);
  });
  $$(links).slimbox({/* Put custom options here */}, null, function(el)
  {
    return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
  });

  // set the opacity on thumbs, get it interactive
  $$('.thumb').setStyle('opacity',0.8).addEvents({
    'mouseover': function(){
      this.setStyle('opacity',1);
    },
    'mouseout': function(){
      this.setStyle('opacity',0.8);
    }
  });

  // get the nav rollovers working
  $$('.roll').addEvents({
    'mouseover': function(){
      var text = this.getProperty('src');
      text = text.replace(/_gray\./ig,'.');
      this.setProperty('src',text);
    },
    'mouseout': function(){
      var text = this.getProperty('src');
      text = text.replace(/\.jpg/ig,'_gray.jpg');
      this.setProperty('src',text);
    }
  });

});
