1;(function () { 2 3 'use strict'; 4 5 var isMobile = { 6 Android: function() { 7 return navigator.userAgent.match(/Android/i); 8 }, 9 BlackBerry: function() { 10 return navigator.userAgent.match(/BlackBerry/i); 11 }, 12 iOS: function() { 13 return navigator.userAgent.match(/iPhone|iPad|iPod/i); 14 }, 15 Opera: function() { 16 return navigator.userAgent.match(/Opera Mini/i); 17 }, 18 Windows: function() { 19 return navigator.userAgent.match(/IEMobile/i); 20 }, 21 any: function() { 22 return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); 23 } 24 }; 25 26 var mobileMenuOutsideClick = function() { 27 28 $(document).click(function (e) { 29 var container = $("#offcanvas, .js-nav-toggle"); 30 if (!container.is(e.target) && container.has(e.target).length === 0) { 31 32 if ( $('body').hasClass('offcanvas') ) { 33 34 $('body').removeClass('offcanvas'); 35 $('.js-nav-toggle').removeClass('active'); 36 37 } 38 39 40 } 41 }); 42 43 }; 44 45 46 var offcanvasMenu = function() { 47 48 $('#page').prepend('<div id="offcanvas" />'); 49 $('#page').prepend('<a href="#" class="js-nav-toggle nav-toggle nav-white"><i></i></a>'); 50 var clone1 = $('.menu-1 > ul').clone(); 51 $('#offcanvas').append(clone1); 52 var clone2 = $('.menu-2 > ul').clone(); 53 $('#offcanvas').append(clone2); 54 55 $('#offcanvas .has-dropdown').addClass('offcanvas-has-dropdown'); 56 $('#offcanvas') 57 .find('li') 58 .removeClass('has-dropdown'); 59 60 // Hover dropdown menu on mobile 61 $('.offcanvas-has-dropdown').mouseenter(function(){ 62 var $this = $(this); 63 64 $this 65 .addClass('active') 66 .find('ul') 67 .slideDown(500, 'easeOutExpo'); 68 }).mouseleave(function(){ 69 70 var $this = $(this); 71 $this 72 .removeClass('active') 73 .find('ul') 74 .slideUp(500, 'easeOutExpo'); 75 }); 76 77 78 $(window).resize(function(){ 79 80 if ( $('body').hasClass('offcanvas') ) { 81 82 $('body').removeClass('offcanvas'); 83 $('.js-nav-toggle').removeClass('active'); 84 85 } 86 }); 87 }; 88 89 90 var burgerMenu = function() { 91 92 $('body').on('click', '.js-nav-toggle', function(event){ 93 var $this = $(this); 94 95 96 if ( $('body').hasClass('overflow offcanvas') ) { 97 $('body').removeClass('overflow offcanvas'); 98 } else { 99 $('body').addClass('overflow offcanvas'); 100 } 101 $this.toggleClass('active'); 102 event.preventDefault(); 103 104 }); 105 }; 106 107 108 109 var contentWayPoint = function() { 110 var i = 0; 111 $('.animate-box').waypoint( function( direction ) { 112 113 if( direction === 'down' && !$(this.element).hasClass('animated-fast') ) { 114 115 i++; 116 117 $(this.element).addClass('item-animate'); 118 setTimeout(function(){ 119 120 $('body .animate-box.item-animate').each(function(k){ 121 var el = $(this); 122 setTimeout( function () { 123 var effect = el.data('animate-effect'); 124 if ( effect === 'fadeIn') { 125 el.addClass('fadeIn animated-fast'); 126 } else if ( effect === 'fadeInLeft') { 127 el.addClass('fadeInLeft animated-fast'); 128 } else if ( effect === 'fadeInRight') { 129 el.addClass('fadeInRight animated-fast'); 130 } else { 131 el.addClass('fadeInUp animated-fast'); 132 } 133 134 el.removeClass('item-animate'); 135 }, k * 200, 'easeInOutExpo' ); 136 }); 137 138 }, 100); 139 140 } 141 142 } , { offset: '85%' } ); 143 }; 144 145 146 var dropdown = function() { 147 148 $('.has-dropdown').mouseenter(function(){ 149 150 var $this = $(this); 151 $this 152 .find('.dropdown') 153 .css('display', 'block') 154 .addClass('animated-fast fadeInUpMenu'); 155 156 }).mouseleave(function(){ 157 var $this = $(this); 158 159 $this 160 .find('.dropdown') 161 .css('display', 'none') 162 .removeClass('animated-fast fadeInUpMenu'); 163 }); 164 165 }; 166 167 168 var goToTop = function() { 169 170 $('.js-gotop').on('click', function(event){ 171 172 event.preventDefault(); 173 174 $('html, body').animate({ 175 scrollTop: $('html').offset().top 176 }, 500, 'easeInOutExpo'); 177 178 return false; 179 }); 180 181 $(window).scroll(function(){ 182 183 var $win = $(window); 184 if ($win.scrollTop() > 200) { 185 $('.js-top').addClass('active'); 186 } else { 187 $('.js-top').removeClass('active'); 188 } 189 190 }); 191 192 }; 193 194 195 // Loading page 196 var loaderPage = function() { 197 $(".loader").fadeOut("slow"); 198 }; 199 200 var counter = function() { 201 $('.js-counter').countTo({ 202 formatter: function (value, options) { 203 return value.toFixed(options.decimals); 204 }, 205 }); 206 }; 207 208 var counterWayPoint = function() { 209 if ($('#fh5co-counter').length > 0 ) { 210 $('#fh5co-counter').waypoint( function( direction ) { 211 212 if( direction === 'down' && !$(this.element).hasClass('animated') ) { 213 setTimeout( counter , 400); 214 $(this.element).addClass('animated'); 215 } 216 } , { offset: '90%' } ); 217 } 218 }; 219 220 var sliderMain = function() { 221 222 $('#hero .flexslider').flexslider({ 223 animation: "slide", 224 225 easing: "swing", 226 direction: "horizontal", 227 228 slideshowSpeed: 5000, 229 directionNav: true, 230 start: function(){ 231 setTimeout(function(){ 232 $('.slider-text').removeClass('animated fadeInUp'); 233 $('.flex-active-slide').find('.slider-text').addClass('animated fadeInUp'); 234 }, 500); 235 }, 236 before: function(){ 237 setTimeout(function(){ 238 $('.slider-text').removeClass('animated fadeInUp'); 239 $('.flex-active-slide').find('.slider-text').addClass('animated fadeInUp'); 240 }, 500); 241 } 242 243 }); 244 245 // $('#hero .flexslider .slides > li').css('height', $(window).height()); 246 // $(window).resize(function(){ 247 // $('#hero .flexslider .slides > li').css('height', $(window).height()); 248 // }); 249 250 }; 251 252 var parallax = function() { 253 254 if ( !isMobile.any() ) { 255 $(window).stellar({ 256 horizontalScrolling: false, 257 hideDistantElements: false, 258 responsive: true 259 260 }); 261 } 262 }; 263 264 var testimonialCarousel = function(){ 265 266 var owl = $('.owl-carousel-fullwidth'); 267 owl.owlCarousel({ 268 items: 1, 269 loop: true, 270 autoplay:true, 271 margin: 0, 272 nav: false, 273 dots: true,
274 smartSpeed: 800, 275 autoHeight: true 276 }); 277 278 }; 279 280 var carousels = function () { 281 jQuery(".owl-carousel1").owlCarousel( 282 { 283 loop:true, 284 center: true, 285 margin:0, 286 responsiveClass:true, 287 nav:false, 288 responsive:{ 289 0:{ 290 items:1, 291 nav:false 292 }, 293 600:{ 294 items:1, 295 nav:false 296 }, 297 1000:{ 298 items:1, 299 nav:true, 300 loop:false 301 } 302 } 303 } 304 ); 305 306 jQuery(".owl-carousel2").owlCarousel( 307 { 308 loop:true, 309 center: true, 310 margin:30, 311 responsiveClass:true, 312 nav:true, 313 dots:false, 314 responsive:{ 315 0:{ 316 items:1, 317 nav:true 318 }, 319 600:{ 320 items:2, 321 nav:true, 322 margin:10, 323 center: false, 324 }, 325 1000:{ 326 items:3, 327 nav:true, 328 loop:true 329 } 330 } 331 } 332 ); 333 } 334 335 336 $(function(){ 337 mobileMenuOutsideClick(); 338 offcanvasMenu(); 339 burgerMenu(); 340 contentWayPoint(); 341 dropdown(); 342 goToTop(); 343 loaderPage(); 344 parallax(); 345 sliderMain(); 346 testimonialCarousel(); 347 carousels(); 348 }); 349 350 351}());
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.