// JavaScript Document

var active_image = "";
var active_item = "";

function initFeature()
{
	var ul = document.getElementById("ultimate_days");
	var features = ul.getElementsByTagName("LI");

	active_image = document.getElementById("feature_powerboat");
	active_item = document.getElementById("item_powerboat");

	var length = features.length;
	for (var i=0; i<length; i++)
	{
		features[i].onmouseover = function() {
			this.style.cursor = "pointer";
			toggleFeature(this);
		};
		features[i].onclick = function() {
			var a = document.getElementById(this.id.replace("item", "feature"));
			window.location.href = a.href;
		};
	}
}
addOnLoad(initFeature);

function toggleFeature(li)
{
	// hide the currently active image and take the active class off the list item
	css.addClassToElement(active_image, "hidden");
	css.removeClassFromElement(active_item, "active");

	// show the new image and set the item to active
	active_image = document.getElementById(li.id.replace("item", "feature"));
	css.removeClassFromElement(active_image, "hidden");
	
	css.addClassToElement(li, "active");
	active_item = li;
}