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

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 = "new/1_rontrent.jpg";
	imgsGallery[0].title = "Ron Trent";
	imgsGallery[0].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[1] = new Object();
	imgsGallery[1].image = new Image();
	imgsGallery[1].image.src = "new/2_ras.jpg";
	imgsGallery[1].title = "Ras G";
	imgsGallery[1].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[2] = new Object();
	imgsGallery[2].image = new Image();
	imgsGallery[2].image.src = "new/3_rontrent2.jpg";
	imgsGallery[2].title = "Ron Trent";
	imgsGallery[2].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[3] = new Object();
	imgsGallery[3].image = new Image();
	imgsGallery[3].image.src = "new/4_bplus.jpg";
	imgsGallery[3].title = "B+";
	imgsGallery[3].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[4] = new Object();
	imgsGallery[4].image = new Image();
	imgsGallery[4].image.src = "new/5_bp2_n.jpg";
	imgsGallery[4].title = "B+";
	imgsGallery[4].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[5] = new Object();
	imgsGallery[5].image = new Image();
	imgsGallery[5].image.src = "new/6_comel.jpg";
	imgsGallery[5].title = "Comel (Time Machine)";
	imgsGallery[5].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[6] = new Object();
	imgsGallery[6].image = new Image();
	imgsGallery[6].image.src = "new/7_tm.jpg";
	imgsGallery[6].title = "Time Machine";
	imgsGallery[6].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[7] = new Object();
	imgsGallery[7].image = new Image();
	imgsGallery[7].image.src = "new/8_danny.jpg";
	imgsGallery[7].title = "Danny Lee";
	imgsGallery[7].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[8] = new Object();
	imgsGallery[8].image = new Image();
	imgsGallery[8].image.src = "new/9_kt.jpg";
	imgsGallery[8].title = "DJ KT";
	imgsGallery[8].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[9] = new Object();
	imgsGallery[9].image = new Image();
	imgsGallery[9].image.src = "new/10_mrmartel2.jpg";
	imgsGallery[9].title = "Mr. Martel";
	imgsGallery[9].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[10] = new Object();
	imgsGallery[10].image = new Image();
	imgsGallery[10].image.src = "new/11_murs3.jpg";
	imgsGallery[10].title = "Murs (Store13)";
	imgsGallery[10].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[11] = new Object();
	imgsGallery[11].image = new Image();
	imgsGallery[11].image.src = "new/12_murs1.jpg";
	imgsGallery[11].title = "Murs (Store13)";
	imgsGallery[11].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[12] = new Object();
	imgsGallery[12].image = new Image();
	imgsGallery[12].image.src = "new/13_hajime1.jpg";
	imgsGallery[12].title = "Hajime (Grey One)";
	imgsGallery[12].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	imgsGallery[13] = new Object();
	imgsGallery[13].image = new Image();
	imgsGallery[13].image.src = "new/14_surreal.jpg";
	imgsGallery[13].title = "Surreal (Sound Providers)";
	imgsGallery[13].caption = "&copy Buddhabong 2000 - 2012 // all rights reserved";
	
	// 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);
