// ---- Intraweb Exfoliator VI

function Grab(wut, how) {
	var bag = [];
	for(var ix in wut) {
		var dat = wut[ix];
		if(how(dat)) bag.push(dat);
	}

	return bag;
}

if(window.ActiveXObject && document.all && !window.opera && !window.XMLHttpRequest) { // if(fail_boat_extreme) {
	//#globalnav li.lv0

	window.attachEvent("onload", function() {
		var ollie = document.getElementById("globalnav").getElementsByTagName("li");
		var lv0li = Grab(ollie, function(lit) { return ((null != lit.className) && (lit.className.indexOf("lv0") > -1)); });
	
		function wire(me) {
			me.attachEvent("onmouseover", function() { var u = me.getElementsByTagName("ul")[0]; if(u) u.style.display = "block"; });
			me.attachEvent("onmouseout", function() { var u = me.getElementsByTagName("ul")[0]; if(u) u.style.display = "none";  });
		}

		for(var ix in lv0li) wire(lv0li[ix]);
	});
}


// ---- Flashiness

var itemInfo = {
	'cover01' : {
		description: "Find audio books, ebooks, maps and more with AquaBrowser",
		url: "/advantages/content"
	},
	'cover02' : {
		description: "Find books, audio cds, articles and more with AquaBrowser",
		url: "/advantages/content/"
	},
	'cover03' : {
		description: "AquaBrowser helps researchers uncover new knowledge",
		url: "/products/academic/"
	},
	'cover04' : {
		description: "Find Movies, music, premium content and more with AquaBrowser",
		url: "/advantages/content/"
	},
	'cover05' : {
		description: "Find newspapers, books, videos and more with AquaBrowser",
		url: "/advantages/content/"
	},
	'cover06' : {
		description: "AquaBrowser: the experts in Search and Discovery",
		url: "/advantages/interface/"
	},
	'cover07' : {
		description: "AquaBrowser makes your library the vibrant center of your community",
		url: "/products/public/"
	},
	'cover08' : {
		description: "AquaBrowser: most experienced with ILSes allover the world",
		url: "/advantages/content/"
	}
}

function changeCurrentItemDescription(item)
{
	var info = itemInfo[item];
	var desc = info ? info.description : "";
	var e = document.getElementById('glitz_item_description');
	if (e)
		e.innerHTML = desc;
}

function gotoItem(item)
{
	var info = itemInfo[item];
	if (!info) 
		return;
	
	var url = info.url;
	window.open(url, '_top');
}

function myHiliteCoverCall(item) {}
function myDehiliteCoverCall(item) {}
function myHiliteFocusCoverCall(item) {}
function myDehiliteFocusCoverCall(item) {}
function myClickSelectedCoverCall(item) {
	gotoItem(item);
}
function mySelectCoverCall(item) {
	changeCurrentItemDescription(item);
}
