var JQ = jQuery.noConflict();
			
JQ(document).ready(function(){
	//Caption Sliding (Partially Hidden to Visible)
	JQ('.boxgrid.caption').hover(function(){
		JQ(".cover", this).stop().animate({top:'25px'},{queue:false,duration:160});
	}, function() {
		JQ(".cover", this).stop().animate({top:'150px'},{queue:false,duration:160});
	});
   
});

function menuOver(e) {
	if (this.className.search(/\bopen\b/g) == -1) { this.className += ' open'; }
}

function menuOut(e) {
	this.className = this.className.replace(/\s*\bopen\b/g, '');
}

function menuItemOver(e) {
	if (this.className.search(/\bhover\b/g) == -1) { this.className += ' hover'; }
}

function menuItemOut(e) {
	this.className = this.className.replace(/\s*\bhover\b/g, '');
}


// Adds hover behavior to menu list elements
function enhanceMenu()
{
	if (document.all) { // IE only
		var menu = document.getElementById('menu');
		if (menu) {
			var ul = menu.getElementsByTagName('ul').item(0);
			if (ul) {
				ul.onmouseover = menuOver;
				ul.onmouseout = menuOut;
				ul = null;
			}
	
			var lis = menu.getElementsByTagName('li');
			if (lis) {
				for (var i = 0; i < lis.length; i++) {
					var node = lis[i];
					// Add hover behavior
					node.onmouseover = menuItemOver;
					node.onmouseout  = menuItemOut;
					//
					node = null;
				}
				lis = null;
			}
			menu = null;
		}
	}
}

function initPage(e)
{
	e = e || window.event;

	enhanceMenu();
}

if (document.getElementById && document.getElementsByTagName) {
	window.onload = initPage;
}