﻿var oScripts = document.getElementsByTagName("script");
var sEditorPath;
for (var i = 0; i < oScripts.length; i++) {
    var sSrc = oScripts[i].src.toLowerCase();
    if (sSrc.indexOf("javascript/index.js") != -1) sEditorPath = oScripts[i].src.replace(/index.js/, "");
}
document.write("<scr" + "ipt src='" + sEditorPath + "jquery.query.js'></scr" + "ipt>");
document.write("<scr" + "ipt src='" + sEditorPath + "common.js'></scr" + "ipt>");
document.write("<scr" + "ipt src='" + sEditorPath + "dialog.js'></scr" + "ipt>");
document.write("<scr" + "ipt src='" + sEditorPath + "AC_RunActiveContent.js'></scr" + "ipt>");

$(document).ready(function() {
    showflash(295, 220, "ImgFocus");
    //	showflash(512, 250, "list_fla", "bcastrlist.xml");
    $("#GroupNewLog .Show ul li").eq(4).addClass("line");
    $("#GroupBestLog .Show ul li").eq(4).addClass("line");
    $("#WeeklyBest .Show ul li").eq(4).addClass("line");
    $("#TodayHot .Show ul li").eq(4).addClass("line");
    $("#TodayHot .Show ul li").eq(9).addClass("line");
    $("#EliteLog  ul li").eq(4).addClass("line");
    $("#EliteLog  ul li").eq(9).addClass("line");
    $("#EliteLog  ul li").eq(14).addClass("line");
    $("a").each(function(i) {
        if ($(this).attr("title") == '') {
            $(this).attr("title", $(this).html());
        }
    });
    if (typeof jsonclass == "object") {
        $("#classname").html(jsonclass[0].classname);
    }
    if (typeof jsonclass == "string") {
        $("#classname").html('所有分类');
    }
    var isbest = $.query.get("isbest");
    if (noquerystringurl.indexOf("blog.aspx") > 0) {
        if (isbest == "1") {
            var classname = $("#classname").html();
            $("#classname").html(classname + ("（精华日志）"))
        }
    }
    if (noquerystringurl.indexOf("blogger.aspx") > 0) {
        switch (isbest) {
            case 1: $("#bloggername").html("推荐用户"); break;
            case 2: $("#bloggername").html("名人博客"); break;

        }
    }
    $(".ShowIndexTag").each(function(i) {
        var usenum = $(this).attr("usenum");
        if (usenum > 1000) {
            $(this).addClass("ShowIndexTag" + 5);
        }
        else if (usenum > 500) {
            $(this).addClass("ShowIndexTag" + 4);
        }
        else if (usenum > 100) {
            $(this).addClass("ShowIndexTag" + 3);
        }
        else if (usenum > 50) {
            $(this).addClass("ShowIndexTag" + 2);
        }
        else if (usenum > 10) {
            $(this).addClass("ShowIndexTag" + 1);
        }
    });
    //	$("#HotComment  .Show ul").eq(1).addClass("CommentList");
    //   alert(noquerystringurl);
});