/******************************************************************************* FILE: mud_Scripts.js REQUIRES: prototype.js, mud_FadeGallery.js AUTHOR: Takashi Okamoto mud(tm) - http://www.mudcorp.com/ VERSION: 2.0 - converted to use prototype.js DATE: 01/05/2006 -------------------------------------------------------------------------------- This file is part of MudFadeGallery. MudFadeGallery is free for anyone to use, but this header MUST be included, and may not be modified. *******************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // GLOBAL VARS var imgsGallery = new Array(); var imgs; /////////////////////////////////////////////////////////////////////////////// // MOUSE EVENTS function setOnMouseClick() { var elements = document.getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { switch(elements[i].className) { case "next": elements[i].onclick = function() { imgs.nextImg(); imgs.apStop(10); return false; } break; case "prev": elements[i].onclick = function() { imgs.prevImg(); imgs.apStop(10); return false; } break; case "s0": elements[i].onclick = function() { imgs.showImg(0); return false; } break; case "s1": elements[i].onclick = function() { imgs.showImg(1); return false; } break; case "s2": elements[i].onclick = function() { imgs.showImg(2); return false; } break; case "s3": elements[i].onclick = function() { imgs.showImg(3); return false; } break; } } } //////////////////////////////////////////////////////////////////////////////// // INIT function init() { setOnMouseClick(); // images gallery // load images note: imgsGallery[].image isn't an array of images, just strings to hold location imgsGallery[0] = new Object();imgsGallery[0].image = "http://www.damelioterras.com/MEDIA/01207.jpg";imgsGallery[0].titles = "Sam Samore
Installation View ";imgsGallery[1] = new Object();imgsGallery[1].image = "http://www.damelioterras.com/MEDIA/01208.jpg";imgsGallery[1].titles = "Sam Samore
Installation View ";imgsGallery[2] = new Object();imgsGallery[2].image = "http://www.damelioterras.com/MEDIA/01228.jpg";imgsGallery[2].titles = "Sam Samore
Installation View ";imgsGallery[3] = new Object();imgsGallery[3].image = "http://www.damelioterras.com/MEDIA/01139.jpg";imgsGallery[3].titles = "Sam Samore
Scenarios #10 2007
36 x 72 inches (91.4 x 182.9 cm) approx image size
49 x 85 inches (124.5 x 215.9 cm) approx frame size
gelatin silver print
Edition of 2
";imgsGallery[4] = new Object();imgsGallery[4].image = "http://www.damelioterras.com/MEDIA/01140.jpg";imgsGallery[4].titles = "Sam Samore
Scenarios #11 2007
36 x 72 inches (91.4 x 182.9 cm) approx image size
49 x 85 inches (124.5 x 215.9 cm) approx frame size
gelatin silver print
Edition of 2
";imgsGallery[5] = new Object();imgsGallery[5].image = "http://www.damelioterras.com/MEDIA/01141.jpg";imgsGallery[5].titles = "Sam Samore
Scenarios #16 2007
36 x 72 inches (91.4 x 182.9 cm) approx image size
49 x 85 inches (124.5 x 215.9 cm) approx frame size
gelatin silver print
Edition of 2
";imgsGallery[6] = new Object();imgsGallery[6].image = "http://www.damelioterras.com/MEDIA/01175.jpg";imgsGallery[6].titles = "Sam Samore
Scenarios #12 2007
36 x 72 inches (91.4 x 182.9 cm) approx image size
49 x 85 inches (124.5 x 215.9 cm) approx frame size
gelatin silver print
Edition of 2
";imgsGallery[7] = new Object();imgsGallery[7].image = "http://www.damelioterras.com/MEDIA/01176.jpg";imgsGallery[7].titles = "Sam Samore
Scenarios #13 2007
36 x 72 inches (91.4 x 182.9 cm) approx image size
49 x 85 inches (124.5 x 215.9 cm) approx frame size
gelatin silver print
Edition of 2
";imgsGallery[8] = new Object();imgsGallery[8].image = "http://www.damelioterras.com/MEDIA/01205.jpg";imgsGallery[8].titles = "Sam Samore
Scenarios #2 2007
36 x 72 inches (91.4 x 182.9 cm) image size
49 x 85 inches (124.5 x 215.9 cm) frame size
gelatin silver print
Edition of 2
";imgsGallery[9] = new Object();imgsGallery[9].image = "http://www.damelioterras.com/MEDIA/01206.jpg";imgsGallery[9].titles = "Sam Samore
Scenarios #4 2007
36 x 72 inches (91.4 x 182.9 cm) image size
49 x 85 inches (124.5 x 215.9 cm) frame size
gelatin silver print
Edition of 2
"; var start = 0; imgs = new MudFadeGallery('imgs', 'imgDisplay', imgsGallery, {startNum: start, preload: true, autoplay: 0}); // set the initial captions var titles = (imgsGallery[0].titles) ? imgsGallery[0].titles : "No Title"; var caption = (imgsGallery[0].caption) ? imgsGallery[0].caption : "No caption"; $("imgDisplay_titles").innerHTML = titles; $("imgDisplay_number").innerHTML = "(image 1 out of " + imgsGallery.length + ")"; $("imgDisplay").src = imgsGallery[start].image; } //////////////////////////////////////////////////////////////////////////////// // EVENTS Event.observe(window, 'load', init, false);