$(function(){ var nav_slide_timer; $("header nav a").hover(function(){ var _flg = $(this).attr("data-nav-flg"); clearTimeout(nav_slide_timer); $(".sub_nav_body").stop(false,true).slideUp(200); $("header nav a").removeClass("hover"); $("header .search_nav").stop(false,true).slideUp(200); $(this).addClass("hover"); $("header").addClass("open"); $(_flg).stop(false,true).slideDown(400); },function(){ nav_slide_timer = setTimeout(function(){ $("header .search_nav").stop(false,true).slideUp(200); $("header nav a").removeClass("hover"); $("header").removeClass("open"); $(".sub_nav_body").stop(false,true).slideUp(200); },400); }); $(".sub_nav_body").hover(function(){ clearTimeout(nav_slide_timer); },function(){ nav_slide_timer = setTimeout(function(){ $("header nav a").removeClass("hover"); $("header").removeClass("open"); $(".sub_nav_body").stop(false,true).slideUp(200); },400); }); $('input#txtKeysH').focus(function(){ $("header .search").addClass("cur"); }); $("input#txtKeysH").blur(function(){ $("header .search").removeClass("cur"); }); $("header .lang").hover(function(){ $("header .lang ul").stop(false,true).slideDown(); },function(){ $("header .lang ul").stop(false,true).slideUp(); }); $("footer .foot-2 .fl .links span").click(function(){ $("footer .foot-2 .fl .links .mask").stop(false,true).slideToggle(); }); var case_body_slider = new Swiper('.case_body .slider .swiper-container', { autoplay: { delay: 4000, disableOnInteraction:true, }, speed:1500, effect:"fade", fadeEffect: { crossFade: true, }, observer:true, observeParents:true, // loop: true, navigation: { nextEl: '.case_body .slider .slider-btn .right', prevEl: '.case_body .slider .slider-btn .left', }, breakpoints: { 640: { pagination: { el: '.case_body .slider .dot', clickable: true, }, }, } }); var caseslidernum = $(".case_body .slider .swiper-container .swiper-wrapper .swiper-slide").length; if(caseslidernum <= 1) { $(".case_body .slider .slider-btn").hide(); } function top_ico_style() { var _top = $(this).scrollTop(); var _footer_height = $("footer").height(); var _d_height = $(document).height(); var _v_height = $(window).height(); if (_top < 200) $(".page_top_btn").removeClass("show"); else if (_top > 200) $(".page_top_btn").addClass("show"); } $(window).scroll(function(){ top_ico_style(); }); $(window).load(function(){ top_ico_style(); }); $(window).resize(function(){ top_ico_style(); }); $(".page_top_btn").click(function(){ $("html , body").animate({ "scrollTop":0 },1000); }); $(".mobile_menu_btn").click(function() { var index = $(".mobile_menu_btn").index($(this)); if ($(this).attr("class") == "mobile_menu_btn cur") { $(this).removeClass("cur"); $(".mobile_nav").slideUp(); } else { $(this).addClass("cur"); $(".mobile_nav").slideDown(); } }); $(".mobile_nav .list h3 i").click(function() { var index = $(".mobile_nav .list h3 i").index($(this)); if ($(this).attr("class") == "cur") { $(this).removeClass("cur"); $(this).parents("h3").next("ul").slideUp(); $(".mobile_nav .list h4 i").removeClass("cur"); $(".mobile_nav .list .dropdown").hide(); } else { $(".mobile_nav .list h3 i").removeClass("cur"); $(".mobile_nav .list h4 i").removeClass("cur"); $(".mobile_nav .list .dropdown").hide(); $(this).addClass("cur"); $(".mobile_nav .list ul").slideUp(); $(this).parents("h3").next("ul").slideDown(); } }); $(".mobile_nav .list h4 i").click(function() { var index = $(".mobile_nav .list h4 i").index($(this)); if ($(this).attr("class") == "cur") { $(this).removeClass("cur"); $(this).parents("h4").next(".dropdown").slideUp(); } else { $(".mobile_nav .list h4 i").removeClass("cur"); $(this).addClass("cur"); $(".mobile_nav .list ul li .dropdown").slideUp(); $(this).parents("h4").next(".dropdown").slideDown(); } }); var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', mobile: true, live: true }); wow.init(); });