jQuery(document).ready(function(){ 
	initTips();
});

var chipTipTimer = null;
var tipFadeSpeed = 200;	/* fade in/out effect speed (note:disabled for ie due to png alpha issues) */
var tipDisappearDelay = 1000;	/* ms delay before the sub nav fades out when the mouse moves off */

function initTips() {
	if (jQuery.browser.msie) {
		tipFadeSpeed = 0;
	}
	// Cancel the fade out timeout if the mouse moved out of the anchor and on to the tip
    jQuery(".tip").mouseover( 
    	function(eventObject) {
    		clearTimeout(chipTipTimer);
		}
	);
	jQuery(".tip-anchor, .tip").mouseout(
    	function(eventObject) {
    		chipTipTimer = setTimeout(hideTips,tipDisappearDelay);							    		
		}
	);
}
function showTip(tipId) {
	clearTimeout(chipTipTimer);
	jQuery(".tip:not(#"+tipId+")").fadeOut(tipFadeSpeed);
	jQuery("#"+tipId).fadeIn(tipFadeSpeed);
}
function hideTips() {
	jQuery(".tip").fadeOut(tipFadeSpeed);
	clearTimeout(chipTipTimer);
}


