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



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 = "http://www.internationale-bauakademie.com/home/templates/rhuk_solarflare_ii/images/space.gif";

	imgsGallery[0].title = "1.gif";

	imgsGallery[0].caption = "this is image_0 caption";

	

	imgsGallery[1] = new Object();

	imgsGallery[1].image = new Image();

	imgsGallery[1].image.src = "http://www.internationale-bauakademie.com/home/templates/rhuk_solarflare_ii/images/space.gif";

	imgsGallery[1].title = "2.gif";

	imgsGallery[1].caption = "this is image_1 caption";

	

	imgsGallery[2] = new Object();

	imgsGallery[2].image = new Image();

	imgsGallery[2].image.src = "http://www.internationale-bauakademie.com/home/templates/rhuk_solarflare_ii/images/space.gif";

	imgsGallery[2].title = "3.gif";

	imgsGallery[2].caption = "this is image_2 caption";

	

	imgsGallery[3] = new Object();

	imgsGallery[3].image = new Image();

	imgsGallery[3].image.src = "http://www.internationale-bauakademie.com/home/templates/rhuk_solarflare_ii/images/space.gif";

	imgsGallery[3].title = "4.gif";

	imgsGallery[3].caption = "this is image_3 caption";



	imgsGallery[4] = new Object();

	imgsGallery[4].image = new Image();

	imgsGallery[4].image.src = "http://www.internationale-bauakademie.com/home/templates/rhuk_solarflare_ii/images/space.gif";

	imgsGallery[4].title = "5.gif";

	imgsGallery[4].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);