// JavaScript Document

jQuery(window).load(function() {
							  
			//Drop Down Menu Holders	
			$("#static_122_menu").html($("#portlet_20110509 .portletBody").html()) ;			
			$("#static_140_menu").html($("#portlet_20110509_1 .portletBody").html()) ;
			$("#static_155_menu").html($("#portlet_20110509_2 .portletBody").html()) ;
			$("#static_141_menu").html($("#portlet_20110509_3 .portletBody").html()) ;
			$("#static_164_menu").html($("#portlet_20111024 .portletBody").html()) ;
			$("#static_94_menu").html($("#portlet_20110509_4 .portletBody").html()) ;
			$("#static_170_menu").html($("#portlet_20111024 .portletBody").html()) ;
			
			//Set up hover states on top menu items	
			$("div.menu_holder").hover(function() {
					$(this).show();
					var parentid = this.id.replace("_menu","") ;
					$('#'+parentid).addClass("hover") ;					
				}, function() {
					$(this).hide();
					var parentid = this.id.replace("_menu","") ;
					$('#'+parentid).removeClass("hover") ;			
			});			
			
			$("#static_122, #static_164, #static_140, #static_155, #static_141, #static_94, #static_170").hover(function() {
			  //mouse on the item
				var panel = $("#" + this.id + "_menu") ;
				var offset = $(this).position();	
				panel.css('top',(offset.top + 175 ) + 'px') ;
				panel.css('left',(offset.left + 60) + 'px') ;
				panel.show();		
				
			}, function() {
			  //mouse off the item
			 var panel = $("#" + this.id + "_menu") ;
			  panel.hide();		
			});
		
							 });

