$(document).ready(function() {
// 메가 메뉴
$(".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").stop().slideUp(200);
$(".nav_box li .twoD").stop().slideUp(200);
if ($(document).scrollTop() > 50) {
} else {
$(".header_wrap").removeClass("navbar-scroll");
}
});
// 모달비디오 닫을 시 재생종료
$('.modal').each(function() {
var src = $(this).find('iframe').attr('src');
$(this).on('click', function() {
$(this).find('iframe').attr('src', '');
$(this).find('iframe').attr('src', src);
});
});
// About 03
$('#owl-thumb').owlCarousel({
nav: false,
dots: false,
loop: true,
items: 1,
autoplay: true,
autoplayTimeout: 3000,
thumbs: true,
thumbImage: true,
thumbContainerClass: 'owl-thumbs',
thumbItemClass: 'owl-thumb-item'
});
// About 03
$('.owl-thumb').owlCarousel({
nav: false,
dots: false,
loop: true,
items: 1,
autoplay: true,
autoplayTimeout: 3000,
thumbs: true,
thumbImage: true,
thumbContainerClass: 'owl-thumbs',
thumbItemClass: 'owl-thumb-item'
});
// About 07
$('#owl-gallery').owlCarousel({
smartSpeed: 660,
nav: false,
dots: true,
loop: true,
margin: 10,
autoplay: true,
autoplayTimeout: 3000,
autoplaySpeed: 500,
thumbs: false,
responsive: {
0: {
items: 1,
},
768: {
items: 2,
},
1200: {
items: 3,
},
}
});
// About 07
$('.owl-gallery').owlCarousel({
smartSpeed: 660,
nav: false,
dots: true,
loop: true,
margin: 10,
autoplay: true,
autoplayTimeout: 3000,
autoplaySpeed: 500,
thumbs: false,
responsive: {
0: {
items: 1,
},
768: {
items: 2,
},
1200: {
items: 3,
},
}
});
// Service 01/02/03
$('.owl-default').owlCarousel({
nav: true,
navText: ["", ""],
loop: true,
items: 1,
autoplay: true,
autoplayTimeout: 6000,
autoplayHoverPause: true,
thumbs: false,
});
// Main hero
$('#owl-intro').owlCarousel({
nav: false,
navText: ["", ""],
loop: true,
items: 1,
dots: true,
autoplay: true,
autoplayTimeout: 4000,
autoplaySpeed: 500,
autoplayHoverPause: false,
thumbs: false,
});
// Service 06
$(document).ready(function() {
$('.tcards').owlCarousel({
loop: true,
margin: 30,
center: false,
stagePadding: 15,
nav: true,
navText: ["", ""],
dots: true,
autoplay: true,
autoplayTimeout: 2000,
autoplayHoverPause: true,
responsiveClass: true,
responsive: {
0: {
items: 1,
nav: false
},
768: {
items: 2
},
1170: {
items: 5
}
}
});
});
// Main 03
$('.testi7').owlCarousel({
loop: true,
margin: 30,
nav: false,
navText: ["", ""],
dots: true,
autoplay: true,
center: true,
responsiveClass: true,
responsive: {
0: {
items: 1
},
1650: {
items: 1
}
}
});
// Main
$(document).ready(function() {
$('.main_tcards').owlCarousel({
loop: true,
margin: 30,
center: false,
stagePadding: 15,
nav: false,
navText: ["", ""],
dots: true,
autoplay: true,
autoplayTimeout: 2000,
autoplayHoverPause: true,
responsiveClass: true,
responsive: {
0: {
items: 1,
nav: false
},
768: {
items: 2
},
1170: {
items: 2
}
}
});
});
// imgBg
$('.imgBg-holder').each(function() {
var b = $(this).children('img').attr('src');
$(this).css('background', 'url("' + b + '")')
});
// imgBg
$('.image-container').each(function() {
var b = $(this).children('img').attr('src');
$(this).css('background-images', 'url("' + b + '")')
});
// Board
$("#border[name='password']").attr("size", "50");
$(".tableA-list td[width='26']").css("font-size", "0");
$(".tableA-write table.board").addClass("innerTable");
$(".tableA-modify table.board").addClass("innerTable");
$("#main-qna .formmail_title_bgcolor>font").css("color", "rgba(255,255,255,.4)");
});
// ==============================================================
// Auto select sub navbar
// ==============================================================
$(document).ready(function() {
var str = location.href.toLowerCase();
$('.sub-navbar>li>a').each(function() {
if (str.indexOf(this.href.toLowerCase()) > -1) {
$(".sub-navbar>li.active").removeClass("active");
$(this).parent().addClass("active");
}
});
$('li.active').parents().each(function() {
if ($(this).is('li')) {
$(this).addClass("active");
}
});
});
$(document).ready(function() {
var e = document.querySelector(".navbar"),
t = document.querySelector(".navbar-collapse"),
o = !1,
a = !1,
n = e.classList.contains("navbar-togglable");
function l() {
!o && n && (e.classList.remove("navbar-dark"),
e.classList.add("navbar-light"),
o = !0)
}
function r() {
o && n && (e.classList.remove("navbar-light"),
e.classList.add("navbar-dark"),
o = !1)
}
function i(e, t) {
if ("fpOnLeave" == e)
0 == t ? r() : l();
else if ("collapse" == e) {
0 == (n = window.pageYOffset) && a ? r() : l()
} else if ("scroll" == e || "load" == e) {
var n;
0 == (n = window.pageYOffset) && !a && o ? r() : 0 === n || o || l()
}
}
"load scroll fpOnLeave".split(" ").forEach(function(e) {
window.addEventListener(e, function(e) {
i(e.type, e.detail ? e.detail.destination.index : void 0)
})
}),
$(t).on({
"show.bs.collapse": function() {
i("collapse"),
a = !0
},
"hidden.bs.collapse": function() {
i("collapse"),
a = !1
}
})
});
$(document).ready(function() {
var e = document.querySelectorAll(".dropup, .dropright, .dropdown, .dropleft"),
t = document.querySelectorAll(".dropdown-menu .dropdown-toggle");
t && [].forEach.call(t, function(a) {
a.addEventListener("click", function(e) {
var t, n, o;
e.preventDefault(),
e.stopPropagation(),
n = (t = a).closest(".dropdown-menu").querySelectorAll(".dropdown-menu"),
o = t.parentElement.querySelector(".dropdown-menu"),
[].forEach.call(n, function(e) {
e !== o && e.classList.remove("show")
}),
o.classList.toggle("show")
})
}),
$(e).on("hide.bs.dropdown", function(e) {
var t;
t = this.querySelectorAll(".dropdown-menu"),
[].forEach.call(t, function(e) {
e.classList.remove("show")
})
})
});