// JavaScript Document //选项卡 $(document).ready(function(){ //在线咨询 分类tab菜单 $(".tab_menu .menuA a").each(function (index) { $(this).click(function () { $(".RCont .tab_list").hide(); $(".tab_menu .menuA a").removeClass("selected") $(this).addClass("selected"); $(".RCont .tab_list:eq(" + index + ")").show() }) }) }); function tags(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?"sd01":""; con.style.display=i==cursel?"block":"none"; } } function tags1(name, cursel, n,obj) { obj.t=setTimeout(function(){ for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "jiu" : ""; con.style.display = i == cursel ? "block" : "none"; } },400) //当鼠标在规定时间内移开时,停止切换 obj.onmouseout=function(){clearTimeout(this.t)} } // 首页特色医疗特效 $(function(){ $(".tese .clearfix li").hover(function(){ $(this).find(".rsp").stop().animate({left:'0',opacity:'0.7'},200); $(this).find(".text").stop().animate({left:'0'},200); }, function(){ $(this).find(".rsp").stop().animate({left:'220',opacity:'0'}, {duration: 400}); $(this).find(".rsp").animate({left:'-220'}, {duration: 0}); $(this).find(".text").stop().animate({left:'220'}, {duration: 400}); $(this).find(".text").animate({left:'-220'}, {duration: 0}); }); }) // 首页特色科室特效 $(function(){ $("#con_tab_2 li").hover(function(){ $(this).find(".Destionbg").stop().animate({left:'4px',opacity:'0.7'},200); $(this).find(".Destion").stop().animate({left:'4px'},200); },function(){ $(this).find(".Destionbg").stop().animate({left:'220',opacity:'0'}, {duration: 400}); $(this).find(".Destionbg").animate({left:'-220'}, {duration: 0}); $(this).find(".Destion").stop().animate({left:'220'}, {duration: 400}); $(this).find(".Destion").animate({left:'-220'}, {duration: 0}); }); }) // 首页专家介绍 /*$(function(){ $("#con_tab_3 li:first").css("width","212px"); $("#con_tab_3 li").hover(function(){ $(this).siblings().stop().stop().animate({width:'92px'},150); $(this).stop().animate({width:'212px'},300); }); })*/ //床位信息显示时间 function GetTime(obj){ var thisTime = new Date(); var showTime = thisTime.getFullYear() +'-'+ (thisTime.getMonth()+1) +'-'+thisTime.getDate()+' ' +thisTime.getHours()+':'+ thisTime.getMinutes()+':'+thisTime.getSeconds(); document.getElementById(obj).innerHTML=showTime; } $(document).ready(function(){ if($("#ShowTime").length >0) { GetTime('ShowTime'); } })