// JavaScript Document
$(function(){	
	//for primary navigation					 
	$("ul.nav li a").css("opacity", 0);
	$("ul.nav li a").hover(function(){
		$(this).stop().animate({
		opacity: 1
		}, 300);
	},
	function () {
		// animate opacity to nill
		$(this).stop().animate({
			opacity: 0
		}, 600);
	});
	
	$("ul.nav li ul li a").css("opacity", 1);
	$("ul.nav li ul li a").hover(function(){
		$(this).stop().animate({
		opacity: 1
		}, 100);
	},
	function () {
		// animate opacity to nill
		$(this).stop().animate({
			opacity: 1
		}, 100);
	});
	
	//for sub navigation
	$("ul.nav li").hover(function(){
		if(!($(this).children("ul").is(":animated"))){																
			$(this).stop().children("ul").fadeIn("fast");
		}
	}, function(){
		$(this).stop().children("ul").delay(300).fadeOut("fast");	
	});
});
