$(document).ready(function () {
    //判断是否存在ul
    $(".wc-menu li:has(ul)").hover(function () {
        //$(this) 代表.navmenu li
        $(this).children("a").addClass("move");
        if ($(this).find("li").length > 0) {
            //显示下拉菜单
            $(this).children("div").stop(true, false).show();
        }
    }, function () {
        $(this).children("a").removeClass("move");
        //隐藏下拉菜单
        $(this).children("div").stop(true, false).hide();
    });
});

$(".possplit").text("/");

$(".intro p").each(function (k, v) {
    $(v).html($(v).text())
})

$(".shi-box .intro").each(function (k, v) {
    $(v).html($(v).text())
})



if ($(".right-nr table").length > 0) {
    $.each($(".right-nr table"), function (k, v) {
        //$(v).removeAttr("style");
        $(v).wrap("<div class='table-responsive'></div>");
    });
}

//手机没有二级的箭头隐藏
$(".dropdown").each(function (k, v) {
    if ($(this).find("li").length == 0) {
        $(this).find(".fa-angle-down").hide();
    }
});

$(".nav_name").click(function () {
    $(".side-nav-panel").slideToggle(150);
});

$("a").each(function () {
        var href = $(this).attr("href");
        if (href != "" && href != undefined) {
            if (href.indexOf("http://") > -1 || href.indexOf("https://") > -1) {
                $(this).attr("target", "_blank");
            }  
        }
});

if ($(".lmnav a").length > 0) {
    $.each($(".lmnav a"), function (k, v) {      
            var href = $(v).attr("href");        
            if (window.location.href.indexOf(href) > -1) {
                $(this).addClass("active");
            }       
    });
}