/* 	JCFlyout.js
	
	Javascript support for 'simple JQuery flyout menu' from jc-designs.net
	
 */
 
 $(document).ready(function($) {
		//Menu animation						
		$('#navList ul').css({display: "none"}); //Fix Opera
 
		$('#navList li').hover(function() {  
            $(this).addClass('addPosition');
			//$(this).find('a').stop().animate({'width' : "210"});	// This makes the links widen when hovered, but looks silly on 2nd-level menu
			$(this).find('ul:first').css({visibility : "visible", display : "none"}).show(200);
			
			// Added by GSK: Change container width according to whether 2nd-level items are exposed. This prevents the container from overwriting
			//  the slideshow (or any other content to its right), which can make it impossible to click on anything in the overwritten area.
			$("#navContainer").css({"width":"399px"});
			}, 
		function() {
    		$(this).find('ul:first').css({visibility : "hidden"}).hide(200);
			//$(this).find('a').stop().animate({'width' : "190"});
            $(this).removeClass('addPosition');
			$("#navContainer").css({"width":"197px"});
			});
		});
