$("document").ready(function(){ $(".nav > li").hover(function(){ $(this).addclass("on"); $(this).children("div").stop(true,true).slidedown("fast"); },function(){ $(this).removeclass("on"); $(this).children("div").stop(true,true).slideup("fast"); }) $("#navchild a:last-child ").css("border-bottom","none") $(".nav > li:last-child").css("background","none"); dingwei(); var pgname = document.location.href; pgname=pgname.replace(/\?.*$/,'') pgname=pgname.replace(/^.*\//,'') if(pgname=="index.php"||pgname=="index.php#"||pgname==null||pgname==""){ $(".banner").css("height","400px"); $(".bann").css("height","400px"); $("#focus").css("height","400px"); $("#focus ul").css("height","400px"); $("#focus ul li").css("height","400px"); } $(".prolistpic ul li:last-child").css("margin-right","0px"); $(".casepiclist ul li").eq(4).css("margin-left","-4px"); $(".casepiclist ul li").hover(function(){ var $abc = $(this); $abc.find(".intro").slidedown("fast"); },function(){ var $abc = $(this); $abc.find(".intro").slideup("fast"); }) $(".newslistul li:last-child").css("border-bottom","none") $(".contact dl:nth-child(2) dt").css("background","url(images/mobile.png) 4px 8px no-repeat"); $(".contact dl:nth-child(3) dt").css("background","url(images/tel.png) 0px 8px no-repeat"); $(".contact dl:nth-child(4) dt").css("background","url(images/mail.png) 0px 10px no-repeat"); $(".contact dl:nth-child(5) dt").css("background","url(images/address.png) 2px 6px no-repeat"); $(".footcontactnr dl:nth-child(2) dt").css("background","url(images/mobile.png) 14px 6px no-repeat"); $(".footcontactnr dl:nth-child(3) dt").css("background","url(images/tel.png) 10px 4px no-repeat"); $(".footcontactnr dl:nth-child(4) dt").css("background","url(images/mail.png) 10px 8px no-repeat"); $(".footcontactnr dl:nth-child(5) dt").css("background","url(images/address.png) 12px 4px no-repeat"); $(".sharediv").hover(function(){ $(".sharelist").css("display","block"); },function(){ $(".sharelist").css("display","none"); }) $(".share .qq").hover(function(){ $(this).css("background","url(images/qq2.png) left top no-repeat"); },function(){ $(this).css("background","url(images/qq.png) left top no-repeat"); }); $(".share .qq2").hover(function(){ $(this).css("background","url(images/share2.png) left top no-repeat"); },function(){ $(this).css("background","url(images/share.png) left top no-repeat"); }); $(".site").hover(function(){ $(this).css("background","url(images/site2.png) left top no-repeat"); },function(){ $(this).css("background","url(images/site.png) left top no-repeat"); }); $('.backtop').click(function(){ $('body,html').animate({scrolltop:0},500) }); $('.codepic').hover(function(){$('.code').fadein()},function(){$('.code').fadeout()}); $('.backup').click(function(){ $('body,html').animate({scrolltop:0},500) }); $(".backup").hide(); $(function() { $(window).scroll(function(){ if ($(window).scrolltop()>500){ $(".backup").fadein(1000); }else{ $(".backup").fadeout(1000); } }); }); /* end index jq */ $(".leftproclalistul > li:last-child").css("border-bottom","none"); $(".leftproclalistul > li").click(function(){ $(this).next("ul").slidetoggle(); }) $(".leftcontactdl dl:nth-child(1) dt").css("background","url(images/mobile.png) 4px 6px no-repeat"); $(".leftcontactdl dl:nth-child(2) dt").css("background","url(images/tel.png) 2px 4px no-repeat"); $(".leftcontactdl dl:nth-child(3) dt").css("background","url(images/mail.png) left 8px no-repeat"); $(".leftcontactdl dl:nth-child(4) dt").css("background","url(images/address.png) 2px 4px no-repeat"); $(".leftnewsul li:last-child").css("border-bottom","none"); $(".mainconlist .pic11:nth-child(3n)").css("margin-right","0px"); $(".pic2:last-child a").css("border-bottom","none"); $(".mainconlist ul li:last-child").css("border-bottom","none"); $(".pglist ul li").not(".on").hover(function(){ $(this).addclass("on");},function(){$(this).removeclass("on");}) $(".maincontect .pgfyl p:first-child").css("border-left","none"); }); $("document").ready(function(){ //case var page=1; var i=1; var box=$('.advpic ul'); var n=$('.advpic li').length; var h=$('.advpic li').width(); var pagetotal=math.ceil(n/i); $('.picleft').bind('click',upwardsfn); $('.picright').bind('click',downfn); function upwardsfn(){ if(page>1){ box.animate({ marginleft : '+='+h }, "slow"); page--; $(".picright").find("img").attr('src','images/advrightb.png'); if(page<=1){ $('.picleft').find("img").attr('src','images/advleftw.png'); }else{ $('.picleft').find("img").attr('display','images/advleftb.png'); } } } function downfn(){ if(pagetotal>page){ box.animate({ marginleft : '-='+h }, "slow"); page++; $(".picleft").find("img").attr('src','images/advleftb.png'); if(page>=pagetotal){ $('.picright').find("img").attr('src','images/advrightw.png'); }else{ $('.picright').find("img").attr('src','images/advrightb.png'); } } } }); //导航定位 function dingwei(){ var nav = document.getelementbyid("nav"); var links = nav.getelementsbytagname("li"); var lilen =$("#nav").find("li"); var st2=new array(); var str1=new array(); var urrenturl = document.location.href; urrenturl = urrenturl.replace("http://",""); urrenturlarr = urrenturl.split("/"); name = urrenturlarr[urrenturlarr.length-1]; st2 = name.split("_"); var last = 0; for (var i=0;i