// JavaScript Document
$(document).ready(function(){
$(".menu_top li").hover(
function()
{
showOrHideChild( "show", $(this), 200 );
},
function(){																	showOrHideChild( "hide", $(this), 200 );
});
																			
                   // Показываем или скрываем элемент меню
						 
		  function showOrHideChild( type, e, speed )
                  {
							var speed = ( speed && speed > 0 ) ? speed : 200;
							var child = false, p = e.parent("ul"), curOpacity = 10, curOpacityTo = 1;
							if( p.attr("class") != "drop" )
							{
								child = e.children("ul.drop");
							}
							else
							{
								child = e.children("ul.dropLevel2");
								curOpacity = 10, curOpacityTo = 1;
							}
                    if( type && child && child.children("li").length >= 1 )
                    {
                      switch( $.trim(type) )
                      {
                        case "show":
                          child.stop().fadeIn(
                                              speed,
                                              function()
                                              {
                                                opacity = parseInt(child.css("opacity") * 10);
                                                if( opacity < curOpacity )
                                                {
                                                  $(this).fadeTo(speed, curOpacityTo);
                                                }
                                              }
                                              );                       
                          break;
                        case "hide":
                          child.stop().fadeOut(speed);
                          break;
                      }
                    }
                  }
					
}); // Close (document).ready

