
/* Slide-out menu control */
jQuery(document).ready(function(){

	jQuery("a[@rel].slideoutMenuLink").mouseover(
		function()
		{
			if( jQuery("#"+this.rel+"Container").html() != null )
			{
				ypSlideOutMenu.showMenu(this.rel);
			}
		}
	);
	
	jQuery("a[@rel].slideoutMenuLink").mouseout(
		function()
		{
			if( jQuery("#"+this.rel+"Container").html() != null )
			{
				ypSlideOutMenu.hideMenu(this.rel);
			}
		}
	);
	
	jQuery('#menus div.slideoutMenu').hover(
		function()
		{
			//first, get the ID of the div container.  we need to determine the button that is 'attached' to this slideout menu, and we can
			//	find that from the ID of the div container
			var theID = jQuery(this).attr('id');
			if(theID.indexOf('Container') > 0)
			{
				var theRel = theID.substring(0, theID.length - 'Container'.length);
				jQuery('a[@rel='+theRel+']').addClass('overMenu');
			}
			
		},
		function()
		{
			var theID = $(this).attr('id');
			if(theID.indexOf('Container') > 0)
			{
				var theRel = theID.substring(0, theID.length - 'Container'.length);
				jQuery('a[@rel='+theRel+']').removeClass('overMenu');
			}
		}
	)
});

