// menu fly out functionality
$(function() {
	
	// determine whether is using IE 6 or IE 7, if so then ignore this functionality
	var version = 'valid';
	//test for MSIE x.x;
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ 
	 // capture x.x portion and store as a number
	 var ieversion=new Number(RegExp.$1);
	 if (ieversion<=7) version = 'invalid';
	}
	
	if(version == 'valid') {
		$('ul.nav li a').hover(function(){
			var menuItem = $(this).parent();
			
				if(menuItem.attr('class') != 'active') {
					$(this).parent().children('ul.flyout').css('display', 'block');
				}
		},
			function() {
				$(this).parent().children('ul.flyout').css('display', 'none');
			}
		);
		$('ul.flyout').hover(function() {
			$(this).css('display', 'block');
		},
			function() {
				$(this).css('display', 'none');
			}
		);
	}
});