
function equipment_startSlider() {
	equipment_slidetimer = setTimeout("equipment_slideItOver()",5000);	
}

function equipment_slideitOver() {
	
	clearTimeout(equipment_slidetimer);
	var stopit = false;
	
	jQuery("#mini"+count).css("border-color","#FFFFFF");
	
	count++;
	if (count > (equipment_images.length - 1)) { count = 0; }
	
	jQuery("#mini"+count).css("border-color","#000000");
	
	jQuery(offscreen).css("left", 640);
	jQuery(offscreen).html("<img src=\""+equipment_images[count]+"\" width=\"640\" height=\"320\" />");
	//jQuery(offscreen).html(goingTo[count]);

	jQuery(onscreen).animate({left: -640},1250);
	jQuery(offscreen).animate({left: 0},1250);
	
	temp = onscreen;
	onscreen = offscreen;
	offscreen = temp;
	
	if (stopit == false) { equipment_slidetimer = setTimeout("equipment_slideitOver()",8000); }
}

function goSomewhere() {
	clearTimeout(equipment_slidetimer);
}

var equipment_Showing = null;
var equipment_Video = null;

function equipment_flipTo(x) {
	//jQuery("#debug").html("flip to "+goingTo[x]);
	
	clearTimeout(equipment_slidetimer);
	
	jQuery(offscreen).css("left", 640);
	jQuery(offscreen).html("<img src=\""+equipment_images[x]+"\" width=\"640\" height=\"320\" />");
	//jQuery(offscreen).html(goingTo[x]);
	
	jQuery(onscreen).animate({left: -640},1250);
	jQuery(offscreen).animate({left: 0},1250);

	jQuery("#mini"+count).css("border-color","#FFFFFF");
	jQuery("#mini"+x).css("border-color","#000000");

	if (equipment_Showing != null) { jQuery("#equipment-"+equipment_Showing).css("display","none"); }
	
	jQuery("#equipment-"+x).css("display","block");
	
	equipment_Showing = x;
	
	count = x;
	
	temp = onscreen;
	onscreen = offscreen;
	offscreen = temp;
}

function openEquipmentVideo(src, closeit) {
	jQuery('#equipment-video').attr('src','3-images/equipment/paplayer.php?src='+src);
	jQuery('#equipment-video-holder').css('visibility','visible');	
	jQuery(closeit).show();
	equipment_Video = closeit;
}

function closeEquipmentVideo(closeit) {
	// unload the video
	jQuery('#equipment-video').attr('src','');
	// hide the layer
	jQuery('#equipment-video-holder').css('visibility','hidden');	
	// hide the button
	jQuery(closeit).hide();
	
}

function unloadEquipmentVideo() {
	// unload the video
	jQuery('#equipment-video').attr('src','');
	// hide the layer
	jQuery('#equipment-video-holder').css('visibility','hidden');
	// hide the button
	jQuery(equipment_Video).hide();
}


function equipment_pauseSlider() { clearTimeout(equipment_slidetimer); }
function equipment_startSlider() { equipment_slideitOver(); }
function equipment_previousSlide() { clearTimeout(equipment_slidetimer); x = count + 1; if (x > (equipment_images.length - 1)) { equipment_flipTo(0); } else { equipment_flipTo(x); } }
function equipment_nextSlide() { clearTimeout(equipment_slidetimer); x = count - 1; if (x < 0) { equipment_flipTo(equipment_images.length); } else { equipment_flipTo(x); } }



