$(document).ready(function(){
$('.header-contacts__btn').on("click", function(){
$('.overlay').show()
});
$('.window-close').on("click", function(){
$('.overlay').hide()
});
var link = $('.menu-link');
var menu = $('.menu');
link.click(function(){
menu.toggleClass('menu_active')
link.toggleClass('menu-link_active')
})
jQuery("form").keypress(function(e) {
if (e.which != 8 && e.which != 0 && e.which != 46 && (e.which < 48 || e.which > 57)) {
return false;
}
});
$(window).on('scroll', function() {
var $div = $('.menu-link'),
scroll = $(this).scrollTop();
if (scroll > 10) {
$div.addClass('menu-link_active');
} else {
$div.removeClass('menu-link_active');
}
});
new WOW().init();
$('.product-slider_for').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
asNavFor: '.product-slider_nav',
responsive: [
{
breakpoint: 576,
settings: "unslick"
}
]
});
$('.product-slider_nav').slick({
slidesToShow: 4,
slidesToScroll: 1,
arrows: true,
focusOnSelect: true,
autoplay: false,
prevArrow: '<div class="slider-arrow slider-arrow_left"></div>',
nextArrow: '<div class="slider-arrow slider-arrow_right"></div>',
asNavFor: '.product-slider_for',
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
arrows: true,
focusOnSelect: true,
dots: true
}
},
{
breakpoint: 576,
settings: "unslick"
}
]
});
$('.feedback-slider').slick({
slidesToShow: 3,
slidesToScroll: 1,
arrow: true,
prevArrow: '<div class="slider-arrow slider-arrow_left slider-arrow_left-o slider-arrow_left_m"></div>',
nextArrow: '<div class="slider-arrow slider-arrow_right slider-arrow_right-o slider-arrow_right_m"></div>',
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
arrows: true,
focusOnSelect: true,
dots: true
}
},
{
breakpoint: 768,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
dots: true
}
},
{
breakpoint: 576,
settings: "unslick"
}
]
});
$('.product-slider_for_m').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
prevArrow: '<div class="slider-arrow slider-arrow_left slider-arrow_left_m"></div>',
nextArrow: '<div class="slider-arrow slider-arrow_right slider-arrow_right_m"></div>'
});
$('.feedback-slider_m').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrow: true,
prevArrow: '<div class="slider-arrow slider-arrow_left slider-arrow_left_m"></div>',
nextArrow: '<div class="slider-arrow slider-arrow_right slider-arrow_right_m"></div>'
});
});