define(() => {
    (function($) {
        $(function () {
            var $wrapper = $('.works-wrapper');
            $('.works-footer .floating-top').bind('click', function (event) {
                event.preventDefault();
                event.stopPropagation();
                $('.works-body .works-content').stop().animate({ scrollTop: 0 }, 1200);
            });

            $('.works-sider .works-sider-menu').bind('click', function () {
                var $this = $(this);
                var $next = $this.next();
                if ($next.is('.works-sider-group')) {
                    $this.toggleClass('active');
                    $next.stop();
                    if ($this.hasClass('active')) {
                        $this.siblings('.active').removeClass('active');
                        $next.slideDown(300);
                    } else {
                        $next.slideUp(300);
                    }
                }
            }).filter('.active').each(function () {
                var $this = $(this);
                var $next = $this.next();
                if ($next.is('.works-sider-group')) {
                    $next.show();
                }
            });

            $('.works-header .works-header-menu .works-menu.works-nav-menu').bind('click', function() {
                var $this = $(this);
                $wrapper.toggleClass('works-navs-active');
            });
        });
    }(jQuery));
});