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

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/start.jpg";
	imgsGallery[0].title = "Melbourne  based  graphic  designer";
	imgsGallery[0].caption = "";

	imgsGallery[1] = new Object();
	imgsGallery[1].image = new Image();
	imgsGallery[1].image.src = "images/004.jpg";
	imgsGallery[1].title = "Urban Initiatives";
	imgsGallery[1].caption = "Neighbourhood report booklet"
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = new Image();
	imgsGallery[2].image.src = "images/015.jpg";
	imgsGallery[2].title = "Country Fire Authority";
	imgsGallery[2].caption = "Community report for fire safety";

	imgsGallery[3] = new Object();
	imgsGallery[3].image = new Image();
	imgsGallery[3].image.src = "images/012.jpg";
	imgsGallery[3].title = "Country Fire Authority";
	imgsGallery[3].caption = "Online Training package material.";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = new Image();
	imgsGallery[4].image.src = "images/003.jpg";
	imgsGallery[4].title = "West City";
	imgsGallery[4].caption = "Logotype";

	imgsGallery[5] = new Object();
	imgsGallery[5].image = new Image();
	imgsGallery[5].image.src = "images/003.jpg";
	imgsGallery[5].title = "Wimbledon Village";
	imgsGallery[5].caption = "Concept logotype";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = new Image();
	imgsGallery[6].image.src = "images/014.jpg";
	imgsGallery[6].title = "Adrian Samson Photography";
	imgsGallery[6].caption = "Logotype";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = new Image();
	imgsGallery[7].image.src = "images/014.jpg";
	imgsGallery[7].title = "Adrian Samson photography";
	imgsGallery[7].caption = "Exhibition flyer";

	imgsGallery[8] = new Object();
	imgsGallery[8].image = new Image();
	imgsGallery[8].image.src = "images/005.jpg";
	imgsGallery[8].title = "Next Generation of Wealth";
	imgsGallery[8].caption = "Logotype";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = new Image();
	imgsGallery[9].image.src = "images/005.jpg";
	imgsGallery[9].title = "Hue~tron";
	imgsGallery[9].caption = "Variation on the theme";

	imgsGallery[10] = new Object();
	imgsGallery[10].image = new Image();
	imgsGallery[10].image.src = "images/005.jpg";
	imgsGallery[10].title = "HueBert";
	imgsGallery[10].caption = "Variation on the theme";

	imgsGallery[11] = new Object();
	imgsGallery[11].image = new Image();
	imgsGallery[11].image.src = "images/014.jpg";
	imgsGallery[11].title = "Huebert business cards";
	imgsGallery[11].caption = "Further variation";
		
	imgsGallery[12] = new Object();
	imgsGallery[12].image = new Image();
	imgsGallery[12].image.src = "images/007.jpg";
	imgsGallery[12].title = "Independent Truck Company";
	imgsGallery[12].caption = "Summer product catalogue 1/2";

	imgsGallery[13] = new Object();
	imgsGallery[13].image = new Image();
	imgsGallery[13].image.src = "images/014.jpg";
	imgsGallery[13].title = "Independent Truck Company";
	imgsGallery[13].caption = "Summer product catalogue 2/2";
	
	imgsGallery[14] = new Object();
	imgsGallery[14].image = new Image();
	imgsGallery[14].image.src = "images/014.jpg";
	imgsGallery[14].title = "Pete & Repeat";
	imgsGallery[14].caption = "Handrawn pattern";

	imgsGallery[15] = new Object();
	imgsGallery[15].image = new Image();
	imgsGallery[15].image.src = "images/014.jpg";
	imgsGallery[15].title = "Gunpoint Publishing";
	imgsGallery[15].caption = "Identity & Business cards";

	imgsGallery[16] = new Object();
	imgsGallery[16].image = new Image();
	imgsGallery[16].image.src = "images/004.jpg";
	imgsGallery[16].title = "Yes, no....maybe";
	imgsGallery[16].caption = "</em>";

	imgsGallery[17] = new Object();
	imgsGallery[17].image = new Image();
	imgsGallery[17].image.src = "images/0033.jpg";
	imgsGallery[17].title = "Tom/Kat";
	imgsGallery[17].caption = "London, United Kingdom <br><em>April 2008 </em>";
	
	imgsGallery[18] = new Object();
	imgsGallery[18].image = new Image();
	imgsGallery[18].image.src = "images/004.jpg";
	imgsGallery[18].title = "The Landing I";
	imgsGallery[18].caption = "Rome, Italy<br><em>September 2006 </em>";
	
	imgsGallery[19] = new Object();
	imgsGallery[19].image = new Image();
	imgsGallery[19].image.src = "images/0032.jpg";
	imgsGallery[19].title = "Give them a quarter and they'll ask you for a dollar";
	imgsGallery[19].caption = "Melbourne, Australia <br><em>January 2008 </em>";

	imgsGallery[20] = new Object();
	imgsGallery[20].image = new Image();
	imgsGallery[20].image.src = "images/004.jpg";
	imgsGallery[20].title = "The Landing II";
	imgsGallery[20].caption = "Rome, Italy <br><em>September 2006 </em>";

	imgsGallery[21] = new Object();
	imgsGallery[21].image = new Image();
	imgsGallery[21].image.src = "images/0034.jpg";
	imgsGallery[21].title = "Morocco ";
	imgsGallery[21].caption = "Morocco <br><em>September 2008 </em>";
	
	imgsGallery[22] = new Object();
	imgsGallery[22].image = new Image();
	imgsGallery[22].image.src = "images/004.jpg";
	imgsGallery[22].title = "Two sides of Sarajevo";
	imgsGallery[22].caption = "Sarajevo, Bosnia & Herzegovina <br> <em>August 2006 </em>";

	imgsGallery[23] = new Object();
	imgsGallery[23].image = new Image();
	imgsGallery[23].image.src = "images/06.jpg";
	imgsGallery[23].title = "Dartmoor";
	imgsGallery[23].caption = "Devon, England <br><em>August 2006 </em>";

	// 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);