/*v1.0 by Georgina Sallery, Negative Dark Ltd  01/12/09  */

var showProject = function(imgSrc, textDiv, moreLink) {
    new Effect.Fade('imgCapture',{ queue: 'front', from: 1.0, to: 0.001, duration: 0.5 });
    new Effect.Fade('carousel-text',{ queue: 'with-last', from: 1.0, to: 0.001, duration: 0.5});
    new Effect.Tween('imgCapture', 0, 0, {queue: 'end', duration: 0.1},
      function(p) {
        $('imgCapture').src=imgSrc;
        $('moreLink').href=moreLink;
        var texts = $$('.project-block');
        for (var i= 0; i < texts.length; i++) {
          if (texts[i].id == textDiv) {
            $(textDiv).style.display = 'block';
          } else {
            $(texts[i]).style.display = 'none';
          }
        }
      });
    new Effect.Fade('imgCapture',{ queue: 'end',  from: 0.001, to: 1.0 });
    new Effect.Fade('carousel-text',{ queue: 'with-last',  from: 0.001, to: 1.0, duration: 1.5 });
  }