jQuery(function($) {
// PC ³×ºñ°ÔÀÌ¼Ç ¹Ù
$(".nav_box").on('mouseenter focusin', function() {
$(".twoDBg").slideDown(300);
$(".nav_box li .twoD").slideDown(300);
$(".header_wrap").addClass("navbar-scroll");
});
$(".nav_box").on('mouseleave', function() {
$(".twoDBg, .nav_box li .twoD").stop().slideUp(200);
if ($(document).scrollTop() <= 50) {
$(".header_wrap").removeClass("navbar-scroll");
}
});
// ¼ºê¸Þ´º È°¼ºÈ
var currentURL = location.href.toLowerCase();
$('.nav-active>li>a').each(function() {
if (currentURL.indexOf(this.href.toLowerCase()) > -1) {
$(".nav-active>li>a.active").removeClass("active");
$(this).addClass("active");
}
});
$('li>a.active').parents().each(function() {
if ($(this).is('li>a')) {
$(this).addClass("active");
}
});
// sample > contact > wide > formmail
$("#formmail-wide input[name='add1']").attr('placeholder', '´ã´çÀÚ¸í');
$("#formmail-wide input[name='add2']").attr('placeholder', '¿¬¶ôó');
$("#formmail-wide input[name='add3']").attr('placeholder', 'À̸ÞÀÏ');
$("#formmail-wide textarea[name='add4']").attr('placeholder', '¹®Àdz»¿ë');
// ¸Þ´º¹Ù ½ºÅ©·Ñ ¾÷
var lastScrollTop = 0;
window.addEventListener("scroll", function(event) {
var st = jQuery(this).scrollTop();
if (st > lastScrollTop) {
jQuery('#header.sticky-on-scrollup').removeClass('show-sticky-onscroll'); // Down Scroll
} else {
jQuery('#header.sticky-on-scrollup').addClass('show-sticky-onscroll'); // Up Scroll
}
lastScrollTop = st;
});
}); // jQuery END
// ±â¾÷Çü > ¸ÞÀÎ
jQuery(window).on('pluginCarouselReady', function() {
jQuery('#oc-main').owlCarousel({
items: 2,
margin: 25,
nav: true,
navText: ['', '⟶'],
dots: false,
responsive: {
576: { items: 1 },
768: { items: 1 }
},
});
});
// ±â¾÷Çü > »ç¾÷¼Ò°³ A
jQuery(window).on('pluginCarouselReady', function() {
jQuery('#oc-review').owlCarousel({
items: 1,
margin: 25,
loop: true,
autoplay: 3000,
nav: true,
navText: ['⟵', '⟶'],
dots: false,
responsive: {
576: { items: 2 },
768: { items: 4 }
},
});
});
// ±â¾÷Çü > Á¦Ç°¼Ò°³ B
jQuery(document).on("click", "#portfolio .portfolio-item .portfolio-image>a", function() {
var isDisplay = jQuery(this).children(".hover").css("display");
if (isDisplay == "block") {
jQuery(this).children(".hover").stop().fadeOut();
jQuery(this).parent().removeClass('on');
} else {
jQuery(".hover").stop().fadeOut();
jQuery(this).children(".hover").stop().fadeToggle();
jQuery(".menu_list>ul>li").removeClass('on');
jQuery(this).parent().addClass('on');
}
return false;
});
// ÀÚÁÖÇÏ´Â Áú¹® ÇÊÅÍ°ª
jQuery(document).ready(function() {
var $faqItems = jQuery('#faqs .faq');
if (window.location.hash != '') {
var faqFilterHash = window.location.hash.split('#')[1];
if ($faqItems.hasClass(faqFilterHash)) {
jQuery('.customjs.grid-filter li').removeClass('activeFilter');
jQuery('[data-filter=".' + faqFilterHash + '"]').parent('li').addClass('activeFilter');
var faqSelector = '.' + faqFilterHash;
$faqItems.css('display', 'none');
if (faqSelector != 'all') {
jQuery(faqSelector).fadeIn(500);
} else {
$faqItems.fadeIn(500);
}
}
}
jQuery('.customjs.grid-filter a').on('click', function() {
jQuery('.customjs.grid-filter li').removeClass('activeFilter');
jQuery(this).parent('li').addClass('activeFilter');
var faqSelector = jQuery(this).attr('data-filter');
$faqItems.css('display', 'none');
if (faqSelector != 'all') {
jQuery(faqSelector).fadeIn(500);
} else {
$faqItems.fadeIn(500);
}
return false;
});
});
// Äü Æû¸ÞÀÏ
jQuery(document).ready(function() {
var elementParent = jQuery('.floating-contact-wrap');
jQuery('.floating-contact-btn').off('click').on('click', function() {
elementParent.toggleClass('active');
});
});
jQuery(function($) {
$("#list_card > li > a").hover(function() {
var bg = $(this).attr('data-background');
$("#bg-custom-section").css('background-image', 'url(' + bg + ')');
});
});