
$(document).ready(function() {	

	$(".navDropDown").mouseenter (
		function() { $(".navDropDown").show(); }
	);
	
	$(".navDropDown").mouseleave (
		function() { 
			hideDropDown();
		}
	);
	
	$("body").mouseenter (
		function() { 
			hideDropDown();
		}
	);
	
	$("#headerBox").mouseenter (
		function() { 
			hideDropDown();
		}
	);
	
	$("#navBar").mouseleave (
		function() { 
			hideDropDown();
		}
	);
	
	$('#testimonials .slide');
	setInterval(function(){
		$('#testimonials .slide').filter(':visible').fadeOut(1000,function(){
			if($(this).next('li.slide').size()){
				$(this).next().fadeIn(1000);
			}
			else{
				$('#testimonials .slide').eq(0).fadeIn(1000);
			}
		});
	},10000);

});
	
function hideDropDown() {
	for (var i = 1; i <= 7; i++) {
		thisNav = "navBarButton" + i;
		document.getElementById(thisNav).style.backgroundColor = "#E49712";
		
		thisLink = "navLink" + i;
		document.getElementById(thisLink).style.color = "#FFFFFF";
		
		thisDD = "nav" + i;
		document.getElementById(thisDD).style.visibility = "hidden";
	}	
}

function showDropDown(whichDrop) {
	
	hideDropDown();
	thisNav = "navBarButton" + whichDrop;
	thisLink = "navLink" + whichDrop;
	document.getElementById(thisNav).style.backgroundColor = "#F4D5A0";
	document.getElementById(thisLink).style.color = "#E49712";
	
	openNav = "nav" + whichDrop;
	document.getElementById(openNav).style.visibility = "visible";
}

	



