function(side, animate) {
        var menus = this.getMenus(),
            menu = menus[side],
            after, viewportAfter,
            size;

        animate = (animate === false) ? false : true;

        if (!menu || (menu.isHidden() || menu.isAnimating)) {
            return;
        }

        after = {
            translateX: 0,
            translateY: 0
        };

        viewportAfter = {
            translateX: 0,
            translateY: 0
        };

        size = (side == 'left' || side == 'right') ? menu.element.getWidth() : menu.element.getHeight();

        if (side == 'left') {
            after.translateX = -size;
        }
        else if (side == 'right') {
            after.translateX = size;
        }
        else if (side == 'top') {
            after.translateY = -size;
        }
        else if (side == 'bottom') {
            after.translateY = size;
        }

        if (menu.$cover) {
            if (animate) {
                menu.getTranslatable().on('animationend', function() {
                    menu.isAnimating = false;
                    menu.hide();
                }, this, {
                    single: true
                });

                menu.translate(after.translateX, after.translateY, {
                    preserveEndState: true,
                    duration: 200
                });
            }
            else {
                menu.translate(after.translateX, after.translateY);
                menu.hide()
            }
        }
        else {
            if (animate) {
                this.getTranslatable().on('animationend', function() {
                    menu.isAnimating = false;
                    menu.hide();
                }, this, {
                    single: true
                });

                this.translate(viewportAfter.translateX, viewportAfter.translateY, {
                    preserveEndState: true,
                    duration: 200
                });
            }
            else {
                this.translate(viewportAfter.translateX, viewportAfter.translateY);
                menu.hide();
            }
        }
    }
function(side, animate) {
        var menus = this.getMenus(),
            menu = menus[side],
            after, viewportAfter,
            size;

        animate = (animate === false) ? false : true;

        if (!menu || (menu.isHidden() || menu.isAnimating)) {
            return;
        }

        after = {
            translateX: 0,
            translateY: 0
        };

        viewportAfter = {
            translateX: 0,
            translateY: 0
        };

        size = (side == 'left' || side == 'right') ? menu.element.getWidth() : menu.element.getHeight();

        if (side == 'left') {
            after.translateX = -size;
        }
        else if (side == 'right') {
            after.translateX = size;
        }
        else if (side == 'top') {
            after.translateY = -size;
        }
        else if (side == 'bottom') {
            after.translateY = size;
        }

        if (menu.$cover) {
            if (animate) {
                menu.getTranslatable().on('animationend', function() {
                    menu.isAnimating = false;
                    menu.hide();
                }, this, {
                    single: true
                });

                menu.translate(after.translateX, after.translateY, {
                    preserveEndState: true,
                    duration: 200
                });
            }
            else {
                menu.translate(after.translateX, after.translateY);
                menu.hide()
            }
        }
        else {
            if (animate) {
                this.getTranslatable().on('animationend', function() {
                    menu.isAnimating = false;
                    menu.hide();
                }, this, {
                    single: true
                });

                this.translate(viewportAfter.translateX, viewportAfter.translateY, {
                    preserveEndState: true,
                    duration: 200
                });
            }
            else {
                this.translate(viewportAfter.translateX, viewportAfter.translateY);
                menu.hide();
            }
        }
    }
function ( side , animate ) { var menus = this . getMenus ( ) , menu = menus [ side ] , after , viewportAfter , size ; animate = ( animate === false ) ? false : true ; if ( ! menu || ( menu . isHidden ( ) || menu . isAnimating ) ) { return ; } after = { translateX : 0 , translateY : 0 } ; viewportAfter = { translateX : 0 , translateY : 0 } ; size = ( side == 'left' || side == 'right' ) ? menu . element . getWidth ( ) : menu . element . getHeight ( ) ; if ( side == 'left' ) { after . translateX = - size ; } else if ( side == 'right' ) { after . translateX = size ; } else if ( side == 'top' ) { after . translateY = - size ; } else if ( side == 'bottom' ) { after . translateY = size ; } if ( menu . $cover ) { if ( animate ) { menu . getTranslatable ( ) . on ( 'animationend' , function ( ) { menu . isAnimating = false ; menu . hide ( ) ; } , this , { single : true } ) ; menu . translate ( after . translateX , after . translateY , { preserveEndState : true , duration : 200 } ) ; } else { menu . translate ( after . translateX , after . translateY ) ; menu . hide ( ) } } else { if ( animate ) { this . getTranslatable ( ) . on ( 'animationend' , function ( ) { menu . isAnimating = false ; menu . hide ( ) ; } , this , { single : true } ) ; this . translate ( viewportAfter . translateX , viewportAfter . translateY , { preserveEndState : true , duration : 200 } ) ; } else { this . translate ( viewportAfter . translateX , viewportAfter . translateY ) ; menu . hide ( ) ; } } }
Hides a menu specified by the menu's side.
@param {String} side The side which the menu is placed.
Hides a menu specified by the menu s side .