var liselection = 0;
		var currentUL = 0;
		var currentLI = 0;
		
		function openSub(){
		closeSub();
		currentUL = $(this).attr('id');   //This gets MN1 and MN2
		currentLI = $(this).find('ul').attr('id');   //This gets Li1 and Li2	
		$(this).find('ul').removeClass('hide');
		$('#li2').addClass('mnopen'); //Keep the on state of the opening LI
		}
		
		function closeSub(){
		$('ul#mn2').addClass('hide');
		$('#li2').removeClass('mnopen'); //Keep the on state of the opening LI
		}
		
		function test(){
		var x = $(this).next().attr('id');
		alert(x);
		}
		
		//Slide show function
		function slideSwitch() {
			var $active = $('#slideshow IMG.active');
			if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
			var $next =  $active.next().length ? $active.next()
				: $('#slideshow IMG:first');
			$active.addClass('last-active');
			$next.css({opacity: 0.0})
				.addClass('active')
				.animate({opacity: 1.0}, 1000, function() {
					$active.removeClass('active last-active');
				});
		}		
		
		$(document).ready(function()		
		{  
		$('li').has('ul>li').bind('mouseover focusin', openSub);
		$('li').has('ul>li').bind('mouseout', closeSub);	
		$("#li1").focusin(closeSub);
		$("#li3").focusin(closeSub);
		document.onclick = closeSub;
		
		//Credit for slideshow function: http://jonraasch.com/blog/
		setInterval( "slideSwitch()", 8000 );
		 });
