<!--底部导航菜单-->
<nav class="mui-bar mui-bar-tab footer" id="footer">
    <a class="foot-outline" href="#offCanvasSide"> <b class="mitem"></b><span>章节列表</span></a>
    <a class="foot-video" href="#"> <b class="mitem"></b><span>视频</span></a>
    <!--<a class="foot-message" href="#"> <b class="mitem"></b><span>交流</span></a>-->
    <a class="foot-text" href="#"> <b class="mitem"></b><span>学习内容</span></a>
    <a class="foot-acc" href="#"> <b class="mitem"></b><span>附件</span></a>
    <!--<a class="foot-home" href="/mobile/default.ashx" type="link" target="_blank"> <b class="mitem"></b><span>返回首页</span></a>  -->
    <a class="foot-course" href="../CoursePage.ashx?couid={$course.cou_id}" type="link"> <b
            class="mitem"></b><span>返回课程</span></a>
</nav>
<script type="text/javascript">
    //底部按钮平均分布
    var footer = $("nav.footer");
    footer.find("a").each(function (item) {
        $(this).width(footer.width() / footer.find("a").size());
    });
</script>
<script type="text/javascript">

    //底部按的事件
    function foot_a_click() {
        var tag = $.trim($(this).text());
        if ($("#context-box>[tag=" + tag + "]").size() <= 0) return;
        //当前显示的内容块
        var current = $("#context-box>[tag=" + tag + "]:visible");
        if (current.size() > 0) return;
        $("#context-box>[tag]").hide();
        $("#context-box>[tag=" + tag + "]").show();
    }
    try {
        mui('body').on('tap', '.footer a', foot_a_click);
    } catch (err) {
        $(".footer a").click(foot_a_click);
        //显示章节列表
        $(".footer a.foot-outline").click(function () {
            var menu = $("#offCanvasSide");
            menu.addClass("mui-off-canvas-left-show");
            $("#offCanvasSideScroll").css({
                'overflow-y': 'auto'
            });
            $(".mui-inner-wrap").css({ opacity: .61 });
            //隐藏视频
            var video = document.querySelector("video");
            if (video) video.style.display = "none";
        });
        $("#offCanvasContentScroll").click(function () {
            var menu = $("#offCanvasSide");
            if (menu.hasClass("mui-off-canvas-left-show")) {
                menu.removeClass("mui-off-canvas-left-show");
                $(".mui-inner-wrap").css({ opacity: 1 });
            }
            //显示视频
            var video = document.querySelector("video");
            if (video) video.style.display = "";
        });
    }
</script>