// ȨÇÇ¿î¿ë ½ºÅ©¸³Æ® $(function () { $('.eh').matchHeight({}); }); //------------------------------- ½ºÆ½¸Þ´º -----------------------------------------> $(function () { "use strict"; var win = $(window), nav = $('#navwrap_bg'), pos = nav.offset().top, sticky = function () { win.scrollTop() > pos ? nav.addClass('sticky') : nav.removeClass('sticky') }; win.scroll(sticky); }); // ------------------------------- ½ºÅ©·Ñž --------------------------------------- --> $(function () { $.fn.scrollToTop = function () { $(this).hide().removeAttr("href"); if ($(window).scrollTop() != "0") { $(this).stop().fadeIn(1000); } var scrollDiv = $(this); $(window).scroll(function () { if ($(window).scrollTop() == "0") { $(scrollDiv).fadeOut(1000); } else { $(scrollDiv).fadeIn(1000); } }); }; }); $(function () { $("#scrollTop").scrollToTop(); }); $(function () { var scrollBottom = $("footer").offset().top + 1000; $(".scrollBtn.up").click(function () { $("html, body").animate({ scrollTop: 0 }, "slow"); }); $(".scrollBtn.down").click(function () { $("html, body").animate({ scrollTop: scrollBottom }, "slow"); var scrollBottom2 = $("footer").offset().top; if (scrollBottom < scrollBottom2) { $("html, body").animate({ scrollTop: scrollBottom2 }, "slow"); } }); $(".scrollBtn.view_item2").click(function () { $('#view_item').toggleClass('view_on'); }); }); // ------------------------------- ÅøÆÁ°ú ¿Í¿ì ÃʱâÈ­ --------------------------------------- --> $(function () { $('[data-toggle="tooltip"]').tooltip(); }); $(function () { var wow_ww = $(window).innerWidth(); if (wow_ww > 922) { new WOW().init(); } }); //------------------------------- ¸ð¹ÙÀϹöÆ° -----------------------------------------> $(function () { $('.menu-icon-container').on('click', function () { $('.menu-icon').toggleClass('transformed'); }); $(".menu-icon-container").on('click', function () { $('#nav_mob').slideToggle(200); }); /* ¸ð¹ÙÀϹöÆ°¿¡ Àû¿ë */ $("#nav .menu").clone().appendTo("#nav_mob"); // $("#nav_mob .menu > li i.fas").bind("click", function () { var $this = $(this); var $icon_plus = "fa-plus"; var $icon_minus = "fa-minus"; if ($this.parent().hasClass('select')) { $this.parent().removeClass("select"); $this.parent().find('> ul').slideUp(200); $("#nav_mob .menu > li i.fas").removeClass($icon_minus).addClass($icon_plus); } else { $("#nav_mob .menu > li i.fas").removeClass($icon_minus).addClass($icon_plus); $this.parent().find("i").removeClass($icon_plus).addClass($icon_minus); $("#nav_mob .menu > li").removeClass("select"); $this.parent().addClass("select"); $('#nav_mob .menu > li > ul').slideUp(200); $this.parent().find("> ul").slideDown(200); } }); }); //------------------------------- Ä«ÇǶóÀÌÅÍ ³âµµ -----------------------------------------> $(function () { var d = new Date(); var n = d.getFullYear(); $("#year").html(n); }); //------------------------------- ºí·¯ -----------------------------------------> // ÆÄÀÏ À̸§: °øÅ뽺ũ¸³Æ® ÆÄÀϸí: common ÆÄÀÏ°æ·Î: {{$template}}/inc/common.js // function bluring() { try { if (event.srcElement.tagName == 'A' || event.srcElement.tagName == 'IMG') { document.body.focus(); } } catch (e) {} } try { document.onfocusin = bluring; } catch (e) {} var rurl = location.href; var purl = getUrl(rurl); function getUrl(url_str) { var real_url; if (url_str.indexOf('/') > 0) { real_url = url_str.split('/'); real_url = real_url[0] + '//' + real_url[2] + '/' + real_url[3] + '/'; } return real_url; } function goLocate(go_url) { document.location = purl + go_url; }