//设置新闻列表页面的链接
$(document).ready( function () {
    setAnchor();
});
//设置动态新闻列表的链接地址
function setAnchor(){
    var detailLink = "/article/chinese/show/";
    //判断是否是英文模式
    if (location.href.indexOf("/english") != -1) {
        detailLink="/article/english/show/";
    }
    var anchors = document.getElementsByTagName("a");
    for (var i = 0, len = anchors.length; i < len; i++) {
        var curAnchor = anchors[i];
        var type = curAnchor.getAttribute("data-type");
        var id = curAnchor.getAttribute("data-id");
        if (type) {
            curAnchor.setAttribute("href", detailLink + id + "/" + type);
        }
    }
}