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

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_2010/01.gif";
	imgsGallery[0].title = "image_0.jpg";
	imgsGallery[0].caption = "this is image_0 caption";
	
	imgsGallery[1] = new Object();
	imgsGallery[1].image = new Image();
	imgsGallery[1].image.src = "images/01_2010/02.jpg";
	imgsGallery[1].title = "image_1.gif";
	imgsGallery[1].caption = "this is image_1 caption";
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = new Image();
	imgsGallery[2].image.src = "images/01_2010/03.jpg";
	imgsGallery[2].title = "image_2.gif";
	imgsGallery[2].caption = "this is image_2 caption";
	
	imgsGallery[3] = new Object();
	imgsGallery[3].image = new Image();
	imgsGallery[3].image.src = "images/01_2010/04.jpg";
	imgsGallery[3].title = "image_3.png";
	imgsGallery[3].caption = "this is image_3 caption";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = new Image();
	imgsGallery[4].image.src = "images/01_2010/05.jpg";
	imgsGallery[4].title = "image_3.png";
	imgsGallery[4].caption = "this is image_3 caption";
	
	imgsGallery[5] = new Object();
	imgsGallery[5].image = new Image();
	imgsGallery[5].image.src = "images/01_2010/06.jpg";
	imgsGallery[5].title = "image_3.png";
	imgsGallery[5].caption = "this is image_3 caption";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = new Image();
	imgsGallery[6].image.src = "images/01_2010/07.jpg";
	imgsGallery[6].title = "image_3.png";
	imgsGallery[6].caption = "this is image_3 caption";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = new Image();
	imgsGallery[7].image.src = "images/01_2010/08.jpg";
	imgsGallery[7].title = "image_3.png";
	imgsGallery[7].caption = "this is image_3 caption";
	
	imgsGallery[8] = new Object();
	imgsGallery[8].image = new Image();
	imgsGallery[8].image.src = "images/01_2010/09.jpg";
	imgsGallery[8].title = "image_3.png";
	imgsGallery[8].caption = "this is image_3 caption";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = new Image();
	imgsGallery[9].image.src = "images/01_2010/10.jpg";
	imgsGallery[9].title = "image_3.png";
	imgsGallery[9].caption = "this is image_3 caption";
	
	imgsGallery[10] = new Object();
	imgsGallery[10].image = new Image();
	imgsGallery[10].image.src = "images/01_2010/11.jpg";
	imgsGallery[10].title = "image_3.png";
	imgsGallery[10].caption = "this is image_3 caption";
	
	imgsGallery[11] = new Object();
	imgsGallery[11].image = new Image();
	imgsGallery[11].image.src = "images/01_2010/12.jpg";
	imgsGallery[11].title = "image_3.png";
	imgsGallery[11].caption = "this is image_3 caption";
	
	imgsGallery[12] = new Object();
	imgsGallery[12].image = new Image();
	imgsGallery[12].image.src = "images/01_2010/13.jpg";
	imgsGallery[12].title = "image_3.png";
	imgsGallery[12].caption = "this is image_3 caption";
	
	imgsGallery[13] = new Object();
	imgsGallery[13].image = new Image();
	imgsGallery[13].image.src = "images/01_2010/14.jpg";
	imgsGallery[13].title = "image_3.png";
	imgsGallery[13].caption = "this is image_3 caption";
	
	imgsGallery[14] = new Object();
	imgsGallery[14].image = new Image();
	imgsGallery[14].image.src = "images/01_2010/15.jpg";
	imgsGallery[14].title = "image_3.png";
	imgsGallery[14].caption = "this is image_3 caption";
	
	imgsGallery[15] = new Object();
	imgsGallery[15].image = new Image();
	imgsGallery[15].image.src = "images/01_2010/16.jpg";
	imgsGallery[15].title = "image_3.png";
	imgsGallery[15].caption = "this is image_3 caption";
	
	imgsGallery[16] = new Object();
	imgsGallery[16].image = new Image();
	imgsGallery[16].image.src = "images/01_2010/17.jpg";
	imgsGallery[16].title = "image_3.png";
	imgsGallery[16].caption = "this is image_3 caption";
	
	imgsGallery[17] = new Object();
	imgsGallery[17].image = new Image();
	imgsGallery[17].image.src = "images/01_2010/18.jpg";
	imgsGallery[17].title = "image_3.png";
	imgsGallery[17].caption = "this is image_3 caption";
	
	imgsGallery[18] = new Object();
	imgsGallery[18].image = new Image();
	imgsGallery[18].image.src = "images/01_2010/19.jpg";
	imgsGallery[18].title = "image_3.png";
	imgsGallery[18].caption = "this is image_3 caption";
	
	imgsGallery[19] = new Object();
	imgsGallery[19].image = new Image();
	imgsGallery[19].image.src = "images/01_2010/20.jpg";
	imgsGallery[19].title = "image_3.png";
	imgsGallery[19].caption = "this is image_3 caption";
	
	imgsGallery[20] = new Object();
	imgsGallery[20].image = new Image();
	imgsGallery[20].image.src = "images/01_2010/21.jpg";
	imgsGallery[20].title = "image_3.png";
	imgsGallery[20].caption = "this is image_3 caption";
	
	imgsGallery[21] = new Object();
	imgsGallery[21].image = new Image();
	imgsGallery[21].image.src = "images/01_2010/22.jpg";
	imgsGallery[21].title = "image_3.png";
	imgsGallery[21].caption = "this is image_3 caption";
	
	imgsGallery[22] = new Object();
	imgsGallery[22].image = new Image();
	imgsGallery[22].image.src = "images/01_2010/23.jpg";
	imgsGallery[22].title = "image_3.png";
	imgsGallery[22].caption = "this is image_3 caption";
	
	imgsGallery[23] = new Object();
	imgsGallery[23].image = new Image();
	imgsGallery[23].image.src = "images/01_2010/24.jpg";
	imgsGallery[23].title = "image_3.png";
	imgsGallery[23].caption = "this is image_3 caption";
	
	imgsGallery[24] = new Object();
	imgsGallery[24].image = new Image();
	imgsGallery[24].image.src = "images/01_2010/25.jpg";
	imgsGallery[24].title = "image_3.png";
	imgsGallery[24].caption = "this is image_3 caption";
	
	imgsGallery[25] = new Object();
	imgsGallery[25].image = new Image();
	imgsGallery[25].image.src = "images/01_2010/26.jpg";
	imgsGallery[25].title = "image_3.png";
	imgsGallery[25].caption = "this is image_3 caption";
	
	imgsGallery[26] = new Object();
	imgsGallery[26].image = new Image();
	imgsGallery[26].image.src = "images/01_2010/27.jpg";
	imgsGallery[26].title = "image_3.png";
	imgsGallery[26].caption = "this is image_3 caption";
	
	imgsGallery[27] = new Object();
	imgsGallery[27].image = new Image();
	imgsGallery[27].image.src = "images/01_2010/28.jpg";
	imgsGallery[27].title = "image_3.png";
	imgsGallery[27].caption = "this is image_3 caption";
	
	imgsGallery[28] = new Object();
	imgsGallery[28].image = new Image();
	imgsGallery[28].image.src = "images/01_2010/29.jpg";
	imgsGallery[28].title = "image_3.png";
	imgsGallery[28].caption = "this is image_3 caption";
	
	imgsGallery[29] = new Object();
	imgsGallery[29].image = new Image();
	imgsGallery[29].image.src = "images/01_2010/30.jpg";
	imgsGallery[29].title = "image_3.png";
	imgsGallery[29].caption = "this is image_3 caption";
	
	imgsGallery[30] = new Object();
	imgsGallery[30].image = new Image();
	imgsGallery[30].image.src = "images/01_2010/31.jpg";
	imgsGallery[30].title = "image_3.png";
	imgsGallery[30].caption = "this is image_3 caption";
	
	imgsGallery[31] = new Object();
	imgsGallery[31].image = new Image();
	imgsGallery[31].image.src = "images/01_2010/32.jpg";
	imgsGallery[31].title = "image_3.png";
	imgsGallery[31].caption = "this is image_3 caption";
	
	imgsGallery[32] = new Object();
	imgsGallery[32].image = new Image();
	imgsGallery[32].image.src = "images/01_2010/33.jpg";
	imgsGallery[32].title = "image_3.png";
	imgsGallery[32].caption = "this is image_3 caption";
	
	imgsGallery[33] = new Object();
	imgsGallery[33].image = new Image();
	imgsGallery[33].image.src = "images/01_2010/34.jpg";
	imgsGallery[33].title = "image_3.png";
	imgsGallery[33].caption = "this is image_3 caption";
	
	imgsGallery[34] = new Object();
	imgsGallery[34].image = new Image();
	imgsGallery[34].image.src = "images/01_2010/35.jpg";
	imgsGallery[34].title = "image_3.png";
	imgsGallery[34].caption = "this is image_3 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);