function settab(name,id,n,k){ for(i=1;i<=n;i++){ var tab=document.getelementbyid(name+i); var con=document.getelementbyid("con_"+name+"_"+i); if(k==1){ tab.classname=i==id?"hover":""; }else if(k==3){ tab/*.children[0]*/.classname=i==id?"hover":""; }else{ tab.classname=i==id?"hover":""; } con.style.display=i==id?"block":"none"; } } function tochoose(index){ if(index==1){ $("#div1").attr("class","qt fleft"); $("#div2").attr("class","yg fleft"); $("#div3").attr("class","qy fleft"); $("#div4").attr("class","ygg fleft"); $("#s1").show(); $("#s2").hide(); $("#s3").hide(); $("#s4").hide(); }else if(index==2){ $("#div1").attr("class","qt01 fleft"); $("#div2").attr("class","yg01 fleft"); $("#div3").attr("class","qy fleft"); $("#div4").attr("class","ygg fleft"); $("#s2").show(); $("#s1").hide(); $("#s3").hide(); $("#s4").hide(); }else if(index==3){ $("#div1").attr("class","qt01 fleft"); $("#div2").attr("class","yg fleft"); $("#div3").attr("class","qy01 fleft"); $("#div4").attr("class","ygg fleft"); $("#s3").show(); $("#s2").hide(); $("#s1").hide(); }else if(index==4){ $("#div1").attr("class","qt01 fleft"); $("#div2").attr("class","yg fleft"); $("#div3").attr("class","qy fleft"); $("#div4").attr("class","ygg01 fleft"); $("#s4").show(); $("#s3").hide(); $("#s2").hide(); $("#s1").hide(); } } function addfavorite(surl, stitle) { try { window.external.addfavorite(surl, stitle); } catch (e) { try { window.sidebar.addpanel(stitle, surl, ""); } catch (e) { alert("加入收藏失败,请使用ctrl+d进行添加"); } } } function sethome(obj,url){ try{ obj.style.behavior='url(#default#homepage)'; obj.sethomepage(url); }catch(e){ if(window.netscape){ try{ netscape.security.privilegemanager.enableprivilege("universalxpconnect"); }catch(e){ alert("抱歉,此操作被浏览器拒绝!\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'"); } }else{ alert("抱歉,您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。"); } } } $(function(){ $('.nav>ul>li>ul').each(function(){ if(!($(this).find('li').length)){ $(this).parent().find('b').remove(); $(this).remove(); } if(!($(this).find('.third-nav li').length)){ $(this).find('.third-nav').remove(); } }) $( '.nav li.yli' ).hover(function(){ $('.ej-nav').slideup(); $( this ).find('.ej-nav').stop().slidedown(); $( this ).find('.ej-nav').addclass('erjion'); $( this ).find('b').stop(true).animate( { bottom: "10px", opacity: "1" }, 300 ); }, function() { $( this ).find('.ej-nav').stop().slideup(); $( this ).find('.ej-nav').removeclass( 'erjion' ); $( this ).find('b').stop(true).animate( { bottom: "14px", opacity: "0" }, 300 ); }) $( '.nav .ej-nav .eli' ).hover( function() { var nh = $(this).offset().top - $(this).parent().offset().top + 15; $( this ).parent().find( '.erji_line>span' ).stop(true).animate( { top: nh }, 300 ); }, function() { $( '.erji_line>span' ).stop( true ).animate( { top: 35 }, 300 ); }) $(".footer_top .sele" ).click(function(){ if($(this ).find(".xiala_con" ).css("display")=="none"){ $(this ).find(".xiala_con" ).css("display","block"); } else{ $(this ).find(".xiala_con" ).css("display","none"); } }) }) /*新网站*/ function qs_xt(make,suf,f_y,f_n,t_y,t_n,evnts,chuf,beg){ if ( chuf == "" || chuf == undefined || chuf == null || chuf == 0){ qs_cs(make,suf,f_y,f_n,t_y,t_n,0); }else if( chuf == 1 ){ }else if( chuf == 2 ){ qs_cs(make,suf,f_y,f_n,t_y,t_n,beg-1); } var qs_event = ''; if( evnts == 1 ){ qs_event = 'click'; }else if(evnts == 2 ){ qs_event = 'mouseover'; }else { qs_event = evnts; } $('.'+make).bind(qs_event,function(){ var t_ind = $(this).index('.'+make); qs_each('.'+make,t_ind,f_y,f_n); qs_each('.'+make+suf,t_ind,t_y,t_n); }); } function qs_each(evt,ind,cy,cn){ $(evt).each(function(i) { if( ind == i){ $(this).removeclass(cn).addclass(cy); }else{ $(this).removeclass(cy).addclass(cn); } }); } function qs_cs(make,suf,f_y,f_n,t_y,t_n,m){ $('.'+make).removeclass(f_y).addclass(f_n); $('.'+make+suf).removeclass(t_y).addclass(t_n); $('.'+make+':eq('+m+')').removeclass(f_n).addclass(f_y); $('.'+make+suf+':eq('+m+')').removeclass(t_n).addclass(t_y); } $(document).ready(function() { //导航 $(".menu_dl dd").each(function(index, element) { var nn=$(this).find(".dddiv .dddivl a").length; if(nn<1){ $(this).find(".dddiv").addclass("nn"); } var ddi=$(this).position().left; if(ddi>798){ $(this).find(".dddiv").css({right:0,}); } else{ $(this).find(".dddiv").css({left:0,}); } $(this).hover(function(){ //$(".menu_dl dd.hover").addclass("active").removeclass("hover"); $(this).addclass("hover"); $(this).find(".dddiv").stop(true,true).slidedown(500); },function(){ $(this).removeclass("hover"); //$(".menu_dl dd.active").addclass("hover").removeclass("active"); $(this).find(".dddiv").stop(true,true).slideup(300); $(".menu_dl dd.hover").hover(function(){ $(this).addclass("hover") },function(){ $(this).addclass("hover") }); }) }); })