/* ----javascript------ */
var thenow_i=0;
//¸Ä±äÏà¹Ø¶ÔÏóµÄ±³¾°Í¼
function chgobj_thebg(bg_var)
{
	if(bg_var>0){ thenow_i=bg_var-1; }
	if(document.getElementById(bg_obj))
	{
		var bgObj=document.getElementById(bg_obj);
		var bgUrl=theimgs[thenow_i];
		if(bg_type==0)
		{
			//bgObj.style.background="url(" + bgUrl + ")";
			bgObj.style.background="url(" + bgUrl + ") no-repeat";
		}
		else
		{
			bgObj.style.background=bgUrl;
		}
	}
}

//¼ÓÔØÊ±ÒýÓÃµÄ×Ô¶¯º¯Êý
function auto_chgbg()
{
	var thernd_num;
	if(thenow_i==theimgs.length)
	{
		thenow_i=0;
	}
	chgobj_thebg();
	//·µ»ØËæ»úÊý
	thernd_num=Math.floor(Math.random()*theimgs.length);
	thenow_i=thernd_num;
	//thenow_i+=1;
	setTimeout("auto_chgbg();",rotation_time);
}
 
window.onload = function () {
    $("#top_btn").click(function () {
        if ($("#com_mainmenu").css = ("display", "none")) {
            $("#com_mainmenu").slideToggle();
        }
    });
}

//点击切换 

$(function () {
		        $('.tab-menu li').click(function () {
		            $(this).addClass('active').siblings().removeClass('active'); 
		            var index=$(this).index();
		            $(".tab-con1").eq(index).show().siblings().hide();
		        })
		    })

 
 $(function () {
		        $('.tab-menu02 li').click(function () {
		            $(this).addClass('active').siblings().removeClass('active'); 
		            var index=$(this).index();
		            $(".tab-con2").eq(index).show().siblings().hide();
		        })
		    })


//导航栏固定
// $(function(){ 
// 	$(window).scroll(function () {
// 	            if ($(window).scrollTop() > 0) {
// 	                $(".mfboxbig02").addClass("addflex");
	                
// 	            }
// 	            else {
// 	                $(".mfboxbig02").removeClass("addflex");
// 	            }
// 	        }); 
// }) 

 $(function(){
	 	$(".yewubox ul li:nth-child(1)").addClass("show");
	    $(".yewubox ul li").hover(function(){
	         $(this).addClass("show").siblings("li").removeClass("show");
	    })
	    });

  