$(function(){
	
	$("#nav ul li").hover(
	  function () {
		var n= $(this).index();
		$("#nav ul li").removeClass("on");  
	    $(this).addClass("on");
		if(n==0){
			$("#img img").attr("src","images/7.jpg");
		}else if(n==2){
			$("#img img").attr("src","images/8.jpg");
		}else{
			$("#img img").attr("src","images/1.jpg");
                }
		//$(".about div").fadeOut(0);
		//$(".about div:eq("+n+")").fadeIn(500);
		showContent(n);
	  },function () {

	  }
	);
	
   showContent(0);
	
   function showContent(n){
	  var obj=$(".about");
	  obj.html("");		
	  obj.css("background","url(images/ajax_small.gif) no-repeat center center");
	  $.post("ajax_content.asp?id="+encodeURIComponent(n), function(data){
		data = data.replace(/^\s+|\s+$/g,"");  
        obj.html(data);
		obj.css("background","none");
		aaa();
      });

   }
   
   function aaa(){
	  $("span.more").bind("click", function() {
		  var obj=$(this).parent().find(".imgInfo");
		  if(obj.is(":hidden")){
		    obj.show();
		    $(this).text("【关闭】");
		  }else{
		    obj.hide();
		    $(this).text("【查看更多...】");
		  }
	  });
   }
  	
});
