jQuery(function ($) { 'use strict'; $('#mainNavbar').affix({ offset: { top: 40 } }); $('li a[href*=#]').on("click", function (e) { var anchor = $(this); var target = $(anchor.attr('href')); if (target.length) { $('html, body').stop().animate({ scrollTop: target.offset().top - 136 }, 700); e.preventDefault(); } }); $(window).on('scroll', function () { if ($(this).scrollTop() > 100) { $('.scroll-up').fadeIn(); } else { $('.scroll-up').fadeOut(); } }); $(".navbar-toggle").on("click", function () { $(this).toggleClass("active"); }); $("img").each(function () { var currentSrc = $(this).attr("src"); var updatedSrc = currentSrc; if (currentSrc === "/cimg/arr_page_go.gif") { updatedSrc = "../img/vdata/inc/images/par1.png"; } else if (currentSrc === "/cimg/arr_page_next.gif") { updatedSrc = "../img/vdata/inc/images/par2.png"; } else if (currentSrc === "/cimg/arr_page_back.gif") { updatedSrc = "../img/vdata/inc/images/pal1.png"; } else if (currentSrc === "/cimg/arr_page_pre.gif") { updatedSrc = "../img/vdata/inc/images/pal2.png"; } $(this).attr("src", updatedSrc); }); $(".mstx-inw").hide().fadeIn(1000); $('.slider-active').owlCarousel({ items: 1, loop: true, animateOut: 'fadeOut', animateIn: 'fadeIn', autoplay: true, autoHeight: true, nav: true, navText: ['', ''], dots: true, autoplayTimeout: 6500, smartSpeed: 700, responsiveRefreshRate: 0, responsiveClass: true, responsive: { 0: { items: 1, dots: false, nav: false }, 400: { items: 1, dots: false, nav: false }, 768: { items: 1 } } }); $(".slider-taxt").hide().fadeIn(1000); $("#no-fouc").delay(170).animate({ "opacity": "1" }, 170); $(".looo").fadeOut("fast"); $("#ss00").each(function () { var sidebarH = $("#sidebar").height(); var contentH = $("#contents").height(); if (sidebarH > contentH) { $(this).height(sidebarH); } else { $(this).height(contentH); } }); }); $(window).on('load', function () { if (typeof AOS !== 'undefined') { AOS.init({ duration: 650, offset: 0, delay: 100, easing: 'ease-out-quad' }); } }); window.gtranslateSettings = { "default_language": "ko", "languages": ["ko", "en"], "wrapper_selector": ".gtranslate_wrapper", "alt_flags": { "en": "usa" } }; document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll("p, span, div, h1, h2, h3, h4, h5, h6, a, li, button").forEach(function(el){ var text = el.textContent.trim(); if (text && /^[A-Za-z0-9\s.,'"\-!?()&/+]+$/.test(text)) { el.classList.add("notranslate"); } }); }); // === 자동번역 후 특정 텍스트 교체 (스타일 유지 버전) === document.addEventListener("DOMContentLoaded", function () { const replacements = { "About the company": "Company", "Business Introduction": "Business", "employment": "Employment", "Request for quotation": "Request" }; const observer = new MutationObserver(function() { document.querySelectorAll("*").forEach(function(el){ el.childNodes.forEach(function(node) { if (node.nodeType === Node.TEXT_NODE) { const trimmed = node.textContent.trim(); if (replacements[trimmed]) { node.textContent = node.textContent.replace(trimmed, replacements[trimmed]); } } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); });