$(document).ready(function() {
$('.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 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: true,
navText: ["", ""],
loop: true,
items: 1,
autoplay: true,
autoplayTimeout: 6000,
autoplayHoverPause: true,
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: 3
}
}
});
});
// imgBg
$('.imgBg-holder').each(function() {
var b = $(this).children('img').attr('src');
$(this).css('background', '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");
});
// ==============================================================
// 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")
})
})
});