$(document).ready(function () { var top_show = 300; var delay = 1000; if ($(window).scrollTop() > top_show) $('#top').fadeIn(); else $('#top').fadeOut(); $(window).scroll(function() { if ($(this).scrollTop() > top_show) $('#top').fadeIn(); else $('#top').fadeOut(); }); $('#top').click(function() { $('body, html').animate({ scrollTop: 0 }, delay); }); $('.mp_features__item ').on('click', function () { $('.mp_features__item_text').removeClass('active'); var type = $(this).data('type'); $(this).parent().find('.mp_features__item_text' + type).addClass('active'); if(type == '1') { $(this).parent().find('.mp_features__item_text' + type).css('width', 117 * 5 + ((($('.mp_features__holder').width() - 702) / 5) * 4)); } else if(type == '2') { $(this).parent().find('.mp_features__item_text' + type).css('width', 117 * 4 + ((($('.mp_features__holder').width() - 702) / 5) * 3)); $(this).parent().find('.mp_features__item_text' + type + '_add').css('width', 118); } else if(type == '3') { $(this).parent().find('.mp_features__item_text' + type).css('width', 117 * 3 + ((($('.mp_features__holder').width() - 702) / 5) * 2)); $(this).parent().find('.mp_features__item_text' + type + '_add').css('width', 117 * 2 + ((($('.mp_features__holder').width() - 702) / 5))); } else if(type == '4') { $(this).parent().find('.mp_features__item_text' + type).css('width', 117 * 3 + ((($('.mp_features__holder').width() - 702) / 5) * 2)); $(this).parent().find('.mp_features__item_text' + type + '_add').css('width', 117 * 2 + ((($('.mp_features__holder').width() - 702) / 5))); } else if(type == '5') { $(this).parent().find('.mp_features__item_text' + type).css('width', 117 * 4 + ((($('.mp_features__holder').width() - 702) / 5) * 3)); $(this).parent().find('.mp_features__item_text' + type + '_add').css('width', 118); } else if(type == '6') { $(this).parent().find('.mp_features__item_text' + type).css('width', 117 * 5 + ((($('.mp_features__holder').width() - 702) / 5) * 4)); } }); $('.mp_features__item:first').trigger('click'); $('.mp_features__item_text .close').on('click', function () { $('.mp_features__item_text').removeClass('active'); }); $('.mpc_bg_title').on('click', function(event){ if($(event.target).prop('tagName') == 'STRONG'){ //переход по ссылке return true; } $(this).toggleClass('active'); $(this).siblings('.mpc_bg_dropdown').slideToggle(250, function(){ if($(this).css('display') === 'none'){ $(this).removeAttr('style'); } }); }); $('.lh_burger').on('click', function () { $('.hblock3').slideToggle(250, function(){ if($(this).css('display') === 'none'){ $(this).removeAttr('style'); } }); }); $('.catalog-opener').on('click', function () { $(this).toggleClass('active'); $('.block.catalog').slideToggle(250, function(){ if($(this).css('display') === 'none'){ $(this).removeAttr('style'); } }); }); $('.about_view_all').on('click', function(){ $(this).toggleClass('active'); $(this).parent('.lcm_content').find('.section_text').toggleClass('active'); }); $('.lh_recall2 a.button').click(function(event) { $('.modal1').show(); return false; }); $('.lf_up').click(function(event) { $('html, body').animate({ scrollTop: 0 }, 250); }); if($('body').find('.uss_shop_detail').length > 0) { $('
').appendTo('.uss_shop_technical_data'); $('.uss_shop_detail .uss_shop_price').prependTo('.udb_left'); $('.uss_shop_detail .uss_shop_by').appendTo('.udb_left'); $('.uss_shop_detail .uss_compare_by').appendTo('.udb_left'); $('.pos_pic').appendTo('.uss_data_bottom').show(); } if($('.mp_sales .uss_widget_outer_content').length){ $('.mp_sales .uss_widget_outer_content').slick('unslick'); $('.mp_sales .uss_widget_outer_content').slick({ infinite: true, slidesToShow: 4, slidesToScroll: 4, autoplay: true, autoplaySpeed: 4500, infinite: true, responsive: [ { breakpoint: 850, settings: { slidesToShow: 3, slidesToScroll: 3 } }, { breakpoint: 650, settings: { slidesToShow: 2, slidesToScroll: 2 } } ] }); } if($('.mp_newbies .uss_widget_outer_content').length){ $('.mp_newbies .uss_widget_outer_content').slick('unslick'); $('.mp_newbies .uss_widget_outer_content').slick({ infinite: true, slidesToShow: 4, slidesToScroll: 4, autoplay: true, autoplaySpeed: 4500, infinite: true, responsive: [ { breakpoint: 850, settings: { slidesToShow: 3, slidesToScroll: 3 } }, { breakpoint: 650, settings: { slidesToShow: 2, slidesToScroll: 2 } } ] }); } if($('.mp_salesleaders .uss_widget_outer_content').length){ $('.mp_salesleaders .uss_widget_outer_content').slick('unslick'); $('.mp_salesleaders .uss_widget_outer_content').slick({ infinite: true, slidesToShow: 4, slidesToScroll: 4, autoplay: true, autoplaySpeed: 4500, infinite: true, responsive: [ { breakpoint: 850, settings: { slidesToShow: 3, slidesToScroll: 3 } }, { breakpoint: 650, settings: { slidesToShow: 2, slidesToScroll: 2 } } ] }); } if($('.block-slider .slides').length){ $('.block-slider .slides').slick('unslick'); $('.block-slider .slides').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: true, dots: false, touchMove: false, autoplay: true, autoplaySpeed: 4500, }); } /*if($('.mp_partners .ib_holder').length){ $('.mp_partners .ib_holder').slick({ infinite: true, slidesToShow: 5, slidesToScroll: 5, responsive: [ { breakpoint: 850, settings: { slidesToShow: 3, slidesToScroll: 3 } }, { breakpoint: 650, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); }*/ if($('.mp_partners_holder').length && !$('.mp_partners_holder').hasClass('slick-initialized')){ $('.mp_partners_holder').slick({ infinite: true, slidesToShow: 5, slidesToScroll: 5, responsive: [ { breakpoint: 1000, settings: { slidesToShow: 4, slidesToScroll: 4 } }, { breakpoint: 768, settings: { slidesToShow: 3, slidesToScroll: 3 } }, { breakpoint: 680, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); } resize(); $(window).resize(function(event) { resize(); }); }); function resize(){ if ($(window).width() < 1001) { if($('.mp_contacts').find('.lf_wrap1').length == 0){ $('.lf_logo').wrap('
'); } $('.lf_recall_phone').insertAfter($('.lf_logo')); $('.mp_contacts .lh_recall').insertAfter($('.lf_recall_phone')); if($('.mp_contacts').find('.lf_wrap2').length == 0){ $('.mp_contacts .posonly_block').wrap('
'); } $('.lf_social').insertAfter($('.mp_contacts .posonly_block')); } else { $('.lf_logo').prependTo($('.mp_contacts .mpc_top .col.left')); $('.lf_recall_phone').insertAfter($('.mp_contacts .lh_search')); $('.mp_contacts .lh_recall').insertAfter($('.lf_recall_phone')); $('.mp_contacts .posonly_block').insertAfter($('.mp_contacts .lh_recall')); $('.lf_social').insertAfter($('.mp_contacts .posonly_block')); $('.lf_wrap1').remove(); $('.lf_wrap2').remove(); } if ($(window).width() < 681) { $('.hblock5_1').appendTo($('.hblock4')); $('.hblock6_4').insertBefore($('.lh_burger')); } else { $('.hblock5_1').prependTo($('.hblock5')); $('.hblock6_4').insertAfter($('.hblock6 .mob')); } if ($(window).width() < 1025) { $('.lc_left .form').insertAfter($('section#content')); } else { $('.l_content .block.form').insertAfter($('.lc_left .catalog')); } } (function($) { $.fn.jCarouselLite = function(o) {} })(jQuery);