// JavaScript Document

$(document).ready(function() {
	var config = {    
     sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
     interval: 200, // number = milliseconds for onMouseOver polling interval    
     over: onMouseIn, // function = onMouseOver callback (REQUIRED)    
     timeout: 500, // number = milliseconds delay before onMouseOut    
     out: onMouseOut // function = onMouseOut callback (REQUIRED)    
	};
	
	$('.navigation-content').hide();
	$('a.navigation-link').hoverIntent(config);	
	
	function onMouseIn() {	
		if ( $(this).is(".current") ) return false;
    	if ( $(this).is(".active") ) return false;
		$(".active").next().hide("slow");
		$(".active").removeClass("active");
		$(this).next().show("slow");
		$(this).addClass("active");
		return false;
  	};
	
	function onMouseOut() {
		return false;
	};
	
	$('.content a').filter(function() {
    	return this.hostname && this.hostname !== location.hostname;
  	}).attr('rel','external')
	.click(function() {
    window.open(this.href);
    return false;
  });
	
  });