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

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/published/full/27.jpg";
	imgsGallery[0].title = "<img src='../../images/desc/newyorkmagazine2.gif'>";
	imgsGallery[0].caption = "";
	
	imgsGallery[1] = new Object();
	imgsGallery[1].image = new Image();
	imgsGallery[1].image.src = "../../images/published/full/29.jpg";
	imgsGallery[1].title = "<img src='../../images/desc/sagharbor.gif'>";
	imgsGallery[1].caption = "";
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = new Image();
	imgsGallery[2].image.src = "../../images/published/full/1.jpg";
	imgsGallery[2].title = "<img src='../../images/desc/macys.gif'>";
	imgsGallery[2].caption = "";
	
	imgsGallery[3] = new Object();
	imgsGallery[3].image = new Image();
	imgsGallery[3].image.src = "../../images/published/full/25.jpg";
	imgsGallery[3].title = "<img src='../../images/desc/businessweek.gif'>";
	imgsGallery[3].caption = "";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = new Image();
	imgsGallery[4].image.src = "../../images/published/full/32.jpg";
	imgsGallery[4].title = "<img src='../../images/desc/informers.gif'>";
	imgsGallery[4].caption = "";
	
	imgsGallery[5] = new Object();
	imgsGallery[5].image = new Image();
	imgsGallery[5].image.src = "../../images/published/full/30.jpg";
	imgsGallery[5].title = "<img src='../../images/desc/ghosts.gif'>";
	imgsGallery[5].caption = "";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = new Image();
	imgsGallery[6].image.src = "../../images/published/full/31.jpg";
	imgsGallery[6].title = "<img src='../../images/desc/fastcompany.gif'>";
	imgsGallery[6].caption = "";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = new Image();
	imgsGallery[7].image.src = "../../images/published/full/23.jpg";
	imgsGallery[7].title = "<img src='../../images/desc/glamour.gif'>";
	imgsGallery[7].caption = "";
	
	imgsGallery[8] = new Object();
	imgsGallery[8].image = new Image();
	imgsGallery[8].image.src = "../../images/published/full/24.jpg";
	imgsGallery[8].title = "<img src='../../images/desc/panic.gif'>";
	imgsGallery[8].caption = "";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = new Image();
	imgsGallery[9].image.src = "../../images/published/full/4.jpg";
	imgsGallery[9].title = "<img src='../../images/desc/timessquare.gif'>";
	imgsGallery[9].caption = "";
	
	imgsGallery[10] = new Object();
	imgsGallery[10].image = new Image();
	imgsGallery[10].image.src = "../../images/published/full/3.jpg";
	imgsGallery[10].title = "<img src='../../images/desc/newyorktimes.gif'>";
	imgsGallery[10].caption = "";
	
	imgsGallery[11] = new Object();
	imgsGallery[11].image = new Image();
	imgsGallery[11].image.src = "../../images/published/full/28.jpg";
	imgsGallery[11].title = "<img src='../../images/desc/menshealth.gif'>";
	imgsGallery[11].caption = "";
	
	imgsGallery[12] = new Object();
	imgsGallery[12].image = new Image();
	imgsGallery[12].image.src = "../../images/published/full/12.jpg";
	imgsGallery[12].title = "<img src='../../images/desc/influence79.gif'>";
	imgsGallery[12].caption = "";
	
	imgsGallery[13] = new Object();
	imgsGallery[13].image = new Image();
	imgsGallery[13].image.src = "../../images/published/full/7.jpg";
	imgsGallery[13].title = "<img src='../../images/desc/influence9293.gif'>";
	imgsGallery[13].caption = "";

	imgsGallery[14] = new Object();
	imgsGallery[14].image = new Image();
	imgsGallery[14].image.src = "../../images/published/full/15.jpg";
	imgsGallery[14].title = "<img src='../../images/desc/influence140141.gif'>";
	imgsGallery[14].caption = "";
	
	imgsGallery[15] = new Object();
	imgsGallery[15].image = new Image();
	imgsGallery[15].image.src = "../../images/published/full/8.jpg";
	imgsGallery[15].title = "<img src='../../images/desc/influence136137.gif'>";
	imgsGallery[15].caption = "";
	
	imgsGallery[16] = new Object();
	imgsGallery[16].image = new Image();
	imgsGallery[16].image.src = "../../images/published/full/13.jpg";
	imgsGallery[16].title = "<img src='../../images/desc/influence79.gif'>";
	imgsGallery[16].caption = "";

	imgsGallery[17] = new Object();
	imgsGallery[17].image = new Image();
	imgsGallery[17].image.src = "../../images/published/full/14.jpg";
	imgsGallery[17].title = "<img src='../../images/desc/influence80.gif'>";
	imgsGallery[17].caption = "";

	imgsGallery[18] = new Object();
	imgsGallery[18].image = new Image();
	imgsGallery[18].image.src = "../../images/published/full/20.jpg";
	imgsGallery[18].title = "<img src='../../images/desc/influence176177.gif'>";
	imgsGallery[18].caption = "";
	
	imgsGallery[19] = new Object();
	imgsGallery[19].image = new Image();
	imgsGallery[19].image.src = "../../images/published/full/10.jpg";
	imgsGallery[19].title = "<img src='../../images/desc/influence247.gif'>";
	imgsGallery[19].caption = "";
	
	imgsGallery[20] = new Object();
	imgsGallery[20].image = new Image();
	imgsGallery[20].image.src = "../../images/published/full/17.jpg";
	imgsGallery[20].title = "<img src='../../images/desc/influence248249.gif'>";
	imgsGallery[20].caption = "";
	
	imgsGallery[21] = new Object();
	imgsGallery[21].image = new Image();
	imgsGallery[21].image.src = "../../images/published/full/2.jpg";
	imgsGallery[21].title = "<img src='../../images/desc/newyorkmagazine.gif'>";
	imgsGallery[21].caption = "";
	
	imgsGallery[22] = new Object();
	imgsGallery[22].image = new Image();
	imgsGallery[22].image.src = "../../images/published/full/26.jpg";
	imgsGallery[22].title = "<img src='../../images/desc/endofthejews.gif'>";
	imgsGallery[22].caption = "";

	imgsGallery[23] = new Object();
	imgsGallery[23].image = new Image();
	imgsGallery[23].image.src = "../../images/published/full/11.jpg";
	imgsGallery[23].title = "<img src='../../images/desc/conde.gif'>";
	imgsGallery[23].caption = "";
	
	imgsGallery[24] = new Object();
	imgsGallery[24].image = new Image();
	imgsGallery[24].image.src = "../../images/published/full/18.jpg";
	imgsGallery[24].title = "<img src='../../images/desc/bwmagazine.gif'>";
	imgsGallery[24].caption = "";
	
	imgsGallery[25] = new Object();
	imgsGallery[25].image = new Image();
	imgsGallery[25].image.src = "../../images/published/full/16.jpg";
	imgsGallery[25].title = "<img src='../../images/desc/soup.gif'>";
	imgsGallery[25].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);
