PageSourceSearch

https://t20wclive.com/frontend/assets/theme/js/script.js

js t20wclive.com collected 2026-10-02 11:04:17 UTC 40,343 bytes, 1,316 lines download raw bytes

1(function ($) {
2  var isBuilder = $("html").hasClass("is-builder");
3
4  $.extend($.easing, {
5    easeInOutCubic: function (x, t, b, c, d) {
6      if ((t /= d / 2) < 1) return (c / 2) * t * t * t + b;
7      return (c / 2) * ((t -= 2) * t * t + 2) + b;
8    },
9  });
10
11  $.fn.outerFind = function (selector) {
12    return this.find(selector).addBack(selector);
13  };
14
15  $.fn.footerReveal = function () {
16    var $this = $(this);
17    var $prev = $this.prev();
18    var $win = $(window);
19    var isIE = !!document.documentMode;
20
21    function initReveal() {
22      if (!isIE && $this.outerHeight() <= $win.outerHeight()) {
23        $this.css({
24          "z-index": -999,
25          position: "fixed",
26          bottom: 0,
27        });
28
29        $this.css({
30          width: $prev.outerWidth(),
31        });
32
33        $prev.css({
34          "margin-bottom": $this.outerHeight(),
35        });
36      } else {
37        $this.css({
38          "z-index": "",
39          position: "",
40          bottom: "",
41        });
42
43        $this.css({
44          width: "",
45        });
46
47        $prev.css({
48          "margin-bottom": "",
49        });
50      }
51    }
52
53    initReveal();
54
55    $win.on("load resize", function () {
56      initReveal();
57    });
58
59    return this;
60  };
61
62  (function ($, sr) {
63    // debouncing function from John Hann
64    // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
65    var debounce = function (func, threshold, execAsap) {
66      var timeout;
67
68      return function debounced() {
69        var obj = this,
70          args = arguments;
71
72        function delayed() {
73          if (!execAsap) func.apply(obj, args);
74          timeout = null;
75        }
76
77        if (timeout) clearTimeout(timeout);
78        else if (execAsap) func.apply(obj, args);
79
80        timeout = setTimeout(delayed, threshold || 100);
81      };
82    };
83    // smartresize
84    jQuery.fn[sr] = function (fn) {
85      return fn ? this.bind("resize", debounce(fn)) : this.trigger(sr);
86    };
87  })(jQuery, "smartresize");
88
89  (function () {
90    var scrollbarWidth = 0,
91      originalMargin,
92      touchHandler = function (event) {
93        event.preventDefault();
94      };
95
96    function getScrollbarWidth() {
97      if (scrollbarWidth) return scrollbarWidth;
98      var scrollDiv = document.createElement("div");
99      $.each(
100        {
101          top: "-9999px",
102          width: "50px",
103          height: "50px",
104          overflow: "scroll",
105          position: "absolute",
106        },
107        function (property, value) {
108          scrollDiv.style[property] = value;
109        }
110      );
111      $("body").append(scrollDiv);
112      scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
113      $("body")[0].removeChild(scrollDiv);
114      return scrollbarWidth;
115    }
116  })();
117
118  $.isMobile = function (type) {
119    var reg = [];
120    var any = {
121      blackberry: "BlackBerry",
122      android: "Android",
123      windows: "IEMobile",
124      opera: "Opera Mini",
125      ios: "iPhone|iPad|iPod",
126    };
127    type = "undefined" == $.type(type) ? "*" : type.toLowerCase();
128    if ("*" == type)
129      reg = $.map(any, function (v) {
130        return v;
131      });
132    else if (type in any) reg.push(any[type]);
133    return !!(
134      reg.length && navigator.userAgent.match(new RegExp(reg.join("|"), "i"))
135    );
136  };
137
138  var isSupportViewportUnits = (function () {
139    // modernizr implementation
140    var $elem = $(
141      '<div style="height: 50vh; position: absolute; top: -1000px; left: -1000px;">'
142    ).appendTo("body");
143    var elem = $elem[0];
144    var height = parseInt(window.innerHeight / 2, 10);
145    var compStyle = parseInt(
146      (window.getComputedStyle
147        ? getComputedStyle(elem, null)
148        : elem.currentStyle)["height"],
149      10
150    );
151    $elem.remove();
152    return compStyle == height;
153  })();
154
155  $(function () {
156    $("html").addClass($.isMobile() ? "mobile" : "desktop");
157
158    // .mbr-navbar--sticky
159    $(window).scroll(function () {
160      $(".mbr-navbar--sticky").each(function () {
161        var method = $(window).scrollTop() > 10 ? "addClass" : "removeClass";
162        $(this)
163          [method]("mbr-navbar--stuck")
164          .not(".mbr-navbar--open")
165          [method]("mbr-navbar--short");
166      });
167    });
168
169    if ($.isMobile() && navigator.userAgent.match(/Chrome/i)) {
170      // simple fix for Chrome's scrolling
171      (function (width, height) {
172        var deviceSize = [width, width];
173        deviceSize[height > width ? 0 : 1] = height;
174        $(window).smartresize(function () {
175          var windowHeight = $(window).height();
176          if ($.inArray(windowHeight, deviceSize) < 0)
177            windowHeight = deviceSize[$(window).width() > windowHeight ? 1 : 0];
178          $(".mbr-section--full-height").css("height", windowHeight + "px");
179        });
180      })($(window).width(), $(window).height());
181    } else if (!isSupportViewportUnits) {
182      // fallback for .mbr-section--full-height
183      $(window).smartresize(function () {
184        $(".mbr-section--full-height").css("height", $(window).height() + "px");
185      });
186      $(document).on("add.cards", function (event) {
187        if (
188          $("html").hasClass("mbr-site-loaded") &&
189          $(event.target).outerFind(".mbr-section--full-height").length
190        )
191          $(window).resize();
192      });
193    }
194
195    // .mbr-section--16by9 (16 by 9 blocks autoheight)
196    function calculate16by9() {
197      $(this).css("height", ($(this).parent().width() * 9) / 16);
198    }
199    $(window).smartresize(function () {
200      $(".mbr-section--16by9").each(calculate16by9);
201    });
202    $(document).on("add.cards changeParameter.cards", function (event) {
203      var enabled = $(event.target).outerFind(".mbr-section--16by9");
204      if (enabled.length) {
205        enabled.attr("data-16by9", "true").each(calculate16by9);
206      } else {
207        $(event.target)
208          .outerFind("[data-16by9]")
209          .css("height", "")
210          .removeAttr("data-16by9");
211      }
212    });
213
214    // .mbr-parallax-background
215    function initParallax(card) {
216      setTimeout(function () {
217        $(card)
218          .outerFind(".mbr-parallax-background")
219          .jarallax({
220            speed: 0.6,
221          })
222          .css("position", "relative");
223      }, 0);
224    }
225
226    function destroyParallax(card) {
227      $(card).jarallax("destroy").css("position", "");
228    }
229
230    if ($.fn.jarallax && !$.isMobile()) {
231      $(window).on("update.parallax", function (event) {
232        setTimeout(function () {
233          var $jarallax = $(".mbr-parallax-background");
234
235          $jarallax.jarallax("coverImage");
236          $jarallax.jarallax("clipContainer");
237          $jarallax.jarallax("onScroll");
238        }, 0);
239      });
240
241      if (isBuilder) {
242        $(document).on("add.cards", function (event) {
243          initParallax(event.target);
244          $(window).trigger("update.parallax");
245        });
246
247        $(document).on(
248          "changeParameter.cards",
249          function (event, paramName, value, key) {
250            if (paramName === "bg") {
251              destroyParallax(event.target);
252
253              switch (key) {
254                case "type":
255                  if (value.parallax === true) {
256                    initParallax(event.target);
257                  }
258                  break;
259                case "value":
260                  if (value.type === "image" && value.parallax === true) {
261                    initParallax(event.target);
262                  }
263                  break;
264                case "parallax":
265                  if (value.parallax === true) {
266                    initParallax(event.target);
267                  }
268              }
269            }
270
271            $(window).trigger("update.parallax");
272          }
273        );
274      } else {
275        initParallax(document.body);
276      }
277
278      // for Tabs
279      $(window).on("shown.bs.tab", function (e) {
280        $(window).trigger("update.parallax");
281      });
282    }
283
284    // .mbr-fixed-top
285    var fixedTopTimeout,
286      scrollTimeout,
287      prevScrollTop = 0,
288      fixedTop = null,
289      isDesktop = !$.isMobile();
290    $(window).scroll(function () {
291      if (scrollTimeout) clearTimeout(scrollTimeout);
292      var scrollTop = $(window).scrollTop();
293      var scrollUp = scrollTop <= prevScrollTop || isDesktop;
294      prevScrollTop = scrollTop;
295      if (fixedTop) {
296        var fixed = scrollTop > fixedTop.breakPoint;
297        if (scrollUp) {
298          if (fixed != fixedTop.fixed) {
299            if (isDesktop) {
300              fixedTop.fixed = fixed;
301              $(fixedTop.elm).toggleClass("is-fixed");
302            } else {
303              scrollTimeout = setTimeout(function () {
304                fixedTop.fixed = fixed;
305                $(fixedTop.elm).toggleClass("is-fixed");
306              }, 40);
307            }
308          }
309        } else {
310          fixedTop.fixed = false;
311          $(fixedTop.elm).removeClass("is-fixed");
312        }
313      }
314    });
315    $(document).on("add.cards delete.cards", function (event) {
316      if (fixedTopTimeout) clearTimeout(fixedTopTimeout);
317      fixedTopTimeout = setTimeout(function () {
318        if (fixedTop) {
319          fixedTop.fixed = false;
320          $(fixedTop.elm).removeClass("is-fixed");
321        }
322        $(".mbr-fixed-top:first").each(function () {
323          fixedTop = {
324            breakPoint: $(this).offset().top + $(this).height() * 3,
325            fixed: false,
326            elm: this,
327          };
328          $(window).scroll();
329        });
330      }, 650);
331    });
332
333    // embedded videos
334    $(window).smartresize(function () {
335      $(".mbr-embedded-video").each(function () {
336        $(this).height(
337          ($(this).width() * parseInt($(this).attr("height") || 315)) /
338            parseInt($(this).attr("width") || 560)
339        );
340      });
341    });
342    $(document).on("add.cards", function (event) {
343      if (
344        $("html").hasClass("mbr-site-loaded") &&
345        $(event.target).outerFind("iframe").length
346      )
347        $(window).resize();
348    });
349
350    // background video
351    function videoParser(card) {
352      $(card)
353        .outerFind("[data-bg-video]")
354        .each(function () {
355          var videoURL = $(this).attr("data-bg-video");
356          var parsedUrl = videoURL.match(
357            /(http:\/\/|https:\/\/|)?(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(&\S+)?/
358          );
359
360          var $img = $('<div class="mbr-background-video-preview">')
361            .hide()
362            .css({
363              backgroundSize: "cover",
364              backgroundPosition: "center",
365            });
366          $("> *:eq(0)", this).before($img);
367
368          // youtube or vimeo
369          if (
370            parsedUrl &&
371            (/youtube/g.test(parsedUrl[3]) || /vimeo/g.test(parsedUrl[3]))
372          ) {
373            // youtube
374            if (parsedUrl && /youtube/g.test(parsedUrl[3])) {
375              var previewURL =
376                "http" + ("https:" === location.protocol ? "s" : "") + ":";
377              previewURL +=
378                "//img.youtube.com/vi/" + parsedUrl[6] + "/maxresdefault.webp";
379
380              $("<img>")
381                .on("load", function () {
382                  if (120 === (this.naturalWidth || this.width)) {
383                    // selection of preview in the best quality
384                    var file = this.src.split("/").pop();
385
386                    switch (file) {
387                      case "maxresdefault.webp":
388                        this.src = this.src.replace(file, "sddefault.webp");
389                        break;
390                      case "sddefault.webp":
391                        this.src = this.src.replace(file, "hqdefault.webp");
392                        break;
393                      default: // image not found
394                        if (isBuilder) {
395                          $img
396                            .css(
397                              "background-image",
398                              'url("images/no-video.webp")'
399                            )
400                            .show();
401                        }
402                    }
403                  } else {
404                    $img
405                      .css("background-image", 'url("' + this.src + '")')
406                      .show();
407                  }
408                })
409                .attr("src", previewURL);
410
411              if ($.fn.YTPlayer && !isBuilder && !$.isMobile()) {
412                $("> *:eq(1)", this)
413                  .before('<div class="mbr-background-video"></div>')
414                  .prev()
415                  .YTPlayer({
416                    videoURL: parsedUrl[6],
417                    containment: "self",
418                    showControls: false,
419                    mute: true,
420                  });
421              }
422            } else if (parsedUrl && /vimeo/g.test(parsedUrl[3])) {
423              // vimeo
424              var request = new XMLHttpRequest();
425              request.open(
426                "GET",
427                "https://vimeo.com/api/v2/video/" + parsedUrl[6] + ".json",
428                true
429              );
430              request.onreadystatechange = function () {
431                if (this.readyState === 4) {
432                  if (this.status >= 200 && this.status < 400) {
433                    var response = JSON.parse(this.responseText);
434
435                    $img
436                      .css(
437                        "background-image",
438                        'url("' + response[0].thumbnail_large + '")'
439                      )
440                      .show();
441                  } else if (isBuilder) {
442                    // image not found
443                    $img
444                      .css("background-image", 'url("images/no-video.webp")')
445                      .show();
446                  }
447                }
448              };
449              request.send();
450              request = null;
451
452              if ($.fn.vimeo_player && !isBuilder && !$.isMobile()) {
453                $("> *:eq(1)", this)
454                  .before('<div class="mbr-background-video"></div>')
455                  .prev()
456                  .vimeo_player({
457                    videoURL: videoURL,
458                    containment: "self",
459                    showControls: false,
460                    mute: true,
461                  });
462              }
463            }
464          } else if (isBuilder) {
465            // neither youtube nor vimeo
466            $img
467              .css("background-image", 'url("images/video-placeholder.webp")')
468              .show();
469          }
470        });
471    }
472
473    if (isBuilder) {
474      $(document).on("add.cards", function (event) {
475        videoParser(event.target);
476      });
477    } else {
478      videoParser(document.body);
479    }
480
481    $(document).on(
482      "changeParameter.cards",
483      function (event, paramName, value, key) {
484        if (paramName === "bg") {
485          switch (key) {
486            case "type":
487              $(event.target).find(".mbr-background-video-preview").remove();
488              if (value.type === "video") {
489                videoParser(event.target);
490              }
491              break;
492            case "value":
493              if (value.type === "video") {
494                $(event.target).find(".mbr-background-video-preview").remove();
495                videoParser(event.target);
496              }
497              break;
498          }
499        }
500      }
501    );
502
503    // init
504    if (!isBuilder) {
505      $("body > *:not(style, script)").trigger("add.cards");
506    }
507    $("html").addClass("mbr-site-loaded");
508    $(window).resize().scroll();
509
510    // smooth scroll
511    if (!isBuilder) {
512      $(document).click(function (e) {
513        try {
514          var target = e.target;
515
516          if ($(target).parents().hasClass("carousel")) {
517            return;
518          }
519          do {
520            if (target.hash) {
521              var useBody = /#bottom|#top/g.test(target.hash);
522              $(useBody ? "body" : target.hash).each(function () {
523                e.preventDefault();
524                // in css sticky navbar has height 64px
525                // var stickyMenuHeight = $('.mbr-navbar--sticky').length ? 64 : 0;
526                var stickyMenuHeight = $(target)
527                  .parents()
528                  .hasClass("navbar-fixed-top")
529                  ? 60
530                  : 0;
531                var goTo =
532                  target.hash == "#bottom"
533                    ? $(this).height() - $(window).height()
534                    : $(this).offset().top - stickyMenuHeight;
535                // Disable Accordion's and Tab's scroll
536                if (
537                  $(this).hasClass("panel-collapse") ||
538                  $(this).hasClass("tab-pane")
539                ) {
540                  return;
541                }
542                $("html, body").stop().animate(
543                  {
544                    scrollTop: goTo,
545                  },
546                  800,
547                  "easeInOutCubic"
548                );
549              });
550              break;
551            }
552          } while ((target = target.parentNode));
553        } catch (e) {
554          // throw e;
555        }
556      });
557    }
558
559    // init the same height columns
560    $(".cols-same-height .mbr-figure").each(function () {
561      var $imageCont = $(this);
562      var $img = $imageCont.children("img");
563      var $cont = $imageCont.parent();
564      var imgW = $img[0].width;
565      var imgH = $img[0].height;
566
567      function setNewSize() {
568        $img.css({
569          width: "",
570          maxWidth: "",
571          marginLeft: "",
572        });
573
574        if (imgH && imgW) {
575          var aspectRatio = imgH / imgW;
576
577          $imageCont.addClass({
578            position: "absolute",
579            top: 0,
580            left: 0,
581            right: 0,
582            bottom: 0,
583          });
584
585          // change image size
586          var contAspectRatio = $cont.height() / $cont.width();
587          if (contAspectRatio > aspectRatio) {
588            var percent = (100 * (contAspectRatio - aspectRatio)) / aspectRatio;
589            $img.css({
590              width: percent + 100 + "%",
591              maxWidth: percent + 100 + "%",
592              marginLeft: -percent / 2 + "%",
593            });
594          }
595        }
596      }
597
598      $img.one("load", function () {
599        imgW = $img[0].width;
600        imgH = $img[0].height;
601        setNewSize();
602      });
603
604      $(window).on("resize", setNewSize);
605      setNewSize();
606    });
607  });
608
609  if (!isBuilder) {
610    // .mbr-social-likes
611    if ($.fn.socialLikes) {
612      $(document).on("add.cards", function (event) {
613        $(event.target)
614          .outerFind(".mbr-social-likes")
615          .on("counter.social-likes", function (event, service, counter) {
616            if (counter > 999)
617              $(".social-likes__counter", event.target).html(
618                Math.floor(counter / 1000) + "k"
619              );
620          })
621          .socialLikes({
622            initHtml: false,
623          });
624      });
625    }
626
627    $(document).on("add.cards", function (event) {
628      if ($(event.target).hasClass("mbr-reveal")) {
629        $(event.target).footerReveal();
630      }
631    });
632
633    $(document).ready(function () {
634      // disable animation on scroll on mobiles
635      if ($.isMobile()) {
636        return;
637        // enable animation on scroll
638      } else if ($("input[name=animation]").length) {
639        $("input[name=animation]").remove();
640
641        var $animatedElements = $(
642          "p, h1, h2, h3, h4, h5, a, button, small, img, li, blockquote, .mbr-author-name, em, label, input, textarea, .input-group, .iconbox, .btn-social, .mbr-figure, .mbr-map, .mbr-testimonial .card-block, .mbr-price-value, .mbr-price-figure, .dataTable, .dataTables_info"
643        )
644          .not(function () {
645            return $(this)
646              .parents()
647              .is(
648                ".navbar, .mbr-arrow, footer, .iconbox, .mbr-slider, .mbr-gallery, .mbr-testimonial .card-block, #cookiesdirective, .mbr-wowslider, .accordion, .tab-content, .engine, #scrollToTop"
649              );
650          })
651          .addClass("hidden animated");
652
653        function getElementOffset(element) {
654          var top = 0;
655          do {
656            top += element.offsetTop || 0;
657            element = element.offsetParent;
658          } while (element);
659
660          return top;
661        }
662
663        function elCarouselItem(element) {
664          if (element.parents(".carousel-item").css("display") !== "none")
665            return false;
666          var parentEl = element.parents(".carousel-item").parent();
667          if (parentEl.find(".carousel-item.active .hidden.animated").lenght) {
668            return false;
669          } else if (parentEl.attr("data-visible") > 1) {
670            var visibleSlides = parentEl.attr("data-visible");
671            if (
672              element.parents().is(".cloneditem-" + (visibleSlides - 1)) &&
673              element
674                .parents(".cloneditem-" + (visibleSlides - 1))
675                .attr("data-cloned-index") >= visibleSlides
676            ) {
677              return true;
678            } else {
679              element.removeClass("animated hidden");
680              return false;
681            }
682          } else return true;
683        }
684
685        function checkIfInView() {
686          var window_height = window.innerHeight;
687          var window_top_position =
688            document.documentElement.scrollTop || document.body.scrollTop;
689          var window_bottom_position = window_top_position + window_height - 50;
690
691          $.each($animatedElements, function () {
692            var $element = $(this);
693            var element = $element[0];
694            var element_height = element.offsetHeight;
695            var element_top_position = getElementOffset(element);
696            var element_bottom_position = element_top_position + element_height;
697
698            // check to see if this current element is within viewport
699            if (
700              ((element_bottom_position >= window_top_position &&
701                element_top_position <= window_bottom_position) ||
702                elCarouselItem($element)) &&
703              $element.hasClass("hidden")
704            ) {
705              $element
706                .removeClass("hidden")
707                .addClass("fadeInUp")
708                .one(
709                  "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",
710                  function () {
711                    $element.removeClass("animated fadeInUp");
712                  }
713                );
714            }
715          });
716        }
717
718        var $window = $(window);
719        $window.on("scroll resize", checkIfInView);
720        $window.trigger("scroll");
721      }
722    });
723
724    if ($(".nav-dropdown").length) {
725      $(".nav-dropdown").swipe({
726        swipeLeft: function (
727          event,
728          direction,
729          distance,
730          duration,
731          fingerCount
732        ) {
733          $(".navbar-close").click();
734        },
735      });
736    }
737  }
738
739  // Scroll to Top Button
740  $(document).ready(function () {
741    if ($(".mbr-arrow-up").length) {
742      var $scroller = $("#scrollToTop"),
743        $main = $("body,html"),
744        $window = $(window);
745      $scroller.css("display", "none");
746      $window.scroll(function () {
747        if ($(this).scrollTop() > 0) {
748          $scroller.fadeIn();
749        } else {
750          $scroller.fadeOut();
751        }
752      });
753      $scroller.click(function () {
754        $main.animate(
755          {
756            scrollTop: 0,
757          },
758          400
759        );
760        return false;
761      });
762    }
763  });
764
765  // arrow down
766  if (!isBuilder) {
767    $(".mbr-arrow").on("click", function (e) {
768      var $next = $(e.target).closest("section").next();
769      if ($next.hasClass("engine")) {
770        $next = $next.closest("section").next();
771      }
772      var offset = $next.offset();
773      $("html, body").stop().animate(
774        {
775          scrollTop: offset.top,
776        },
777        800,
778        "linear"
779      );
780    });
781  }
782
783  // add padding to the first element, if it exists
784  if ($("nav.navbar").length) {
785    var navHeight = $("nav.navbar").height();
786    $(".mbr-after-navbar.mbr-fullscreen").css("padding-top", navHeight + "px");
787  }
788
789  function isIE() {
790    var ua = window.navigator.userAgent;
791    var msie = ua.indexOf("MSIE ");
792
793    if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
794      return true;
795    }
796
797    return false;
798  }
799
800  // fixes for IE
801  if (!isBuilder && isIE()) {
802    $(document).on("add.cards", function (event) {
803      var $eventTarget = $(event.target);
804
805      if ($eventTarget.hasClass("mbr-fullscreen")) {
806        $(window).on("load resize", function () {
807          $eventTarget.css("height", "auto");
808
809          if ($eventTarget.outerHeight() <= $(window).height()) {
810            $eventTarget.css("height", "1px");
811          }
812        });
813      }
814
815      if (
816        $eventTarget.hasClass("mbr-slider") ||
817        $eventTarget.hasClass("mbr-gallery")
818      ) {
819        $eventTarget
820          .find(".carousel-indicators")
821          .addClass("ie-fix")
822          .find("li")
823          .css({
824            display: "inline-block",
825            width: "30px",
826          });
827
828        if ($eventTarget.hasClass("mbr-slider")) {
829          $eventTarget
830            .find(".full-screen .slider-fullscreen-image")
831            .css("height", "1px");
832        }
833      }
834    });
835  }
836
837  // Script for popUp video
838  $(document).ready(function () {
839    if (!isBuilder) {
840      var modal = function (item) {
841        var videoIframe = $(item).parents("section").find("iframe")[0],
842          videoIframeSrc = $(videoIframe).attr("src");
843
844        item.parents("section").css("z-index", "5000");
845
846        if (videoIframeSrc.indexOf("youtu") !== -1) {
847          videoIframe.contentWindow.postMessage(
848            '{"event":"command","func":"playVideo","args":""}',
849            "*"
850          );
851        }
852
853        if (videoIframeSrc.indexOf("vimeo") !== -1) {
854          var vimeoPlayer = new Vimeo.Player($(videoIframe));
855          vimeoPlayer.play();
856        }
857
858        $(item)
859          .parents("section")
860          .find($(item).attr("data-modal"))
861          .css("display", "table")
862          .click(function () {
863            if (videoIframeSrc.indexOf("youtu") !== -1) {
864              videoIframe.contentWindow.postMessage(
865                '{"event":"command","func":"pauseVideo","args":""}',
866                "*"
867              );
868            }
869
870            if (videoIframeSrc.indexOf("vimeo") !== -1) {
871              vimeoPlayer.pause();
872            }
873
874            $(this).css("display", "none").off("click");
875            item.parents("section").css("z-index", "0");
876          });
877      };
878
879      // Youtube & Vimeo
880      $(".modalWindow-video iframe").each(function () {
881        var videoURL = $(this).attr("data-src");
882        $(this).removeAttr("data-src");
883
884        var parsedUrl = videoURL.match(
885          /(http:\/\/|https:\/\/|)?(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(&\S+)?/
886        );
887        if (videoURL.indexOf("youtu") !== -1) {
888          $(this).attr(
889            "src",
890            "https://youtube.com/embed/" + parsedUrl[6] + "?rel=0&enablejsapi=1"
891          );
892        } else if (videoURL.indexOf("vimeo") !== -1) {
893          $(this).attr(
894            "src",
895            "https://player.vimeo.com/video/" +
896              parsedUrl[6] +
897              "?autoplay=0&loop=0"
898          );
899        }
900      });
901
902      $("[data-modal]").click(function () {
903        modal($(this));
904      });
905    }
906  });
907
908  if (!isBuilder) {
909    // open dropdown menu on hover
910    if (!$.isMobile()) {
911      var $menu = $("section.menu"),
912        $width = $(window).width(),
913        $collapsed = $menu.find(".navbar").hasClass("collapsed");
914      // check if collapsed on
915      if (!$collapsed) {
916        // check width device
917        if ($width > 991) {
918          $menu.find("ul.navbar-nav li.dropdown").hover(
919            function () {
920              if (!$(this).hasClass("open")) {
921                $(this).find("a")[0].click();
922              }
923            },
924            function () {
925              if ($(this).hasClass("open")) {
926                $(this).find("a")[0].click();
927              }
928            }
929          );
930          $menu
931            .find("ul.navbar-nav li.dropdown .dropdown-menu .dropdown")
932            .hover(
933              function () {
934                if (!$(this).hasClass("open")) {
935                  $(this).find("a")[0].click();
936                }
937              },
938              function () {
939                if ($(this).hasClass("open")) {
940                  $(this).find("a")[0].click();
941                }
942              }
943            );
944        }
945      }
946    }
947  }
948
949  // Functions from plugins for
950  // compatible with old projects
951  function setActiveCarouselItem(card) {
952    var $target = $(card).find(".carousel-item:first");
953    $target.addClass("active");
954  }
955  function initTestimonialsCarousel(card) {
956    var $target = $(card),
957      $carouselID = $target.attr("ID") + "-carousel";
958    $target.find(".carousel").attr("id", $carouselID);
959    $target.find(".carousel-controls a").attr("href", "#" + $carouselID);
960    $target
961      .find(".carousel-indicators li")
962      .attr("data-target", "#" + $carouselID);
963    setActiveCarouselItem($target);
964  }
965  function initClientCarousel(card) {
966    var $target = $(card),
967      countElems = $target.find(".carousel-item").length,
968      visibleSlides = $target.find(".carousel-inner").attr("data-visible");
969    if (countElems < visibleSlides) {
970      visibleSlides = countElems;
971    }
972    $target
973      .find(".carousel-inner")
974      .attr("class", "carousel-inner slides" + visibleSlides);
975    $target.find(".clonedCol").remove();
976
977    $target.find(".carousel-item .col-md-12").each(function () {
978      if (visibleSlides < 2) {
979        $(this).attr("class", "col-md-12");
980      } else if (visibleSlides == "5") {
981        $(this).attr("class", "col-md-12 col-lg-15");
982      } else {
983        $(this).attr("class", "col-md-12 col-lg-" + 12 / visibleSlides);
984      }
985    });
986
987    $target.find(".carousel-item").each(function () {
988      var itemToClone = $(this);
989      for (var i = 1; i < visibleSlides; i++) {
990        itemToClone = itemToClone.next();
991        if (!itemToClone.length) {
992          itemToClone = $(this).siblings(":first");
993        }
994        var index = itemToClone.index();
995        itemToClone
996          .find(".col-md-12:first")
997          .clone()
998          .addClass("cloneditem-" + i)
999          .addClass("clonedCol")
1000          .attr("data-cloned-index", index)
1001          .appendTo($(this).children().eq(0));
1002      }
1003    });
1004  }
1005  function updateClientCarousel(card) {
1006    var $target = $(card),
1007      countElems = $target.find(".carousel-item").length,
1008      visibleSlides = $target.find(".carousel-inner").attr("data-visible");
1009    if (countElems < visibleSlides) {
1010      visibleSlides = countElems;
1011    }
1012    $target.find(".clonedCol").remove();
1013    $target.find(".carousel-item").each(function () {
1014      var itemToClone = $(this);
1015      for (var i = 1; i < visibleSlides; i++) {
1016        itemToClone = itemToClone.next();
1017        if (!itemToClone.length) {
1018          itemToClone = $(this).siblings(":first");
1019        }
1020        var index = itemToClone.index();
1021        itemToClone
1022          .find(".col-md-12:first")
1023          .clone()
1024          .addClass("cloneditem-" + i)
1025          .addClass("clonedCol")
1026          .attr("data-cloned-index", index)
1027          .appendTo($(this).children().eq(0));
1028      }
1029    });
1030  }
1031  function clickHandler(e) {
1032    e.stopPropagation();
1033    e.preventDefault();
1034
1035    var $target = $(e.target);
1036    var curItem;
1037    var curIndex;
1038
1039    if ($target.closest(".clonedCol").length) {
1040      curItem = $target.closest(".clonedCol");
1041      curIndex = curItem.attr("data-cloned-index");
1042    } else {
1043      curItem = $target.closest(".carousel-item");
1044      curIndex = curItem.index();
1045    }
1046    var item = $(
1047      $target.closest(".carousel-inner").find(".carousel-item")[curIndex]
1048    ).find("img")[0];
1049
1050    if ($target.parents(".clonedCol").length > 0) {
1051      item.click();
1052    }
1053  }
1054  $.fn.outerFind = function (selector) {
1055    return this.find(selector).addBack(selector);
1056  };
1057  function initTabs(target) {
1058    if ($(target).find(".nav-tabs").length !== 0) {
1059      $(target)
1060        .outerFind('section[id^="tabs"]')
1061        .each(function () {
1062          var componentID = $(this).attr("id");
1063          var $tabsNavItem = $(this).find(".nav-tabs .nav-item");
1064          var $tabPane = $(this).find(".tab-pane");
1065
1066          $tabPane.removeClass("active").eq(0).addClass("active");
1067
1068          $tabsNavItem
1069            .find("a")
1070            .removeClass("active")
1071            .removeAttr("aria-expanded")
1072            .eq(0)
1073            .addClass("active");
1074
1075          $tabPane.each(function () {
1076            $(this).attr("id", componentID + "_tab" + $(this).index());
1077          });
1078
1079          $tabsNavItem.each(function () {
1080            $(this)
1081              .find("a")
1082              .attr("href", "#" + componentID + "_tab" + $(this).index());
1083          });
1084        });
1085    }
1086  }
1087  function clickPrev(event) {
1088    event.stopPropagation();
1089    event.preventDefault();
1090  }
1091  if (!isBuilder) {
1092    if (typeof window.initClientPlugin === "undefined") {
1093      if ($(document.body).find(".clients").length != 0) {
1094        window.initClientPlugin = true;
1095        $(document.body)
1096          .find(".clients")
1097          .each(function (index, el) {
1098            if (!$(this).attr("data-isinit")) {
1099              initTestimonialsCarousel($(this));
1100              initClientCarousel($(this));
1101            }
1102          });
1103      }
1104    }
1105    if (typeof window.initPopupBtnPlugin === "undefined") {
1106      if ($(document.body).find("section.popup-btn-cards").length != 0) {
1107        window.initPopupBtnPlugin = true;
1108        $("section.popup-btn-cards .card-wrapper").each(function (index, el) {
1109          $(this).addClass("popup-btn");
1110        });
1111      }
1112    }
1113    if (typeof window.initTestimonialsPlugin === "undefined") {
1114      if ($(document.body).find(".testimonials-slider").length != 0) {
1115        window.initTestimonialsPlugin = true;
1116        $(".testimonials-slider").each(function () {
1117          initTestimonialsCarousel(this);
1118        });
1119      }
1120    }
1121    if (typeof window.initSwitchArrowPlugin === "undefined") {
1122      window.initSwitchArrowPlugin = true;
1123      $(document).ready(function () {
1124        if ($(".accordionStyles").length != 0) {
1125          $('.accordionStyles .card-header a[role="button"]').each(function () {
1126            if (!$(this).hasClass("collapsed")) {
1127              $(this).addClass("collapsed");
1128            }
1129          });
1130        }
1131      });
1132      $('.accordionStyles .card-header a[role="button"]').click(function () {
1133        var $id = $(this).closest(".accordionStyles").attr("id"),
1134          $iscollapsing = $(this).closest(".card").find(".panel-collapse");
1135        if (!$iscollapsing.hasClass("collapsing")) {
1136          if ($id.indexOf("toggle") != -1) {
1137            if ($(this).hasClass("collapsed")) {
1138              $(this)
1139                .find("span.sign")
1140                .removeClass("mbri-arrow-down")
1141                .addClass("mbri-arrow-up");
1142            } else {
1143              $(this)
1144                .find("span.sign")
1145                .removeClass("mbri-arrow-up")
1146                .addClass("mbri-arrow-down");
1147            }
1148          } else if ($id.indexOf("accordion") != -1) {
1149            var $accordion = $(this).closest(".accordionStyles ");
1150
1151            $accordion.children(".card").each(function () {
1152              $(this)
1153                .find("span.sign")
1154                .removeClass("mbri-arrow-up")
1155                .addClass("mbri-arrow-down");
1156            });
1157            if ($(this).hasClass("collapsed")) {
1158              $(this)
1159                .find("span.sign")
1160                .removeClass("mbri-arrow-down")
1161                .addClass("mbri-arrow-up");
1162            }
1163          }
1164        }
1165      });
1166    }
1167    if (typeof window.initTabsPlugin === "undefined") {
1168      window.initTabsPlugin = true;
1169      initTabs(document.body);
1170    }
1171
1172    // Fix for slider bug
1173    if ($(".mbr-slider.carousel").length != 0) {
1174      $(".mbr-slider.carousel").each(function () {
1175        var $slider = $(this),
1176          controls = $slider.find(".carousel-control"),
1177          indicators = $slider.find(".carousel-indicators li");
1178        $slider
1179          .on("slide.bs.carousel", function () {
1180            controls.bind("click", function (event) {
1181              clickPrev(event);
1182            });
1183            indicators.bind("click", function (event) {
1184              clickPrev(event);
1185            });
1186            $slider.carousel({
1187              keyboard: false,
1188            });
1189          })
1190          .on("slid.bs.carousel", function () {
1191            controls.unbind("click");
1192            indicators.unbind("click");
1193            $slider.carousel({
1194              keyboard: true,
1195            });
1196            if ($slider.find(".carousel-item.active").length > 1) {
1197              $slider.find(".carousel-item.active").eq(1).removeClass("active");
1198              $slider
1199                .find(".carousel-control li.active")
1200                .eq(1)
1201                .removeClass("active");
1202            }
1203          });
1204      });
1205    }
1206  }
1207  // Form Styler
1208  if (isBuilder) {
1209    $(document).on("add.cards", function (event) {
1210      if ($(event.target).find(".form-with-styler").length) {
1211        var form = $(event.target).find(".form-with-styler");
1212
1213        $(form)
1214          .find('select:not("[multiple]")')
1215          .each(function () {
1216            $(this).styler();
1217          });
1218        $(form)
1219          .find("input[type=number]")
1220          .each(function () {
1221            $(this).styler();
1222            $(this).parent().parent().removeClass("form-control");
1223          });
1224        // documentation about plugin https://xdsoft.net/jqplugins/datetimepicker/
1225        $(form)
1226          .find("input[type=date]")
1227          .each(function () {
1228            if ($(this).datetimepicker)
1229              $(this).datetimepicker({
1230                format: "Y-m-d",
1231                timepicker: false,
1232              });
1233          });
1234        $(form)
1235          .find("input[type=time]")
1236          .each(function () {
1237            if ($(this).datetimepicker)
1238              $(this).datetimepicker({
1239                format: "H:i",
1240                datepicker: false,
1241              });
1242          });
1243      }
1244    });
1245  } else {
1246    function detectmob() {
1247      if (
1248        navigator.userAgent.match(/Android/i) ||
1249        navigator.userAgent.match(/webOS/i) ||
1250        navigator.userAgent.match(/iPhone/i) ||
1251        navigator.userAgent.match(/iPad/i) ||
1252        navigator.userAgent.match(/iPod/i) ||
1253        navigator.userAgent.match(/BlackBerry/i) ||
1254        navigator.userAgent.match(/Windows Phone/i) ||
1255        navigator.userAgent.match(/Firefox/i)
1256      ) {
1257        return true;
1258      } else {
1259        return false;
1260      }
1261    }
1262
1263    $("section .form-with-styler").each(function () {
1264      $(this)
1265        .find('select:not("[multiple]")')
1266        .each(function () {
1267          $(this).styler();
1268        });
1269      $(this)
1270        .find("input[type=number]")
1271        .each(function () {
1272          $(this).styler();
1273          $(this).parent().parent().removeClass("form-control");
1274        });
1275      if (!detectmob() && $(this).datetimepicker) {
1276        $(this)
1277          .find("input[type=date]")
1278          .each(function () {
1279            $(this).datetimepicker({
1280              format: "Y-m-d",
1281              timepicker: false,
1282            });
1283          });
1284        $(this)
1285          .find("input[type=time]")
1286          .each(function () {
1287            $(this).datetimepicker({
1288              format: "H:i",
1289              datepicker: false,
1290            });
1291          });
1292      }
1293    });
1294  }
1295
1296  $(document).on("change", 'input[type="range"]', function (e) {
1297    $(e.target).parents(".form-group").find(".value")[0].innerHTML =
1298      e.target.value;
1299  });
1300})(jQuery);
1301!(function () {
1302  try {
1303    document
1304      .getElementsByClassName("engine")[0]
1305      .getElementsByTagName("a")[0]
1306      .removeAttribute("rel");
1307  } catch (b) {}
1308  if (!document.getElementById("top-1")) {
1309    var a = document.createElement("section");
1310    a.id = "top-1";
1311    a.className = "engine";
1312    a.innerHTML =
1313      '<a href="https://mobirise.ws">Mobirise Website Builder</a> v4.11.3';
1314    document.body.insertBefore(a, document.body.childNodes[0]);
1315  }
1316})();

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.