1$(document).ready(function () { 2 "use strict"; // start of use strict 3 4 /*============================== 5 Mobile navigation 6 ==============================*/ 7 $('.header__btn').on('click', function() { 8 $(this).toggleClass('header__btn--active'); 9 $('.header__nav').toggleClass('header__nav--active'); 10 11 if ( $(window).scrollTop() == 0 ) { 12 $('.header').toggleClass('header--active'); 13 } 14 }); 15 16 $('.header__nav a[data-scroll]').on('click', function() { 17 $('.header__nav').toggleClass('header__nav--active'); 18 $('.header__btn').toggleClass('header__btn--active'); 19 }); 20 21 /*============================== 22 Header 23 ==============================*/ 24 $(window).on('scroll', function () { 25 if ( $(window).scrollTop() > 0 ) { 26 $('.header').addClass('header--active'); 27 } else { 28 $('.header').removeClass('header--active'); 29 } 30 }); 31 $(window).trigger('scroll'); 32 33 /*============================== 34 Home slider 35 ==============================*/ 36 $('.home__slider').owlCarousel({ 37 animateOut: 'fadeOut', 38 animateIn: 'fadeIn', 39 mouseDrag: false, 40 touchDrag: false, 41 dots: false, 42 items: 1, 43 loop: true, 44 autoplay: true, 45 autoplayTimeout: 5000, 46 smartSpeed: 700, 47 }); 48 49 $('.home__slider .item').each(function(){ 50 if ($(this).attr("data-bg")){ 51 $(this).css({ 52 'background': 'url(' + $(this).data('bg') + ')', 53 'background-position': 'center center', 54 'background-repeat': 'no-repeat', 55 'background-size': 'cover' 56 }); 57 } 58 }); 59 60 /*============================== 61 Section bg 62 ==============================*/ 63 $('.section--bg').each(function(){ 64 if ($(this).attr("data-bg")){ 65 $(this).css({ 66 'background': 'url(' + $(this).data('bg') + ')', 67 'background-position': 'center center', 68 'background-repeat': 'no-repeat', 69 'background-size': 'cover' 70 }); 71 } 72 }); 73 74 /*============================== 75 Partners slider 76 ==============================*/ 77 $('.partners__slider').owlCarousel({ 78 mouseDrag: false, 79 touchDrag: false, 80 dots: false, 81 loop: true, 82 autoplay: true, 83 autoplayTimeout: 5000, 84 autoplayHoverPause: true, 85 smartSpeed: 700, 86 margin: 20, 87 responsive : { 88 0 : { 89 items: 2, 90 }, 91 576 : { 92 items: 3, 93 margin: 20, 94 }, 95 768 : { 96 items: 4, 97 margin: 30 98 }, 99 992 : { 100 items: 5, 101 margin: 30 102 }, 103 1200 : { 104 items: 6, 105 margin: 30 106 } 107 } 108 }); 109 110 /*============================== 111 Counter 112 ==============================*/ 113 $('.counter__value').counterUp({ 114 delay: 10, 115 time: 800 116 }); 117 118 /*============================== 119 Ticker 120 ==============================*/ 121 $('.ticker').marquee({ 122 pauseOnHover: true, 123 duplicated: true, 124 duration: 20000, 125 gap: 0, 126 startVisible: true 127 }); 128 129 /*============================== 130 Smooth scroll 131 ==============================*/ 132 var scroll = new SmoothScroll('[data-scroll]', { 133 ignore: '[data-scroll-ignore]', 134 header: '.header', 135 speed: 600, 136 offset: 0, 137 easing: 'easeInOutCubic', 138 updateURL: false, 139 }); 140 141 /*============================== 142 Modal 143 ==============================*/ 144 // $('.video__btn').magnificPopup({ 145 // disableOn: 700, 146 // type: 'iframe', 147 // mainClass: 'mfp-fade', 148 // removalDelay: 300, 149 // preloader: false, 150 // fixedContentPos: false 151 // }); 152 153 // $('.modal-btn').magnificPopup({ 154 // fixedContentPos: true, 155 // fixedBgPos: true, 156 // overflowY: 'auto', 157 // type: 'inline', 158 // preloader: false, 159 // focus: '#username', 160 // modal: false, 161 // removalDelay: 300, 162 // mainClass: 'my-mfp-zoom-in', 163 // callbacks: { 164 // open: function() { 165 // if ($(window).width() > 1200) { 166 // $('.header').css('margin-left', "-" + (getScrollBarWidth()/2) + "px"); 167 // } 168 // }, 169 // close: function() { 170 // if ($(window).width() > 1200) { 171 // $('.header').css('margin-left', 0); 172 // } 173 // } 174 // } 175 // }); 176 177 // $('.modal-article').magnificPopup({ 178 // fixedContentPos: true, 179 // fixedBgPos: true, 180 // overflowY: 'auto', 181 // type: 'inline', 182 // preloader: false, 183 // focus: '#username', 184 // modal: false, 185 // removalDelay: 300, 186 // mainClass: 'my-mfp-zoom-in', 187 // callbacks: { 188 // open: function() { 189 // if ($(window).width() > 1200) { 190 // $('.header').css('margin-left', "-" + (getScrollBarWidth()/2) + "px"); 191 // } 192 // }, 193 // close: function() { 194 // if ($(window).width() > 1200) { 195 // $('.header').css('margin-left', 0); 196 // } 197 // } 198 // } 199 // }); 200 201 function getScrollBarWidth () {
202 var $outer = $('<div>').css({visibility: 'hidden', width: 100, overflow: 'scroll'}).appendTo('body'), 203 widthWithScroll = $('<div>').css({width: '100%'}).appendTo($outer).outerWidth(); 204 $outer.remove(); 205 return 100 - widthWithScroll; 206 }; 207 208});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.