<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/jsp/includes.jsp" %>
<%@page import="java.util.Date,com.wisedu.coeus.util.DateUtils" %>
<input type="hidden" id="currentOpenId" value="${openId}">
<%
    request.setAttribute("nowDate", DateUtils.formatDatetime(new Date()));
%>
<div id="header">
	<div class="layout clearfix">
		<div class="view-logo">
            <a href="${contextPath}/home/index.mooc"><coeus:img alt="知途" src="images/zhitu-logo.png"/></a>
		</div>
		<!-- <div class="header-inner-menu">
			<a class="fix-nav-item" content="mycourse" href="${contextPath}/portal/mycourse/index.mooc">课程</a>
		</div> -->
		<div tabindex="1001" id="view_login_info" class="person-menu">
            <%@include file="login_info.jsp" %>
        </div>
	</div>
</div>
<script type="text/javascript">
    function addCurrentToHeadLink() {
        var content = $('#currentMenu').val();
        $('.header-inner-menu a').each(function () {
            var $this = $(this);
            if ($this.attr("content") == content) {
                $this.addClass("current");
            }
            else {
                $this.removeClass("current");
            }
        })
    }

    $(function () {
        //头部右侧 个人信息、登录
        $("#header").on("click",".person-menu",function(event){
            var b=$(this).hasClass("menu-open");
            $(this).focus();
            if(b){
                $(this).removeClass("menu-open");
                $(this).find(".select-dropdown").slideUp(100);
            }else{
                $(this).addClass("menu-open");
                $(this).find(".select-dropdown").slideDown(100);
            }

        });
        $(".person-menu").on("blur",function(){
            $(this).removeClass("menu-open");
            $(this).find(".select-dropdown").slideUp();
        });

        $(".select-item").mousedown(function(event){
            window.location.href=$(this).attr("href");
        });

		addCurrentToHeadLink();
    })

</script>
