
$(function () {
    //头部图片切换
    $("#kinMaxShow").kinMaxShow({
        height: 380,
        intervalTime: 1,
        switchTime: 100,
        button: {
            showIndex: false,
            normal: { background: 'url(images/button.png) no-repeat -14px 0', marginRight: '8px', border: '0', right: '49%', bottom: '50px' },
            focus: { background: 'url(images/button.png) no-repeat 0 0', border: '0' }

        }
    });

    //试题做题比列 
    $('#containers').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: 0,
            plotShadow: true
        },
        title: {
            text: '', //标题
            align: 'center',
            verticalAlign: 'middle',
            y: 100
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                dataLabels: {
                    enabled: true,
                    distance: -100,
                    style: {
                        fontWeight: 'bold',
                        color: 'white',
                        textShadow: '0px 1px 2px blue'
                    }
                },
                startAngle: -2000,
                endAngle: 90,
                center: ['50%', '60%']
            }
        },
        series: [{
            type: 'pie',
            name: '比列',
            innerSize: '80%',
            data: [
                        ['Firefox', 45.0],
                        ['IE', 26.8],
                        ['做错 10题 ', 12.8],
                        ['收藏 1套 ', 0.7],
                        ['已做 27套题', 6.2],
                        ['未做 17317套 ', 8.5]
                    ]
        }]
    });
});
function getprogress(value, maxvalue, color) {
    var w;
    if (maxvalue <= 0)
        w = 0;
    else
        w = value * 100 / maxvalue;
    if (value > maxvalue) {
        w = 100;
    }
    document.writeln("<div class=\"process-bar\">");
    document.writeln("     <div class=\"pb-wrapper\">");
    document.writeln("          <div class=\"pb-container\">");
    document.writeln("               <div class=\"pb-text\">");
    document.writeln("               " + value + "/" + maxvalue + "</div>");
    if (color == undefined || color == "") { color = "" } else { color = "background-color:" + color + ";"; }
    document.writeln("               <div class=\"pb-value\" style=\"width: " + w + "%;" + color + "\">");
    document.writeln("               </div>");
    document.writeln("         </div>");
    document.writeln("     </div>");
    document.writeln("</div>");
}
$(function () {
    showOrNone(1);
});
//修改样式问题
function liClick(obj) {
    $(obj).css("color", "red");
    $(obj).siblings("li").css("color", "black");
}

//显示隐藏信息
function showOrNone(obj) {
    switch (obj) {
        case 1:
            $("#tableBasicInfo").css("display", "block");
            $("#divClassInfo").css("display", "none");
            break;
        case 2:
            $("#tableBasicInfo").css("display", "none");
            $("#divClassInfo").css("display", "block");
            break;
    }
}
  