﻿// Custom sliding navigation: Jon Sinclair, December 27, 2008
// Feel free to use this as needed, please leave the credit 
// if don't change the code, or just change the variables.
$(document).ready(function(){
    //for top tier of nav
    $("#nav").find("ul li").hoverIntent(
		function(){
			if (this._timerID)
				clearTimeout(this._timerID)
			$("ul.tier1",this).fadeIn("fast");
			$("ul.tier1 li ul",this).hide();
		}, 
		function(){
			var self = this;
			var fadespeed = 200;
			this._timerID = window.setTimeout(function(){
				// jQuery fade out the UL of the calling li
				$("ul.tier1", self).fadeOut("fast");
			},fadespeed);
		}
	);
	$("#nav").find("ul li ul li").hover(
	    function(){
	        $("ul.tier2",this).fadeIn("fast");
	    },
	    function(){
	        $("ul.tier2",this).fadeOut("fast");
	    }
	);
});