//新闻中心 $(function() { // 搜索框 var myli = $('.subnav .subnav1>li'); $('.sousuo').click(function(){ myli.hide(); $('.sousuo').hide(); $('.search-from').show(); $('.close').show(); }); $('.close').click(function(){ myli.show(); $('.sousuo').show(); $('.search-from').hide(); $('.close').hide(); }); $(".servicebox").mouseenter(function () { $(this).addclass("borshadow"); $(this).children(".botline").stop(true,false).animate({width:"100px"}) }); $(".servicebox").mouseleave(function () { $(this).removeclass("borshadow"); $(this).children(".botline").stop(true,false).animate({width:"40px"}) }); $(".case").mouseenter(function () { $(this).children().children(".caseimg").stop(true,false).slidedown(); }); $(".case").mouseleave(function () { $(this).children().children(".caseimg").stop(true,false).slideup(); }); $(".mccbox .mcc").mouseenter(function () { $(this).children(".mccimg").stop(true,false).slidedown(); var num=$(this).index(); if(num==0){$(this).children("img").attr("src","/statics/img/products/mci1s.png");} if(num==1){$(this).children("img").attr("src","/statics/img/products/mci2s.png");} if(num==2){$(this).children("img").attr("src","/statics/img/products/mci3s.png");} if(num==3){$(this).children("img").attr("src","/statics/img/products/mci4s.png");} if(num==4){$(this).children("img").attr("src","/statics/img/products/mci5s.png");} }); $(".mccbox .mcc").mouseleave(function () { $(this).children(".mccimg").stop(true,false).slideup(); var num=$(this).index(); if(num==0){$(this).children("img").attr("src","/statics/img/products/mci1.png");} if(num==1){$(this).children("img").attr("src","/statics/img/products/mci2.png");} if(num==2){$(this).children("img").attr("src","/statics/img/products/mci3.png");} if(num==3){$(this).children("img").attr("src","/statics/img/products/mci4.png");} if(num==4){$(this).children("img").attr("src","/statics/img/products/mci5.png");} }); $(".products-yq .mccbox .mcc").mouseenter(function () { $(this).children(".mccimg").stop(true,false).slidedown(); $(this).children("img").stop(true,false).animate({margintop:"120px"}); $(this).children("p").stop(true,false).animate({opacity:"1"}); var num=$(this).index(); if(num==0){$(this).children("img").attr("src","/statics/img/products/mci1s.png");} if(num==1){$(this).children("img").attr("src","/statics/img/products/mci2s.png");} if(num==2){$(this).children("img").attr("src","/statics/img/products/mci3s.png");} }); $(".products-yq .mccbox .mcc").mouseleave(function () { $(this).children(".mccimg").stop(true,false).slideup(); $(this).children("img").stop(true,false).animate({margintop:"200px"}); $(this).children("p").stop(true,false).animate({opacity:"0"}); var num=$(this).index(); if(num==0){$(this).children("img").attr("src","/statics/img/products/mci1.png");} if(num==1){$(this).children("img").attr("src","/statics/img/products/mci2.png");} if(num==2){$(this).children("img").attr("src","/statics/img/products/mci3.png");} }); $(".productnav .probox").mouseenter(function () { var act=$(this).hasclass("thispro"); if(act==false){ $(this).children(".proline").stop(true,false).animate({width:"146px"}); $(this).children(".pro").hide(); $(this).children(".pros").show(); } }); $(".productnav .probox").mouseleave(function () { var act=$(this).hasclass("thispro"); if(act==false){ $(this).children(".proline").stop(true,false).animate({width:"0px"}); $(this).children(".pro").show(); $(this).children(".pros").hide(); } }); $(".productnav .probox").click(function () { $(this).addclass("thispro"); $(this).siblings().removeclass("thispro"); $(this).siblings().children(".proline").stop(true,false).animate({width:"0px"}); $(this).siblings().children(".pro").show(); $(this).siblings().children(".pros").hide(); var num=$(this).index(); $(".protabbox .productbox").eq(num).fadein().siblings().hide() }); $(".caselist .caseli").click(function () { $(this).addclass("caseactive").siblings().removeclass("caseactive"); var num=$(this).index(); $(".casepage .casebox").eq(num).fadein().siblings().hide() }) $(".sltab-yq .slbox-yq").click(function () { $(this).addclass("tab-on"); $(this).siblings().removeclass("tab-on"); var num=$(this).index(); $(".slimgbox-yq .slimg-yq").eq(num).fadein().siblings().hide() }); });