/*******************************************************************************

FILE: mud_Scripts.js
REQUIRES: prototype.js
AUTHOR: Takashi Okamoto mud(tm) - http://www.mudcorp.com/
VERSION: 2.1 - update to make it work more like MudFadeGallery
DATE: 04/07/2006

--------------------------------------------------------------------------------

This file is part of MudShiftContent.

	MudShiftContent is free for anyone to use, but this header MUST be
	included, and may not be modified.

*******************************************************************************/

////////////////////////////////////////////////////////////////////////////////
// GLOBAL VARS

var imgs;
var imgsGallery = new Array();

////////////////////////////////////////////////////////////////////////////////
// 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.move('next');
					 return false;
				}
				break;
			case "prev":
				elements[i].onclick = function() {
					 imgs.move('prev');
					 return false;
				}
				break;
		}
	}
}


////////////////////////////////////////////////////////////////////////////////
// INIT

function init() {
	setOnMouseClick();
	// images gallery
	imgsGallery[0] = new Object();
	imgsGallery[0].image = new Image();
	imgsGallery[0].image.src = "images/01-adc.jpg";
	imgsGallery[0].title = "85th Art Directors Annual (1/38)";
	imgsGallery[0].caption = "";
	
	imgsGallery[1] = new Object();
	imgsGallery[1].image = new Image();
	imgsGallery[1].image.src = "images/02-adc.jpg";
	imgsGallery[1].title = "85th Art Directors Annual (2/38)";
	imgsGallery[1].caption = "";
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = new Image();
	imgsGallery[2].image.src = "images/03-adc.jpg";
	imgsGallery[2].title = "85th Art Directors Annual (3/38)";
	imgsGallery[2].caption = "";
	
	imgsGallery[3] = new Object();
	imgsGallery[3].image = new Image();
	imgsGallery[3].image.src = "images/04-thin.jpg";
	imgsGallery[3].title = "Lauren Greenfield: Thin (4/38)";
	imgsGallery[3].caption = "";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = new Image();
	imgsGallery[4].image.src = "images/05-thin.jpg";
	imgsGallery[4].title = "Lauren Greenfield: Thin (5/38)";
	imgsGallery[4].caption = "";
	
	imgsGallery[5] = new Object();
	imgsGallery[5].image = new Image();
	imgsGallery[5].image.src = "images/06-spd.jpg";
	imgsGallery[5].title = "41st Society of Publication Designers Annual (6/38)";
	imgsGallery[5].caption = "";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = new Image();
	imgsGallery[6].image.src = "images/07-spd.jpg";
	imgsGallery[6].title = "41st Society of Publication Designers Annual (7/38)";
	imgsGallery[6].caption = "";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = new Image();
	imgsGallery[7].image.src = "images/08-spd.jpg";
	imgsGallery[7].title = "41st Society of Publication Designers Annual (8/38)";
	imgsGallery[7].caption = "";
	
	imgsGallery[8] = new Object();
	imgsGallery[8].image = new Image();
	imgsGallery[8].image.src = "images/09-ge.jpg";
	imgsGallery[8].title = "GE Imagination Notebook (9/38)";
	imgsGallery[8].caption = "";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = new Image();
	imgsGallery[9].image.src = "images/10-ge.jpg";
	imgsGallery[9].title = "GE Imagination Notebook (10/38)";
	imgsGallery[9].caption = "";
	
	imgsGallery[10] = new Object();
	imgsGallery[10].image = new Image();
	imgsGallery[10].image.src = "images/11-ge.jpg";
	imgsGallery[10].title = "GE Imagination Notebook (11/38)";
	imgsGallery[10].caption = "";
	
	imgsGallery[11] = new Object();
	imgsGallery[11].image = new Image();
	imgsGallery[11].image.src = "images/12-felders.jpg";
	imgsGallery[11].title = "Felder's Comprehensive (12/38)";
	imgsGallery[11].caption = "";
	
	imgsGallery[12] = new Object();
	imgsGallery[12].image = new Image();
	imgsGallery[12].image.src = "images/13-felders.jpg";
	imgsGallery[12].title = "Felder's Comprehensive (13/38)";
	imgsGallery[12].caption = "";
	
	imgsGallery[13] = new Object();
	imgsGallery[13].image = new Image();
	imgsGallery[13].image.src = "images/14-felders.jpg";
	imgsGallery[13].title = "Felder's Comprehensive (14/38)";
	imgsGallery[13].caption = "";
	
	imgsGallery[14] = new Object();
	imgsGallery[14].image = new Image();
	imgsGallery[14].image.src = "images/15-dzama.jpg";
	imgsGallery[14].title = "Marcel Dzama (15/38)";
	imgsGallery[14].caption = "";
	
	imgsGallery[15] = new Object();
	imgsGallery[15].image = new Image();
	imgsGallery[15].image.src = "images/16-dzama.jpg";
	imgsGallery[15].title = "Marcel Dzama (16/38)";
	imgsGallery[15].caption = "";
	
	imgsGallery[16] = new Object();
	imgsGallery[16].image = new Image();
	imgsGallery[16].image.src = "images/17-dzama.jpg";
	imgsGallery[16].title = "Marcel Dzama (17/38)";
	imgsGallery[16].caption = "";
	
	imgsGallery[17] = new Object();
	imgsGallery[17].image = new Image();
	imgsGallery[17].image.src = "images/18-sherman.jpg";
	imgsGallery[17].title = "Cindy Sherman: Centerfolds (18/38)";
	imgsGallery[17].caption = "";
	
	imgsGallery[18] = new Object();
	imgsGallery[18].image = new Image();
	imgsGallery[18].image.src = "images/19-sherman.jpg";
	imgsGallery[18].title = "Cindy Sherman: Centerfolds (19/38)";
	imgsGallery[18].caption = "";
	
	imgsGallery[19] = new Object();
	imgsGallery[19].image = new Image();
	imgsGallery[19].image.src = "images/20-sherman.jpg";
	imgsGallery[19].title = "Cindy Sherman: Centerfolds (20/38)";
	imgsGallery[19].caption = "";
	
	imgsGallery[20] = new Object();
	imgsGallery[20].image = new Image();
	imgsGallery[20].image.src = "images/21-kruger.jpg";
	imgsGallery[20].title = "Barbara Kruger: Money Talks (21/38)";
	imgsGallery[20].caption = "";
	
	imgsGallery[21] = new Object();
	imgsGallery[21].image = new Image();
	imgsGallery[21].image.src = "images/22-kruger.jpg";
	imgsGallery[21].title = "Barbara Kruger: Money Talks (22/38)";
	imgsGallery[21].caption = "";
	
	imgsGallery[22] = new Object();
	imgsGallery[22].image = new Image();
	imgsGallery[22].image.src = "images/23-claes.jpg";
	imgsGallery[22].title = "Claes Oldenburg (23/38)";
	imgsGallery[22].caption = "";
	
	imgsGallery[23] = new Object();
	imgsGallery[23].image = new Image();
	imgsGallery[23].image.src = "images/24-claes.jpg";
	imgsGallery[23].title = "Claes Oldenburg (24/38)";
	imgsGallery[23].caption = "";
	
	imgsGallery[24] = new Object();
	imgsGallery[24].image = new Image();
	imgsGallery[24].image.src = "images/25-claes.jpg";
	imgsGallery[24].title = "Claes Oldenburg (25/38)";
	imgsGallery[24].caption = "";
	
	imgsGallery[25] = new Object();
	imgsGallery[25].image = new Image();
	imgsGallery[25].image.src = "images/26-myth.jpg";
	imgsGallery[25].title = "The Genealogy of Greek Mythology (26/38)";
	imgsGallery[25].caption = "";
	
	imgsGallery[26] = new Object();
	imgsGallery[26].image = new Image();
	imgsGallery[26].image.src = "images/27-myth.jpg";
	imgsGallery[26].title = "The Genealogy of Greek Mythology (27/38)";
	imgsGallery[26].caption = "";
	
	imgsGallery[27] = new Object();
	imgsGallery[27].image = new Image();
	imgsGallery[27].image.src = "images/28-myth.jpg";
	imgsGallery[27].title = "The Genealogy of Greek Mythology (28/38)";
	imgsGallery[27].caption = "";
	
	imgsGallery[28] = new Object();
	imgsGallery[28].image = new Image();
	imgsGallery[28].image.src = "images/29-kafka.jpg";
	imgsGallery[28].title = "Kafka Goes to the Movies (29/38)";
	imgsGallery[28].caption = "";
	
	imgsGallery[29] = new Object();
	imgsGallery[29].image = new Image();
	imgsGallery[29].image.src = "images/30-kafka.jpg";
	imgsGallery[29].title = "Kafka Goes to the Movies (30/38)";
	imgsGallery[29].caption = "";
	
	imgsGallery[30] = new Object();
	imgsGallery[30].image = new Image();
	imgsGallery[30].image.src = "images/31-sontag.jpg";
	imgsGallery[30].title = "Susan Sontag series (31/38)";
	imgsGallery[30].caption = "";
	
	imgsGallery[31] = new Object();
	imgsGallery[31].image = new Image();
	imgsGallery[31].image.src = "images/32-wheel.jpg";
	imgsGallery[31].title = "Reinventing the Wheel (32/38)";
	imgsGallery[31].caption = "";
	
	imgsGallery[32] = new Object();
	imgsGallery[32].image = new Image();
	imgsGallery[32].image.src = "images/33-wheel.jpg";
	imgsGallery[32].title = "Reinventing the Wheel (33/38)";
	imgsGallery[32].caption = "";
	
	imgsGallery[33] = new Object();
	imgsGallery[33].image = new Image();
	imgsGallery[33].image.src = "images/34-mccracken.jpg";
	imgsGallery[33].title = "John McCracken (34/38)";
	imgsGallery[33].caption = "";

	imgsGallery[34] = new Object();
	imgsGallery[34].image = new Image();
	imgsGallery[34].image.src = "images/35-mccracken.jpg";
	imgsGallery[34].title = "John McCracken (35/38)";
	imgsGallery[34].caption = "";

	imgsGallery[35] = new Object();
	imgsGallery[35].image = new Image();
	imgsGallery[35].image.src = "images/36-quack.jpg";
	imgsGallery[35].title = "Quack, Quack, Quack (36/38)";
	imgsGallery[35].caption = "";

	imgsGallery[36] = new Object();
	imgsGallery[36].image = new Image();
	imgsGallery[36].image.src = "images/37-quack.jpg";
	imgsGallery[36].title = "Quack, Quack, Quack (37/38)";
	imgsGallery[36].caption = "";

	imgsGallery[37] = new Object();
	imgsGallery[37].image = new Image();
	imgsGallery[37].image.src = "images/38-quack.jpg";
	imgsGallery[37].title = "Quack, Quack, Quack (38/38)";
	imgsGallery[37].caption = "";

	// MudShiftContent(id, unitX, unitTotal)
	imgs = new MudShiftContent('imgs', imgsGallery);
	
	// set init
	if ($('imgs_title')) $('imgs_title').innerHTML = imgsGallery[0].title;
	if ($('imgs_caption')) $('imgs_caption').innerHTML = imgsGallery[0].caption;
}

////////////////////////////////////////////////////////////////////////////////
// EVENTS

Event.observe(window, 'load', init, false);
