jQuery(function ($) {
'use strict';
$('#mainNavbar').affix({
offset: {
top: 40
}
});
$('li a[href*=\\#]').on("click", function (e) {
var anchor = $(this);
$('html, body').stop().animate({
scrollTop: $(anchor.attr('href')).offset().top - 136
}, 1000);
e.preventDefault();
});
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('.scroll-up').fadeIn();
} else {
$('.scroll-up').fadeOut();
}
});
$(window).on('load', function () {
parallaxInit();
});
$(".navbar-toggle").on("click", function () {
$(this).toggleClass("active");
});
window.sr = ScrollReveal();
sr.reveal('.p-1', {
duration: 1200,
scale: 1,
opacity: 0,
origin: 'bottom',
distance: '43px'
});
});
function parallaxInit() {
// Add your parallax functionality here, such as initializing a plugin.
}
$(document).ready(function () {
$('.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-active').on('changed.owl.carousel', function (event) {
var item = event.item.index - 2;
$('h1').removeClass('slide-caption_h1');
$('.owl-item').not('.cloned').eq(item).find('h1').addClass('slide-caption_h1');
$('h2').removeClass('slide-caption_h2');
$('.owl-item').not('.cloned').eq(item).find('h2').addClass('slide-caption_h2');
$('p').removeClass('slide-caption_p');
$('.owl-item').not('.cloned').eq(item).find('p').addClass('slide-caption_p');
});
});