
function init()
{
	
	if(window.do_Calendars)
		if(typeof window.do_Calendars == 'function') 
			do_Calendars();
	
	
	
								  

		$$("#logTable .ltr").each(function(t)
		{ 
				t.addEvents(
				{
					'mouseover': function(){
						t.setStyle("background-color", "#fefefe");
						t.getElement(".edit").setStyle("display", "block");
					},
					'mouseout': function(){
						t.setStyle("background-color", "transparent");
						t.getElement(".edit").setStyle("display", "none");
					}
				});
		});
		
		
								  
		
	
	
	
		//menu
		if($("menuCont"))
		{	

			$$(".menuLink").each(function(el)
			{

				var parent = el.getParent(".linkCont");
				var submenu = parent.getElement(".submenu");

				parent.addEvent("click", function()
				{
					var href = el.getProperty("href");
					window.location = href;
					
				});

				if(!el.hasClass("active"))
				{
						var button = el.getElement(".buttonLink");
						var buttonSrc = button.getProperty("src");
						var buttonHover = el.getElement(".buttonLinkHover");
							
						parent.addEvent('mouseenter', function()
						{
							parent.removeClass("off");
							parent.addClass("on");
							
							
							//rollover
							if(button && buttonHover)
							{
									button.setProperty("src", buttonHover.getProperty("src"));

							}
							
							
							// submenu
							if(submenu)
							if(!submenu.hasClass("showSub"))
							{
								//submenu.setStyle("width", 0);
								submenu.setStyle("display", "block");
								submenu.setStyle("z-index", 12);
								//var fx = new Fx.Tween(submenu, { 'duration':390, 'link':'chain'} );
								//fx.start("width", 950);
								
																
							} // submenu
							//-----------------
							
						});
						
						parent.addEvent('mouseleave', function()
						{
							parent.removeClass("on");
							parent.addClass("off");
							
							
							//rollover
							if(button && buttonHover)
							{
									button.setProperty("src", buttonSrc);
							}
							
							
							//submenu
							if(submenu)
							if(!submenu.hasClass("showSub"))
							{
								
								submenu.setStyle("z-index", 5);
								//var fx = new Fx.Tween(submenu, { 'duration':390, 'link':'chain'} );
								//fx.start("width", 0).chain(function() { submenu.setStyle("display", "none"); });
								submenu.setStyle("display", "none");
							}
							// ---------------
							
							
						});

				} //-- has class active
				
				
				
				
			
			});
			
			
		}
		
		// ------

		


}





window.addEvent('domready', function(){init()});  // domready, load









