$(document).ready(function()   {
    

if($('.menu3 .upakovka a[class=act]').html()!=null) {
    
    var this_point=$('.menu3 .upakovka a[class=act]');
    
    var parent_id=$(this_point).parent().children('.point_parent_id').attr('title');
    var point_id=$(this_point).parent().children('.point_id').attr('title');
    
    
    $('.menu2 .point_id[title='+parent_id+']').parents('.menu2').show(0,'easeInOutExpo',function(){       

        $(this_point).parents('.menu3').show();
        
    });
    
} else {
    
    
if($('.menu2 a[class=act]').html()!=null) {
   $('.menu2 a[class=act]').parents('.menu2').show(); 
} 
    
} 



    
    
$('.menu1 li').live('click',function(){
    
    
       if($(this).children('a').attr('href')=="#") { 

    
           
$('.menu1 li a.act').removeClass('act');
$('.menu2 li a.act').removeClass('act');
$(this).children('a').addClass('act'); 
var point_id=$(this).children('.point_id').attr('title');


if($('.menu3:visible').html()!=null) {
$('.menu3:visible').slideUp(100,'easeInOutExpo',function(){    
    
    
if($('.menu2:visible').html()==null) {
$('.menu2 .point_parent_id[title='+point_id+']:first').parents('.menu2').slideDown(250,'easeInOutExpo',function(){});  
//if($('#mainText').html()!=null){ console.log('menu1'); }     
} else {    
$('.menu2:visible').slideUp(100,'easeInOutExpo',function(){    
 $('.menu2 .point_parent_id[title='+point_id+']:first').parents('.menu2').slideDown(250,'easeInOutExpo',function(){});     
//if($('#mainText').html()!=null){ console.log('menu2'); }    
});  
}    
      
      });       
} else {
    
 
if($('.menu2:visible').html()==null) {
$('.menu2 .point_parent_id[title='+point_id+']:first').parents('.menu2').slideDown(250,'easeInOutExpo',function(){}); 
if($('#mainText').html()!=null){ $('#mainText').animate({'top':'+=28'},250,'easeOutExpo',function(){}); }         
} else {    
if($('#mainText').html()!=null){ $('#mainText').animate({'top':'-=28'},250,'easeOutExpo',function(){}); }  
$('.menu2:visible').slideUp(100,'easeInOutExpo',function(){    
 if($('#mainText').html()!=null){ $('#mainText').animate({'top':'+=28'},250,'easeOutExpo',function(){}); }  
 $('.menu2 .point_parent_id[title='+point_id+']:first').parents('.menu2').slideDown(250,'easeInOutExpo',function(){});      
});  
} 
    
    
}
    
 
return false;
 
 } else return true;

});
 
 
 
 
 /*
 
 $('.menu2 li').live('click',function(){
     
       if($(this).children('a').attr('href')=="#") {      
$('.menu2 li a.act').removeClass('act');
$(this).children('a').addClass('act'); 
var point_id=$(this).children('.point_id').attr('title');


if($('.menu3:visible').html()==null) {
  $('.menu3 .point_parent_id[title='+point_id+']:first').parents('.menu3').slideDown(250,'easeInOutExpo',function(){});       
} else {
    
$('.menu3:visible').slideUp(100,'easeInOutExpo',function(){    
 $('.menu3 .point_parent_id[title='+point_id+']:first').parents('.menu3').slideDown(250,'easeInOutExpo',function(){});      
});  
    
}


return false;
       } else return true;
});
 
 */
    
});
