      layui.use( function () {
          var element = layui.element
            , layer = layui.layer
            , util = layui.util
            , $ = layui.$;

          //头部事件
          util.event('lay-header-event', {
              //左侧菜单事件
              menuLeft: function (othis) {
                  if ($('[class="layui-side layui-bg-black"]').attr('style') != 'left: 0px;') {
                      $('[class="layui-side layui-bg-black"]').animate({ left: '0' }, 1000);
                  } else {
                      $('[class="layui-side layui-bg-black"]').animate({ left: '-200px' }, 1000);
                  }
              }

          });

          $(".layui-body").click(function () {
              if ($(window).width() < 768) {
                  $('[class="layui-side layui-bg-black"]').animate({ left: '-200px' }, 1000);
              }
          })

      });
 



      layui.define(['util'], function (exports) {
          util = layui.util;
          util.toVisibleArea({
              scrollElem: $('.layui-side-scroll').eq(0)
            , thisElem: $('.site-demo-nav').find('dd.layui-this')
          });

          util.toVisibleArea({
              scrollElem: $('.layui-side-scroll').eq(1)
            , thisElem: $('.site-demo-table-nav').find('li.layui-this')
          });
      });
