//导航，鼠标在li上的移入，移出的事件。class="newUL"为显示或者隐藏的层
$(function() {

    var a = 0;
    var b = 0;
    window.setInterval(function() {
        if (b == 0) {
            $(".fMain").find("div").each(function(index, domEle) {
                {
                    if (index == a) {
                        $(domEle).fadeIn("slow");
                        $(".fsNav").find("a").eq(a).addClass("current");
                    }
                    else {
                        $(domEle).hide();
                        $(".fsNav").find("a").eq(index).removeClass("current");
                    }
                }
            });
            a = a + 1;
            if (a > $(".fMain").find("div").length-1) {
                a = 0;
            }
        }
    }, 3000);
    $(".fsNav").find("a").mouseover(function() {
        b = 1;
    });

    $(".fsNav").find("a").mouseout(function() {
        b = 0;
    });
    $(".fMain").find("div").mouseover(function() {
        b = 1;
    });
    $(".fMain").find("div").mouseout(function() {
        b = 0;
    });

    $(".nav li").hover(function() {
        //显示UL内容
        $(this).find(".nav2").show();
        //为A标签添加样式
        $(this).children("a").toggleClass("current");
    }, function() {
        //隐藏UL内容。
        $(this).find(".nav2").hide();
        //删除A标签样式
        $(this).children("a").toggleClass("current");
    });

    //首页大广告鼠标滑动事件。
    var objTabs = $(".mc");
    $("#focus ul.fsNav li a").hover(function() {
        objTabs.hide().filter("#" + $(this).attr("divid")).fadeIn("fast");
        $("ul.fsNav li a").removeClass("current");
        $(this).addClass("current");
    }, function() {
        $("ul.fsNav li a").removeClass("current");
        $(this).addClass("current");
    });

    //左边3级菜单
   
        $("li.liNav span").hover(function() {
            //显示UL内容
            $(this).find(".ss3").show("fast");
            //为A标签添加样式
            $(this).children("a").toggleClass("current");
        }, function() {
            //隐藏UL内容。
            $(this).find(".ss3").hide("fast");
            //删除A标签样式
            $(this).children("a").toggleClass("current");
        });

        $(".nav").find("li").mouseover(function() {
            if ($(this).find(".s3 a").length == 0) {
                $(this).find(".nav2").remove();
            }
        });


        $(".ul03").find(".liNav span").mouseover(function() {
            if ($(this).find(".ss3 a").length ==0) {

                $(this).find(".ss3").remove();
            }
        });

        $(".ul06a").find(".liNav span").mouseover(function() {
            if ($(this).find(".ss3 a").length == 0) {

                $(this).find(".ss3").remove();
            }
        });


        //第一个鼠标滑动事件用。
        var objTabs2 = $(".bmain");
        $("#tabs ul.bnav1 li a").hover(function() {
            objTabs2.hide().filter("#" + $(this).attr("divid")).show();
            $("ul.bnav1 li a").removeClass("current");
            $(this).addClass("current");
        }, function() {
            $("ul.bnav1 li a").removeClass("current");
            $(this).addClass("current");
        });
        //第二个鼠标滑动事件。
        var objTabs3 = $(".bmain2");
        $("#tabs2 ul.bnav2 li a").hover(function() {
            objTabs3.hide().filter("#" + $(this).attr("divid")).show();
            $("ul.bnav2 li a").removeClass("current");
            $(this).addClass("current");
        }, function() {
            $("ul.bnav2 li a").removeClass("current");
            $(this).addClass("current");
        });



});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22985831-1']);
_gaq.push(['_trackPageview']);

(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();










