//브라우저 체크 (function(){ $(document).ready(function(){ var $agents = [/(opr|opera)/gim,/(chrome)/gim,/(firefox)/gim,/(safari)/gim,/(msie[\s]+[\d]+)/gim,/(trident).*rv:(\d+)/gim]; var $agent = navigator.userAgent.toLocaleLowerCase(); for(var ag in $agents){ if($agent.match($agents[ag])){ $(document.body).addClass(String(RegExp.$1+RegExp.$2).replace(/opr/,'opera').replace(/trident/,'msie').replace(/\s+/,'')); break; } } }); })(); $(document).ready(function(){ //스크롤시 헤더부분 스크립트 $(window).scroll(function(){ var viewHeight = $(document).scrollTop(); if(viewHeight > 0){ $('header').addClass('scroll'); }else{ $('header').removeClass('scroll'); } }); // 모바일 내비게이션 $('.btn-m_gnb').click(function(){ $('body').toggleClass('fixed'); return false; }); $('#m_gnb .btn-close, .bg-m_gnb').click(function(){ $('body').removeClass('fixed'); return false; }); $('.header_inner .gnb .gnb_ul .gnb_li_lang > a').click(function(){ $('.header').css('overflow', 'visible'); $('.header_inner .gnb .gnb_ul .gnb_li_lang').removeClass('active'); $('.header_inner .gnb .gnb_ul .gnb_li_lang > ul').show(); }); $('.header_inner .gnb .gnb_ul .gnb_li_lang').mouseleave(function(){ $('.header_inner .gnb .gnb_ul .gnb_li_lang > ul').hide(); $('.header').css('overflow', 'hidden'); }); }); $(document).ready(function(){ $('#main .section5 .content .slider').slick({ dots: false, autoplay: true, infinite: true, speed: 300, slidesToShow: 5, slidesToScroll: 1, responsive: [ { breakpoint: 1230, settings: { slidesToShow: 4 } }, { breakpoint: 1024, settings: { slidesToShow: 3 } }, { breakpoint: 768, settings: { slidesToShow: 2 } }, { breakpoint: 550, settings: { slidesToShow: 1 } } ] }); }); $(document).ready(function(){ $('.common_layout-path_li a').click(function(){ $(this).siblings('ul').toggleClass('subPathOn'); }); }); $(document).ready(function(){ $('.archive .history .cont .right .img_group').hide(); $('.archive .history .cont .right .img_group:first').show(); $('.archive .history .cont .left ul li').click(function () { $('.archive .history .cont .left ul li').removeClass('active'); $(this).addClass('active'); $('.archive .history .cont .right .img_group').hide() var activeTab = $(this).attr('rel'); $('#' + activeTab).fadeIn() }); });