	
	var offset = [99,177,265,353,440,523,616,708,796];
	var widthArr = [85,93,93,92,88,99,98,94,88];
	var url = ["index.html", "Company.aspx", "NewsList.aspx?id=9", "ProductList.aspx?id=10", "HeroList.aspx", "Order.aspx", "luntan.html", "TouchUs.aspx", "Message.aspx"];
	var sid =1;
	
	function xianshi(id) {
		//alert(sid);
		if(sid != 1) {
			var h = document.getElementById("div"+sid);
			h.style.display = "none";
		}
		sid = id;
		
		var img = "img/"+id+".jpg";
		img = "url("+img+")";
	    var div = document.getElementById("dh");
		
		 var l2 = document.getElementById("div"+id);
	//	p.className = "offect"+id;
		
		div.style.width = widthArr[id-1]+"px";
		div.style.backgroundImage = img;
		div.style.left = offset[id-1]+"px";
		
	}

	$(document).ready(function() {
	    $("#dh>span>a").mouseover(function() {
	        $(this).css("background-color", "red");
	    });
	    $("#dh>span>a").mouseout(function() {
	        $(this).css("background-color", "#333");
	    });

	    $(".right_list_max_1").toggle(
		      function() {
		          $(this).next().show();
		      },
		      function() {
		          $(this).next().hide();
		      }
		    );

	    $(".right3").mouseover(function() {
	        $(this).css('color', '#fff');
	        $(this).css("background", "url(img/list_r1_c1.jpg)");
	    });
	    $(".right3").mouseout(function() {
	        $(this).css('color', '#000');
	        if($(this).next().css("display") == "none")
	            $(this).css("background", "url(img/list_r2_c1.jpg)");

	    });
	    $(".right3").toggle(
		  function() {
		      $(this).next().show();
		      $(this).css("background-image", "url(img/list_r1_c1.jpg)");
		  },
		  function() {
		      $(this).next().hide();
		  }
		);



	    $("#dh").width(widthArr[index - 1]).css("position", "absolute").css("left", offset[index - 1]).css("background-image", "url(img/" + index + ".jpg)");

	    $("#dh").click(function() { window.location.href = url[index]; });


	    $("#dh").hover(function() { //Hover over event on list item
	        $("#dh").click(function() { window.location.href = url[sid - 1]; });
	        //$(this).css({ 'background' : '#1376c9 url(topnav_active.gif) repeat-x'}); //Add background color + image on hovered list item
	        if (sid != 1 && sid != 6 && sid != 7 && sid != 8) {
	            var spanId = "div" + sid;
	            $(this).find("span").hide(); //Show the subnav
	            $("#" + spanId).show();
	        }
	    }, function() { //on hover out...
	        //$(this).css({ 'background' : 'none'}); //Ditch the background
	        $(this).find("span").hide(); //Hide the subnav

	        var img = "img/" + index + ".jpg";
	        img = "url(" + img + ")";

	        $("#dh").width(widthArr[index - 1]);
	        $("#dh").css("backgroundImage", img);
	        $("#dh").css("left", offset[index - 1] + "px");

	    });

	});
	
	
	
	
	function cl(id,num,tit){
		for(var i=1;i<=tit;i++)
		{
		    var sd = document.getElementById(id + i);
				var links=document.getElementById("but"+i);
				links.className=i==num?"pre":"";
				sd.className=i==num?"main_top_left_text":"main_top_left_text_hid";
		}
	}




jQuery(function($){

					$('div.click').each(function(i){
						$(this).children('label:first').addClass('select');
						$(this).next('div').html($(this).children('div:first').html())
						});


					$('div.click label').click(function(){
						$(this).addClass('select').siblings('label').removeClass('select').parents('div.click').next('div:first').html($(this).next('div:first').html())
						},function(){});

					})





