/* ======================= */
/* Modified From pageSlide */
/* ======================= */

/* Configuration Settings */

var moveIns = 560 // x axis movement
var sliderPosIns = 1 // where the slider starts

/* ==================== */
/* ===   Functions 	=== */
/* ==================== */

function jumpToDVD(dvd, pos) {
	/* part one - getting position from element */
	var obj = $(dvd);
	var objClass = obj.readAttribute('class');
	var objNum = objClass.substring(8);

	/* part two - getting distance to move */
	var moveDist = ((objNum - sliderPosIns)*moveIns)*-1;
	
	/* part three - moving object */
	new Effect.Move($('dvdSlider'),{x: moveDist, y: 0, queue: {position: 'end', scope: 'contentscope'}})
	
	/* updating sliderPos */
	sliderPosIns = objNum;
	
	/* Updating elements */
	var titleOffset = 0;
	switch(dvd) {
		case 'dvdAudio':
			$('toggleAudio').addClassName('bottomBG');
			$('toggleComplexRock').removeClassName('bottomBG');
			$('toggleComplex').removeClassName('bottomBG');
			$('toggleCantaConmigo').removeClassName('bottomBG');
			titleOffset = 0;
			divHeight = pos; //600;
		break;
		
		case 'dvdComplexRock':
			$('toggleComplexRock').addClassName('bottomBG');
			$('toggleComplex').removeClassName('bottomBG');
			$('toggleAudio').removeClassName('bottomBG');
			$('toggleCantaConmigo').removeClassName('bottomBG');
			titleOffset = -60;
			divHeight = pos; //820;
		break;
		
		case 'dvdComplex':
			$('toggleComplex').addClassName('bottomBG');
			$('toggleComplexRock').removeClassName('bottomBG');
			$('toggleAudio').removeClassName('bottomBG');
			$('toggleCantaConmigo').removeClassName('bottomBG');
			titleOffset = -116;
			divHeight = pos; //540;
		break;
		
		case 'dvdCantaConmigo':
			$('toggleCantaConmigo').addClassName('bottomBG');
			$('toggleComplexRock').removeClassName('bottomBG');
			$('toggleAudio').removeClassName('bottomBG');
			$('toggleComplex').removeClassName('bottomBG');
			titleOffset = -169;
			divHeight = pos; //1030;
		break;
		
	}
	
	/* Altering Header Title & Updating Height */
	new Effect.Morph('dvdViewport',{style:{height:divHeight+'px'}});
	new Effect.Morph('dvdTitleImg',{style:{marginTop:titleOffset+'px'}});
}