1// JavaScript Document 2 3 jQuery(window).on('load', function() { 4 5 "use strict"; 6 7 /*====================================================*/ 8 /* PRELOADER 9 /*====================================================*/ 10 jQuery('.preloader').fadeOut('slow', function () { 11 jQuery(this).remove(); 12 }); 13 14 jQuery("#loader").delay(100).fadeOut(); 15 jQuery("#loader-wrapper").delay(100).fadeOut("fast"); 16 17 }); 18 19 20 jQuery(window).on('scroll', function() { 21 22 "use strict"; 23 24 /*====================================================*/ 25 /* Navigtion Menu Scroll 26 /*====================================================*/ 27 var b = jQuery(window).scrollTop(); 28 29 if( b > 72 ){ 30 jQuery(".navbar").addClass("scroll"); 31 } else { 32 jQuery(".navbar").removeClass("scroll"); 33 } 34 35 }); 36 37 38 jQuery(document).ready(function() { 39 40 "use strict"; 41 42 /*====================================================*/ 43 /* MOBILE MENU TOGGLE 44 /*====================================================*/ 45 if ( jQuery(window).width() < 769 ) { 46 jQuery('.navbar-nav li.nav-item.nl-simple').on('click', function() { 47 jQuery('#navbarSupportedContent').css("height", "1px").removeClass("in").addClass("collapse"); 48 jQuery('#navbarSupportedContent').removeClass("show"); 49 }); 50 } 51 52 53 /*====================================================*/ 54 /* HERO FULLSCREEN SLIDER 55 /*====================================================*/ 56 jQuery("#slides").superslides({ 57 play: 4500, 58 animation: "fade", 59 pagination: true 60 }); 61 62 /*====================================================*/ 63 /* ONSCROLL ANIMATION 64 /*====================================================*/ 65 jQuery('.animated').appear(function() { 66 67 var elem = jQuery(this); 68 var animation = elem.data('animation'); 69 70 if ( !elem.hasClass('visible') ) { 71 var animationDelay = elem.data('animation-delay'); 72 if ( animationDelay ) { 73 setTimeout(function(){ 74 elem.addClass( animation + " visible" ); 75 }, animationDelay); 76 77 } else { 78 elem.addClass( animation + " visible" ); 79 } 80 } 81 82 }); 83 84 85 /*====================================================*/ 86 /* ANIMATED SCROLL TO ANCHOR 87 /*====================================================*/ 88 89 var scroll = new SmoothScroll('a[href*="#"]'); 90 91 /*====================================================*/ 92 /* SCROLLUP 93 /*====================================================*/ 94 jQuery.scrollUp({ 95 scrollName: 'scrollUp', // Element ID 96 scrollDistance: 600, // Distance from top/bottom before showing element (px) 97 scrollFrom: 'top', // 'top' or 'bottom' 98 scrollSpeed: 300, // Speed back to top (ms) 99 easingType: 'linear', // Scroll to top easing (see http://easings.net/) 100 animation: 'slide', // Fade, slide, none 101 animationSpeed: 200, // Animation speed (ms) 102 scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object 103 scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number 104 scrollText: '', // Text for element, can contain HTML 105 scrollTitle: false, // Set a custom <a> title if required. 106 scrollImg: false, // Set true to use image 107 activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF' 108 zIndex: 2147483647 // Z-Index for the overlay 109 }); 110 111 112 /*====================================================*/ 113 /* TYPED TEXT 114 /*====================================================*/ 115 var wrapT = jQuery('.hero-txt.typed-style'); 116 if(wrapT.length){ 117 var cursor = wrapT.attr('data-cursor-char'); 118 var showcursor = wrapT.attr('data-cursor'); 119 var speed = wrapT.attr('data-speed'); 120 var backspeed = wrapT.attr('data-back-speed'); 121 var loop = wrapT.attr('data-loop'); 122 123 var speedT = (speed) ? parseInt(speed) : 100; 124 var backspeedT = (backspeed) ? parseInt(backspeed) : 100; 125 var loopT = (loop != 'false') ? true : false; 126 var cursoT = (cursor) ? ''+cursor+'' : '_'; 127 128 129 var countSpan = jQuery('.hero-typed span').size(); 130 var arr = []; 131 for (var i = 1; i < countSpan+1; i++) { 132 var textcolor = jQuery('.hero-typed > span:nth-child('+i+')').css('color'); 133 134 var texte = jQuery('.hero-typed > span:nth-child('+i+')').text(); 135 var elString = '<span style="color:'+textcolor+';">'+texte+'</span>'; 136 arr.push(elString); 137 } 138 139 //typed options 140 var typed = new Typed('.typed', {
141 strings: arr, 142 typeSpeed: speedT, 143 backSpeed: backspeedT, 144 loop: loopT, 145 loopCount: Infinity, 146 showCursor: true, 147 cursorChar: cursoT, 148 }); 149 jQuery('.hero-typed').css('display','none'); 150 var cursorcolor = jQuery('.hero-txt.typed-style').attr('data-cursor-color'); 151 if( cursorcolor ){jQuery('.hero-txt .typed-cursor').css('color',cursorcolor);} 152 } 153 154 155 /*====================================================*/ 156 /* PARALLAX BACKGROUND 157 /*====================================================*/ 158 159 160 //jQuery('.jarallax').jarallax({}); 161 jarallax(document.querySelectorAll('.jarallax'), { 162 disableParallax: function () { 163 return /iPad|iPhone|iPod|Android/.test(navigator.userAgent); 164 }, 165 disableVideo: function () { 166 return /iPad|iPhone|iPod|Android/.test(navigator.userAgent); 167 } 168 }); 169 170 /*====================================================*/ 171 /* PORTFOLIO GRID 172 /*====================================================*/ 173 jQuery('.grid-loaded').imagesLoaded(function () { 174 175 // filter items on button click 176 jQuery('.portfolio-filter').on('click', 'button', function () { 177 var filterValue = jQuery(this).attr('data-filter'); 178 $grid.isotope({ 179 filter: filterValue 180 }); 181 }); 182 183 // change is-checked class on buttons 184 jQuery('.portfolio-filter button').on('click', function () { 185 jQuery('.portfolio-filter button').removeClass('is-checked'); 186 jQuery(this).addClass('is-checked'); 187 var selector = jQuery(this).attr('data-filter'); 188 $grid.isotope({ 189 filter: selector 190 }); 191 return false; 192 }); 193 194 // init Isotope 195 var $grid = jQuery('.masonry-wrap').isotope({ 196 itemSelector: '.portfolio-item', 197 percentPosition: true, 198 transitionDuration: '0.7s', 199 masonry: { 200 // use outer width of grid-sizer for columnWidth 201 columnWidth: '.portfolio-item', 202 } 203 }); 204 205 }); 206 207 208 /*====================================================*/ 209 /* SINGLE IMAGE LIGHTBOX 210 /*====================================================*/ 211 jQuery('.image-link').magnificPopup({ 212 type: 'image' 213 }); 214 215 216 /*====================================================*/ 217 /* GALLERY LIGHTBOX 218 /*====================================================*/ 219 jQuery('.portfolio-items-list.popup-gallery').magnificPopup({ 220 delegate: '.image-zoom a', 221 type: 'image', 222 gallery: { 223 enabled: true, 224 navigateByImgClick: true, 225 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 226 }, 227 callbacks: { 228 elementParse: function(item) { 229 if(item.el[0].className == 'video') { 230 item.type = 'iframe', 231 item.iframe = { 232 patterns: { 233 youtube: { 234 index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index). 235 236 id: 'v=', // String that splits URL in a two parts, second part should be %id% 237 // Or null - full URL will be returned 238 // Or a function that should return %id%, for example: 239 // id: function(url) { return 'parsed id'; } 240 241 src: '//www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe. 242 }, 243 vimeo: { 244 index: 'vimeo.com/', 245 id: '/', 246 src: '//player.vimeo.com/video/%id%?autoplay=1' 247 }, 248 gmaps: { 249 index: '//maps.google.', 250 src: '%id%&output=embed' 251 } 252 } 253 } 254 } else { 255 item.type = 'image', 256 item.tLoading = 'Loading image #%curr%...', 257 item.mainClass = 'mfp-img-mobile', 258 item.image = { 259 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' 260 } 261 } 262 263 } 264 } 265 }); 266 267 /*====================================================*/ 268 /* SINGLE-IMAGE LIGHTBOX 269 /*====================================================*/ 270 jQuery('.portfolio-items-list.single-image').magnificPopup({ 271 delegate: '.image-zoom a', 272 type: 'image', 273 gallery: { 274 enabled: false, 275 navigateByImgClick: true, 276 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 277 }, 278 callbacks: { 279 elementParse: function(item) { 280 if(item.el[0].className == 'video') { 281 item.type = 'iframe', 282 item.iframe = { 283 patterns: { 284 youtube: { 285 index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index). 286 287 id: 'v=', // String that splits URL in a two parts, second part should be %id% 288 // Or null - full URL will be returned 289 // Or a function that should return %id%, for example: 290 // id: function(url) { return 'parsed id'; } 291 292 src: '//www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe. 293 }, 294 vimeo: { 295 index: 'vimeo.com/', 296 id: '/', 297 src: '//player.vimeo.com/video/%id%?autoplay=1' 298 }, 299 gmaps: { 300 index: '//maps.google.', 301 src: '%id%&output=embed' 302 } 303 } 304 } 305 } else { 306 item.type = 'image', 307 item.tLoading = 'Loading image #%curr%...', 308 item.mainClass = 'mfp-img-mobile', 309 item.image = { 310 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' 311 } 312 } 313 314 } 315 } 316 }); 317 318 /*====================================================*/ 319 /* SINGLE-IMAGE LIGHTBOX 320 /*====================================================*/ 321 jQuery('.carousel-slider').magnificPopup({ 322 delegate: '.image-zoom a', 323 type: 'image', 324 gallery: { 325 enabled: true, 326 navigateByImgClick: true, 327 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 328 }, 329 callbacks: { 330 elementParse: function(item) { 331 if(item.el[0].className == 'video') { 332 item.type = 'iframe', 333 item.iframe = { 334 patterns: { 335 youtube: { 336 index: 'youtube.com/', // String that detects type of video (in this case YouTube). Simply via url.indexOf(index). 337 338 id: 'v=', // String that splits URL in a two parts, second part should be %id% 339 // Or null - full URL will be returned 340 // Or a function that should return %id%, for example: 341 // id: function(url) { return 'parsed id'; } 342 343 src: '//www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe. 344 }, 345 vimeo: { 346 index: 'vimeo.com/', 347 id: '/', 348 src: '//player.vimeo.com/video/%id%?autoplay=1' 349 }, 350 gmaps: { 351 index: '//maps.google.', 352 src: '%id%&output=embed' 353 } 354 } 355 } 356 } else { 357 item.type = 'image', 358 item.tLoading = 'Loading image #%curr%...', 359 item.mainClass = 'mfp-img-mobile', 360 item.image = { 361 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' 362 } 363 } 364 365 } 366 } 367 }); 368 369 370 /*====================================================*/ 371 /* VIDEO LINK LIGHTBOX 372 /*====================================================*/ 373 jQuery('.video-popup').magnificPopup({ 374 type: 'iframe', 375 iframe: { 376 patterns: { 377 youtube: { 378 index: 'youtube.com/', 379 380 id: 'v=', 381 382 src: '//www.youtube.com/embed/%id%?autoplay=1' 383 }, 384 vimeo: { 385 index: 'vimeo.com/', 386 id: '/', 387 src: '//player.vimeo.com/video/%id%?autoplay=1' 388 }, 389 gmaps: { 390 index: '//maps.google.', 391 src: '%id%&output=embed' 392 } 393 } 394 } 395 }); 396 397 /*====================================================*/ 398 /* HERO TEXT ROTATOR 399 /*====================================================*/ 400 401 jQuery('.hero-slider').flexslider({ 402 animation: "fade", 403 controlNav: false, 404 directionNav: false, 405 slideshowSpeed: 5500, 406 animationSpeed: 1500, 407 start: function(slider){ 408 jQuery('body').removeClass('loading'); 409 }, 410 }); 411 412 413 /*====================================================*/ 414 /* TESTIMONIALS ROTATOR FLEXSLIDER 415 /*====================================================*/ 416 jQuery('#reviews-1 .flexslider').flexslider({ 417 animation: "fade", 418 controlNav: true, 419 directionNav: false, 420 slideshowSpeed: 5000, 421 animationSpeed: 2000, 422 start: function(slider){ 423 jQuery('body').removeClass('loading'); 424 } 425 }); 426 427 428 /*====================================================*/ 429 /* HERO IMAGES ROTATOR 430 /*====================================================*/ 431 var owl = jQuery('.images-holder'); 432 433 owl.owlCarousel({ 434 items: 3, 435 loop:true, 436 autoplay:true, 437 dots: true, 438 navBy: 1, 439 autoplayTimeout: 4500, 440 autoplayHoverPause: false, 441 smartSpeed: 1500, 442 responsive:{ 443 0:{items:1}, 444 767:{ items:1}, 445 768:{items:2}, 446 991:{items:2}, 447 1000:{items:3} 448 } 449 }); 450 451 452 /*====================================================*/ 453 /* ROTATOR OWLCAROUSEL 454 /*====================================================*/ 455 var owl = jQuery('.images-carousel'); 456 owl.owlCarousel({ 457 items: 1, 458 loop:true, 459 autoplay:true, 460 nav:true, 461 dots: false, 462 navText: [ '<', '>' ], 463 navBy: 1, 464 autoplayTimeout: 6000, 465 autoplayHoverPause: false, 466 smartSpeed: 1500, 467 }); 468 469 470 /*====================================================*/ 471 /* TESTIMONIALS ROTATOR 472 /*====================================================*/ 473 var owl = jQuery('.reviews-holder'); 474 owl.owlCarousel({ 475 items: 3, 476 loop:true, 477 autoplay:true, 478 navBy: 1, 479 autoplayTimeout: 4500, 480 autoplayHoverPause: false, 481 smartSpeed: 1500, 482 responsive:{ 483 0:{items:1}, 484 767:{items:1}, 485 768:{items:2}, 486 991:{items:2}, 487 1000:{items:3} 488 } 489 }); 490 491 492 /*====================================================*/ 493 /* BRANDS LOGO ROTATOR 494 /*====================================================*/ 495 var owl = jQuery('.brands-logo-holder'); 496 owl.owlCarousel({ 497 items: 6, 498 loop:true, 499 autoplay:true, 500 navBy: 1, 501 autoplayTimeout: 4000, 502 autoplayHoverPause: false, 503 smartSpeed: 1500, 504 responsive:{ 505 0:{items:2}, 506 640:{items:3}, 507 767:{items:3}, 508 768:{items:4}, 509 991:{items:4}, 510 1000:{items:5} 511 } 512 }); 513 514 515 /*====================================================*/ 516 /* STATISTIC COUNTER 517 /*====================================================*/ 518 jQuery('.statistic-number').each(function () { 519 jQuery(this).appear(function() { 520 jQuery(this).prop('Counter',0).animate({ 521 Counter: jQuery(this).text() 522 }, { 523 duration: 4000, 524 easing: 'swing', 525 step: function (now) { 526 jQuery(this).text(Math.ceil(now)); 527 } 528 }); 529 },{accX: 0, accY: 0}); 530 }); 531 532 533 /*====================================================*/ 534 /* ANIMATED PROGRESS BAR 535 /*====================================================*/
536 var delay = 500; 537 jQuery(".progress-bar").each(function(i){ 538 jQuery(this).delay( delay*i ).animate( { width: jQuery(this).attr('aria-valuenow') + '%' }, delay ); 539 540 jQuery(this).prop('Counter',0).animate({}, { 541 duration: delay, 542 easing: 'swing', 543 step: function (now) { 544 jQuery(this).text(Math.ceil(now)+'%'); 545 } 546 }); 547 }); 548 549 });
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.