
jQuery(document).ready(function(){
jQuery('#idSlider a').soChange({
thumbObj:'#idNum li', 
thumbNowClass:'on',
changeTime:3500
});
//导航菜单BYqq9330722
jQuery(".title").click(function(){
		jQuery(this).blur();
	});
	jQuery("li").hover(function(){
		var heht=jQuery(this).find("dl").height()+20+"px";//获取dl的高度，方便设定外层div的高度+20是由于有8px的内边距和2px的边框BYqq9330722
		var aclas=jQuery(this).attr("class");
		jQuery(this).stop().find(".mla").animate({height:heht},{queue:false, duration:600, easing: 'easeOutBounce'});		
		jQuery(this).stop().find(".title").addClass(aclas);
	},function(){
		var aclas=jQuery(this).attr("class");
		jQuery(this).stop().find(".mla").animate({height:'0px'},{queue:false, duration:600, easing: 'easeOutBounce'});		
		jQuery(this).stop().find(".title").removeClass(aclas);
	});



//首页四大专区切换
jQuery(".fone").hide();
jQuery(".fone:eq(0)").show();
jQuery(".fourtitle li").each(function(i){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".fourtitle li").removeClass();
			  jQuery(this).addClass("fhover"+(i+1)+"");
			  jQuery(".fone:visible").hide();
			  jQuery(".fone:eq(" + i + ")").show();
			  jQuery(".rmen:visible").hide();
			  jQuery(".rmen:eq(" + i + ")").show();
	  })
   })

//十大项目
jQuery(".cfr li").each(function(j){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".cfr li").removeClass("tenlion");
			  for(var p=1;p<11;p++){
			  jQuery(".cfr li").removeClass("tenli"+p+"on");	
			  }
			  jQuery(this).addClass("tenlion");
			  jQuery(this).addClass("tenli"+(j+1)+"on");
	  })
   })
//首页底部华美信息切换
jQuery(".hjone").hide();
jQuery(".hjone:eq(1)").show();
jQuery(".hjnavleft li").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".hjnavleft li").removeClass();
			  jQuery(this).addClass("hover"+index+"");
			  jQuery(".hjone:visible").hide();
			  jQuery(".hjone:eq(" + index + ")").show();
	  })
   })

//首页华美动态和美容新闻信息切换
jQuery(".twoqie:eq(0)").show();
jQuery(".zfnewsul li").each(function(index){
       jQuery(this).mouseover(
	   	  function(){
			  jQuery(".zfnewsul li").removeClass();
			  jQuery(this).addClass("ahover");
			  jQuery(".twoqie:visible").hide();
			  jQuery(".twoqie:eq(" + index + ")").show();
	  })
   })
//热门的项目下拉

jQuery(".rmen").hover(function(i){
	jQuery(".rmen dd").show();
	jQuery(".rmen dt").addClass("dthover");
	},function(){
	jQuery(".rmen dd").hide();
	jQuery(".rmen dt").removeClass("dthover");
	})

/*//首页焦点图
jQuery("#cfli li:not(:first)").css("opacity",0.5);
var imageWidth = jQuery(".cfcimg img").width();//获取显示区域的大小也是单个图片的大小
var imageSum = jQuery(".cfcimg img").size();//获取图片的总数
var imageReelWidth = imageWidth * imageSum;//计算图片区域的宽度
jQuery(".cfcimg").css({'width' : imageReelWidth});
rotate = function(){	
		var triggerID = jQueryactive.attr("id") - 1; 
		var fswidthPosition = triggerID * imageWidth; 
		jQuery("#cfli li").removeClass('fohover'); 
		jQueryactive.addClass('fohover'); 
		jQuery("#cfli li").css("opacity",0.5);
		jQueryactive.removeAttr("style")
		jQuery(".cfcimg").animate({ 
			left: -fswidthPosition
		}, 500 );
		
}; 
rotateSwitch = function(){		
	play = setInterval(function(){
			jQueryactive = jQuery('#cfli li.fohover').next();
			if ( jQueryactive.length === 0) { 
				jQueryactive = jQuery('#cfli li:first');
			}
			rotate(); 
		}, 4000); 
};
	
rotateSwitch();
jQuery(".cfcimg img").hover(function() {
		clearInterval(play);
	}, function() {
		rotateSwitch();
});	
jQuery("#cfli li").click(function() {	
		jQueryactive = jQuery(this);
		clearInterval(play);
		rotate(); 
		rotateSwitch(); 
		return false;
	});	
*/

//华美右侧专家团队切换
jQuery("#ronezj").imageScroller({
			frame:"ronebox",
			next:"leftdl",
			prev:"rightdl",
			child:".roneqie",
			margleftzhi:-248,
			auto:true
			
});

//首页专家团队滚动
jQuery("#ex").imageScroller({
			frame:"extable",
			next:"leftzj",
			prev:"rightzj",
			child:"li",
			margleftzhi:-242,
			auto:true
			
});

});


function AutoScroll(obj){   
        jQuery(obj).find("ul:first").animate({   
                marginTop:"-58px"  
        },500,function(){   
                jQuery(this).css({marginTop:"0px"}).find("li:first").appendTo(this);   
        });   
}   
jQuery(document).ready(function(){   
setInterval('AutoScroll(".mtgun")',3000)   
});   


