﻿var now_content = 0;
var timeout3 = 10000;
var way = 1;
$(function() {
    $("#h_cpqhzs .tit .tit1 a").mouseover(function() {
        var $index = $("#h_cpqhzs .tit .tit1 a").index(this);
        $("#h_cpqhzs .tit .tit1 a").eq($index).addClass("on").siblings().removeClass("on");
        $("#h_cpqhzs .con .conn").eq($index).addClass("on").siblings().removeClass("on");
    })
    $("#h_xlqh div.tit dl dt").click(function() {
    now_content = $("#h_xlqh div.tit dl dt").index(this);
        $(this).next("dd").css("display", "block").siblings("dd").css("display", "none");
    })
    theTimer2 = setTimeout(function()
    { now_content =0; change_content(); },
   timeout3);
})
function change_content() {
    if (way == 1) {
        $("#h_xlqh div.tit dl dt").eq(++now_content).next("dd").css("display", "block").siblings("dd").css("display", "none");
        if (now_content == ($("#h_xlqh div.tit dl dt").length-1)) {
            way = 0;
        }
    }
    else {
        $("#h_xlqh div.tit dl dt").eq(--now_content).next("dd").css("display", "block").siblings("dd").css("display", "none");
        if (now_content == 0) {
            way = 1;
        }
    }
    theTimer2 = setTimeout('change_content()', timeout3);
}

