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

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/Untitled-1.jpg";
	imgsGallery[0].title = "Nicole Klagsbrun poster (1/30)";
	imgsGallery[0].caption = "";
	
	imgsGallery[1] = new Object();
	imgsGallery[1].image = new Image();
	imgsGallery[1].image.src = "images/Untitled-2.jpg";
	imgsGallery[1].title = "Accept & Proceed illustration (2/30)";
	imgsGallery[1].caption = "";
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = new Image();
	imgsGallery[2].image.src = "images/Untitled-3.jpg";
	imgsGallery[2].title = "Knoll Space brochure (3/30)";
	imgsGallery[2].caption = "";
	
	imgsGallery[3] = new Object();
	imgsGallery[3].image = new Image();
	imgsGallery[3].image.src = "images/Untitled-4.jpg";
	imgsGallery[3].title = "Whitney Museum brochure (4/30)";
	imgsGallery[3].caption = "";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = new Image();
	imgsGallery[4].image.src = "images/Untitled-5.jpg";
	imgsGallery[4].title = "Nerve Media identity (5/30)";
	imgsGallery[4].caption = "";
	
	imgsGallery[5] = new Object();
	imgsGallery[5].image = new Image();
	imgsGallery[5].image.src = "images/Untitled-6.jpg";
	imgsGallery[5].title = "Design Issues cover (6/30)";
	imgsGallery[5].caption = "";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = new Image();
	imgsGallery[6].image.src = "images/Untitled-7.jpg";
	imgsGallery[6].title = "New York Magazine: High Priority illustration (7/30)";
	imgsGallery[6].caption = "";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = new Image();
	imgsGallery[7].image.src = "images/Untitled-8.jpg";
	imgsGallery[7].title = "Peer Health Exchange website (8/30)";
	imgsGallery[7].caption = "";
	
	imgsGallery[8] = new Object();
	imgsGallery[8].image = new Image();
	imgsGallery[8].image.src = "images/Untitled-9.jpg";
	imgsGallery[8].title = "NYU: Iraq and Beyond poster (9/30)";
	imgsGallery[8].caption = "";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = new Image();
	imgsGallery[9].image.src = "images/Untitled-10.jpg";
	imgsGallery[9].title = "AIGA website poster (10/30)";
	imgsGallery[9].caption = "";
	
	imgsGallery[10] = new Object();
	imgsGallery[10].image = new Image();
	imgsGallery[10].image.src = "images/Untitled-11.jpg";
	imgsGallery[10].title = "Social Research cover (11/30)";
	imgsGallery[10].caption = "";
	
	imgsGallery[11] = new Object();
	imgsGallery[11].image = new Image();
	imgsGallery[11].image.src = "images/Untitled-12.jpg";
	imgsGallery[11].title = "Slate food pyramid redesign (12/30)";
	imgsGallery[11].caption = "";
	
	imgsGallery[12] = new Object();
	imgsGallery[12].image = new Image();
	imgsGallery[12].image.src = "images/Untitled-13.jpg";
	imgsGallery[12].title = "Helen Bodian online portfolio (13/30)";
	imgsGallery[12].caption = "";
	
	imgsGallery[13] = new Object();
	imgsGallery[13].image = new Image();
	imgsGallery[13].image.src = "images/Untitled-14.jpg";
	imgsGallery[13].title = "Knoll Textiles website announcement (14/30)";
	imgsGallery[13].caption = "";
	
	imgsGallery[14] = new Object();
	imgsGallery[14].image = new Image();
	imgsGallery[14].image.src = "images/Untitled-15.jpg";
	imgsGallery[14].title = "Forum for Urban Design identity (15/30)";
	imgsGallery[14].caption = "";
	
	imgsGallery[15] = new Object();
	imgsGallery[15].image = new Image();
	imgsGallery[15].image.src = "images/Untitled-16.jpg";
	imgsGallery[15].title = "Gregory Crewdson: Firefiles announcement (16/30)";
	imgsGallery[15].caption = "";
	
	imgsGallery[16] = new Object();
	imgsGallery[16].image = new Image();
	imgsGallery[16].image.src = "images/Untitled-17.jpg";
	imgsGallery[16].title = "Luhring Augustine art fair t-shirt (17/30)";
	imgsGallery[16].caption = "";
	
	imgsGallery[17] = new Object();
	imgsGallery[17].image = new Image();
	imgsGallery[17].image.src = "images/Untitled-18.jpg";
	imgsGallery[17].title = "Luhring Augustine print advertisement (18/30)";
	imgsGallery[17].caption = "";
	
	imgsGallery[18] = new Object();
	imgsGallery[18].image = new Image();
	imgsGallery[18].image.src = "images/Untitled-19.jpg";
	imgsGallery[18].title = "Peer Health Exchange brochure (19/30)";
	imgsGallery[18].caption = "";
	
	imgsGallery[19] = new Object();
	imgsGallery[19].image = new Image();
	imgsGallery[19].image.src = "images/Untitled-20.jpg";
	imgsGallery[19].title = "Children's Scientology Pageant CD design (20/30)";
	imgsGallery[19].caption = "";
	
	imgsGallery[20] = new Object();
	imgsGallery[20].image = new Image();
	imgsGallery[20].image.src = "images/Untitled-21.jpg";
	imgsGallery[20].title = "Knoll moving annoucement wheel (21/30)";
	imgsGallery[20].caption = "";
	
	imgsGallery[21] = new Object();
	imgsGallery[21].image = new Image();
	imgsGallery[21].image.src = "images/Untitled-22.jpg";
	imgsGallery[21].title = "Nicole Klagsbrun identity and website (22/30)";
	imgsGallery[21].caption = "";
	
	imgsGallery[22] = new Object();
	imgsGallery[22].image = new Image();
	imgsGallery[22].image.src = "images/Untitled-23.jpg";
	imgsGallery[22].title = "Sound Map for the University of Minnesota (23/30)";
	imgsGallery[22].caption = "";
	
	imgsGallery[23] = new Object();
	imgsGallery[23].image = new Image();
	imgsGallery[23].image.src = "images/Untitled-24.jpg";
	imgsGallery[23].title = "First Press PR identity (24/30)";
	imgsGallery[23].caption = "";
	
	imgsGallery[24] = new Object();
	imgsGallery[24].image = new Image();
	imgsGallery[24].image.src = "images/Untitled-25.jpg";
	imgsGallery[24].title = "Drillteam Media identity (25/30)";
	imgsGallery[24].caption = "";
	
	imgsGallery[25] = new Object();
	imgsGallery[25].image = new Image();
	imgsGallery[25].image.src = "images/Untitled-26.jpg";
	imgsGallery[25].title = "NYT Magazine: Freakonomics illustration (26/30)";
	imgsGallery[25].caption = "";
	
	imgsGallery[26] = new Object();
	imgsGallery[26].image = new Image();
	imgsGallery[26].image.src = "images/Untitled-27.jpg";
	imgsGallery[26].title = "Print Magazine: Chick Lit Covers graphic (27/30)";
	imgsGallery[26].caption = "";
	
	imgsGallery[27] = new Object();
	imgsGallery[27].image = new Image();
	imgsGallery[27].image.src = "images/Untitled-28.jpg";
	imgsGallery[27].title = "Chaus Organic Cotton presentation (28/30)";
	imgsGallery[27].caption = "";
	
	imgsGallery[28] = new Object();
	imgsGallery[28].image = new Image();
	imgsGallery[28].image.src = "images/Untitled-29.jpg";
	imgsGallery[28].title = "Luhring Augustine announcement (29/30)";
	imgsGallery[28].caption = "";
	
	imgsGallery[29] = new Object();
	imgsGallery[29].image = new Image();
	imgsGallery[29].image.src = "images/Untitled-30.jpg";
	imgsGallery[29].title = "NYT Magazine: Lurton Wine Family Tree illustration (30/30)";
	imgsGallery[29].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);
