core/skin/p008.yurecnt.ru/js/main.js

80 lines
2.0 KiB
JavaScript
Raw Normal View History

2023-04-09 19:52:26 +05:00
$(function() {
"use strict";
// //------- Sticky Header -------//
// $(".sticky-header").sticky();
// //------- video popup -------//
// $(".hero-banner__video, .video-play-button").magnificPopup({
// disableOn: 700,
// type: "iframe",
// mainClass: "mfp-fade",
// removalDelay: 160,
// preloader: false,
// fixedContentPos: false
// });
// //------- mailchimp --------//
// function mailChimp() {
// $('#mc_embed_signup').find('form').ajaxChimp();
// }
// mailChimp();
var nav_offset_top = $('header').height() + 50;
/*-------------------------------------------------------------------------------
Navbar
-------------------------------------------------------------------------------*/
//* Navbar Fixed
function navbarFixed(){
if ( $('.header_area').length ){
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= nav_offset_top ) {
$(".header_area").addClass("navbar_fixed");
} else {
$(".header_area").removeClass("navbar_fixed");
}
});
};
};
navbarFixed();
if ($('.blog-slider').length) {
$('.blog-slider').owlCarousel({
loop: true,
margin: 30,
items: 1,
nav: true,
autoplay: 2500,
smartSpeed: 1500,
dots: false,
responsiveClass: true,
navText : ["<div class='blog-slider__leftArrow'><img src='img/home/left-arrow.png'></div>","<div class='blog-slider__rightArrow'><img src='img/home/right-arrow.png'></div>"],
responsive:{
0:{
items:1
},
600:{
items:2
},
1000:{
items:3
}
}
})
}
//------- mailchimp --------//
function mailChimp() {
$('#mc_embed_signup').find('form').ajaxChimp();
}
mailChimp();
});
$(".lazy").lazyload({ placeholder: "/img/grey.gif", effect: "fadeIn", failure_limit: 2, threshold: 10 });