1;(function ($) { 2 "use strict"; 3 4 function debounce(func, wait, immediate) { 5 var timeout; 6 return function() { 7 var context = this, args = arguments; 8 var later = function() { 9 timeout = null; 10 if (!immediate) func.apply(context, args); 11 }; 12 var callNow = immediate && !timeout; 13 clearTimeout(timeout); 14 timeout = setTimeout(later, wait); 15 if (callNow) func.apply(context, args); 16 }; 17 }; 18 19 /*============================================= 20 Variable init 21 ==============================================*/ 22 var $window, $document, $body, windowWidth; 23 24 $window = $(window); 25 $document = $(document); 26 $body = $(document.body); 27 windowWidth = $window.width(); 28 29 /*============================================= 30 Preloader init 31 ==============================================*/ 32 if (MassiveJS.hasPreloader) { 33 $window.on("load", function () { 34 $body.imagesLoaded(function () { 35 $(".tb-preloader-wave").fadeOut(); 36 $("#tb-preloader").delay(200).fadeOut("slow").remove(); 37 }); 38 }); 39 } 40 41 /*============================================= 42 Social share 43 ==============================================*/ 44 jsSocials.shares.digg = { 45 label: "Digg", 46 logo: "fa fa-digg", 47 shareUrl: "http://digg.com/submit?url={url}&title={text}", 48 countUrl: "", 49 getCount: function(data) { 50 return data.count; 51 } 52 }; 53 jsSocials.shares.tumblr = { 54 label: "Tumblr", 55 logo: "fa fa-tumblr", 56 shareUrl: "http://www.tumblr.com/share/link?url={url}&name={text}&description={text}", 57 countUrl: "", 58 getCount: function(data) { 59 return data.count; 60 } 61 }; 62 jsSocials.shares.reddit = { 63 label: "Reddit", 64 logo: "fa fa-reddit", 65 shareUrl: "http://reddit.com/submit?url={url}&title={text}", 66 countUrl: "", 67 getCount: function(data) { 68 return data.count; 69 } 70 }; 71 jsSocials.shares.stumbleupon = { 72 label: "Stumble Upon", 73 logo: "fa fa-stumbleupon", 74 shareUrl: "http://www.stumbleupon.com/submit?url={url}&title={text}", 75 countUrl: "", 76 getCount: function(data) { 77 return data.count; 78 } 79 }; 80 jsSocials.shares.wordpress = { 81 label: "WordPress", 82 logo: "fa fa-wordpress", 83 shareUrl: "http://wordpress.com/press-this.php?u={url}&t={text}", 84 countUrl: "", 85 getCount: function(data) { 86 return data.count; 87 } 88 }; 89 90 /*============================================= 91 Wow animation 92 ==============================================*/ 93 if (typeof WOW == "function") 94 new WOW().init(); 95 96 /*============================================= 97 Section parallax 98 ==============================================*/ 99 function setParallaxImg() { 100 $("[data-massive-parallax-image]").each(function() { 101 var _parallaxRow = $(this); 102 _parallaxRow.css({ 103 backgroundImage: 'url("'+_parallaxRow.data("massive-parallax-image")+'")', 104 }); 105 }); 106 } 107 108 $document.ready(function () { 109 110 /*============================================= 111 Section parallax init 112 ==============================================*/ 113 setParallaxImg(); 114 115 /*============================================= 116 Social share init 117 ==============================================*/ 118 $("#share").jsSocials({ 119 shares: MassiveJS.activeSocialShares, 120 showLabel: false, 121 showCount: false 122 }); 123 124 /*============================================= 125 FitVids init 126 ==============================================*/ 127 $(".post").fitVids({ 128 customSelector: 'iframe[src^="http://w.soundcloud.com"], iframe[src^="https://w.soundcloud.com"]' 129 }); 130 131 /*============================================= 132 Retina image init 133 ==============================================*/ 134 if (window.devicePixelRatio > 1) { 135 $("[data-retina]").imagesLoaded(function () { 136 $("[data-retina]").each(function () { 137 var _img = $(this), 138 retinaSrc = _img.data("retina"), 139 height = _img.height(); 140 141 if ( retinaSrc ) { 142 _img 143 .attr("src", retinaSrc) 144 .css({ 145 height: height+"px", 146 width: "auto" 147 }); 148 } 149 }); 150 }); 151 } 152 153 /*============================================= 154 Smooth scroll init 155 ==============================================*/ 156 if (typeof smoothScroll == "object") { 157 smoothScroll.init(); 158 } 159 160 /*============================================= 161 MenuZord init 162 ==============================================*/ 163 $("#massive-menu").menuzord({ 164 indicatorFirstLevel: '<i class="fa fa-angle-down"></i>', 165 indicatorSecondLevel: '<i class="fa fa-angle-right"></i>' 166 }); 167 168 /*============================================= 169 OnePage navigation init 170 ==============================================*/ 171 $(".tb-onepage li").on("click", function () { 172 if ($(".showhide").is(":visible")) { 173 $(".showhide").trigger("click"); 174 } 175 }); 176 177 if ($.fn.onePageNav) { 178 $(".tb-onepage").onePageNav({ 179 currentClass: "active", 180 changeHash: true 181 }); 182 } 183 184 /*============================================= 185 Sticky navbar init 186 ==============================================*/ 187 function initSticky(windowWidth) { 188 var $stickyWrapper, $sticky; 189 190 $stickyWrapper = $("#sticky-wrapper");
191 $sticky = $(".bucket-navbar-sticky"); 192 193 if (windowWidth > 768 && !$stickyWrapper.length) { 194 $sticky.sticky({ 195 topSpacing: 0, 196 className: "bucket-navbar-sticky-mode", 197 wrapperClassName: "bucket-navbar-sticky-wrapper", 198 responsiveWidth: true, 199 zIndex: 10000 200 }); 201 } 202 203 if ($stickyWrapper.length) { 204 if (windowWidth <= 768) { 205 $stickyWrapper.height("auto"); 206 } else { 207 $stickyWrapper.height($sticky.height()+"px"); 208 } 209 } 210 } 211 212 initSticky(windowWidth); 213 214 $window.on("resize", debounce(function() { 215 initSticky( $window.width()); 216 }, 100)); 217 218 /*============================================= 219 Flex slider init 220 ==============================================*/ 221 $window.load(function () { 222 $(".post-slider-thumb").flexslider({ 223 animation: "slide", 224 controlNav: "thumbnails" 225 }); 226 227 $(".post-slider").flexslider({ 228 animation: "slide" 229 }); 230 231 $(".portfolio-slider").flexslider({ 232 animation: "slide", 233 direction: "vertical", 234 slideshowSpeed: 3000, 235 start: function () { 236 imagesLoaded($(".portfolio"), function () { 237 setTimeout(function () { 238 $(".portfolio-filter li:eq(0) a").trigger("click"); 239 }, 1500); 240 }); 241 } 242 }); 243 244 $(".portfolio-slider-alt").flexslider({ 245 animation: "slide", 246 direction: "horizontal", 247 slideshowSpeed: 4000, 248 start: function () { 249 imagesLoaded($(".portfolio"), function () { 250 setTimeout(function () { 251 $(".portfolio-filter li:eq(0) a").trigger("click"); 252 }, 1500); 253 }); 254 } 255 }); 256 }); 257 258 259 $(".massive-slider").each(function() { 260 var slider = $(this); 261 slider.flexslider({ 262 animation: slider.data("animation"), 263 animationSpeed: slider.data("speed"), 264 controlNav: slider.data("pagination"), 265 direction: slider.data("direction"), 266 slideshowSpeed: slider.data("slide-speed"), 267 smoothHeight: true, 268 }); 269 }); 270 271 $(".news-slider").flexslider({ 272 animation: "slide", 273 slideshowSpeed: 3000 274 }); 275 276 $(".blog-post-slider").flexslider({ 277 animation: "slide" 278 }); 279 280 281 /*============================================= 282 Full screen banner 283 ==============================================*/ 284 $window.bind("resizeEnd", function () { 285 $("#fullscreen-banner").height($window.height()); 286 }); 287 288 $window.resize(function () { 289 if (this.resizeTO) clearTimeout(this.resizeTO); 290 this.resizeTO = setTimeout(function () { 291 $(this).trigger("resizeEnd"); 292 }, 300); 293 }).trigger("resize"); 294 295 296 /*============================================= 297 Portfolio grid init 298 ==============================================*/ 299 var $portfolioGeneral = $(".portfolio:not(.portfolio-masonry)").isotope({ 300 itemSelector: ".portfolio-item", 301 layoutMode: "fitRows", 302 filter: "*" 303 }); 304 305 var $portfolioMasonry = $(".portfolio-masonry").isotope({ 306 itemSelector: ".portfolio-item", 307 resizesContainer: false, 308 layoutMode: "masonry", 309 filter: "*" 310 }); 311 312 if (typeof imagesLoaded == "function") { 313 $portfolioMasonry.imagesLoaded().progress(function() { 314 $portfolioMasonry.isotope("layout"); 315 }); 316 317 $portfolioGeneral.imagesLoaded().progress(function() { 318 $portfolioGeneral.isotope("layout"); 319 }); 320 } 321 322 /*============================================= 323 Portfolio filtering 324 ==============================================*/ 325 $(".portfolio-filter").on("click", "a", function (event) { 326 event.preventDefault(); 327 var $this = $(this); 328 $this.parent().addClass("active").siblings().removeClass("active"); 329 $(this).parents(".text-center").next().isotope({filter: $this.data("filter")}); 330 }); 331 332 333 /*============================================= 334 Portfolio gallery 335 ==============================================*/ 336 $(".portfolio-slider, .portfolio-slider-alt").each(function () { // the containers for all your galleries 337 var _items = $(this).find("li > a"); 338 var items = []; 339 for (var i = 0; i < _items.length; i++) { 340 items.push({src: $(_items[i]).attr("href"), title: $(_items[i]).attr("title")}); 341 } 342 $(this).parent().find(".action-btn").magnificPopup({ 343 items: items, 344 type: "image", 345 gallery: { 346 enabled: true 347 } 348 }); 349 $(this).parent().find(".portfolio-description").magnificPopup({ 350 items: items, 351 type: "image", 352 gallery: { 353 enabled: true 354 } 355 }); 356 }); 357 358 $(".portfolio-gallery").each(function () { // the containers for all your galleries 359 $(this).find(".popup-gallery").magnificPopup({ 360 type: "image", 361 gallery: { 362 enabled: true 363 } 364 }); 365 $(this).find(".popup-gallery2").magnificPopup({ 366 type: "image", 367 gallery: { 368 enabled: true 369 } 370 }); 371 }); 372 373 374 /*============================================= 375 Progressbar init 376 ==============================================*/ 377 var progressBar = $(".progress-bar"); 378 progressBar.each(function (indx) { 379 $(this).data("animated", 0); 380 if ($.fn.visible) { 381 animateProgressbar(this); 382 } 383 }); 384 385 $window.on("scroll", function () { 386 if ($.fn.visible) { 387 progressBar.each(function () { 388 animateProgressbar(this); 389 }) 390 } 391 }); 392 393 function animateProgressbar(pb) { 394 if ($(pb).data("animated") == 0) { 395 if ($(pb).visible()) { 396 $(pb).css("width", $(pb).attr("aria-valuenow") + "%"); 397 $(pb).data("animated", 1); 398 } 399 } 400 } 401 402 /*============================================= 403 Popup init 404 ==============================================*/ 405 $(".popup-link, .Massive-gallery-img").magnificPopup({ 406 type: "image" 407 }); 408 409 $(".popup-youtube, .popup-vimeo, .popup-gmaps").magnificPopup({ 410 disableOn: 700, 411 type: "iframe", 412 mainClass: "mfp-fade", 413 removalDelay: 160, 414 preloader: false,
415 fixedContentPos: false 416 }); 417 418 /*============================================= 419 Accordion init 420 ==============================================*/ 421 var allPanels = $(".accordion > dd").hide(); 422 allPanels.first().slideDown("easeOutExpo"); 423 $(".accordion").each(function () { 424 $(this).find("dt > a").first().addClass("active").parent().next().css({display: "block"}); 425 }); 426 427 $(".accordion > dt > a").click(function () { 428 429 var current = $(this).parent().next("dd"); 430 $(this).parents(".accordion").find("dt > a").removeClass("active"); 431 $(this).addClass("active"); 432 $(this).parents(".accordion").find("dd").slideUp("easeInExpo"); 433 $(this).parent().next().slideDown("easeOutExpo"); 434 435 return false; 436 437 }); 438 439 /*============================================= 440 Toggle accordion init 441 ==============================================*/ 442 var allToggles = $(".toggle > dd").hide(); 443 444 $(".toggle > dt > a").click(function () { 445 446 if ($(this).hasClass("active")) { 447 448 $(this).parent().next().slideUp("easeOutExpo"); 449 $(this).removeClass("active"); 450 451 } 452 else { 453 var current = $(this).parent().next("dd"); 454 $(this).addClass("active"); 455 $(this).parent().next().slideDown("easeOutExpo"); 456 } 457 458 return false; 459 }); 460 461 462 /*============================================= 463 Career box button setup 464 ==============================================*/ 465 $(".career-box").on("click", ".show-detail", function(e) { 466 e.preventDefault(); 467 $(this).next() 468 .slideToggle() 469 .end() 470 .delay(400) 471 .css("visibility", "hidden"); 472 }); 473 474 $(".career-box").on("click", ".cancel-btn", function(e) { 475 e.preventDefault(); 476 var parent = $(this).parents(".career-details-info"); 477 parent.slideToggle() 478 .prev() 479 .delay(400) 480 .css("visibility", "visible"); 481 }); 482 483 /*============================================= 484 Countdown init 485 ==============================================*/ 486 var clocks = $(".clock"); 487 clocks.each(function() { 488 var clock, endtime; 489 clock = $(this); 490 endtime = clock.data("endtime"); 491 clock.countdown(endtime, function(event) { 492 clock.html(event.strftime("" 493 + '<span class="c-grid c-weeks"> <span class="c-value">%w</span> <span class="c-title">weeks</span> </span>' 494 + '<span class="c-grid"> <span class="c-value">%D</span> <span class="c-title">days</span> </span>' 495 + '<span class="c-grid"> <span class="c-value">%H</span> <span class="c-title">hours</span> </span>' 496 + '<span class="c-grid"> <span class="c-value">%M</span> <span class="c-title">minutes</span> </span>' 497 + '<span class="c-grid"> <span class="c-value">%S</span> <span class="c-title">seconds</span> </span>')); 498 }); 499 500 }); 501 502 /*============================================= 503 Count to init 504 ==============================================*/ 505 var timers = $(".timer"); 506 if ($.fn.countTo) { 507 timers.each(function () { 508 $(this).data("animated", 0); 509 animateTimer(this); 510 }); 511 } 512 513 $window.on("scroll", function () { 514 timers.each(function () { 515 animateTimer(this); 516 }); 517 }); 518 519 function animateTimer(timer) { 520 if ($(timer).data("animated") == 0) { 521 if ($.fn.visible && $(timer).visible()) { 522 $(timer).data("animated", 1); 523 $(timer).countTo(); 524 } 525 } 526 } 527 528 /*============================================= 529 Carousel init 530 ==============================================*/ 531 if ($.fn.owlCarousel) { 532 533 var clients = $(".carousel-client"); 534 535 clients.each(function() { 536 var client, pagination, items, autoPlay; 537 client = $(this); 538 autoPlay = client.data("autoplay"); 539 pagination = client.data("pagination"); 540 items = client.data("item"); 541 client.owlCarousel({ 542 autoPlay: autoPlay, 543 items: items, 544 pagination: pagination 545 }); 546 }); 547 548 $("#clients-1").owlCarousel({
549 autoPlay: false, //Set AutoPlay to 3 seconds 550 items: 6, 551 itemsDesktop: [1199, 3], 552 itemsDesktopSmall: [979, 3] 553 554 }); 555 556 var testimonials = $(".testimonials"); 557 558 testimonials.each(function() { 559 var testimonial; 560 testimonial= $(this); 561 testimonial.owlCarousel({ 562 autoPlay: 3000, 563 items: 1 564 }); 565 }); 566 567 $("#carousel-object").owlCarousel({ 568 autoPlay: 4000, //Set AutoPlay to 3 seconds 569 items: 1 570 //pagination : false 571 }); 572 573 $("#portfolio-carousel").owlCarousel({ 574 autoPlay: 3000, //Set AutoPlay to 3 seconds 575 items: 4, 576 itemsDesktop: [1199, 3], 577 itemsDesktopSmall: [979, 3], 578 navigation: true, 579 pagination: false, 580 navigationText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'] 581 582 }); 583 584 $("#portfolio-carousel-alt").owlCarousel({ 585 autoPlay: false, //Set AutoPlay to 3 seconds 586 items: 3, 587 itemsDesktop: [1199, 3], 588 itemsDesktopSmall: [979, 3], 589 navigation: true, 590 pagination: false, 591 navigationText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'] 592 }); 593 594 $(".massive-carousel").each(function() { 595 var carousel = $(this); 596 597 carousel.owlCarousel({ 598 autoPlay: carousel.data("autoplay"), 599 slideSpeed: carousel.data("slide-speed"), 600 items: carousel.data("lg-items"), 601 itemsDesktop: [1199, carousel.data("md-items")], 602 itemsTablet: [768, carousel.data("sm-items")], 603 itemsMobile: [479, carousel.data("xs-items")], 604 navigationText: ['<i class ="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'] 605 }); 606 }); 607 } 608 609 $(".portfolio-with-title").addClass("portfolio"); 610 611 612 /*============================================= 613 Typist init 614 ==============================================*/ 615 if (typeof Typist == "function") { 616 $(".typist-element").each(function() { 617 var id = $(this).attr("id"); 618 if(id) { 619 new Typist( document.querySelector("#"+id), { 620 letterInterval: 60, 621 textInterval: 3000 622 }); 623 } 624 }); 625 } 626 627 628 /*============================================= 629 Back to top init 630 ==============================================*/ 631 if (MassiveJS.hasBackToTop) { 632 $body.append('<a id="bucket-lift-off" class="bucket-lift-off-hide" href="#"><i class="fa fa-angle-up"></i></a>'); 633 var $tbScrollBack = $("#bucket-lift-off"); 634 $window.on("scroll.liftOff", debounce(function(){ 635 if ($window.scrollTop() > 150) { 636 $tbScrollBack 637 .addClass("bucket-lift-off-show") 638 .removeClass("bucket-lift-off-hide"); 639 } else { 640 $tbScrollBack 641 .addClass("bucket-lift-off-hide") 642 .removeClass("bucket-lift-off-show"); 643 } 644 }, 100)); 645 646 $body.on("click.liftOff", "#bucket-lift-off", function(e){ 647 e.preventDefault(); 648 $("body,html").animate({ 649 scrollTop: 0 650 }, 300 ); 651 }); 652 } 653 654 655 /*============================================= 656 Mail chimp init 657 ==============================================*/ 658 if ($.fn.ajaxChimp) { 659 $(".mc-subscriber-form").ajaxChimp(); 660 } 661 662 /*============================================= 663 Tabs init 664 ==============================================*/ 665 var MassiveTabs = $(".nav-tabs li:first-child a, .nav-pills li:first-child a"); 666 667 MassiveTabs.each(function(e) { 668 $(this).tab("show"); 669 }); 670 671 /*============================================= 672 Massive banners 673 ==============================================*/ 674 // Elastic banner 675 $(".massive-elastic-banner").eislideshow({ 676 easing : "easeOutExpo", 677 titleeasing : "easeOutExpo", 678 titlespeed : 1200 679 }); 680 681 // Owl banner 682 $(".massive-owl-banner").owlCarousel({ 683 autoPlay: 4000, 684 items: 1, 685 navigation: true, 686 navigationText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'] 687 }); 688 689 // Flex banner 690 $(".massive-flex-banner").each(function() { 691 var $banner = $(this); 692 $banner.flexslider({ 693 animation: "slide", 694 controlNav: $banner.data("pagination") 695 }); 696 }); 697 698 /*============================================= 699 TB grid init 700 ==============================================*/ 701 $(".tb-grid").masonry({ 702 itemSelector: ".item", 703 percentPosition: true, 704 columnWidth: ".box", 705 }); 706 707 var $imgBoxes = $(".tb-grid").find(".box-img"); 708 $imgBoxes.each(function(index, item) { 709 var $item = $(item), src = $item.data("src"); 710 if ( src ) { 711 $item.css({ 712 backgroundImage: 'url("' + src + '")' 713 }) 714 } 715 }); 716 717 $(".box-img").magnificPopup({ 718 type:"image", 719 gallery: { 720 enabled: true 721 } 722 }); 723 724 /*============================================= 725 Megamenu alignment fix 726 ==============================================*/ 727 function fixMegamenuDropdown() { 728 var dropdownCon;
729 dropdownCon = $(".menuzord-right").children(".menu-item-has-children").filter(function() { 730 return $(this).children(".dropdown").length; 731 }); 732 dropdownCon.on("mouseenter click", function() { 733 var that = this; 734 setTimeout(function() { 735 var dropdown, rightOffset; 736 dropdown = $(that).children(".dropdown"); 737 rightOffset = windowWidth - (dropdown.offset().left + dropdown.width()); 738 if (rightOffset < 450) { 739 dropdown.find(".dropdown").addClass("dropdown-left"); 740 } 741 }, 10); 742 }); 743 } 744 fixMegamenuDropdown(); 745 746 /*============================================= 747 Portfolio full width fix 748 ==============================================*/ 749 function fixFullWidthPortfolio() { 750 var portfolio = $(".Massive-portfolio"); 751 if (portfolio.parents(".container").length < 1) { 752 portfolio.parents(".vc_column_container").addClass("zero-padding"); 753 } 754 } 755 756 fixFullWidthPortfolio(); 757 758 // fix blog grid view equal height 759 $(".blog-grid-view, .products li, .product-list").matchHeight(); 760 761 }); // jquery ready end 762 763})(jQuery);
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.