$(function(){
    
    /* Часть, необходимая для левого меню*/
      
    $('#lmenu ul').hide();
    openItem($('#lmenu-start'));

    function openItem(item)
    {
        item.addClass('opened');
        item.next().slideDown('fast');
    }
    
    function closeItem(item)
    {       
        item.removeClass('opened');
        item.next().slideUp('fast');
    }
    
   
    $('#lmenu .parent').click(function(){
        if($(this).hasClass('opened'))
            closeItem($(this));
        else
            openItem($(this));
    })
    
    
   /* Часть, необходимая для блоков "Подробнее" */
    $('.table0 .show').show();
    $('.table0 .details').hide();

    $('.table0 .show').click(function(){
        $(this).hide();
        $(this).parent().next().children('.hide').show();
        $(this).parent().prev().slideDown('fast');
    });

    $('.table0 .hide').click(function(){
        $(this).hide();
        $(this).parent().prev().children('.show').show();
        $(this).parent().prev().prev().slideUp('fast');
    });

    
});
