// ????? ?????? //------------------------------- ?????? -----------------------------------------> $(document).ready(function() { "use strict"; var win = $(window), nav = $('#navwrap_bg'), pos = nav.offset().top, sticky = function(){ console.log('Simple sticky function called'); win.scrollTop() > pos ? nav.addClass('sticky') : nav.removeClass('sticky') }; win.scroll(sticky); }); // ------------------------------- ?????? --------------------------------------- --> $(function() { $.fn.scrollToTop = function() { $(this).hide().removeAttr("href"); if ($(window).scrollTop() != "0") { $(this).stop().fadeIn(1000); } var scrollDiv = $(this); $(window).scroll(function() { if ($(window).scrollTop() == "0") { $(scrollDiv).fadeOut(1000) } else { $(scrollDiv).fadeIn(1000) } }); $(this).click(function() { $("html, body").animate({ scrollTop: 0 }, "slow") }) } }); $(function() { $("#scrollTop").scrollToTop(); }); // ------------------------------- ?????? ??? ???? --------------------------------------- --> $(function () { $('[data-toggle="tooltip"]').tooltip(); }); $(function () { var wow_ww = $(window).innerWidth(); if (wow_ww > 922) { new WOW().init(); } }); //------------------------------- ??????? -----------------------------------------> $(document).ready(function(){ $('.menu-icon-container').on('click', function(){ $('.menu-icon').toggleClass('transformed'); }); $(".menu-icon-container").on('click', function(){ $('#nav').slideToggle(200); } ); }); // //------------------------------- ???????? ?? -----------------------------------------> $(document).ready(function(){ var d = new Date(); var n = d.getFullYear(); $("#year").html(n); }); //------------------------------- ???? -----------------------------------------> function bluring() { try{ if(event.srcElement.tagName=='A'||event.srcElement.tagName=='IMG') { document.body.focus(); } }catch( e ) { } } try{ document.onfocusin=bluring; }catch( e ) { } var rurl = location.href; var purl = getUrl(rurl); function getUrl(url_str) { var real_url; if (url_str.indexOf('/') > 0) { real_url = url_str.split('/'); real_url = real_url[0]+'//'+real_url[2]+'/'+real_url[3]+'/'; } return real_url; } function goLocate(go_url) { document.location = purl + go_url; } //------------------------------- ???? ??????? ---------------------------------------------// $(document).ready(function(){ $('.contact_slider').slick({ infinite: true, slidesToShow: 1, slidesToScroll: 1, dots: true, arrows: false, autoplay: true, autoplaySpeed: 2000 }); }); //------------------------------- ????(???????) --------------------------------------------// $(document).ready(function(){ $('.spot_slick').slick({ slidesToShow: 3, slidesToScroll: 1, autoplay: true, autoplaySpeed: 2000, responsive: [ { breakpoint: 992, settings: { slidesToShow: 2 } }, { breakpoint: 768, settings: { slidesToShow: 1 } } ] }); }); //----------------------------- ????????(???????ес??) ---------------------------------------// $(window).on('load', function() { setFlowBanner(); }) function setFlowBanner() { const $wrap = $('#program_wrapper'); const $list = $('#program_wrapper .swiper-wrapper'); let wrapWidth = ''; //$wrap?? ???? ??? let listWidth = ''; //$list?? ???? ??? const speed = 92; //1??? ????? ???????? ???? //????? ???? let $clone = $list.clone(); $wrap.append($clone); flowBannerAct() //?????? :: ???????? ???? ?? ?????? ??? ??? ???? let oldWChk = window.innerWidth > 1279 ? 'pc' : window.innerWidth > 767 ? 'ta' : 'mo'; $(window).on('resize', function() { let newWChk = window.innerWidth > 1279 ? 'pc' : window.innerWidth > 767 ? 'ta' : 'mo'; if (newWChk != oldWChk) { oldWChk = newWChk; flowBannerAct(); } }); //??? ???? ??? function flowBannerAct() { //??? ??? ???? if (wrapWidth != '') { $wrap.find('.swiper-wrapper').css({ 'animation': 'none' }); $wrap.find('.swiper-wrapper').slice(2).remove(); } wrapWidth = $wrap.width(); listWidth = $list.width(); //???? ????? ???? ??????? ???? ?? ???? ??? if (listWidth < wrapWidth) { const listCount = Math.ceil(wrapWidth * 2 / listWidth); for (let i = 2; i < listCount; i++) { $clone = $clone.clone(); $wrap.append($clone); } } $wrap.find('.swiper-wrapper').css({ 'animation': `${listWidth / speed}s linear infinite flowRolling` }); } /* $wrap.on('mouseenter', function () { $wrap.find('.swiper-wrapper').css('animation-play-state', 'paused'); }); */ $wrap.on('mouseleave', function () { $wrap.find('.swiper-wrapper').css('animation-play-state', 'running'); }); }