$(function(){ $('.inline-banner .down').on('click',function(){ var navt = $('.inline-banner').height() - $('header').height(); $('html,body').stop().animate({scrollTop:navt},500); }) change(); $(window).resize(function(){ change(); }) $('footer .right dl,.mobile-footer .link').hover(function(){ $(this).find('dd').stop().slideDown(); },function(){ $(this).find('dd').stop().slideUp(); }) $('.pc-footer .left .font a.map, .wel-font-left a.map').on('click',function(){ $('.website-map').slideDown(); }) $('.website-map .top .close').on('click',function(){ $('.website-map').slideUp(); }) $(window).load(function(){ $('.load').fadeOut(300,function(){ $('.pc-header').stop().animate({top:0,opacity:1},300); $('.mobile-header').stop().animate({top:0,opacity:1},300); $('.zindex').stop().animate({top:0,opacity:1},500); $('footer').stop().animate({top:0,opacity:1},500,function(){ var location = window.location.href; var href="mpdbujpo """; var href_part=href.split('?'); var num1=href_part[1]; $(".index").each(function(i) { var _now=$(this); var _shuzi=$(this).index(); var tiao=_now.offset().top- $('header').height(); var shu=$(".index").index(_now); if(num1==_shuzi){ tiao=_now.offset().top-$('header').height(); $("html,body").stop().animate({"scrollTop":tiao}, 1000); } }); }); }); }) $('.pc-header .nav-btn').on('click',function(){ $('.pc-header').stop().animate({left:0},500,'easeInCubic',function(){ $('.pc-header .con').fadeOut() }); }) $(window).scroll(function(){ $('.pc-header .con').fadeIn(0,function(){ $('.pc-header').stop().animate({left:'-100%'},500,'easeInCubic') }) }) $('.fixed-right li.one').hover(function(){ $(this).stop(true,true).animate({width:'70px',marginLeft:'-13px'},300); },function(){ $(this).stop(true,true).animate({width:'50px',marginLeft:'0px'},300); }) $('.fixed-right li.id').hover(function(){ $(this).stop(true,true).animate({width:'195px',marginLeft:'-145px'},1000); },function(){ $(this).stop(true,true).animate({width:'195px',marginLeft:'0px'},1000); }) $('.fixed-right li.top').on('click',function(){ $('html,body').stop().animate({scrollTop:0},1000) }) $('.pc-header .header-box li').hover(function(){ var aSize = $(this).children().children().children('a').size(); if(aSize>0){ $(this).find('.con1').stop(true,true).slideDown(); } },function(){ $(this).find('.con1').stop(true,true).slideUp(); }) $('.pc-header .header-box li.header-pro').hover(function(){ $(this).find('.con2').stop(true,true).slideDown(); },function(){ $(this).find('.con2').stop(true,true).slideUp(); }) $('.pc-header .header-box nav dd').hover(function(){ $(this).find('.three').stop(true,true).slideDown(); },function(){ $(this).find('.three').stop(true,true).slideUp(); }) $('.pc-header .header-box .serch-btn').on('click',function(){ if (!$(this).hasClass('on')) { $(this).addClass('on'); $('.pc-header .serch-con').stop(true,true).slideDown(); }else{ $(this).removeClass('on'); $('.pc-header .serch-con').stop(true,true).slideUp(); } }) $("header .search-btn").on('click', function() { $(".search-bg,.m-search-box,.m-close-search").stop().show(); }); $(".m-close-search").on('click', function() { $(".search-bg,.m-search-box,.m-close-search").stop().hide(); }) $(".mobile-header .nav-btn").on('click', function() { var _this = $(this); if (!$(this).hasClass('hover')) { $(this).addClass('hover'); // $(this).children('.line1').stop().transition({rotate: 45}, 300); // $(this).children('.line2').stop().fadeOut(300); // $(this).children('.line3').stop().transition({rotate: -45}, 300,function(){ // _this.addClass('active'); // }); $('.mobile-header .nav-btn .line').css('background-color','#004da1'); $(this).parent(".w1400").siblings('.sub-menu').stop().fadeIn(); // $("header .list-cont").addClass('active'); $("body,html").addClass('ovh'); }else{ $(this).removeClass('hover'); // $(this).removeClass('active'); // $(this).children('.line1').stop().transition({rotate: 0}, 300); // $(this).children('.line2').stop().fadeIn(300); // $(this).children('.line3').stop().transition({rotate: 0}, 300); $(this).parent(".w1400").siblings('.sub-menu').stop().fadeOut(); // $("header .list-cont").removeClass('active'); $('.mobile-header .nav-btn .line').css('background-color','#292929'); $("body,html").removeClass('ovh'); } }); $("header .sub-menu .sub-tit").on('click', function() { if ($(this).siblings('.sec-list').is(':hidden')){ $(this).addClass('on'); $(this).siblings('.sec-list').stop().slideDown(); $(this).parent().siblings('li').children('.sec-list').stop().slideUp().siblings('.tit').removeClass('on'); }else{ $(this).removeClass('on'); $(this).siblings('.sec-list').stop().slideUp(); } }); }); function change(){ var win = $(window).width(); var winh = $(window).height(); $('footer .right').height($('footer .left').height()) $('.website-map').width(win); $('.website-map').height(winh) $('.pc-header .header-box nav .con1').width(win); $('.pc-header .header-box nav .con2').width(win); $('.pc-header .header-box nav .three').width(win); $('.mobile-header .sub-menu').height($(window).height() - $('header').height()) }