﻿// JavaScript Document
// This script configures the dropdown nav menus. Set the megaConfig variables to 
// configure menu open and close timing (ms), as well as mouse sensitivity behaviour.


//<![CDATA[
$(document).ready(function() {

	function addMega(){
		$(this).addClass("hovering");
	}
	
	function removeMega(){
		$(this).removeClass("hovering");
	}
	
	// sensitivity is how much mouse movement required before considered an actual mouse move
	// by the menus system. 
	var megaConfig = {
		interval: 200,
		sensitivity: 4,
		over: addMega,
		timeout: 400,
		out: removeMega
	};
	
	$("li.mega").hoverIntent(megaConfig)

});
//]]>

function findPos(obj) {
	var curleft = curtop = 0;
		if (obj.offsetParent) {
			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
	return [curleft,curtop];
	}
}

