$(document).ready(function() { $('.navb>li').hover(function() { if(!$(this).hasClass('act')){ $(this).addClass('act'); $(this).find('.snav').stop(true,true).slideDown().siblings().find('.snav').hide(); }else{ $(this).removeClass('act'); $(this).find('.snav').stop(true,true).hide(); } }); $('.top').click(function() { $(document.body).animate({'scrollTop':0},500); }); $('.close').click(function(e) { $('.choi_m').animate({width:'0%'},0); $('.nav_m').removeClass('on2'); $('.front').css("margin-left","-134px"); $('.nav_mx ').hide(); $('.nav_pro ').hide(); $('.nav_more ').hide(); $('.nav_zhao ').hide(); $('.nav_ab ').hide(); $('.ser_m').hide(); }); $('.onef li').hover(function() { $(this).find('img').stop(true,true).animate({marginRight:'15.625%'}); },function(){ $(this).find('img').stop(true,true).animate({marginRight:'8.125%'}); }); $('.nav_m').click(function() { if(!$(this).hasClass('on2')){ $(this).addClass('on2'); $('.choi_m').animate({width:'100%'},'fast'); $('.onef').animate({width:'100%'},'fast'); }else{ $(this).removeClass('on2'); $('.choi_m').animate({width:'0%'}); } }); $('.front').click(function() { $(this).stop(true,true).animate({marginLeft:-85},'fast'); $('.nav_mx').fadeOut(0); $('.onef').animate({width:'100%'},'fast'); $('.nav_pro').fadeOut(0); $('.ser_m').fadeOut(0); $('.nav_pro ').hide(); $('.nav_more ').hide(); $('.nav_zhao ').hide(); $('.nav_ab ').hide(); }); $('.sc a').click(function() { $('.onef').css("width","0%"); $('.nav_mx').show().addClass('animated slideInRight'); $('.front').stop(true,true).animate({marginLeft:0},'fast'); }); $('.cp a').click(function() { $('.onef').css("width","0%"); $('.nav_pro').show().addClass('animated slideInRight'); $('.front').stop(true,true).animate({marginLeft:0},'fast'); }); $('.ab a').click(function() { $('.onef').css("width","0%"); $('.nav_ab').show().addClass('animated slideInRight'); $('.front').stop(true,true).animate({marginLeft:0},'fast'); }); $('.mo a').click(function() { $('.onef').css("width","0%"); $('.nav_more').show().addClass('animated slideInRight'); $('.front').stop(true,true).animate({marginLeft:0},'fast'); }); $('.zha a').click(function() { $('.onef').css("width","0%"); $('.nav_zhao').show().addClass('animated slideInRight'); $('.front').stop(true,true).animate({marginLeft:0},'fast'); }); // $(".se1").click(function(){ // $.scrollTo('#section1',800); // }); // $(".se2").click(function(){ // $.scrollTo('#section2',800); // }); // $(".se3").click(function(){ // $.scrollTo('#section3',800); // }); // $(".se4").click(function(){ // $.scrollTo('#section4',800); // }); // $(".se5").click(function(){ // $.scrollTo('#section5',800); // }); // $(".se6").click(function(){ // $.scrollTo('#section6',800); // }); // $(".se7").click(function(){ // $.scrollTo('#section7',800); // }); $('.pro>span').click(function() { $('.guid').slideToggle(); }); $('.pro1>span').click(function() { $('.guid1').slideToggle(); }); $('.fer').hover(function() { $(this).find('span').stop(true,true).animate({width:197}); $(this).stop(true,true).animate({width:197}); }); // ,function(){ // $(this).find('span').stop(true,true).animate({width:0}); // $(this).stop(true,true).animate({width:16}); // }); $('.nap').hover(function() {},function(){ $(this).find('span').stop(true,true).animate({width:0}); $(this).find('.fer').stop(true,true).animate({width:16}); }); $('.serch a').click(function() { $('.onef').css("width","0%"); $('.ser_m').slideDown(); $('.front').stop(true,true).animate({marginLeft:0},'fast'); }); $('.wechat').click(function(e) { if (!$(this).hasClass('spe10')) { $(this).addClass('spe10'); $(this).find('.img6').show(); e.stopPropagation(); }else{ $(this).removeClass('spe10'); $(this).find('.img6').hide(); e.stopPropagation(); } }); $(".headbl h2").addClass('animated1 fadeInUp'); $(".headbr").addClass('animated3 fadeInUp'); $(".headbl p").addClass('animated2 fadeInUp1'); $(".shop_hk").addClass('animated1 fadeInUp'); $(".shop_hk1").addClass('animated1 fadeInUp'); $('.detab').addClass('animated3 fadeInUp1'); $('.detb img').addClass('animated1 fadeInUp'); $('.detb h2').addClass('animated2 fadeInUp'); $('.detb p').addClass('animated3 fadeInUp1'); $('.about h2').addClass('animated1 fadeInUp'); $('.about p').addClass('animated2 fadeInUp1'); }); function gdjz(div,cssname,offset){ if($(div).length){ var a,b,c,d; d=$(div).offset().top; a=eval(d + offset); b=$(window).scrollTop(); c=$(window).height(); if(b+c>a){ $((div)).addClass((cssname)); } } }