$(document).ready(function(){
	var over='2';
	$("div[att*=in]").hover(	
		function(){
			if(over=="2"){
				over="1";
				$(this).children('div').eq(1).css('display','none')
					.fadeIn(280,function(){
										over='2';
									});
			}
		},
		function(){
			$(this).children('div').eq(1).css('display','block')
				.fadeOut(280,function(){
			});
		}
	);
	//$('.pcp_headli').html('<iframe name="weather_inc" src="http://tianqi.xixik.com/cframe/5" width="200" height="30" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true"></iframe>');
	if (document.getElementById("meitigun")){
		$("#meitigun").KinSlideshow({
			isHasTitleFont:false,
			isHasTitleBar:false,
		    btn:{btn_fontHoverColor:"#ffff"}
		});
	}
	if (document.getElementById("picgun4"))	{
		
			 if (window.ActiveXObject){
				$("#picgun4").children("div").children("div").css("float",'left');
				//$("#hjgun").children("div").children("div").css("float",'left');
			 }
		
	}
	var SDmodel = new scrollDoor();
	if(document.getElementById("gmbz")){//首页肛门病种
		SDmodel.sd( ["zc","nz","wz","hhz","gl","glou","tg","gznz","gmsy",'gmcs'],
				    ["zc_list","nz_list","wz_list","hhz_list","gl_list","glou_list","tg_list","gznz_list","gmsy_list",'gmcs_list'],
			        "hot","");
	}

	if(document.getElementById("cdbz")){//首页肠道病种
		SDmodel.sd( ["bms","bxs","fzs","fxs","jxcys","mxcys","jcys","zcys"],
				    ["bms_list","bxs_list","fzs_list","fxs_list","jxcys_list","mxcys_list","jcys_list","zcys_list"],
			        "hot","");
	}
	if(document.getElementById("b_lf_zc")){//特色疗法页滑动门
		SDmodel.sd( ["b_lf_zc","b_lf_gl","b_lf_glie","b_lf_tg","b_lf_gz","b_lf_xz","b_lf_xr","b_lf_cy"],
				    ["c_lf_zc","c_lf_gl","c_lf_glie","c_lf_tg","c_lf_gz","c_lf_xz","c_lf_xr","c_lf_cy"],
			        "lf_srcurr","");
	}
	if(document.getElementById("b_pic_01")){//图说疾病页滑动门
		SDmodel.sd( ["b_pic_01","b_pic_02","b_pic_03","b_pic_04","b_pic_05","b_pic_06"],
				    ["c_pic_01","c_pic_02","c_pic_03","c_pic_04","c_pic_05","c_pic_06"],
			        "leg_scrcurr","");
	}
		$(".baike").hover(
			function(){
				$(this).children('p').css('display',"");
				$(this).siblings().children('p').css('display',"none");


			}
			,
			function(){
			
			}
		)
	$('#hhua div').hover(
		function(){
			$(this).children('div').css('display','block');
			$(this).siblings().children('div').css('display','none');
			
		}
		,
		function(){}
	)
			
});
//





//
function online()//商务通
{	
	changeURL('news', 'http://xj.zoosnet.net/JS/ChatWinByIP.aspx?newagentid=17&lng=cn&mysiteid=KHT54245569');
	//changeURL('news','http://kht.zoosnet.net/LR/Chatpre.aspx?id=KHT54245569');
	return false;
}
function changeURL(winName, newURL) 
{win = window.open("", winName);
win.location.href = newURL;
}

function dateshow(){ 
	var da=new Date();
	da=da.getYear()+"-"+(da.getMonth()+1)+"-"+da.getDate();
	execScript('dim   n   :   n   =   DateAdd("d",   -3,   "'+   da   +'")','vbscript');   
	var   d   =   new   Date(n);   
	document.write(d.getFullYear()   +   "-"   +   (d.getMonth()   +   1)   +   "-"   +   d.getDate()   +   "")   
}
function setTab(name,cursel,n){
	for(i=1;i<=n;i++){
		var menu=document.getElementById(name+i);
		var con=document.getElementById("con_"+name+"_"+i);
		menu.className=i==cursel?"door-nav-current":"";
		con.style.display=i==cursel?"block":"none";
	}
}



//滑动门START
function scrollDoor(){
}
scrollDoor.prototype = {
	sd : function(menus,divs,openClass,closeClass){
		var _this = this;
		if(menus.length != divs.length)
		{
			alert("菜单层数量和内容层数量不一样!");
			return false;
		}    
		for(var i = 0 ; i < menus.length ; i++)
		{ 
			_this.$(menus[i]).value = i;    
			_this.$(menus[i]).onmouseover = function(){
		 
			for(var j = 0 ; j < menus.length ; j++)
			{      
				_this.$(menus[j]).className = closeClass;
				_this.$(divs[j]).style.display = "none";
			}
				_this.$(menus[this.value]).className = openClass; 
				_this.$(divs[this.value]).style.display = "block";    
			}
		}
	},
	$ : function(oid){
	if(typeof(oid) == "string")
		return document.getElementById(oid);
		return oid;
	}
}
//滑动门END

function morearc(tid,urls){
	if(tid ==12||tid==8||tid==9||tid==10||tid==11){
		document.writeln("<div class=\"art_more\">更多 “"+urls+"” 相关问题可<a href=\"javascript:void(0)\" onclick=\"online()\">点此咨询在线专家</a><\/div>");
	}
}
//文章页底部扩展

