PageSourceSearch

https://lntcaredevelopments.co.uk/wp-content/themes/lntcaredevelopments/js/app.js?ver=1.11

js lntcaredevelopments.co.uk collected 2026-10-09 21:49:07 UTC 89,084 bytes, 3,325 lines download raw bytes

1$ = jQuery;
2
3var Mad = (function ($) {
4  'use strict'
5
6  var App = {},
7    DOMDfd = $.Deferred(),
8    $body = $('body'),
9    $doc = $(document)
10
11  App.modules = {}
12  App.helpers = {}
13  App._localCache = {}
14
15  App.ISTOUCH = Modernizr.touchevents
16  App.ANIMATIONDURATION = 500
17  App.ANIMATIONEASING = 'easeOutQuart'
18  App.ANIMATIONSUPPORTED = Modernizr.cssanimations
19  App.ANIMATIONEND =
20    'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'
21  App.RTL = getComputedStyle(document.body).direction === 'rtl'
22  App.ISLEGACYBROWSER = !Modernizr.flexbox
23  App.ISFIREFOX = window.navigator.userAgent.indexOf('Firefox') != -1
24
25  App.afterDOMReady = function () {
26    var self = this
27
28    if (this.ISFIREFOX) window.onunload = function () {}
29
30    // Show message to update legacy browser
31    if (this.ISLEGACYBROWSER) {
32      if (this.helpers.showCriticalFullScreenMessage) {
33        this.helpers.showCriticalFullScreenMessage({
34          before: '<i class="icon icon-sad"></i>',
35          content:
36            'Your browser does not support some technologies this site use. Please update your browser or visit the site using more modern browser.'
37        })
38      }
39
40      // Anyway preloader must be used
41      if (this.modules.preloader) this.modules.preloader()
42
43      return
44    }
45
46    if (this.modules.backToTop) {
47      this.modules.backToTop({
48        easing: 'easeOutQuint',
49        speed: 550,
50        cssPrefix: 'lnt-'
51      })
52    }
53
54    if (this.helpers.toggledFields) this.helpers.toggledFields()
55
56    if (window.MadEventsCalendar)
57      window.MadEventsCalendar.init($('.lnt-events-calendar'), {
58        isTouch: self.ISTOUCH,
59        cssPrefix: 'lnt-',
60        breakpoint: 768
61      })
62
63    if (window.MadSidebarHidden) {
64      new window.MadSidebarHidden({
65        cssPrefix: 'lnt-'
66      })
67    }
68
69    if (window.MadStickyHeaderSection) {
70      var $stickySections = $(
71        '[class*="lnt-header-section--sticky"]:not([class*="lnt-header-section--sticky-hidden"])'
72      )
73
74      if ($stickySections.length) {
75        new window.MadStickyHeaderSection($stickySections, {
76          animationEasing: self.ANIMATIONEASING,
77          animationDuration: self.ANIMATIONDURATION
78        })
79      }
80    }
81
82    if (this.modules.dropdown) this.modules.dropdown.init()
83
84    if (this.modules.closeBtn) this.modules.closeBtn()
85
86    if (this.modules.hiddenSections) this.modules.hiddenSections()
87
88    if (this.modules.viewTypes) this.modules.viewTypes()
89
90    if (this.helpers.calendarWidget) this.helpers.calendarWidget()
91
92    if (this.modules.fieldDatepicker) this.modules.fieldDatepicker()
93
94    var $datepickers = $('.lnt-datepicker:not(.default)')
95
96    if ($('.lnt-booking-form--style-1').length) {
97      $datepickers.datepicker({
98        showOtherMonths: true,
99        selectOtherMonths: true,
100        isRTL: self.RTL,
101        dayNamesMin: ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'],
102        prevText: self.RTL
103          ? '<i class="material-icons">keyboard_arrow_right</i>'
104          : '<i class="material-icons">keyboard_arrow_left</i>',
105        nextText: self.RTL
106          ? '<i class="material-icons">keyboard_arrow_left</i>'
107          : '<i class="material-icons">keyboard_arrow_right</i>'
108      })
109    }
110
111    /* ------------------------------------------------
112            Range Slider
113        ------------------------------------------------ */
114
115    var $rangeSliders = $('.lnt-range-slider')
116
117    if ($.fn.slider && $rangeSliders.length) {
118      $rangeSliders.slider({
119        range: true,
120        min: 0,
121        max: 999,
122        values: [200, 800],
123        slide: function (event, ui) {
124          var $range = $(ui.handle).closest('.lnt-range-slider'),
125            $input = $range.siblings('.lnt-range-slider-input'),
126            $input2 = $range.siblings('.lnt-range-slider-input2')
127
128          if ($range.length && $input.length) {
129            $input
130              .attr('value', '$' + $range.slider('values', 0))
131              .val('$' + $range.slider('values', 0))
132            $input2
133              .attr('value', '$' + $range.slider('values', 1))
134              .val('$' + $range.slider('values', 1))
135          }
136        }
137      })
138    }
139
140    /* ------------------------------------------------
141            End of Range Slider
142        ------------------------------------------------ */
143
144    /* ------------------------------------------------
145            Twitter
146        ------------------------------------------------ */
147
148    var $twitterFeed = $('.lnt-twitter-feed')
149
150    if ($twitterFeed.length && $.fn.tweetie) {
151      $twitterFeed.tweetie({
152        url:
153          'http://velikorodnov.com/html/hotel-prive/vendors/tweetie/api/php/server.php',
154        type: 'timeline',
155        template:
156          '<li>\
157                        <div class="lnt-tweet">\
158                            <div class="lnt-tweet-content">{{tweet.text}}</div>\
159                            \
160                        </div>\
161                    </li>',
162        dateFormat: '%B %d, %Y',
163        params: {
164          count: 2,
165          screen_name: null,
166          list_id: null,
167          slug: null,
168          q: null,
169          exclude_replies: false,
170          include_rts: false
171        }
172      })
173    }
174
175    /* ------------------------------------------------
176            End of Twitter
177        ------------------------------------------------ */
178
179    /* ------------------------------------------------
180            Custom Select
181        ------------------------------------------------ */
182
183    var $selects = $('.lnt-custom-select')
184
185    if ($selects.length) {
186      $selects.MadCustomSelect({
187        cssPrefix: 'lnt-'
188      })
189    }
190
191    /* ------------------------------------------------
192            End of Custom Select
193        ------------------------------------------------ */
194
195    /* ------------------------------------------------
196            Newsletter Form
197        ------------------------------------------------ */
198
199    var newsletterForm = $('.lnt-newsletter-form')
200
201    if (newsletterForm.length && window.MadNewsletter) {
202      window.MadNewsletter(newsletterForm)
203    }
204
205    /* ------------------------------------------------
206            End of Newsletter Form
207        ------------------------------------------------ */
208
209    /* ------------------------------------------------
210            Contact Form
211        ------------------------------------------------ */
212
213    var contactForm = $('.lnt-contact-form')
214
215    if (contactForm.length && window.MadContactForm) {
216      MadContactForm.init(contactForm)
217    }
218
219    /* ------------------------------------------------
220            End of Contact Form
221        ------------------------------------------------ */
222
223    /* ----------------------------------------
224            Fancybox
225         ---------------------------------------- */
226
227    if ($.fancybox && $.fancybox.defaults) {
228      $.extend($.fancybox.defaults, {
229        transitionEffect: 'slide',
230        transitionDuration: self.ANIMATIONDURATION,
231        animationDuration: self.ANIMATIONDURATION
232      })
233    }
234
235    /* ----------------------------------------
236            End of Fancybox
237         ---------------------------------------- */
238
239    if (this.modules.arcticModals)
240      this.modules.arcticModals.init($('[data-arctic-modal]'))
241
242    /* ------------------------------------------------
243            Navigation
244        ------------------------------------------------ */
245
246    /*
247      var $nav = $('.lnt-navigation'),
248      $verticalNav = $('.lnt-navigation-vertical')
249
250    if ($nav.length) {
251      $nav.MonkeysanNav({
252        cssPrefix: 'lnt-',
253        mobileBreakpoint: 1025
254      })
255    }
256
257    if ($verticalNav.length) {
258      $verticalNav.MonkeysanNav({
259        cssPrefix: 'lnt-',
260        mobileBreakpoint: 10000
261      })
262    }
263
264    $('.lnt-navigation > li > a').on('click', function (e) {
265      e.preventDefault
266    })
267    */
268
269    /* ------------------------------------------------
270            End of Navigation
271        ------------------------------------------------ */
272
273    /* ------------------------------------------------
274            Countdown
275        ------------------------------------------------ */
276
277    var $countdown = $('.lnt-countdown')
278
279    if ($countdown.length) {
280      $countdown.each(function () {
281        var $this = $(this),
282          endDate = $this.data(),
283          until = new Date(
284            endDate.year,
285            endDate.month || 0,
286            endDate.day || 1,
287            endDate.hours || 0,
288            endDate.minutes || 0,
289            endDate.seconds || 0
290          )
291
292        $this.countdown({
293          until: until,
294          padZeroes: true,
295          format: 'dHMS',
296          labels: [
297            'Years',
298            'Month',
299            'Weeks',
300            'Days',
301            'Hours',
302            'Minutes',
303            'Seconds'
304          ],
305          labels1: [
306            'Years',
307            'Month',
308            'Weeks',
309            'Days',
310            'Hours',
311            'Minutes',
312            'Seconds'
313          ]
314        })
315      })
316    }
317
318    /* ------------------------------------------------
319            End countdown
320        ------------------------------------------------ */
321
322    /* ------------------------------------------------
323            Revolution slider
324        ------------------------------------------------ */
325
326    var $revSlider1 = $('#rev-slider-1'),
327      revApi1
328
329    if ($revSlider1.length && $.fn.revolution) {
330      revApi1 = $revSlider1.show().revolution({
331        dottedOverlay: 'mad',
332        disableProgressBar: 'on',
333        spinner: 'spinner3',
334        gridwidth: [1488, 1024, 1024, 580],
335        gridheight: [1064, 1064, 1064, 1064],
336        responsiveLevels: [1440, 1024, 820, 580],
337        navigation: {
338          keyboardNavigation: 'on',
339          keyboard_direction: 'horizontal',
340          onHoverStop: 'false',
341          arrows: {
342            enable: false
343          },
344          bullets: {
345            enable: true,
346            style: 'mad',
347            hide_onleave: false,
348            h_align: 'center',
349            v_align: 'bottom',
350            direction: 'horisontal',
351            h_offset: 0,
352            v_offset: 40
353          }
354        }
355      })
356    }
357
358    /* ------------------------------------------------
359            End of Revolution slider
360        ------------------------------------------------ */
361
362    /* ------------------------------------------------
363            Accordions & Toggles
364        ------------------------------------------------ */
365
366    var $accordions = $('.lnt-panels--accordion'),
367      $toggles = $('.lnt-panels--toggles')
368
369    if ($accordions.length) {
370      $accordions.MonkeysanAccordion({
371        easing: self.ANIMATIONEASING,
372        speed: '400',
373        cssPrefix: 'lnt-'
374      })
375    }
376
377    if ($toggles.length) {
378      $toggles.MonkeysanAccordion({
379        easing: self.ANIMATIONEASING,
380        speed: self.ANIMATIONDURATION,
381        toggle: true,
382        cssPrefix: 'lnt-'
383      })
384    }
385
386    /* ------------------------------------------------
387            End of Accordions & Toggles
388        ------------------------------------------------ */
389
390    /* ----------------------------------------
391            Alert Boxes
392        ---------------------------------------- */
393
394    var $alertBoxes = $('.lnt-alert-box')
395
396    if ($alertBoxes.filter('.lnt-alert-box--success').length) {
397      MadAlertBox.init($alertBoxes.filter('.lnt-alert-box--success'), {
398        duration: self.ANIMATIONDURATION,
399        cssPrefix: 'lnt-',
400        easing: self.ANIMATIONEASING,
401        type: 'success'
402      })
403    }
404
405    if ($alertBoxes.filter('.lnt-alert-box--warning').length) {
406      MadAlertBox.init($alertBoxes.filter('.lnt-alert-box--warning'), {
407        duration: self.ANIMATIONDURATION,
408        cssPrefix: 'lnt-',
409        easing: self.ANIMATIONEASING,
410        type: 'warning'
411      })
412    }
413
414    if ($alertBoxes.filter('.lnt-alert-box--info').length) {
415      MadAlertBox.init($alertBoxes.filter('.lnt-alert-box--info'), {
416        duration: self.ANIMATIONDURATION,
417        cssPrefix: 'lnt-',
418        easing: self.ANIMATIONEASING,
419        type: 'info'
420      })
421    }
422
423    if ($alertBoxes.filter('.lnt-alert-box--error').length) {
424      MadAlertBox.init($alertBoxes.filter('.lnt-alert-box--error'), {
425        duration: self.ANIMATIONDURATION,
426        cssPrefix: 'lnt-',
427        easing: self.ANIMATIONEASING,
428        type: 'error'
429      })
430    }
431
432    /* ----------------------------------------
433            End of Alert Boxes
434        ---------------------------------------- */
435
436    /* ----------------------------------------
437            Tooltips
438        ---------------------------------------- */
439
440    if ($('[data-tooltip]').length && $.fn.MonkeysanTooltip) {
441      $('[data-tooltip]').MonkeysanTooltip({
442        animationIn: 'fadeInDown',
443        animationOut: 'fadeOutUp',
444        tooltipPosition: 'top',
445        jQueryAnimationEasing: self.ANIMATIONEASING,
446        jQueryAnimationDuration: self.ANIMATIONDURATION,
447        skin: 'mad'
448      })
449    }
450
451    /* ----------------------------------------
452            End of Tooltips
453        ---------------------------------------- */
454
455    /* ----------------------------------------
456            IsotopeWrapper
457        ---------------------------------------- */
458
459    $(window).on('load resize open', function () {
460      var $isotope = $('.lnt-grid--isotope:not(.lnt-sponsors)')
461
462      if ($isotope.length && window.MadIsotopeWrapper) {
463        $isotope.each(function (index, container) {
464          var $container = $(container),
465            $stretchedSection = $container.closest(
466              '.lnt-section--stretched-content, .lnt-section--stretched-content-no-px'
467            )
468
469          if ($stretchedSection.length) {
470            $stretchedSection.on('stretched.mad.Section', function () {
471              if ($container.data('IsotopeWrapper')) return
472
473              MadIsotopeWrapper.init($container, {
474                itemSelector: '.lnt-grid-item',
475                transitionDuration: self.ANIMATIONDURATION
476              })
477            })
478          } else {
479            MadIsotopeWrapper.init($container, {
480              itemSelector: '.lnt-grid-item',
481              transitionDuration: self.ANIMATIONDURATION
482            })
483          }
484        })
485      }
486    })
487
488    /* ----------------------------------------
489            End of IsotopeWrapper
490        ---------------------------------------- */
491
492    /* ----------------------------------------
493            Dynamic background image
494        ---------------------------------------- */
495
496    var $backgrounds = $(
497      '[data-bg-image-src]:not([class*="lnt-colorizer--scheme-"])'
498    )
499
500    if ($backgrounds.length && this.helpers.dynamicBgImage) {
501      this.helpers.dynamicBgImage($backgrounds)
502    }
503
504    /* ----------------------------------------
505            End of Dynamic background image
506        ---------------------------------------- */
507
508    /* ----------------------------------------
509            Owl Carousel
510        ---------------------------------------- */
511
512    // owl carousel adaptive
513    if ($('.owl-carousel').length) this.helpers.owlAdaptive()
514
515    var $simpleSlideshow = $('.lnt-simple-slideshow'),
516      $testimonialsCarousel = $('.lnt-testimonials-inner .owl-carousel'),
517      $textFaderCarousel = $('.text-fader .owl-carousel')
518
519    if ($simpleSlideshow.length && $.fn.owlCarousel) {
520      $simpleSlideshow.each(function (index, carousel) {
521        var $carousel = $(carousel),
522          $stretchedSection = $carousel.closest(
523            '.lnt-section--stretched-content, .lnt-section--stretched-content-no-px'
524          )
525
526        if ($stretchedSection.length) {
527          $stretchedSection.each(function (scindex, scelement) {
528            $(scelement).on('stretched.mad.Section', function () {
529              $carousel.owlCarousel(
530                self.helpers.owlSettings({
531                  margin: 1,
532                  animateIn: 'fadeIn', // add this
533                  animateOut: 'fadeOut', // and this
534                  loop: true,
535                  autoplay: true,
536                  dots: false,
537                  transitionStyle: "fade",
538                  autoplay: $carousel.hasClass('lnt-simple-slideshow--autoplay')
539                })
540              )
541            })
542          })
543        } else {
544          $carousel.owlCarousel(
545            self.helpers.owlSettings({
546              margin: 1,
547              animateIn: 'fadeIn', // add this
548              animateOut: 'fadeOut', // and this
549              loop: true,
550              autoplay: true,
551              transitionStyle: "fade",
552              dots: false
553            })
554          )
555        }
556      })
557    }
558
559    if ($testimonialsCarousel.length && $.fn.owlCarousel) {
560      $testimonialsCarousel.each(function (index, carousel) {
561        var $carousel = $(carousel),
562          $stretchedSection = $carousel.closest(
563            '.lnt-section--stretched-content, .lnt-section--stretched-content-no-px'
564          )
565
566        if ($stretchedSection.length) {
567          $stretchedSection.on('stretched.mad.Section', function () {
568            if ($carousel.data('owl.carousel')) return
569            $carousel.owlCarousel(
570              self.helpers.owlSettings({
571                margin: 0,
572                loop: true,
573                autoplay: true,
574                autoplayTimeout: 18000,
575                nav: true,
576                  animateIn: 'fadeIn', // add this
577                  animateOut: 'fadeOut', // and this
578                dots: true
579              })
580            )
581          })
582        } else {
583          $carousel.owlCarousel(
584            self.helpers.owlSettings({
585              margin: 0,
586              loop: true,
587              autoplay: true,
588                autoplayTimeout: 18000,
589              nav: true,
590                  animateIn: 'fadeIn', // add this
591                  animateOut: 'fadeOut', // and this
592              dots: true
593            })
594          )
595        }
596      })
597    }
598
599    if ($textFaderCarousel.length && $.fn.owlCarousel) {
600      $textFaderCarousel.each(function (index, carousel) {
601        var $carousel = $(carousel)
602
603          $carousel.owlCarousel(
604            self.helpers.owlSettings({
605              margin: 0,
606              loop: true,
607              autoplay: true,
608              autoplayTimeout: 3200,
609              nav: false,
610              dots: false,
611              mouseDrag: false,
612              touchDrag: false,
613              pullDrag: false,
614              freeDrag: false,
615              autoplayHoverPause: false,
616              singleItem: true,
617              //animateIn: 'fadeIn',
618              //animateOut: 'fadeOut',
619              animateOut: 'slideOutUp',
620              animateIn: 'slideInUp'
621            })
622          )
623      })
624    }
625
626    this.helpers.gridOwl.extendConfigFor('.lnt-sponsors', {
627      responsive: {
628        0: {
629          items: 2
630        },
631        480: {
632          items: 3
633        },
634        1200: {
635          items: 6
636        },
637        1300: {
638          items: 6
639        }
640      }
641    })
642
643    this.helpers.gridOwl.extendConfigFor('.full-scr', {
644      margin: 16,
645      loop: true
646    })
647
648    this.helpers.gridOwl.extendConfigFor(
649      '.owl-carousel.lnt-grid--cols-1.lnt-entities.type-5',
650      {
651        startPosition: 1,
652        margin: 96,
653        responsive: {
654          0: {
655            items: 1
656          },
657          480: {
658            items: 1
659          },
660          992: {
661            items: 1
662          },
663          1200: {
664            items: 1
665          },
666          1300: {
667            items: 1
668          }
669        }
670      }
671    )
672
673    this.helpers.gridOwl.extendConfigFor(
674      '.lnt-testimonials .lnt-grid--cols-2',
675      {
676        startPosition: 1,
677        autoplay: true,
678        margin: 96,
679        responsive: {
680          0: {
681            items: 1
682          },
683          480: {
684            items: 1
685          },
686          992: {
687            items: 2
688          },
689          1200: {
690            items: 2
691          },
692          1300: {
693            items: 2
694          }
695        }
696      }
697    )
698
699    this.helpers.gridOwl.extendConfigFor(
700      '.owl-carousel.lnt-grid--cols-1:not(".type-5")',
701      {
702        startPosition: 1,
703        animateOut: 'fadeOut'
704      }
705    )
706
707    this.helpers.gridOwl.extendConfigFor('.lnt-sponsors', {
708      startPosition: 1,
709      responsive: {
710        0: {
711          items: 2
712        },
713        480: {
714          items: 3
715        },
716        992: {
717          items: 4
718        },
719        1200: {
720          items: 5
721        },
722        1300: {
723          items: 6
724        }
725      }
726    })
727
728    this.helpers.gridOwl.extendConfigFor('.lnt-single-menu', {
729      startPosition: 1,
730      center: true,
731      loop: true,
732      responsive: {
733        0: {
734          items: 1
735        },
736        480: {
737          items: 1
738        },
739        992: {
740          items: 1
741        },
742        1024: {
743          items: 2
744        },
745        1300: {
746          items: 2
747        }
748      }
749    })
750
751    this.helpers.gridOwl.extendConfigFor('.lnt-owl-center', {
752      center: true,
753        navSpeed: 1000,
754        dotsSpeed: 1000,
755        dragEndSpeed: 800,
756        autoplay: false,
757      responsive: {
758        300: {
759          items: 1.2,
760            margin: 15,
761        autoplay: false,
762        },
763        480: {
764          items: 1.2,
765            margin: 15,
766        autoplay: false,
767        },
768        768: {
769          items: 1.35
770        },
771        1200: {
772          items: 1.75
773        },
774        1300: {
775          items: 2.35
776        }
777      }
778    })
779
780    this.helpers.gridOwl.extendConfigFor('.lnt-owl-center-2', {
781      center: true,
782        navSpeed: 1000,
783        dotsSpeed: 1000,
784        dragEndSpeed: 800,
785        autoplay: false,
786      startPosition: 1,
787        loop: false,
788      margin: 12,
789      responsive: {
790        380: {
791          items: 1.2
792        },
793        480: {
794          items: 3.15
795        },
796        1200: {
797          items: 3.15
798        },
799        1300: {
800          items: 3.2
801        }
802      }
803    })
804
805    this.helpers.gridOwl.extendConfigFor(
806      '.lnt-owl-center.lnt-owl-center-auto',
807      {
808        loop: true,
809        autoWidth: true,
810        center: false,
811        items: 2
812      }
813    )
814
815    this.helpers.gridOwl.extendConfigFor('.lnt-product-thumbs', {
816      margin: 16,
817      loop: false,
818      responsive: {
819        380: {
820          items: 2
821        },
822        480: {
823          items: 2
824        },
825        768: {
826          items: 3
827        },
828        1024: {
829          items: 4
830        },
831        1200: {
832          items: 4
833        },
834        1300: {
835          items: 4
836        }
837      }
838    })
839
840    this.helpers.gridOwl.extendConfigFor(
841      '.lnt-entities.type-3.lnt-grid--cols-3',
842      {
843        responsive: {
844          380: {
845            items: 1
846          },
847          480: {
848            items: 1
849          },
850          820: {
851            items: 2
852          },
853          1200: {
854            items: 2
855          },
856          1300: {
857            items: 2
858          },
859          1480: {
860            items: 3
861          }
862        }
863      }
864    )
865
866    this.helpers.gridOwl.extendConfigFor(
867      '.lnt-entities.with-bg-backplate.lnt-grid--cols-3',
868      {
869        responsive: {
870          0: {
871            items: 1.22,
872            margin: 10
873          },
874          660: {
875            items: 2
876          },
877          820: {
878            items: 2
879          },
880          1100: {
881            items: 3
882          },
883          1300: {
884            items: 3
885          },
886          1480: {
887            items: 3
888          }
889        }
890      }
891    )
892
893    // Initialization owl carousels placed in the stretched sections
894    $('[class*="lnt-section--stretched-content"]').on(
895      'stretched.mad.Section',
896      function (event, $section) {
897        var $gridOwlCarousels = $section.find('.lnt-grid.owl-carousel'),
898          $simpleThumbs = $section.find(
899            '.lnt-simple-slideshow-thumbs.owl-carousel'
900          )
901
902        if ($gridOwlCarousels.length)
903          self.helpers.gridOwl.add($gridOwlCarousels)
904
905        if ($simpleThumbs.length) {
906          $simpleThumbs.owlCarousel(
907            self.helpers.owlSettings({
908              responsive: {
909                0: {
910                  items: 2
911                },
912                380: {
913                  items: 3
914                },
915                992: {
916                  items: 4
917                },
918                1200: {
919                  items: 6
920                }
921              },
922              margin: 10,
923              loop: false
924            })
925          )
926        }
927      }
928    )
929
930    // Initialization owl carousels placed in the normal sections
931    var $simpleThumbs = $('.lnt-simple-slideshow-thumbs.owl-carousel').filter(
932      function (index, element) {
933        return !$(element).closest('[class*="lnt-section--stretched-content"]')
934          .length
935      }
936    )
937
938    if ($simpleThumbs.length) {
939      $simpleThumbs.owlCarousel(
940        self.helpers.owlSettings({
941          responsive: {
942            0: {
943              items: 2
944            },
945            380: {
946              items: 3
947            },
948            992: {
949              items: 4
950            },
951            1200: {
952              items: 6
953            }
954          },
955          margin: 10,
956          dots: true,
957          loop: false
958        })
959      )
960    }
961
962    this.helpers.gridOwl.add(
963      $('.lnt-grid.owl-carousel').filter(function (index, element) {
964        return !$(element).closest(
965          '[class*="lnt-section--stretched-content"]'
966        ).length
967      })
968    )
969
970    this.helpers.owlSync.init()
971
972    /* ----------------------------------------
973            End of Owl Carousel
974        ---------------------------------------- */
975
976    /* ----------------------------------------
977            Rating
978        ---------------------------------------- */
979
980    var $ratingFields = $('.lnt-rating-field'),
981      $ratings
982
983    if ($ratingFields.length) {
984      $ratings = $ratingFields.find('.lnt-rating')
985
986      if ($ratings.length) {
987        $ratings.on('built.mad.Rating', function (event, $rating) {
988          var $tabs = $rating.closest('.lnt-tabs'),
989            Tabs
990
991          if ($tabs.length) {
992            Tabs = $tabs.data('tabs')
993
994            if (Tabs) Tabs.updateContainer()
995          }
996        })
997      }
998    }
999
1000    if (this.helpers.rating)
1001      this.helpers.rating($('.lnt-rating:not(.lnt-rating--independent)'), {
1002        topLevelElements: '<i class="material-icons active">star</i>',
1003        bottomLevelElements: '<i class="material-icons">star_border</i>'
1004      })
1005
1006    if (this.helpers.rating)
1007      this.helpers.rating($('.lnt-rating--independent'), {
1008        topLevelElements: '<i class="material-icons active">star</i>',
1009        bottomLevelElements: '<i class="material-icons">star_border</i>'
1010      })
1011
1012    if (this.helpers.ratingField)
1013      this.helpers.ratingField($('.lnt-rating-field'))
1014
1015    /* ----------------------------------------
1016            End of Rating
1017        ---------------------------------------- */
1018
1019    DOMDfd.resolve()
1020  }
1021
1022  App.afterOuterResourcesLoaded = function () {
1023    var self = this
1024
1025    // Stop initializing any modules in case legacy browser is using
1026    if (this.ISLEGACYBROWSER) return
1027
1028    var $sections = $('.lnt-section')
1029
1030    if (this.helpers.Colorizer)
1031      this.helpers.Colorizer.init($('[class*="lnt-colorizer--scheme-"]'))
1032
1033    if (this.modules.Section && $sections.length) {
1034      this.modules.Section.init($sections)
1035    }
1036
1037    if (this.helpers.Breadcrumb)
1038      this.helpers.Breadcrumb.init(
1039        $('.lnt-header--transparent + .lnt-breadcrumb[data-bg-image-src]')
1040      )
1041
1042    if (this.helpers.fullScreenArea)
1043      this.helpers.fullScreenArea.init({
1044        except: $('#lnt-header:not(.lnt-header--transparent)').add(
1045          $('#lnt-footer')
1046        )
1047      })
1048
1049    /* ----------------------------------------
1050            Tabs & Tour Sections
1051        ---------------------------------------- */
1052
1053    var $tabs = $('.lnt-tabs')
1054
1055    if ($tabs.length) {
1056      $tabs.MonkeysanTabs({
1057        speed: self.ANIMATIONDURATION,
1058        easing: self.ANIMATIONEASING,
1059        cssPrefix: 'lnt-'
1060      })
1061      $('.lnt-tabs-nav .lnt-tab-link').on('click', function () {
1062        $('.owl-carousel').trigger('refresh.owl.carousel')
1063        $('.inner-container').css({
1064          height: $('.inner-container .lnt-tab.lnt-active').height() + 'px'
1065        })
1066      })
1067      var $utabs = $('.lnt-tabs').data('tabs')
1068      $('.lnt-iso-tabs .lnt-tabs-nav .lnt-tab-link').on('click', function () {
1069        setTimeout(function () {
1070          $utabs.updateContainer()
1071        }, 300)
1072      })
1073    }
1074
1075    var tabs = $('.tabs-section')
1076    if (tabs.length) {
1077      tabs.tabs({
1078        active: 0,
1079        beforeActivate: function (event, ui) {
1080          var hash = ui.newTab.find('li a').attr('href')
1081        },
1082        hide: {
1083          effect: 'fadeOut',
1084          duration: 450
1085        },
1086        show: {
1087          effect: 'fadeIn',
1088          duration: 450
1089        },
1090        updateHash: false
1091      })
1092    }
1093
1094    /* ----------------------------------------
1095            End of Tabs & Tour Sections
1096        ---------------------------------------- */
1097
1098    if (this.modules.preloader) this.modules.preloader()
1099
1100    var $parallaxSections = $(
1101      '.lnt-colorizer--parallax .lnt-colorizer-bg-image'
1102    )
1103    var parallaxStrength = 0.75;
1104
1105    if ($parallaxSections.length) {
1106        $parallaxSections.each(function(){
1107            if((this).hasAttribute('parallax-strength')){ parallaxStrength = (this).attr('parallax-strength'); }
1108            $(this).parallax('50%', parallaxStrength)
1109        });      
1110    }
1111  }
1112
1113  /* ----------------------------------------
1114        Back to top
1115    ---------------------------------------- */
1116
1117  App.modules.backToTop = function (config) {
1118    var backToTop = {
1119      init: function (config) {
1120        var self = this
1121
1122        if (config) this.config = $.extend(this.config, config)
1123
1124        this.btn = $('<button></button>', {
1125          class: self.config.cssPrefix + 'back-to-top animated stealthy',
1126          html: '<span class="icon"></span>'
1127        })
1128
1129        this.bindEvents()
1130
1131        $body.append(this.btn)
1132      },
1133
1134      config: {
1135        breakpoint: 700,
1136        showClass: 'zoomIn',
1137        hideClass: 'zoomOut',
1138        easing: 'linear',
1139        speed: 500,
1140        cssPrefix: ''
1141      },
1142
1143      bindEvents: function () {
1144        var page = $('html, body'),
1145          self = this
1146
1147        this.btn.on('click', function (e) {
1148          page.stop().animate(
1149            {
1150              scrollTop: 0
1151            },
1152            {
1153              easing: self.config.easing,
1154              duration: self.config.speed
1155            }
1156          )
1157        })
1158
1159        this.btn.on(App.ANIMATIONEND, function (e) {
1160          e.preventDefault()
1161
1162          var $this = $(this)
1163
1164          if ($this.hasClass(self.config.hideClass)) {
1165            $this
1166              .addClass('stealthy')
1167              .removeClass(
1168                self.config.hideClass + ' ' + self.config.cssPrefix + 'inview'
1169              )
1170          }
1171        })
1172
1173        $(window).on('scroll.backtotop', { self: this }, this.toggleBtn)
1174      },
1175
1176      toggleBtn: function (e) {
1177        var $this = $(this),
1178          self = e.data.self
1179
1180        if (
1181          $this.scrollTop() > self.config.breakpoint &&
1182          !self.btn.hasClass(self.config.cssPrefix + 'inview')
1183        ) {
1184          self.btn
1185            .addClass(self.config.cssPrefix + 'inview')
1186            .removeClass('stealthy')
1187
1188          if (App.ANIMATIONSUPPORTED) {
1189            self.btn.addClass(self.config.showClass)
1190          }
1191        } else if (
1192          $this.scrollTop() < self.config.breakpoint &&
1193          self.btn.hasClass(self.config.cssPrefix + 'inview')
1194        ) {
1195          self.btn.removeClass(self.config.cssPrefix + 'inview')
1196
1197          if (!App.ANIMATIONSUPPORTED) {
1198            self.btn.addClass('stealthy')
1199          } else {
1200            self.btn
1201              .removeClass(self.config.showClass)
1202              .addClass(self.config.hideClass)
1203          }
1204        }
1205      }
1206    }
1207
1208    backToTop.init(config)
1209
1210    return this
1211  }
1212
1213  /* ----------------------------------------
1214        End of Back to top
1215    ---------------------------------------- */
1216
1217  /* ----------------------------------------
1218        Preloader
1219    ---------------------------------------- */
1220
1221  App.modules.preloader = function () {
1222      $('body').addClass('loaded');
1223      
1224      $('.simple-preloader').delay(200).fadeOut(750, function(){
1225          $('.simple-preloader').remove();
1226      });
1227  }
1228
1229  /* ----------------------------------------
1230        End of Preloader
1231    ---------------------------------------- */
1232
1233  /* ----------------------------------------
1234        Dropdown
1235    ---------------------------------------- */
1236
1237  App.modules.dropdown = {}
1238
1239  App.modules.dropdown.config = {
1240    uncloseable: '.lnt-dropdown, .select2-container--mad',
1241    cssPrefix: 'lnt-',
1242    availableError: 30,
1243    rtl: App.RTL,
1244    classMap: {
1245      active: 'dropdown--opened',
1246      container: 'dropdown',
1247      title: 'dropdown-title',
1248      element: 'dropdown-element',
1249      leftPlaced: 'dropdown-element--x-left',
1250      rightPlaced: 'dropdown-element--x-right',
1251      topPlaced: 'dropdown-element--y-top'
1252    }
1253  }
1254
1255  App.modules.dropdown.init = function (config) {
1256    if (this._initialized) return
1257
1258    if ($.isPlainObject(config)) $.extend(true, this.config, config)
1259
1260    Object.defineProperties(this, {
1261      activeClass: {
1262        get: function () {
1263          return this.config.cssPrefix + this.config.classMap.active
1264        }
1265      },
1266      containerClass: {
1267        get: function () {
1268          return this.config.cssPrefix + this.config.classMap.container
1269        }
1270      },
1271      titleClass: {
1272        get: function () {
1273          return this.config.cssPrefix + this.config.classMap.title
1274        }
1275      },
1276      elementClass: {
1277        get: function () {
1278          return this.config.cssPrefix + this.config.classMap.element
1279        }
1280      },
1281      rightPlacedClass: {
1282        get: function () {
1283          return this.config.cssPrefix + this.config.classMap.rightPlaced
1284        }
1285      },
1286      leftPlacedClass: {
1287        get: function () {
1288          return this.config.cssPrefix + this.config.classMap.leftPlaced
1289        }
1290      },
1291      topPlacedClass: {
1292        get: function () {
1293          return this.config.cssPrefix + this.config.classMap.topPlaced
1294        }
1295      },
1296      $dropdowns: {
1297        get: function () {
1298          return $('.' + this.containerClass)
1299        }
1300      }
1301    })
1302
1303    this._bindEvents()
1304  }
1305
1306  App.modules.dropdown._bindEvents = function () {
1307    var self = this
1308
1309    $doc
1310      .off('click.MadDropdown')
1311      .on('click.MadDropdown', function (e) {
1312        var $target = $(e.target)
1313
1314        if (!$target.closest(self.config.uncloseable).length) {
1315          self.close(self.$dropdowns)
1316        }
1317      })
1318      .on('keydown.MadDropdown', function (event) {
1319        if (event.keyCode && event.keyCode == 27) {
1320          self.close(self.$dropdowns)
1321        }
1322      })
1323
1324    $body
1325      .off('click.MadDropdown')
1326      .on('click.MadDropdown', '.' + self.titleClass, function (e) {
1327        var $dropdown = $(this).closest('.' + self.containerClass),
1328          $others = self.$dropdowns.not($dropdown)
1329
1330        if ($dropdown.length) {
1331          self.toggle($dropdown)
1332          e.preventDefault()
1333        }
1334
1335        self.close($others)
1336      })
1337
1338    this._initialized = true
1339  }
1340
1341  App.modules.dropdown.close = function ($dropdowns) {
1342    if (!$.isjQuery($dropdowns, true)) return
1343
1344    $dropdowns
1345      .removeClass(this.activeClass)
1346      .find('.' + this.elementClass)
1347      .attr('aria-hidden', 'true')
1348      .end()
1349      .find('.' + this.titleClass)
1350      .attr('aria-expanded', 'false')
1351  }
1352
1353  App.modules.dropdown.open = function ($dropdowns) {
1354    if (!$.isjQuery($dropdowns, true)) return
1355
1356    this.fixPosition($dropdowns)
1357
1358    $dropdowns
1359      .addClass(this.activeClass)
1360      .find('.' + this.elementClass)
1361      .attr('aria-hidden', 'false')
1362      .end()
1363      .find('.' + this.titleClass)
1364      .attr('aria-expanded', 'true')
1365  }
1366
1367  App.modules.dropdown.fixPosition = function ($dropdowns) {
1368    var self = this,
1369      $w = $(window)
1370
1371    if (!$.isjQuery($dropdowns, true)) return
1372
1373    return $dropdowns.each(function (index, dropdown) {
1374      var $dropdown = $(dropdown),
1375        $element = $dropdown.find('.' + self.elementClass),
1376        dOffset
1377
1378      $element
1379        .removeClass(self.leftPlacedClass)
1380        .removeClass(self.rightPlacedClass)
1381        .removeClass(self.topPlacedClass)
1382
1383      dOffset = $element.offset()
1384
1385      // x
1386      if (dOffset.left - self.config.availableError < 0) {
1387        $element.addClass(self.leftPlacedClass)
1388      } else if (
1389        dOffset.left + $element.outerWidth() + self.config.availableError >
1390        $w.width()
1391      ) {
1392        $element.addClass(self.rightPlacedClass)
1393      }
1394
1395      // y
1396      if (
1397        dOffset.top + $element.outerHeight() + self.config.availableError >
1398        $w.scrollTop() + $w.height()
1399      ) {
1400        $element.addClass(self.topPlacedClass)
1401      }
1402    })
1403  }
1404
1405  App.modules.dropdown.toggle = function ($dropdowns) {
1406    if (!$.isjQuery($dropdowns, true)) return
1407    var self = this
1408
1409    return $dropdowns.each(function (index, dropdown) {
1410      var $dropdown = $(dropdown)
1411
1412      if ($dropdown.hasClass(self.activeClass)) self.close($dropdown)
1413      else self.open($dropdown)
1414    })
1415  }
1416
1417  /* ----------------------------------------
1418        End of Dropdown
1419    ---------------------------------------- */
1420
1421  /* ----------------------------------------
1422        Field Datepicker
1423  ---------------------------------------- */
1424
1425  App.modules.fieldDatepicker = function () {
1426    $body.on(
1427      'change.MadFieldDatepicker',
1428      'input.lnt-field-datepicker-invoker',
1429      function (event) {
1430        var $field = $(this),
1431          $markupField = $field.siblings('.lnt-field-datepicker'),
1432          $day,
1433          $yearAndMonth,
1434          $dayName,
1435          currentDate = moment($field.datepicker('getDate'))
1436
1437        if (
1438          $markupField.length &&
1439          $markupField.hasClass('lnt-field-datepicker--style-1')
1440        ) {
1441          $day = $markupField.find('.lnt-field-datepicker-day')
1442          $yearAndMonth = $markupField.find('.lnt-field-datepicker-month-year')
1443          $dayName = $markupField.find('.lnt-field-datepicker-dayname')
1444
1445          if ($day.length) {
1446            $day.text(currentDate.date())
1447          }
1448
1449          if ($yearAndMonth.length) {
1450            $yearAndMonth.text(currentDate.format('MMMM, YYYY'))
1451          }
1452
1453          if ($dayName.length) {
1454            $dayName.text(currentDate.format('dddd'))
1455          }
1456        } else if (
1457          $markupField.length &&
1458          ($markupField.hasClass('lnt-field-datepicker--style-2') ||
1459            $markupField.hasClass('lnt-field-datepicker--style-3') ||
1460            $markupField.hasClass('lnt-field-datepicker--style-4'))
1461        ) {
1462          $markupField.text(currentDate.format('dddd Do MMMM, YYYY'))
1463        }
1464      }
1465    )
1466  }
1467
1468  /* ----------------------------------------
1469          End of Field Datepicker
1470  ---------------------------------------- */
1471
1472  /* ----------------------------------------
1473        Arctic Modal
1474    ---------------------------------------- */
1475
1476  App.modules.arcticModals = {
1477    _config: {
1478      type: 'html',
1479      closeOnOverlayClick: true,
1480      overlay: {
1481        css: {
1482          backgroundColor: '#000000'
1483        }
1484      },
1485      clickableElements: null
1486    },
1487    _collection: $(),
1488    init: function (collection, config) {
1489      if (!collection || !collection.length) return
1490
1491      config = $.isPlainObject(config)
1492        ? $.extend(true, {}, this._config, config)
1493        : this._config
1494
1495      config = this._prepareCallbacks(config)
1496
1497      if (config && config.clickableElements) {
1498        $body.on('click.MadArcticModals', '.arcticmodal-container', function (
1499          e
1500        ) {
1501          var $target = $(e.target)
1502          if (!$target.closest(config.clickableElements).length) {
1503            $.arcticmodal('close')
1504          }
1505        })
1506      }
1507
1508      collection.on('click.MadArcticModals', function (e) {
1509        var $this = $(this)
1510
1511        if ($this.data('arctic-modal-type') == 'ajax') {
1512          if (!$this.data('arctic-modal-ajax-action')) {
1513            return
1514          }
1515
1516          $.arcticmodal(
1517            $.extend(true, {}, config, {
1518              type: 'ajax',
1519              url: MadAJAXData.url,
1520              ajax: {
1521                cache: false,
1522                dataType: 'html',
1523                data: {
1524                  action: $this.data('arctic-modal-ajax-action'),
1525                  data: $this.data('arctic-modal-ajax-data'),
1526                  AJAX_token: MadAJAXData.AJAX_token
1527                },
1528                success: function (data, el, response) {
1529                  data.body.html(response)
1530                }
1531              }
1532            })
1533          )
1534        } else {
1535          $($this.data('arctic-modal')).arcticmodal(config)
1536        }
1537
1538        e.preventDefault()
1539      })
1540    },
1541    _prepareCallbacks: function (config) {
1542      var beforeOpenCallback = config.beforeOpen || function () {},
1543        beforeCloseCallback = config.beforeClose || function () {},
1544        afterOpenCallback = config.afterOpen || function () {},
1545        afterCloseCallback = config.afterClose || function () {}
1546
1547      config.beforeOpen = function () {
1548        beforeOpenCallback.apply(this, Array.prototype.slice(arguments, 0))
1549      }
1550
1551      config.beforeClose = function (event) {
1552        beforeCloseCallback.apply(this, Array.prototype.slice(arguments, 0))
1553      }
1554
1555      config.afterClose = function (event) {
1556        $body.css('overflow', '')
1557
1558        afterCloseCallback.apply(this, Array.prototype.slice(arguments, 0))
1559      }
1560
1561      return config
1562    }
1563  }
1564
1565  /* ----------------------------------------
1566        End of Arctic Modal
1567    ------------------------------
1567---------- */
1568
1569  /* ----------------------------------------
1570        Alert Message Module
1571    ---------------------------------------- */
1572
1573  App.modules.alertMessage = function (options) {
1574    if (!('Handlebars' in window)) return
1575    var config = {
1576      target: $body.children().last(),
1577      type: 'info',
1578      timeout: 4000
1579    }
1580    config =
1581      options && $.isPlainObject(options)
1582        ? $.extend(true, {}, config, options)
1583        : config
1584
1585    var template =
1586      '<div class="lnt-alert-box lnt-alert-box--{{type}}" style="display: none;">\
1587                    <div class="lnt-alert-box-inner">\
1588                        {{message}}\
1589                    </div>\
1590                </div>'
1591
1592    var messageBox = $(Handlebars.compile(template)(config))
1593    messageBox
1594      .data(
1595        'timeOut',
1596        setTimeout(function () {
1597          messageBox.stop().slideUp({
1598            duration: 350,
1599            easing: 'linear',
1600            complete: function () {
1601              $(this).remove()
1602            }
1603          })
1604        }, config.timeout)
1605      )
1606      .insertAfter(config.target)
1607      .stop()
1608      .slideDown({
1609        duration: 350,
1610        easing: 'linear'
1611      })
1612  }
1613
1614  /* ----------------------------------------
1615        End of Alert Message Module
1616    ---------------------------------------- */
1617
1618  /* ----------------------------------------
1619        Section Module
1620    ---------------------------------------- */
1621
1622  App.modules.Section = {}
1623  App.modules.Section._$collection = $()
1624  App.modules.Section.config = {
1625    cssPrefix: 'lnt-',
1626    resizeDelay: 10,
1627    boddyPaddings: false,
1628    classMap: {
1629      loading: 'section--loading',
1630      stretched: 'section--stretched',
1631      stretchedContent: 'section--stretched-content',
1632      stretchedContentNoPadding: 'section--stretched-content-no-px',
1633      bgColorElementClass: 'colorizer-bg-color',
1634      bgImageElementClass: 'colorizer-bg-image'
1635    }
1636  }
1637
1638  Object.defineProperties(App.modules.Section, {
1639    bgColorElementClass: {
1640      get: function () {
1641        return this.config.cssPrefix + this.config.classMap.bgColorElementClass
1642      }
1643    },
1644    bgImageElementClass: {
1645      get: function () {
1646        return this.config.cssPrefix + this.config.classMap.bgImageElementClass
1647      }
1648    },
1649    stretchedClass: {
1650      get: function () {
1651        return this.config.cssPrefix + this.config.classMap.stretched
1652      }
1653    },
1654    stretchedContentClass: {
1655      get: function () {
1656        return this.config.cssPrefix + this.config.classMap.stretchedContent
1657      }
1658    },
1659    stretchedContentNoPaddingClass: {
1660      get: function () {
1661        return (
1662          this.config.cssPrefix + this.config.classMap.stretchedContentNoPadding
1663        )
1664      }
1665    },
1666    loadingClass: {
1667      get: function () {
1668        return this.config.cssPrefix + this.config.classMap.loading
1669      }
1670    }
1671  })
1672
1673  App.modules.Section.changeConfig = function (config) {
1674    return $.extend(true, this.config, config)
1675  }
1676
1677  App.modules.Section.init = function ($collection) {
1678    var self = this
1679
1680    if (!$.isjQuery($collection, true)) return
1681
1682    if (!this._bindedGlobalEvents) this._bindGlobalEvents()
1683
1684    return $collection.each(function (index, section) {
1685      var $section = $(section)
1686
1687      if (self._$collection.filter($section).length) return
1688
1689      self.build($section)
1690      self._$collection = self._$collection.add($section)
1691    })
1692  }
1693
1694  App.modules.Section._bindGlobalEvents = function () {
1695    var self = this
1696
1697    $(window).on('resize.App.modules.Section', function () {
1698      if (self._resizeTimeOutId) clearTimeout(self._resizeTimeOutId)
1699
1700      self._resizeTimeOutId = setTimeout(function () {
1701        self.rebuild()
1702      }, self.config.resizeDelay)
1703    })
1704  }
1705
1706  App.modules.Section.rebuild = function () {
1707    var self = this
1708
1709    return this._$collection.each(function (index, section) {
1710      var $section = $(section)
1711
1712      self.reset($section).build($section)
1713    })
1714  }
1715
1716  App.modules.Section.reset = function ($section) {
1717    if (!$.isjQuery($section, true)) return
1718
1719    $section.css({
1720      'margin-left': '',
1721      'margin-right': ''
1722    })
1723
1724    return this
1725  }
1726
1727  App.modules.Section.build = function ($section) {
1728    if (!$.isjQuery($section, true)) return
1729
1730    if ($section.hasClass(this.stretchedClass)) {
1731      this.stretch($section)
1732    } else if (
1733      $section.hasClass(this.stretchedContentClass) ||
1734      $section.hasClass(this.stretchedContentNoPaddingClass)
1735    ) {
1736      this.stretchContent($section)
1737    }
1738
1739    return this
1740  }
1741
1742  App.modules.Section.getDocumentGeometry = function () {
1743    return {
1744      'padding-left': parseInt($body.css('padding-left'), 10),
1745      'padding-right': parseInt($body.css('padding-right'), 10)
1746    }
1747  }
1748
1749  App.modules.Section.stretch = function ($section) {
1750    var $bgs, xOffsetDiff, documentGeometry
1751
1752    if (!$.isjQuery($section, true)) return
1753
1754    $bgs = $section.find(
1755      '.' + this.bgColorElementClass + ', .' + this.bgImageElementClass
1756    )
1757
1758    if (!$bgs.length) return
1759
1760    xOffsetDiff = $section.offset().left
1761    documentGeometry = this.getDocumentGeometry()
1762
1763    if (xOffsetDiff > 0) {
1764      $bgs.css({
1765        left: (xOffsetDiff - documentGeometry['padding-left']) / -1,
1766        right: (xOffsetDiff - documentGeometry['padding-right']) / -1
1767      })
1768    }
1769
1770    $section
1771      .removeClass(this.loadingClass)
1772      .trigger('stretched.mad.Section', [$section])
1773
1774    return $section
1775  }
1776
1777  App.modules.Section.stretchContent = function ($section) {
1778    var xOffsetDiff, documentGeometry
1779
1780    if (!$.isjQuery($section) || !$section.length) return
1781
1782    xOffsetDiff = $section.offset().left
1783    documentGeometry = this.getDocumentGeometry()
1784
1785    if (xOffsetDiff > 0) {
1786      $section.css({
1787        'margin-left': (xOffsetDiff - documentGeometry['padding-left']) / -1,
1788        'margin-right': (xOffsetDiff - documentGeometry['padding-right']) / -1
1789      })
1790    }
1791
1792    $section
1793      .removeClass(this.loadingClass)
1794      .trigger('stretched.mad.Section', [$section])
1795
1796    return $section
1797  }
1798
1799  /* ----------------------------------------
1800        End of Section Module
1801    ---------------------------------------- */
1802
1803  /* ----------------------------------------
1804        Colorizer
1805     ---------------------------------------- */
1806
1807  App.helpers.Colorizer = {}
1808  App.helpers.Colorizer.config = {
1809    cssPrefix: 'lnt-',
1810    classMap: {
1811      bgColorElement: 'colorizer-bg-color',
1812      bgImageElement: 'colorizer-bg-image',
1813      parallax: 'colorizer--parallax'
1814    },
1815    afterInit: function () {}
1816  }
1817
1818  Object.defineProperties(App.helpers.Colorizer, {
1819    bgColorElementClass: {
1820      get: function () {
1821        return this.config.cssPrefix + this.config.classMap.bgColorElement
1822      }
1823    },
1824    bgImageElementClass: {
1825      get: function () {
1826        return this.config.cssPrefix + this.config.classMap.bgImageElement
1827      }
1828    },
1829    parallaxClass: {
1830      get: function () {
1831        return this.config.cssPrefix + this.config.classMap.parallax
1832      }
1833    }
1834  })
1835
1836  /**
1837   *
1838   * @param {jQuery} $collection - collection of elements to colorize
1839   * @returns {jQuery} $collection
1840   */
1841  App.helpers.Colorizer.init = function ($collection, config) {
1842    var self = this
1843
1844    if (!$.isjQuery($collection, true)) return $collection
1845
1846    this.config = $.extend(true, {}, this.config, config)
1847
1848    $collection.each(function (index, element) {
1849      var $element = $(element)
1850
1851      if (!self.hasBGColorElement($element)) {
1852        self.appendBGColorElement($element)
1853      }
1854
1855      if (!self.hasBGImageElement($element) && $element.data('bg-image-src')) {
1856        self.appendBGImageElement($element)
1857      }
1858    })
1859
1860    this.config.afterInit.call(this)
1861
1862    return $collection
1863  }
1864
1865  /**
1866   *
1867   * @param {jQuery} $element
1868   * @returns {Boolean}
1869   */
1870  App.helpers.Colorizer.hasBGColorElement = function ($element) {
1871    return $element.children('.' + this.bgColorElementClass).length
1872  }
1873
1874  /**
1875   *
1876   * @param {jQuery} $element
1877   * @returns {Boolean}
1878   */
1879  App.helpers.Colorizer.hasBGImageElement = function ($element) {
1880    return $element.children('.' + this.bgImageElementClass).length
1881  }
1882
1883  /**
1884   *
1885   * @param {jQuery} $element
1886   * @returns {jQuery}
1887   */
1888  App.helpers.Colorizer.appendBGColorElement = function ($element) {
1889    var self = this,
1890      $bgColorElement = $('<div></div>', {
1891        class: self.bgColorElementClass
1892      })
1893
1894    return $element.prepend($bgColorElement)
1895  }
1896
1897  /**
1898   *
1899   * @param {jQuery} $element
1900   * @returns {jQuery}
1901   */
1902  App.helpers.Colorizer.appendBGImageElement = function ($element) {
1903    var self = this,
1904      src = $element.data('bg-image-src'),
1905      $bgImageElement = $('<div></div>', {
1906        class: self.bgImageElementClass
1907      })
1908
1909    $bgImageElement.css('background-image', 'url("' + src + '")')
1910    $element.prepend($bgImageElement)
1911
1912    return $element
1913  }
1914
1915  /* ----------------------------------------
1916        End of Colorizer
1917    ---------------------------------------- */
1918
1919  /* ----------------------------------------
1920        Critical Error
1921    ---------------------------------------- */
1922
1923  App.helpers.showCriticalFullScreenMessage = function (config) {
1924    var _config = {
1925        after: '',
1926        before: '',
1927        content: '',
1928        cssPrefix: 'lnt-',
1929        cssClass: ''
1930      },
1931      template =
1932        '<div class="%cssPrefix%fullscreen-message %cssClass% %cssPrefix%aligner">\
1933                            <div class="%cssPrefix%aligner-outer">\
1934                                <div class="%cssPrefix%aligner-inner">\
1935                                    <div class="%cssPrefix%fullscreen-message-before">%before%</div>\
1936                                    <div class="%cssPrefix%fullscreen-message-content">%content%</div>\
1937                                    <div class="%cssPrefix%fullscreen-message-after">%after%</div>\
1938                                </div>\
1939                            </div>\
1940                        </div>'
1941
1942    config = $.extend(_config, config)
1943
1944    for (var option in config) {
1945      template = template.replace(
1946        new RegExp('%' + option + '%', 'g'),
1947        config[option]
1948      )
1949    }
1950
1951    $body
1952      .html('')
1953      .addClass(config.cssPrefix + 'body--has-critical-fullscreen-message')
1954      .append(template)
1955  }
1956
1957  /* ----------------------------------------
1958        End of Critical Error
1959    ---------------------------------------- */
1960
1961  /* ----------------------------------------
1962        Dynamic background image
1963    ---------------------------------------- */
1964  ;(App.helpers.dynamicBgImage = function (collection) {
1965    collection = $.isjQuery(collection) ? collection : $('[data-bg-image-src]')
1966    if (!collection.length) return
1967
1968    return collection.each(function (i, el) {
1969      var $this = $(el)
1970      if (!$this.data('bg-image-src')) return
1971
1972      $this.css('background-image', 'url("' + $this.data('bg-image-src') + '")')
1973    })
1974  }),
1975    /* ----------------------------------------
1976            End of Dynamic background image
1977        ---------------------------------------- */
1978
1979    /* ----------------------------------------
1980            Toggled fields
1981        ---------------------------------------- */
1982
1983    (App.helpers.toggledFields = function () {
1984      $body
1985        .off('click.MadToggledFields')
1986        .on('click.MadToggledFields', '.lnt-toggled-fields-invoker', function (
1987          event
1988        ) {
1989          var $this = $(this),
1990            $fields = $this.siblings('.lnt-toggled-fields')
1991
1992          $this.toggleClass('lnt-toggled-fields-invoker--opened')
1993
1994          if ($fields.length) {
1995            $fields.stop().slideToggle({
1996              duration: App.ANIMATIONDURATION,
1997              easing: App.ANIMATIONEASING
1998            })
1999          }
2000        })
2001    })
2002
2003  /* ----------------------------------------
2004        End of Toggled fields
2005    ---------------------------------------- */
2006
2007  /* ----------------------------------------
2008        Calendar Widget
2009    ---------------------------------------- */
2010
2011  App.helpers.calendarWidget = function () {
2012    var $calendar = $('.calendar_wrap'),
2013      $caption,
2014      $prev,
2015      $next
2016    if (!$calendar.length || $calendar.hasClass('lnt-calendar-rendered')) return
2017
2018    $caption = $calendar.find('caption')
2019
2020    if (!$caption.length) return
2021
2022    $prev = $calendar.find('#prev > a')
2023    $next = $calendar.find('#next > a')
2024
2025    if ($prev.length) {
2026      $('<a></a>', {
2027        class: 'calendar-caption-prev lnt-ln--independent',
2028        html: App.RTL
2029          ? '<i class="icon licon-arrow-right"></i>'
2030          : '<i class="icon licon-arrow-left"></i>',
2031        href: $prev.attr('href')
2032      }).appendTo($caption)
2033    }
2034
2035    if ($next.length) {
2036      $('<a></a>', {
2037        class: 'calendar-caption-next lnt-ln--independent',
2038        html: App.RTL
2039          ? '<i class="icon licon-arrow-left"></i>'
2040          : '<i class="icon licon-arrow-right"></i>',
2041        href: $next.attr('href')
2042      }).appendTo($caption)
2043    }
2044
2045    $calendar.addClass('lnt-calendar-rendered')
2046  }
2047
2048  /* ----------------------------------------
2049        End of Calendar Widget
2050    ---------------------------------------- */
2051
2052  /* ----------------------------------------
2053        Owl Carousel helpers
2054    ---------------------------------------- */
2055
2056  App.baseOwlSettings = {
2057    items: 1,
2058    margin: 32,
2059    nav: true,
2060    loop: true,
2061    rtl: App.RTL,
2062    dots: true,
2063    autoplayHoverPause: true,
2064    smartSpeed: App.ANIMATIONDURATION,
2065    fluidSpeed: App.ANIMATIONDURATION,
2066    autoplaySpeed: App.ANIMATIONDURATION,
2067    navSpeed: App.ANIMATIONDURATION,
2068    dotsSpeed: App.ANIMATIONDURATION,
2069    dragEndSpeed: App.ANIMATIONDURATION
2070  }
2071
2072  App.helpers.owlAdaptive = function (collection) {
2073    collection = collection ? collection : $('.owl-carousel')
2074    if (!collection.length) return
2075  }
2076
2077  App.helpers.owlContainerHeight = function (owl, resized) {
2078    if (owl.hasClass('owl-carousel--vadaptive')) return
2079
2080    setTimeout(function () {
2081      var max = 0,
2082        items = owl.find('.owl-item'),
2083        activeItems = items.filter('.active').children()
2084
2085      items.children().css('height', 'auto')
2086
2087      activeItems.each(function (i, el) {
2088        var $this = $(el),
2089          height = $this.outerHeight()
2090
2091        if (height > max) max = height
2092      })
2093
2094      owl
2095        .find('.owl-stage-outer')
2096        .stop()
2097        .animate(
2098          {
2099            height: max
2100          },
2101          {
2102            duration: 150,
2103            complete: function () {
2104              if (!resized) return
2105              App.helpers.owlUpdateIsotopeParent($(this))
2106            }
2107          }
2108        )
2109    }, 1)
2110  }
2111
2112  App.helpers.owlUpdateIsotopeParent = function ($owl) {
2113    var $isotope = $owl.closest('.lnt-grid--isotope')
2114    if ($isotope.length) $isotope.isotope('layout')
2115  }
2116
2117  App.helpers.owlNav = function (owl) {
2118    setTimeout(function () {
2119      var settings = owl.data('owl.carousel').settings
2120      if (settings.autoplay || settings.loop) return
2121
2122      var prev = owl.find('.owl-prev'),
2123        next = owl.find('.owl-next')
2124
2125      if (
2126        owl
2127          .find('.owl-item')
2128          .first()
2129          .hasClass('active')
2130      )
2131        prev.addClass('lnt-disabled')
2132      else prev.removeClass('lnt-disabled')
2133
2134      if (
2135        owl
2136          .find('.owl-item')
2137          .last()
2138          .hasClass('active')
2139      )
2140        next.addClass('lnt-disabled')
2141      else next.removeClass('lnt-disabled')
2142    }, 100)
2143  }
2144
2145  App.helpers.owlSettings = function (settings) {
2146    return $.extend(true, {}, App.baseOwlSettings, settings)
2147  }
2148
2149  App.helpers.owlSync = {
2150    init: function () {
2151      this.collection = $('.owl-carousel[data-sync]')
2152      if (!this.collection.length) return
2153
2154      this.prepare()
2155    },
2156
2157    prepare: function () {
2158      this.collection.each(function (i, el) {
2159        var $this = $(el),
2160          sync = $($this.data('sync'))
2161
2162        sync.on('changed.owl.carousel', function (e) {
2163          var index = e.item.index
2164
2165          if (!sync.data('afterClicked'))
2166            $this.trigger('to.owl.carousel', [index, 350, true])
2167
2168          sync.data('afterClicked', false)
2169        })
2170
2171        $this.on('prev.owl.carousel', function () {
2172          sync.trigger('prev.owl.carousel')
2173        })
2174
2175        $this.on('next.owl.carousel', function () {
2176          sync.trigger('next.owl.carousel')
2177        })
2178
2179        $this.on('click.owlSync', '.owl-item', function (e) {
2180          e.preventDefault()
2181
2182          var index = $(this).index()
2183
2184          sync.data('afterClicked', true)
2185
2186          sync.trigger('to.owl.carousel', [index, 350, true])
2187        })
2188      })
2189    }
2190  }
2191
2192  /* ----------------------------------------
2193        End of Owl Carousel helpers
2194    ---------------------------------------- */
2195
2196  /* ----------------------------------------
2197        Rating
2198    ---------------------------------------- */
2199
2200  function MadRating ($element, config) {
2201    this.$element = $element
2202    this.config = $.extend(MadRating.config, config)
2203
2204    Object.defineProperties(this, {
2205      bottomLevelElementClass: {
2206        get: function () {
2207          return this.config.cssPrefix + this.config.classMap.bottomLevelElement
2208        }
2209      },
2210      topLevelElementClass: {
2211        get: function () {
2212          return this.config.cssPrefix + this.config.classMap.topLevelElement
2213        }
2214      }
2215    })
2216  }
2217
2218  MadRating.config = {
2219    cssPrefix: 'lnt-',
2220    bottomLevelElements: '<i class="icon licon-star"></i>',
2221    topLevelElements: '<i class="icon licon-star"></i>',
2222    estimate: 5,
2223    rtl: App.RTL,
2224    classMap: {
2225      bottomLevelElement: 'rating-bottom-level',
2226      topLevelElement: 'rating-top-level'
2227    }
2228  }
2229
2230  MadRating.prototype.init = function () {
2231    this._buildMarkup()
2232
2233    return this
2234  }
2235
2236  MadRating.prototype._buildMarkup = function () {
2237    var _self = this
2238
2239    if (this._markupBuilded) return
2240
2241    this.$element.css({
2242      position: 'relative',
2243      display: 'inline-block'
2244    })
2245
2246    if (this.config.topLevelElements) {
2247      this.$topLevelEl = $('<div></div>', {
2248        class: _self.topLevelElementClass,
2249        style:
2250          'position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; white-space: nowrap; overflow: hidden;'
2251      })
2252
2253      for (var i = 0; i < 5; i++)
2254        this.$topLevelEl.append(this.config.topLevelElements)
2255
2256      this.$element.append(this.$topLevelEl)
2257    }
2258
2259    if (this.config.bottomLevelElements) {
2260      this.$bottomLevelEl = $('<div></div>', {
2261        class: _self.bottomLevelElementClass,
2262        style: 'position: relative; z-index: 1;'
2263      })
2264
2265      for (var i = 0; i < 5; i++)
2266        this.$bottomLevelEl.append(this.config.bottomLevelElements)
2267
2268      this.$element.append(this.$bottomLevelEl)
2269    }
2270
2271    this.update(this.config.estimate)
2272
2273    this._markupBuilded = true
2274
2275    this.$element.trigger('built.mad.Rating', [this.$element])
2276  }
2277
2278  MadRating.prototype.update = function (estimate) {
2279    if (this.config.topLevelElements) {
2280      this.$topLevelEl.css('width', (estimate / 5) * 100 + '%')
2281    } else {
2282      if (this.config.bottomLevelElements) {
2283        this.$bottomLevelEl.html('')
2284        for (var i = 0; i < Math.round(estimate); i++)
2285          this.$bottomLevelEl.append(this.config.bottomLevelElements)
2286      }
2287    }
2288  }
2289
2290  App.helpers.rating = function ($collection, config) {
2291    config = config || {}
2292
2293    if (!$.isjQuery($collection) || !$collection.length) return $collection
2294
2295    return $collection.each(function (index, element) {
2296      var $element = $(element),
2297        elementConfig = $.extend(true, {}, config, {
2298          estimate: $element.data('estimate')
2299        })
2300
2301      if (!$element.data('Rating'))
2302        $element.data('Rating', new MadRating($element, elementConfig).init())
2303    })
2304  }
2305
2306  App.helpers.ratingField = function ($collection) {
2307    if (!$.isjQuery($collection)) return
2308
2309    $collection.on('click.MadRatingField', '.icon', function (event) {
2310      var $icon = $(this),
2311        $rating = $icon.closest('[data-estimate]'),
2312        index = $icon.index() + 1,
2313        Rating = $rating.data('Rating'),
2314        $field = $rating.siblings('input[type="hidden"]')
2315
2316      if (Rating) {
2317        Rating.update(App.RTL ? 6 - index : index)
2318
2319        if ($field.length) {
2320          $field.val(index)
2321        }
2322      }
2323
2324      event.preventDefault()
2325      event.stopPropagation()
2326    })
2327  }
2328
2329  /* ----------------------------------------
2330        End of Rating
2331    ---------------------------------------- */
2332
2333  /* ----------------------------------------
2334        gridOwl
2335    ---------------------------------------- */
2336
2337  App.helpers.gridOwl = {
2338    _commonLayoutConfig: {
2339      'columns-4': {
2340        responsive: {
2341          0: {
2342            items: 1
2343          },
2344          768: {
2345            items: 2
2346          },
2347          1200: {
2348            items: 3
2349          },
2350          1420: {
2351            items: 4
2352          }
2353        }
2354      },
2355      'columns-4-sidebar': {
2356        responsive: {
2357          0: {
2358            items: 1
2359          },
2360          992: {
2361            items: 2
2362          },
2363          1200: {
2364            items: 3
2365          }
2366        }
2367      },
2368      'columns-3': {
2369        responsive: {
2370          0: {
2371            items: 1
2372          },
2373          768: {
2374            items: 2
2375          },
2376          1200: {
2377            items: 3
2378          }
2379        }
2380      },
2381      'columns-3-sidebar': {
2382        responsive: {
2383          0: {
2384            items: 1
2385          },
2386          992: {
2387            items: 2
2388          },
2389          1200: {
2390            items: 3
2391          }
2392        }
2393      },
2394      'columns-2': {
2395        responsive: {
2396          0: {
2397            items: 1
2398          },
2399          820: {
2400            items: 2
2401          }
2402        }
2403      },
2404      'columns-2-sidebar': {
2405        responsive: {
2406          0: {
2407            items: 1
2408          },
2409          992: {
2410            items: 2
2411          }
2412        }
2413      }
2414    },
2415    _$collection: $(),
2416    _individualConfigs: {}
2417  }
2418
2419  /**
2420   * Initializes the gridOwl helper
2421   * @param {jQuery} $collection
2422   *
2423   * @returns {jQuery}
2424   */
2425  App.helpers.gridOwl.init = function ($collection) {
2426    var self = this
2427
2428    $collection = $.isjQuery($collection)
2429      ? $collection
2430      : $('.lnt-grid.owl-carousel')
2431
2432    $collection.each(function (index, element) {
2433      var $element = $(element)
2434
2435      if (self._$collection.filter($element).length) return
2436
2437      self._$collection = self._$collection.add($element)
2438    })
2439
2440    this.update()
2441
2442    return $collection
2443  }
2444
2445  /**
2446   * Modifies config for the elements with parents that match specified selector.
2447   * @param {String} selector
2448   * @param {Object} config
2449   *
2450   * @returns {Object}
2451   */
2452  App.helpers.gridOwl.extendConfigFor = function (selector, config) {
2453    this._individualConfigs[selector] = config
2454
2455    return this
2456  }
2457
2458  /**
2459   * Adds new carousel to the collection
2460   *
2461   * @param {jQuery} $carousel
2462   *
2463   * @returns {Object}
2464   */
2465  App.helpers.gridOwl.add = function ($carousel) {
2466    if ($.isjQuery($carousel) && !this._$collection.filter($carousel).length) {
2467      this._$collection = this._$collection.add($carousel)
2468      this.update()
2469    }
2470
2471    return this
2472  }
2473
2474  /**
2475   * Initializes not initialized carousels.
2476   *
2477   * @returns {Object}
2478   */
2479  App.helpers.gridOwl.update = function () {
2480    var self = this
2481
2482    this._$collection.each(function (index, element) {
2483      var $element = $(element),
2484        config = {},
2485        columnsCount,
2486        layoutConfigProp
2487
2488      if ($element.data('owl.carousel')) return
2489
2490      // detect layout settings
2491      columnsCount = self._getColumnsCount($element)
2492
2493      if (columnsCount > 1) {
2494        // check if sidebar
2495        if ($element.closest('.lnt-has-sidebar').length) {
2496          layoutConfigProp = 'columns-' + columnsCount + '-sidebar'
2497        } else {
2498          layoutConfigProp = 'columns-' + columnsCount
2499        }
2500
2501        $.extend(config, self._commonLayoutConfig[layoutConfigProp])
2502      }
2503
2504      for (var selector in self._individualConfigs) {
2505        if ($element.closest(selector).length) {
2506          $.extend(config, self._individualConfigs[selector])
2507
2508          if ($element.closest('.lnt-has-sidebar').length) {
2509            config.responsive = config.responsiveWithSidebar
2510          }
2511        }
2512      }
2513
2514      $element.owlCarousel(App.helpers.owlSettings(config))
2515    })
2516
2517    return this
2518  }
2519
2520  /**
2521   * Returns amount of columns in the specified element.
2522   *
2523   * @param {jQuery} $element
2524   * @returns {Number}
2525   */
2526  App.helpers.gridOwl._getColumnsCount = function ($element) {
2527    if ($element.hasClass('lnt-grid--cols-4')) return 4
2528    else if ($element.hasClass('lnt-grid--cols-3')) return 3
2529    else if ($element.hasClass('lnt-grid--cols-2')) return 2
2530    else if ($element.hasClass('lnt-grid--cols-5')) return 5
2531
2532    return 1
2533  }
2534
2535  /* ----------------------------------------
2536        End of gridOwl
2537    ---------------------------------------- */
2538
2539  /* ----------------------------------------
2540        Google Maps
2541    ---------------------------------------- */
2542
2543  if ($('#googleMap').length) {
2544    function loadMap () {
2545      var mapProp = {
2546        center: { lat: 53.79945328426041, lng: -1.368663876984829 },
2547        zoom: 9,
2548        mapTypeId: google.maps.MapTypeId.ROADMAP
2549      }
2550
2551      var map = document.getElementById('googleMap')
2552
2553      if (map !== null) {
2554        var map = new google.maps.Map(
2555          document.getElementById('googleMap'),
2556          mapProp
2557        )
2558      }
2559
2560      var bodyStyles = window.getComputedStyle(document.body)
2561
2562      var markerColor = bodyStyles.getPropertyValue('--color-primary')
2563
2564      var marker = new google.maps.Marker({
2565        position: { lat: 53.79945328426041, lng: -1.368663876984829 },
2566        map: map,
2567          /*
2568        icon: {
2569          path:
2570            'M24.5001 0.195312C28.6377 0.196517 32.7064 1.23128 36.3202 3.20144C39.934 5.1716 42.9732 8.01183 45.1493 11.4527C47.3254 14.8936 48.5663 18.821 48.7544 22.8624C48.9425 26.9038 48.0714 30.9252 46.2239 34.5451C43.0976 40.6518 27.2513 50.2589 24.4617 61.8072C19.9345 50.5984 5.90263 40.6518 2.7763 34.5451C0.928772 30.9252 0.0577348 26.9038 0.24581 22.8624C0.433885 18.821 1.67484 14.8936 3.85095 11.4527C6.02706 8.01183 9.06617 5.1716 12.68 3.20144C16.2938 1.23128 20.3625 0.196517 24.5001 0.195312ZM31.1879 13.8927C29.2083 12.5994 26.8809 11.9091 24.5001 11.9091C21.3075 11.9091 18.2456 13.1491 15.9881 15.3564C13.7306 17.5637 12.4623 20.5575 12.4623 23.6791C12.4623 26.007 13.1683 28.2826 14.4911 30.2182C15.8138 32.1538 17.6938 33.6623 19.8934 34.5532C22.0931 35.444 24.5135 35.6771 26.8486 35.223C29.1837 34.7688 31.3286 33.6478 33.0121 32.0018C34.6956 30.3557 35.8421 28.2585 36.3066 25.9753C36.771 23.6922 36.5327 21.3256 35.6216 19.1749C34.7104 17.0242 33.1675 15.186 31.1879 13.8927Z',
2571          fillColor: markerColor,
2572          strokeWeight: 0,
2573          fillOpacity: 1,
2574          anchorPosition: new google.maps.Point(90,99)
2575        }*/
2576      })
2577
2578      marker.setMap(map)
2579
2580      //Zoom to 7 when clicked on marker
2581      /*
2582        google.maps.event.addListener(marker, 'click', function () {
2583        map.setZoom(9)
2584        map.setCenter(marker.getPosition())
2585      })
2586      */
2587    }
2588
2589    google.maps.event.addDomListener(window, 'load', loadMap)
2590  }
2591
2592  /* ----------------------------------------
2593        End of Google Maps
2594    ---------------------------------------- */
2595
2596  /* ----------------------------------------
2597        Shop item close
2598    ---------------------------------------- */
2599
2600  /**
2601   * Initialize global close event
2602   * @return Object Core;
2603   **/
2604  App.modules.closeBtn = function () {
2605    $('body').on(
2606      'click.globalclose',
2607      '.lnt-close-item:not(.shopping-cart-full .lnt-close-item)',
2608      function (e) {
2609        e.preventDefault()
2610        $(this)
2611          .parent()
2612          .stop()
2613          .animate(
2614            {
2615              opacity: 0
2616            },
2617            function () {
2618              $(this)
2619                .stop()
2620                .slideUp(function () {
2621                  $(this).remove()
2622                })
2623            }
2624          )
2625      }
2626    )
2627    var c = $('.shopping-cart-full')
2628    c.on('click.removeProduct', '.lnt-close-item', function (e) {
2629      e.preventDefault()
2630      $(this)
2631        .closest('tr')
2632        .stop()
2633        .fadeOut(function () {
2634          $(this).remove()
2635        })
2636    })
2637    return this
2638  }
2639
2640  /* ----------------------------------------
2641        Shop item close
2642    ---------------------------------------- */
2643
2644  /**
2645   * Emulates single accordion item
2646   * @param Function callback
2647   * @return jQuery collection;
2648   **/
2649  ;(App.modules.hiddenSections = function (callback) {
2650    var collection = $('.hidden-section')
2651    if (!collection.length) return
2652
2653    collection.each(function (i, el) {
2654      $(el)
2655        .find('.content')
2656        .hide()
2657    })
2658
2659    collection.on('click.hidden', '.invoker', function (e) {
2660      e.preventDefault()
2661
2662      $(this).toggleClass('toggled')
2663
2664      var content = $(this)
2665        .closest('.hidden-section')
2666        .find('.content')
2667
2668      content.slideToggle({
2669        duration: 500,
2670        easing: 'easeOutQuint',
2671        complete: callback ? callback : function () {}
2672      })
2673    })
2674
2675    return collection
2676  }),
2677    $.extend({
2678      isjQuery: function (element, elementExists) {
2679        if (element === undefined || element === null) return false
2680
2681        if (elementExists === undefined) {
2682          return element instanceof jQuery
2683        } else {
2684          return $.isjQuery(element) && element.length
2685        }
2686      }
2687    })
2688
2689  $.fn.extend({
2690    jQueryImagesLoaded: function () {
2691      var $imgs = this.find('img[src!=""]')
2692
2693      if (!$imgs.length) {
2694        return $.Deferred()
2695          .resolve()
2696          .promise()
2697      }
2698
2699      var dfds = []
2700
2701      $imgs.each(function () {
2702        var dfd = $.Deferred()
2703        dfds.push(dfd)
2704        var img = new Image()
2705        img.onload = function () {
2706          dfd.resolve()
2707        }
2708        img.onerror = function () {
2709          dfd.resolve()
2710        }
2711        img.src = this.src
2712      })
2713
2714      return $.when.apply($, dfds)
2715    }
2716  })
2717
2718  $doc.on('beforeClose', function (event) {
2719    if ($(event.target).hasClass('lnt-modal')) {
2720      event.stopImmediatePropagation()
2721    }
2722  })
2723
2724  $doc.ready(function () {
2725    App.afterDOMReady()
2726  })
2727
2728  $(window).on('load', function () {
2729    DOMDfd.done(function () {
2730      App.afterOuterResourcesLoaded()
2731    })
2732
2733    // $('.menu-item a').on("click", function (e) {
2734    //     e.preventDefault();
2735    // });
2736
2737    if ($('.lnt-datepicker').length) {
2738      $('.lnt-datepicker-body').on('click', function () {
2739        $(this)
2740          .parent()
2741          .toggleClass('lnt-toggled')
2742        $(this)
2743          .next('.lnt-datepicker-select')
2744          .slideToggle()
2745      })
2746      const $canvas = $('.lnt-datepicker-select, .lnt-datepicker-body')
2747
2748      $(document).mouseup(e => {
2749        if (
2750          !$canvas.is(e.target) && // if the target of the click isn't the container...
2751          $canvas.has(e.target).length === 0
2752        ) {
2753          // ... nor a descendant of the container
2754          $('.lnt-datepicker-body').removeClass('lnt-filter-opened')
2755          $('.lnt-datepicker-select').slideUp()
2756        }
2757      })
2758    }
2759
2760    if ($('.lnt-slider').length) {
2761      $('.lnt-slider').owlCarousel({
2762        animateOut: 'fadeOut',
2763        loop: true,
2764        margin: 10,
2765        nav: true,
2766        responsive: {
2767          0: {
2768            items: 1
2769          },
2770          600: {
2771            items: 1
2772          },
2773          1000: {
2774            items: 1
2775          }
2776        }
2777      })
2778    }
2779
2780    if ($('.lnt-owl-moving').length) {
2781      $('.lnt-owl-moving').on('mouseenter', function () {
2782        var position = $(this)
2783
2784        position.find('.owl-nav > button > span').html('')
2785
2786        var mouseX = 0,
2787          mouseY = 0,
2788          limitX = 900 - 96,
2789          limitY = 1000 - 96
2790        position.mousemove(function (e) {
2791          var offset = position.find('.owl-prev').offset()
2792          mouseX = Math.min(e.pageX - offset.left, limitX)
2793          mouseY = Math.min(e.pageY - offset.top, limitY)
2794          if (mouseX < 0) mouseX = 0
2795          if (mouseY < 0) mouseY = 0
2796        })
2797
2798        // cache the selector
2799        var follower = position.find('.owl-prev > span')
2800        var xp = 0,
2801          yp = 0
2802        var loop = setInterval(function () {
2803          // change 12 to alter damping higher is slower
2804          xp += (mouseX - xp) / 1
2805          yp += (mouseY - yp) / 1
2806          follower.css({ left: xp, top: yp })
2807        }, 1)
2808
2809        var mouseX2 = 0,
2810          mouseY2 = 0,
2811          limitX2 = 900 - 96,
2812          limitY2 = 1000 - 96
2813
2814        position.mousemove(function (e) {
2815          var offset2 = position.find('.owl-next').offset()
2816          mouseX2 = Math.min(e.pageX - offset2.left, limitX2)
2817          mouseY2 = Math.min(e.pageY - offset2.top, limitY2)
2818          if (mouseX2 < 0) mouseX2 = 0
2819          if (mouseY2 < 0) mouseY2 = 0
2820        })
2821
2822        // cache the selector
2823        var follower2 = position.find('.owl-next > span')
2824        var xp2 = 0,
2825          yp2 = 0
2826        var loop2 = setInterval(function () {
2827          // change 12 to alter damping higher is slower
2828          xp2 += (mouseX2 - xp2) / 1
2829          yp2 += (mouseY2 - yp2) / 1
2830          follower2.css({ left: xp2, top: yp2 })
2831        }, 1)
2832      })
2833    }
2834
2835    if ($('#lnt-nav-canvas').length) {
2836      // Vertical menu
2837
2838      $('.lnt-vr-nav > ul > li.menu-item-has-children > a').on(
2839        'click',
2840        function (e) {
2841          e.preventDefault()
2842          $(this)
2843            .next('.sub-menu')
2844            .slideToggle()
2845          $(this)
2846            .parent()
2847            .siblings()
2848            .children('.sub-menu')
2849            .slideUp()
2850        }
2851      )
2852
2853      $('#lnt-nav-btn').on('click', function (e) {
2854        e.preventDefault()
2855        if ($('.header-5').length) {
2856          $('html').toggleClass('with-src-menu')
2857        }
2858        $('.lnt-lang').toggleClass('hide')
2859        $('.lnt-header-section--sticky-xl').toggleClass('lnt-header-stationar')
2860        $(this).toggleClass('lnt-opened')
2861        $('#lnt-nav-canvas').toggleClass('lnt-nav-opened')
2862      })
2863
2864      const $canvas = $('.lnt-nav-canvas, .lnt-nav-btn')
2865
2866      $(document).mouseup(e => {
2867        if (
2868          !$canvas.is(e.target) && // if the target of the click isn't the container...
2869          $canvas.has(e.target).length === 0
2870        ) {
2871          // ... nor a descendant of the container
2872          $('.lnt-nav-canvas').removeClass('lnt-nav-opened')
2873          $('.lnt-nav-btn').removeClass('lnt-opened')
2874        }
2875      })
2876    }
2877
2878    if ($('.owl-carousel-custom-nav').length) {
2879      // Go to the next item
2880      $('.lnt-custom-next').on('click', function () {
2881        $(this)
2882          .parent()
2883          .next()
2884          .find('.owl-carousel')
2885          .trigger('next.owl.carousel')
2886      })
2887      // Go to the previous item
2888      $('.lnt-custom-prev').on('click', function () {
2889        // With optional speed parameter
2890        // Parameters has to be in square bracket '[]'
2891        $(this)
2892          .parent()
2893          .next()
2894          .find('.owl-carousel')
2895          .trigger('prev.owl.carousel', [300])
2896      })
2897    }
2898
2899    if ($('.lnt-scroll-nav').length) {
2900      var scrbtn = $('.lnt-scroll-nav > ul > li')
2901
2902      // scrbtn.on('click', function() {
2903      //     $(this).addClass('lnt-active').siblings().removeClass('lnt-active');
2904      // });
2905
2906      $('body').localScroll({
2907        hash: true,
2908        filter: '.animated',
2909        onBefore: function () {
2910          this.offset = -240
2911        }
2912      })
2913
2914      // highlight menu element on scroll
2915      calculateScroll()
2916      $(window).scroll(function (event) {
2917        calculateScroll()
2918      })
2919
2920      /*  Automatically Highlights Navigation Item */
2921      var rangeTop = 240 //rangeTop is used for changing the class a little sooner that reaching the top of the page
2922      var rangeBottom = 240 //rangeBottom is similar but used for when scrolling bottom to top
2923      function calculateScroll () {
2924        var winTop = $(window).scrollTop()
2925        var contentTop = []
2926        var contentBottom = []
2927        $('#menu')
2928          .find('a.animated')
2929          .each(function () {
2930            contentTop.push($($(this).attr('href')).offset().top)
2931            contentBottom.push(
2932              $($(this).attr('href')).offset().top +
2933                $($(this).attr('href')).height()
2934            )
2935          })
2936
2937        $.each(contentTop, function (i) {
2938          if (
2939            winTop > contentTop[i] - rangeTop &&
2940            winTop < contentBottom[i] - rangeBottom
2941          ) {
2942            $('#menu > li')
2943              .removeClass('lnt-active')
2944              .eq(i)
2945              .addClass('lnt-active')
2946          }
2947        })
2948      }
2949    }
2950
2951    if ($('#lnt-scroll-item').length) {
2952      $(document).scroll(function () {
2953        if ($(this).scrollTop() >= $('#lnt-scroll-item').offset().top + 0) {
2954          $('.lnt-header .lnt-scroll-nav').addClass('visible')
2955        } else {
2956          $('.lnt-header .lnt-scroll-nav').removeClass('visible')
2957        }
2958      })
2959    }
2960
2961    if ($('.lnt-same-height').length) {
2962      var highestBox = 0
2963      $('.lnt-same-height .lnt-gallery-item .lnt-gallery-desc').each(
2964        function () {
2965          if ($(this).height() > highestBox) {
2966            highestBox = $(this).height()
2967          }
2968        }
2969      )
2970      $('.lnt-same-height .lnt-gallery-item .lnt-gallery-desc').height(
2971        highestBox
2972      )
2973    }
2974
2975    if ($('#lnt-sync-elements').length) {
2976      $('#lnt-sync-elements .lnt-panels-title').click(function () {
2977        var myEm = $(this).attr('data-active')
2978        //alert(myEm);
2979        $('section[data-active = ' + myEm + ']')
2980          .addClass('clicked')
2981          .siblings()
2982          .removeClass('clicked')
2983      })
2984    }
2985
2986    if ($('.lnt-owl-center-auto.owl-carousel').length) {
2987      $('.lnt-owl-center-auto.owl-carousel').owlCarousel({
2988        margin: 32,
2989        loop: true,
2990          navSpeed: 1500,
2991          dragEndSpeed: 1500,
2992        rtl: App.RTL,
2993        items: 1.5,
2994        responsive: {
2995            300: {
2996              items: 1.1,
2997                margin: 12,
2998            },
2999            480: {
3000              items: 1.12,
3001                margin: 15,
3002            },
3003            768: {
3004              items: 1.12,
3005                margin: 15,
3006            },
3007            1024: {
3008              items: 1.12
3009            },
3010            1200: {
3011              items: 1.2
3012            },
3013            1400: {
3014              items: 1.3
3015            },
3016            1600: {
3017              items: 1.5
3018            }
3019        }
3020      })
3021    }
3022
3023    // appear animation
3024
3025    function animate () {
3026      $('[data-appear-animation]').each(function () {
3027        var self = $(this)
3028
3029        self.addClass('appear-animation')
3030
3031        if ($(window).width() > 1200) {
3032          self.appear(
3033            function () {
3034              var delay = self.attr('data-appear-animation-delay')
3035                ? self.attr('data-appear-animation-delay')
3036                : 1
3037
3038              if (delay > 1) self.css('animation-delay', delay + 'ms')
3039              self.addClass(self.attr('data-appear-animation'))
3040
3041              setTimeout(function () {
3042                self.addClass('appear-animation-visible')
3043              }, delay)
3044            },
3045            { accX: 0, accY: -150 }
3046          )
3047        } else {
3048          self.addClass('appear-animation-visible')
3049        }
3050      })
3051    }
3052
3053    animate()
3054
3055    $(window).on('resize', animate)
3056
3057    $(window).scroll(function () {
3058      var w = $(window).scrollTop();
3059      var e = 'translateY(' + -w / 40 + 'px)';
3060
3061      $('.lnt-img-move').css({
3062        transform: e
3063      });
3064        
3065        checkScrolled();
3066    });
3067      
3068      function checkScrolled(){
3069        var w = $(window).scrollTop();
3070        
3071        if(w>200){
3072           $('body').addClass('scrolled');
3073        }else{
3074           $('body').removeClass('scrolled');
3075        }
3076      }
3077      checkScrolled();
3078  })
3079
3080  /* ---------------------------------------------------- */
3081  /*	Elevate zoom										*/
3082  /* ---------------------------------------------------- */
3083
3084  if ($('[data-zoom-image]').length) {
3085    var button = $('.qv-preview')
3086
3087    $('#zoom-image').elevateZoom({
3088      gallery: 'thumbnails',
3089      galleryActiveClass: 'active',
3090      zoomType: 'inner',
3091      cursor: 'crosshair',
3092      responsive: true,
3093      zoomWindowFadeIn: 500,
3094      zoomWindowFadeOut: 500,
3095      easing: true,
3096      lensFadeIn: 500,
3097      lensFadeOut: 500
3098    })
3099  }
3100
3101  /* ---------------------------------------------------- */
3102  /*	Elevate zoom										*/
3103  /* ---------------------------------------------------- */
3104
3105  /* ---------------------------------------------------- */
3106  /*	Quantity											*/
3107  /* ---------------------------------------------------- */
3108
3109  if ($('.quantity').length) {
3110    var q = $('.quantity')
3111    q.each(function () {
3112      var $this = $(this),
3113        button = $this.children('button'),
3114        input = $this.children('input[type="text"]'),
3115        val = +input.val()
3116      button.on('click', function () {
3117        if ($(this).hasClass('qty-minus')) {
3118          if (val === 1) return false
3119          input.val(--val)
3120        } else {
3121          input.val(++val)
3122        }
3123      })
3124    })
3125  }
3126
3127  /* ---------------------------------------------------- */
3128  /*	Quantity											*/
3129  /* ---------------------------------------------------- */
3130    
3131    AOS.init({duration: 1000, disable: 'mobile'});
3132    
3133    
3134    $('.lnt-navigation').mouseenter(function(){
3135       $('body').addClass('nav-hover-active'); 
3136    });
3137    $('.lnt-navigation').mouseleave(function(){
3138       $('body').removeClass('nav-hover-active'); 
3139    });
3140    
3141    
3142    $('.image-slider-gallery').slippry({
3143      // general elements & wrapper
3144      slippryWrapper: '<div class="sy-box image-slider-gallery-wrapper" />', // wrapper to wrap everything, including pager
3145
3146      // options
3147      adaptiveHeight: false, // height of the sliders adapts to current slide
3148      captions: false, // Position: overlay, below, custom, false
3149
3150      // pager
3151      pager: false,
3152
3153      // controls
3154      controls: false,
3155      autoHover: false,
3156
3157      // transitions
3158      transition: 'kenburns', // fade, horizontal, kenburns, false
3159      kenZoom: 500,
3160      speed: 3500 // time the transition takes (ms)
3161    });
3162    
3163    
3164    
3165	
3166	//add pushy classes
3167	$( "nav.pushy ul li" ).has( "> ul" ).addClass('pushy-submenu');
3168	$( 'nav.pushy ul li:not(:has( > ul ))').addClass('pushy-link');
3169    
3170    $('.pushy-submenu > a').click(function(e){
3171        e.preventDefault();
3172    });
3173    
3174
3175    function _calculateScrollbarWidth() {
3176      document.documentElement.style.setProperty('--scrollbar-width', (window.innerWidth - document.documentElement.clientWidth) + "px");
3177    }
3178    // recalculate on resize
3179    window.addEventListener('resize', _calculateScrollbarWidth, false);
3180    // recalculate on dom load
3181    document.addEventListener('DOMContentLoaded', _calculateScrollbarWidth, false); 
3182    // recalculate on load (assets loaded as well)
3183    window.addEventListener('load', _calculateScrollbarWidth);
3184    
3185
3186  return App
3187})(window.jQuery)
3188
3189/*
3190Video Play
3191*/
3192$(document).on('click', '.js-videoPoster', function (e) {
3193  //отменяем стандартное действие button
3194  e.preventDefault()
3195  var poster = $(this)
3196  // ищем родителя ближайшего по классу
3197  var wrapper = poster.closest('.js-videoWrapper')
3198  videoPlay(wrapper)
3199})
3200
3201//вопроизводим видео, при этом скрывая постер
3202function videoPlay (wrapper) {
3203  var iframe = wrapper.find('.js-videoIframe')
3204  // Берем ссылку видео из data
3205  var src = iframe.data('src')
3206  // скрываем постер
3207  wrapper.addClass('videoWrapperActive')
3208  // подставляем в src параметр из data
3209  iframe.attr('src', src)
3210}
3211
3212/*
3213Plugin Name: 	SVG for jQuery.
3214*/
3215$(function () {
3216  jQuery('img.svg').each(function () {
3217    var $img = jQuery(this)
3218    var imgID = $img.attr('id')
3219    var imgClass = $img.attr('class')
3220    var imgURL = $img.attr('src')
3221
3222    jQuery.get(
3223      imgURL,
3224      function (data) {
3225        // Get the SVG tag, ignore the rest
3226        var $svg = jQuery(data).find('svg')
3227
3228        // Add replaced image's ID to the new SVG
3229        if (typeof imgID !== 'undefined') {
3230          $svg = $svg.attr('id', imgID)
3231        }
3232        // Add replaced image's classes to the new SVG
3233        if (typeof imgClass !== 'undefined') {
3234          $svg = $svg.attr('class', imgClass + ' replaced-svg')
3235        }
3236
3237        // Remove any invalid XML tags as per http://validator.w3.org
3238        $svg = $svg.removeAttr('xmlns:a')
3239
3240        // Check if the viewport is set, else we gonna set it if we can.
3241        if (
3242          !$svg.attr('viewBox') &&
3243          $svg.attr('height') &&
3244          $svg.attr('width')
3245        ) {
3246          $svg.attr(
3247            'viewBox',
3248            '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width')
3249          )
3250        }
3251
3252        // Replace image with new SVG
3253        $img.replaceWith($svg)
3254      },
3255      'xml'
3256    )
3257  });
3258})
3259
3260/* ------------------------------------------------
3261    Sticky sidebar
3262------------------------------------------------ */
3263
3264$(window).on('load resize', function () {
3265  if ($(window).width() > 992 && $('.sticky-bar').length) {
3266    $('.content, .sidebar , .lnt-sidebar , #sidebar').theiaStickySidebar({
3267      // Settings
3268      additionalMarginTop: 160,
3269      additionalMarginBottom: 40
3270    })
3271  }
3272    
3273    setTimeout(function(){
3274		$('.same-height-items').each(function(){
3275			var items = $(this).find('.same-height-item');
3276			var target_height = 0;
3277			
3278			items.each(function(){
3279				if( $(this).innerHeight()>target_height ){
3280				   target_height = $(this).innerHeight();
3281				}
3282			});
3283			
3284			items.innerHeight(target_height);
3285		});
3286	}, 200);
3287    
3288    $('.lazy').lazy();
3289    
3290    lazyloadvideos();
3291    
3292    setTimeout(function(){
3293        lazyloadvideos();
3294        $('.target-towns-list-wrapper').addClass('visible');
3295    }, 300);    
3296    
3297});
3298
3299
3300function lazyloadvideos(){
3301  var lazyVideos = [].slice.call(document.querySelectorAll("video.lazy"));
3302
3303  if ("IntersectionObserver" in window) {
3304    var lazyVideoObserver = new IntersectionObserver(function(entries, observer) {
3305      entries.forEach(function(video) {
3306        if (video.isIntersecting) {
3307          for (var source in video.target.children) {
3308            var videoSource = video.target.children[source];
3309            if (typeof videoSource.tagName === "string" && videoSource.tagName === "SOURCE") {
3310              videoSource.src = videoSource.dataset.src;
3311            }
3312          }
3313
3314          video.target.load();
3315          video.target.classList.remove("lazy");
3316          lazyVideoObserver.unobserve(video.target);
3317        }
3318      });
3319    });
3320
3321    lazyVideos.forEach(function(lazyVideo) {
3322      lazyVideoObserver.observe(lazyVideo);
3323    });
3324  }
3325}

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.