$(function(){
	if (jQuery.browser.msie) { 

	} else {
		// $('div#mainwrapper').css("opacity","0");
		$('ul#nav li a').css("opacity","100");
		$('ul#nav li span').css("opacity","0");
		// $('ul#nav li.active a').css("opacity","0");
		$('ul#nav li.active span').css("opacity","100");
		$('ul#nav li.active a').css("opacity","0");
	
		// $(document).ready(function () {
		// 			// // loop menu
		// 			// $("#nav li a").each(	
		// 			// 	function (intIndex) {
		// 			// 		if($(this).attr('class').indexOf("active")) {
		// 			// 			// animate span opacity to 0
		// 			// 			$(this).stop().animate({
		// 			// 				opacity: 1
		// 			// 			}, 1500);
		// 			// 		}
		// 			// 	}
		// 			// );
		// 			// // animate active span opacity to 100
		// 			// $(this).find("#nav li.active span").stop().animate({
		// 			// 	opacity: 1
		// 			// }, 1000);
		// 			$("#mainwrapper").stop().animate({
		// 				opacity: 1
		// 			}, 1000);
		// 		});
	
		// Navigation buttons: mouse over
		$("ul#nav li").hover(function () {
		
			if($(this).attr('class').indexOf("active")) {
				// animate span opacity to 100
				$(this).find("span").stop().animate({
					opacity: 1
				}, 100);
			
				// animate anchor opacity to 0
				$(this).find("a").stop().animate({
					opacity: 0
				}, 100);
			}
		},
		// Navigation buttons: mouse out 
		function () {

			if($(this).attr('class').indexOf("active")) {
				// animate span opacity to 0
				$(this).find("span").stop().animate({
					opacity: 0
				}, 1100);
		
				// animate anchor opacity to 100
				$(this).find("a").stop().animate({
					opacity: 1
				}, 1100);
			}
		});

	}

});
