$(document).ready(function() {
    
        var easing_type = 'easeOutBounce';
        var default_dock_height = '40';
        var expanded_dock_height = $('#dock').height(); //присваиваем текущее значение высоты элемента
        var body_height = $(window).height() - default_dock_height;
        
        
        
           
        /*$('#but').mouseover(function () {
        expanded_height = $(window).height() - expanded_dock_height;
        $('#dock').animate({'height':expanded_dock_height},{queue:false, duration:1000, easing: easing_type});
        }).mouseout(function () {
        body_height = $(window).height() - default_dock_height;
        $('#dock').animate({'height':default_dock_height},{queue:false, duration:1000, easing: easing_type});
        });*/
        $('#but_up').click(function () {
        $(".dock_text_content").show();
        $(".dock_text_form").hide();
        $('#dock').css({'position':'absolute', 'bottom':"0px"});
        $(this).hide();
        $('#but_down').show();
        expanded_height = $(window).height() - expanded_dock_height;
        $('#dock').animate({'height':expanded_dock_height},{queue:false, duration:1000});
        return false;
        })
        
        $('#but_down').click(function () {
        $('.rem').show();
        $(".add").hide();    
        $(this).hide();
        $('#but_up').show();
        body_height = $(window).height() - default_dock_height;
        $('#dock').animate({'height':default_dock_height},{queue:false, duration:1000});
        return false;
        })
        
        $('.rem').click(function () {
        $(".dock_text_content").hide();
        $(".dock_text_form").show();
        $(this).hide();
        $(".add").show();
        /*$(this).css({'text-decoration':'none'});*/
        $('#dock').css({'position':'absolute', 'bottom':"0px"});
        $("#but_up").hide();
        $('#but_down').show();
        expanded_height = $(window).height() - expanded_dock_height;
        $('#dock').animate({'height':expanded_dock_height},{queue:false, duration:1000});
        return false;
        })
        
        $(".add").click(function () {
            $(".dock_text_content").show();
            $(".dock_text_form").hide();    
            return false;
        })
        
        $(".wait_text p sub a").click(function () {
        $(".wait").hide();
        return false;
        })
        
});
