PageSourceSearch

https://www.creatio.com/themes/custom/creatio/js/creatio.js?v=1.6.2

js creatio.com collected 2026-10-01 09:18:04 UTC 28,905 bytes, 843 lines download raw bytes

1window.dataLayer = window.dataLayer || [];
2function gtag() { dataLayer.push(arguments); }
3
4(function ($, Drupal) {
5
6  let flag = false;
7
8  // Also check for the renamed version in newer core/modules
9  if(Drupal.AjaxCommands && Drupal.AjaxCommands.prototype.scrollTop) {
10    Drupal.AjaxCommands.prototype.scrollTop = function(ajax, response, status) {};
11  }
12
13  Drupal.behaviors.creatio = {
14    attach: function (context, settings) {
15      if(typeof Drupal.behaviors.form_creatio === 'undefined') {
16        if(getCookie('bpmRef')) {
17          $('form input[name="field_lead_bpmref"]').val(getCookie('bpmRef'));
18        }
19        $('form input[name="field_lead_bpmhref"]').val(getCookie('bpmHref'));
20        $('form input[name="field_lead_bpmsessionid"]').val(getCookie('bpmTrackingId'));
21
22        const country = $('select[name="field_lead_country"]', context);
23        if(country.length && !country.closest('#drupal-modal').length && typeof window.intlTelInputGlobals !== 'undefined') {
24          country.once('country_option_each').find('option').each(function() {
25            const option = $(this);
26            let val = option.val();
27            if(val.length) {
28              if(val === 'USA') {
29                val = 'United States';
30              } else if(val === 'UAE') {
31                val = 'United Arab Emirates';
32              }
33
34              $.each(window.intlTelInputGlobals.getCountryData(), function(index, value) {
35                if(value.name.indexOf(val) > -1) {
36                  option.attr('data-country-code', value.iso2);
37                  option.attr('data-dial-code', value.dialCode);
38                }
39              });
40            }
41          });
42
43          country.once('country_change').bind('change', function() {
44            const $this = $(this);
45            const iti = $('input[name="field_lead_mobilephone"]');
46            if(flag) {
47              let countryCode = $this.find('option:selected').data('country-code'), val;
48              const dialCode = $this.find('option:selected').data('dial-code');
49              const input = $this.closest('form').find('input.form-tel');
50              if(typeof countryCode === 'undefined' && typeof dialCode === 'undefined') {
51                countryCode = '';
52                val = '+';
53              } else {
54                if(typeof iti.intlTelInput('getSelectedCountryData').dialCode === 'undefined') {
55                  val = `+${dialCode}`;
56                } else {
57                  val = input.val().replace(`+${iti.intlTelInput('getSelectedCountryData').dialCode}`, `+${dialCode}`);
58                }
59              }
60              iti.intlTelInput('setCountry', countryCode);
61              input.val(val);
62            }
63
64            flag = true;
65          }).trigger('change');
66
67          $('input.form-tel', context).bind('focus', function() {
68            const input = $(this);
69            if(!input.val().length && typeof input.intlTelInput('getSelectedCountryData').dialCode !== 'undefined') {
70              input.val(`+${input.intlTelInput('getSelectedCountryData').dialCode}`);
71            }
72          });
73
74          $(document).on('click', '.iti .iti__country', function() {
75            const item = $(this);
76            let val = $(`select[name="field_lead_country"] option[data-country-code="${item.data('country-code')}"]`).val();
77            if(typeof val !== 'undefined') {
78              $('select[name="field_lead_country"]').val(val).trigger('change');
79            }
80          });
81        }
82      }
83    }
84  };
85
86  function getCookie(name) {
87    var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
88    return matches ? decodeURIComponent(matches[1]) : undefined;
89  }
90
91	$(document).ready(function() {
92    Fancybox.bind('[data-fancybox]', {});
93
94		var $body = $('body');
95		var isMac = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
96		if(isMac) {
97			$body.addClass('is-mac');
98
99      if(navigator.platform === 'iPad') {
100        $body.addClass('is-mac_ipad');
101      } else if(navigator.platform === 'iPhone') {
102        $body.addClass('is-mac_iphone');
103      } else {
104        $body.addClass('is-macintosh');
105      }
106		}
107    const UserAgent = navigator.userAgent;
108		var isIE = UserAgent.indexOf("Trident") > -1;
109    var isSafari = (UserAgent.indexOf("Safari") > -1 && UserAgent.indexOf("Chrome") === -1);
110		var isEdge = UserAgent.indexOf("Edge") > -1;
111		if(isEdge) { $body.addClass('is-Edge'); }
112		if(isSafari) { $body.addClass('is-Safari'); }
113		if(isIE) {
114			$body.addClass('is-IE');
115		} else {
116			$('.creatio-animation').each(function() {
117				$(this).addClass('animation').addClass('creatio-animation_init');
118			});
119		}
120
121    const id = location.hash;
122    if(id.length) {
123      const element = $(id);
124      if(element.length) {
125        $([document.documentElement, document.body]).scrollTop(10000);
126        $([document.documentElement, document.body]).scrollTop(0);
127        setTimeout(() => {
128          let top = element.offset().top - parseInt($body.css('padding-top')) - 32;
129          if($('.creatio-header').css('display') !== 'none') {
130            top -= $('.creatio-header-menu').height();
131          } else {
132            top -= $('.creatio-mobile-header-top').height();
133          }
134
135          const wm = $('#ts-navigation');
136          if(wm.length && wm.css('display') === 'block') {
137            top -= wm.height() + parseInt(element.css('margin-top')) - 1;
138          }
139
140          $([document.documentElement, document.body]).animate({
141            scrollTop: top
142          }, {
143            duration: 700,
144            queue: false
145          });
146        }, 10);
147      }
148    }
149
150		const $award = $('.creatio-region-award__text');
151		if($award.length) {
152      $award.closest('.creatio-region-award__content').height($award.outerHeight(true));
153    }
154
155    sectionMenuTitleMultiple();
156
157    setTimeout(function() {
158      var st = $(window).scrollTop();
159      $(window).scrollTop(st+1);
160      $(window).scrollTop(st-1);
161    }, 300);
162
163    $(document).on('click', '.creatio-content a, .creatio-content input.form-submit', function() {
164			var $this = $(this);
165			if(typeof $this.attr('id') !== 'undefined') {
166        let action = getAction($this);
167        if(typeof ga !== 'undefined') {
168          ga('send', {
169            'event': 'GAEvent',
170            'eventCategory': $this.attr('id'),
171            'eventAction': action,
172            'eventLabel': $this.attr('href')
173          });
174        }
175			} else if ($this.hasClass('product-pricing-list__link_buy')) {
176        let a = $this.parent().parent().find('.product-pricing-list__title').text();
177        let c, b;
178        $this.parent().parent().find('.product-pricing-list__cost-currency').each(function(){
179          if($(this).is(':visible')){
180            b = $(this).text();
181          }
182        });
183        $this.parent().parent().find('.product-pricing-list__cost_active .cost').each(function(){
184          let v = $(this).text().indexOf(b);
185          if($(this).text().indexOf(b) > -1 && $(this).is(':visible')){
186            c = $(this).text();
187          }
188        });
189        if(c === undefined){
190          c = $this.parent().parent().find('.product-pricing-list__cost_active').text();
191        }
192        ga('send', {
193          'event': 'GAEvent',
194          'eventCategory': 'product-pricing-button',
195          'eventAction': 'click - Buy now',
196          'eventLabel': a,
197          'eventValue': c,
198        });
199      }
200		});
201
202    // eventValue
203		$(document).on('blur', '.creatio-footer-newsletter input[name="field_lead_email"]', function () {
204		  const $this = $(this);
205      const $form = $this.closest('form');
206		  $form.find('input[name="field_lead_company"]').val($this.val());
207    });
208		$(document).on('blur', '.webform-submission-newsletter-insights-form input[name="field_lead_name"]', function () {
209		  const $this = $(this);
210      const $form = $this.closest('form');
211		  $form.find('input[name="field_lead_company"]').val($this.val());
212    });
213
214		sliderResize();
215
216    const awards = $('.view-block-awards .view-header .view-content');
217    const count =  awards.find('.views-row').length - 1;
218    let rowsWidth = 0, awardsWidth = awards.outerWidth(true);
219    awards.find('.views-row').each((index, item) => {
220      rowsWidth += $(item).outerWidth(true);
221    });
222    let arrows = false, infinite = false, touchMove = false;
223    if(rowsWidth > awardsWidth) {
224      arrows = true, infinite = true, touchMove = true;
225      awards.addClass('slider');
226    }
227
228    $(window).on('resize', () => {
229      awardsWidth = awards.outerWidth(true);
230
231      if(rowsWidth > awardsWidth && !awards.hasClass('slider')) {
232        awards.slick('slickSetOption', {
233          arrows: true,
234          infinite: true,
235          touchMove: true,
236        }, true);
237        awards.addClass('slider');
238      }
239
240      if(rowsWidth < awardsWidth && awards.hasClass('slider')) {
241        awards.slick('slickSetOption', {
242          arrows: false,
243          infinite: false,
244          touchMove: false,
245        }, true);
246        awards.removeClass('slider');
247      }
248    });
249
250    awards.slick({
251      arrows: arrows,
252      focusOnSelect: false,
253      infinite: infinite,
254      slidesToShow: count,
255      speed: 300,
256      variableWidth: true,
257      touchMove: touchMove,
258			responsive: [
259				{
260					breakpoint: 1200,
261					settings: {
262						arrows: true,
263						infinite: true,
264						touchMove: true
265					}
266				},
267				{
268					breakpoint: 768,
269					settings: {
270						arrows: true,
271						infinite: true,
272						slidesToShow: 2,
273						variableWidth: false
274					}
275				}
276			]
277		}).on('beforeChange', function(event, slick, currentSlide, nextSlide) {
278			if($(slick.$slideTrack).css('display') !== 'inline-block') {
279				$('.view-block-awards .view-header .slick-slide[data-slick-index="'+nextSlide+'"] .award-logo').trigger('mousedown');
280			}
281		});
282
283		var $awardContent = $('.view-block-awards .row-content');
284		$(document).on('mousedown', '.award-logo', function() {
285			var $this = $(this);
286			if(!$this.hasClass('active')) {
287				var index = $this.data('index');
288				$('.award-logo').add($awardContent).removeClass('active');
289				$this.add($awardContent.eq(index)).addClass('active');
290				if($awardContent.eq(index).find('.slick-slider').length) {
291					$awardContent.eq(index).find('.slick-slider').slick('unslick');
292				}
293				$awardContent.eq(index).find('.item-list ul').slick({
294					arrows: false,
295					dots: true,
296					infinite: false,
297					slidesToShow: 1,
298					speed: 300
299				});
300			}
301		});
302		$('.view-block-awards .slick-active .award-logo[data-index="0"]').trigger('mousedown');
303
304		$('.node--type-customer').each(function() {
305			var $this = $(this);
306			var $edit = $this.find('.contextual .entitynodeedit-form a');
307			if($edit.length) {
308				var linkArr = $edit.attr('href').split('?');
309				$this.find('.contextual ul').prepend('<li><a href="'+linkArr[0].replace('/edit', '')+'">'+Drupal.t('View')+'</a></li>');
310			}
311		});
312
313		$(document).on('mouseenter', '.product-pricing-table__help', function() {
314		  $(this).addClass('product-pricing-table__help_hover');
315    });
316
317		$(document).on('mouseleave', '.product-pricing-table__help', function() {
318		  var $this = $(this);
319		  setTimeout(function() {
320        $this.removeClass('product-pricing-table__help_hover');
321      }, 100);
322    });
323
324		$(document).on('mouseenter', '.creatio-section-server', function() {
325			var $this = $(this);
326			var $map = $this.closest('.creatio-section-map');
327			$this.find('.creatio-section-server__point').addClass('creatio-section-server__point_hover');
328			$map.find('.creatio-section-server__point').addClass('creatio-section-server__point_paused');
329			setTimeout(function () {
330				$this.addClass('creatio-section-server_hover');
331			}, 500);
332		});
333
334		$(document).on('mouseleave', '.creatio-section-server', function() {
335			var $this = $(this);
336			var $map = $this.closest('.creatio-section-map');
337			$this.find('.creatio-section-server__point').removeClass('creatio-section-server__point_hover');
338			$map.find('.creatio-section-server__point').removeClass('creatio-section-server__point_paused');
339			setTimeout(function () {
340				$this.removeClass('creatio-section-server_hover');
341			}, 500);
342		});
343
344    $('.creatio-section-price__description').matchHeight();
345		$(document).on('mouseenter', '.creatio-section-price__item', function() {
346		  var $this = $(this);
347		  if(!$this.hasClass('creatio-section-price__item_active')) {
348        var $parent = $this.closest('.creatio-section-price');
349        $parent.find('.creatio-section-price__item_active').removeClass('creatio-section-price__item_active');
350        $this.addClass('creatio-section-price__item_active');
351      }
352    });
353		$(document).on('mouseleave', '.creatio-section-price', function() {
354		  var $defaultItem = $('.creatio-section-price__item[data-default="1"]');
355		  if(!$defaultItem.hasClass('creatio-section-price__item_active')) {
356        $defaultItem.trigger('mouseenter');
357      }
358    });
359
360		$('.product-pricing-list__description').matchHeight();
361		$(document).on('mouseenter', '.product-pricing-list__item', function() {
362		  var $this = $(this);
363		  if(!$this.hasClass('product-pricing-list__item_active')) {
364        var $parent = $this.closest('.product-pricing-list');
365        $parent.find('.product-pricing-list__item_active').removeClass('product-pricing-list__item_active');
366        $this.addClass('product-pricing-list__item_active');
367      }
368    });
369		$(document).on('mouseleave', '.product-pricing-list', function() {
370		  var $defaultItem = $('.product-pricing-list__item[data-default="1"]');
371		  if($defaultItem.length) {
372        if(!$defaultItem.hasClass('product-pricing-list__item_active')) {
373          $defaultItem.trigger('mouseenter');
374        }
375      } else {
376		    $('.product-pricing-list__item_active').removeClass('product-pricing-list__item_active');
377      }
378    });
379
380		$(document).on('click', '.digital-events__display-toggle', function() {
381		  var href = $(this).closest('.digital-events__display-modes').find('.digital-events__display-mode:not(.digital-events__display-mode_active)').attr('href');
382		  window.location = href;
383    });
384
385		$(document).on('click', '.creatio-values-menu-items__item', function() {
386			var $this = $(this);
387			var index = $this.index();
388			var $section = $('.creatio-value');
389			var top = 0;
390			switch(index) {
391				case 0:
392					top = 0;
393					break;
394				case 1:
395					top = $section.eq(index).closest('.creatio-region').offset().top;
396					break;
397				default:
398					top = $section.eq(index).closest('.creatio-region').offset().top - $(window).height()*0.125;
399			}
400			$('html, body').animate({scrollTop: top}, {duration: 700, queue: false});
401		});
402
403		$(document).on('click', '.creatio-accordion__title', function() {
404		  var $this = $(this);
405		  $this.toggleClass('creatio-accordion__title_active');
406		  $this.closest('.creatio-accordion__row').find('.creatio-accordion__content').slideToggle(300, function() {
407        if(!$this.hasClass('creatio-accordion__title_active')) {
408          $(window).trigger('scroll');
409        }
410      });
411    });
412
413    if($('.value-content-num').length) {
414      new Rellax('.value-content-num', {
415        speed: 2.5,
416        center: true,
417        wrapper: null,
418        round: true,
419        vertical: true,
420        horizontal: false
421      });
422    }
423	});
424
425  $(window).on('load', function() {
426		var $customers = $('.field--name-field-customers > .field__item');
427		if($customers.length) {
428			var arr = [];
429			for(var $i = 0; $i < $customers.length; $i++) {
430				arr[$i] = $i;
431			}
432			shuffle(arr);
433			for($i = 0; $i < arr.length; $i++) {
434				var index = arr[$i];
435				$customers.eq(index).css('transition-delay', ($i*0.02)+'s');
436			}
437		}
438    var reload = getUrlParameter('reload');
439    if(typeof reload !== 'undefined' && reload == 1){
440      if($('#webform-submission-trial-form-add-form').length){
441        var $form = $('#webform-submission-trial-form-add-form');
442      }else{
443        $form = $('#webform-submission-trial-add-form');
444      }
445      if(typeof $form !== 'undefined') {
446        $('html, body').animate({scrollTop: $form.offset().top}, 'slow');
447      }
448    }
449	});
450
451	$(window).on('resize', function() {
452		sliderResize();
453		setTimeout(function () {
454      sectionMenuTitleMultiple();
455    }, 300);
456	});
457
458	$(window).on('scroll', function() {
459		var st = $(window).scrollTop();
460		var wh = $(window).height();
461
462    $('.block-system-main-block .lazyloaded.remove-attributes').each(function() {
463      var $this = $(this);
464      $this.removeAttr('style').removeClass('remove-attributes');
465    });
466
467		$('.creatio-animation.animation:not(.animated)').each(function() {
468			var $this = $(this);
469			var cf = 0.05;
470      if(typeof $this.attr('data-height') !== 'undefined') {
471        cf = $this.attr('data-height');
472      } else if($this.attr('class').indexOf('creatio-animation_queue') > -1) {
473				cf = 0.2;
474			} else if($this.find('.ts-video').length) {
475        cf = 0.3;
476      }
477			var top = $this.offset().top + wh*cf;
478      if($this.attr('class').indexOf('creatio-animation_fh') > -1) {
479        top = $this.offset().top + $this.outerHeight(true);
480      }
481			if(top < st + wh) {
482				$this.addClass('animated').removeClass('creatio-animation_init');
483
484				if($this.find('.ts-video').length) {
485          videoPlay($this.find('.ts-video video'));
486        }
487
488				if($this.find('.creatio-section-tabs').length) {
489					var $tabs = $this.find('.creatio-section-tabs');
490					if($tabs.find('.creatio-section-tabs-content_carousel').length) {
491            $tabs.find('.creatio-section-tabs-content_carousel').on('init', function(event, slick) {
492              var prev = slick.slideCount-1;
493              var next = 1;
494              var $prev = $(slick.$slider).find('.slick-slide[data-slick-index="'+prev+'"]');
495              var $next = $(slick.$slider).find('.slick-slide[data-slick-index="'+next+'"]');
496              $prev.addClass('slick-slide-prev');
497              $next.addClass('slick-slide-next');
498              slick.$prev = $prev;
499              slick.$next = $next;
500            }).once().on('beforeChange', function(event, slick, currentSlide, nextSlide) {
501              slick.$prev.removeClass('slick-slide-prev').removeClass('slick-slide-z-1');
502              slick.$next.removeClass('slick-slide-next').removeClass('slick-slide-z-1');
503              var prev = nextSlide-1;
504              var next = nextSlide+1;
505              if(prev < 0) {
506                prev = slick.slideCount-1;
507              }
508              if(next === slick.slideCount) {
509                next = 0;
510              }
511
512              var $prev = $(slick.$slider).find('.slick-slide[data-slick-index="'+prev+'"]');
513              var $next = $(slick.$slider).find('.slick-slide[data-slick-index="'+next+'"]');
514              $prev.addClass('slick-slide-prev');
515              $next.addClass('slick-slide-next');
516
517              if(nextSlide > currentSlide && nextSlide !== slick.slideCount-1) {
518                $prev.addClass('slick-slide-z-1');
519              }
520              if((nextSlide < currentSlide && currentSlide !== slick.slideCount-1) || (currentSlide === 0 && nextSlide === slick.slideCount-1)) {
521                $next.addClass('slick-slide-z-1');
522              }
523
524              slick.$prev = $prev;
525              slick.$next = $next;
526            }).slick({
527              arrows: false,
528              autoplay: true,
529              autoplaySpeed: 6000,
530              centerMode: true,
531              centerPadding: '0',
532              focusOnSelect: true,
533              pauseOnFocus: false,
534              pauseOnHover: false,
535              slidesToShow: 1,
536              slidesToScroll: 1,
537              asNavFor: $tabs.find('.creatio-section-tabs-menu'),
538            });
539          } else {
540					  let adaptiveHeight = false;
541					  if(typeof $tabs.find('.creatio-section-tabs-content').data('adaptive-height') !== 'undefined' && $tabs.find('.creatio-section-tabs-content').data('adaptive-height') === true) {
542              adaptiveHeight = true;
543            }
544            $tabs.find('.creatio-section-tabs-content').on('init', function(event, slick) {
545              setTimeout(function() {
546                if(typeof $(slick.$slider).find('.slick-list').attr('style') !== 'undefined') {
547                  $(slick.$slider).find('.slick-list').css('height', $(slick.$slider).find('.slick-slide[data-slick-index="0"]').height());
548                }
549              }, 150);
550            }).slick({
551              arrows: false,
552              autoplay: true,
553              autoplaySpeed: 6000,
554              adaptiveHeight: adaptiveHeight,
555              fade: true,
556              pauseOnFocus: false,
557              pauseOnHover: false,
558              slidesToShow: 1,
559              slidesToScroll: 1,
560              asNavFor: $tabs.find('.creatio-section-tabs-menu'),
561              responsive: [
562                {
563                  breakpoint: 992,
564                  settings: {
565                    adaptiveHeight: true
566                  }
567                }
568              ]
569            });
570          }
571					$tabs.find('.creatio-section-tabs-menu').slick({
572						slidesToShow: 5,
573						slidesToScroll: 1,
574						asNavFor: $tabs.find('.creatio-section-tabs-content'),
575						focusOnSelect: true,
576						variableWidth: true,
577						responsive: [
578							{
579								breakpoint: 992,
580								settings: {
581									slidesToShow: 1,
582									variableWidth: false
583								}
584							}
585						]
586					});
587					$tabs.find('.creatio-section-tabs-menu').find('.slick-slide').removeClass('slick-current');
588					setTimeout(function() {
589						$tabs.find('.creatio-section-tabs-menu').find('.slick-slide[aria-hidden="false"]').first().addClass('slick-current');
590					}, 1);
591				}
592
593				var $slides = $this.find('.creatio-section-slides');
594				if($slides.length) {
595					$slides.slick({
596						centerMode: true,
597						centerPadding: 0,
598						focusOnSelect: true,
599						slidesToShow: 5,
600						slidesToScroll: 1,
601						prevArrow: '<button class="slick-prev slick-prev-large" aria-label="Previous" type="button"></button>',
602						nextArrow: '<button class="slick-next slick-next-large" aria-label="Next" type="button"></button>',
603						responsive: [
604							{
605								breakpoint: 992,
606								settings: {
607									slidesToShow: 3
608								}
609							},
610							{
611								breakpoint: 767,
612								settings: {
613									slidesToShow: 1
614								}
615							}
616						]
617					});
618				}
619
620				var $slider = $this.find('.creatio-section-slider');
621				if($slider.length) {
622					$slider.slick({
623            arrows: false,
624            autoplay: true,
625            autoplaySpeed: 6000,
626            dots: true,
627            fade: true,
628					});
629				}
630
631				var $word = $this.find('.animate-word');
632				if($word.length) {
633					$word.wordAnimate(80, 3);
634				}
635				var $text = $this.find('.animate-text');
636				if($text.length) {
637					$text.textAnimate();
638				}
639			}
640		});
641
642		$('video:not(.no-autoplay):not(.cols-video)').each(function() {
643			var $this = $(this);
644			var cf = 0.05;
645
646			var top = $this.offset().top + wh*cf;
647			if(top < st + wh && typeof $this.attr('autoplay') === 'undefined') {
648				 $this[0].play();
649         $this.attr('autoplay', '');
650			}
651		});
652
653		var $values = $('.creatio-values');
654		if($values.length) {
655			var $menu = $('.creatio-values-menu');
656			var hh = $('.creatio-header').height();
657			if(st+wh-hh > $values.outerHeight(true)+(wh-hh-$('.creatio-values-menu-items').height())/2) {
658				$menu.addClass('creatio-values-menu_hide');
659			} else {
660				if($menu.hasClass('creatio-values-menu_hide')) {
661					$menu.removeClass('creatio-values-menu_hide');
662				}
663			}
664
665			$('.creatio-values-menu-items__item').each(function() {
666				var $this = $(this);
667				if($values.offset().top-st <= $this.offset().top-st) {
668					$this.addClass('creatio-values-menu-items__item_dark');
669				} else {
670					if($this.hasClass('creatio-values-menu-items__item_dark')) {
671						$this.removeClass('creatio-values-menu-items__item_dark');
672					}
673				}
674			});
675
676			$values.find('.creatio-region').each(function() {
677				var $this = $(this);
678				var index = $this.index()+1;
679				var top = $this.offset().top - wh*0.125 - $this.find('.creatio-value-content').height();
680				if(st >= top && st <= top+$this.outerHeight(true)) {
681					if(!$menu.find('.creatio-values-menu-items__item').eq(index).hasClass('creatio-values-menu-items__item_active')) {
682						$menu.find('.creatio-values-menu-items__item').removeClass('creatio-values-menu-items__item_active');
683						$menu.find('.creatio-values-menu-items__item').eq(index).addClass('creatio-values-menu-items__item_active');
684					}
685				}
686			});
687
688			if(st < $values.find('.creatio-region').first().offset().top) {
689				if(!$menu.find('.creatio-values-menu-items__item').eq(0).hasClass('creatio-values-menu-items__item_active')) {
690					$menu.find('.creatio-values-menu-items__item').removeClass('creatio-values-menu-items__item_active');
691					$menu.find('.creatio-values-menu-items__item').eq(0).addClass('creatio-values-menu-items__item_active');
692				}
693			}
694		}
695	});
696
697  $(document).on('click', '.ts-video__repeat', (e) => {
698    const repeat = $(e.target).closest('.ts-video__repeat');
699    const video = repeat.closest('.ts-video').find('video');
700    repeat.removeClass('show');
701    videoPlay(video);
702  });
703
704  const videoPlay = (selector) => {
705    const video = selector[0];
706    video.play();
707
708    const repeat = selector.closest('.ts-video').find('.ts-video__repeat');
709    if(repeat.length) {
710      const timer = setInterval(() => {
711        if(video.currentTime === video.duration) {
712          repeat.addClass('show');
713          clearInterval(timer);
714        }
715      }, 500);
716    }
717  };
718
719	function sliderResize() {
720		var $news = $('.view-news-webinars-creatio .view-content');
721		if($news.css('display') === 'block') {
722			if(!$news.hasClass('slick-slider')) {
723				$news.slick({
724					arrows: true,
725					dots: true,
726					infinite: false,
727					slidesToShow: 1,
728					speed: 300
729				});
730			}
731		} else {
732			if($news.hasClass('slick-slider')) {
733				$news.slick('unslick');
734			}
735		}
736
737		var $customers = $('.block-customers .field--name-field-customers');
738		if($customers.css('display') === 'block') {
739			if(!$customers.hasClass('slick-slider')) {
740				$customers.slick({
741					arrows: true,
742					dots: true,
743					infinite: false,
744					rows: 2,
745					slidesToShow: 2,
746					slidesToScroll: 2,
747					speed: 300
748				});
749			}
750		} else {
751			if($customers.hasClass('slick-slider')) {
752				$customers.slick('unslick');
753			}
754		}
755	}
756
757	function sectionMenuTitleMultiple() {
758	  $('.creatio-section-menu-title').textIsMultiple('creatio-section-menu-title');
759  }
760
761	function shuffle(arr) {
762		var j, temp;
763		for(var i = arr.length - 1; i > 0; i--){
764			j = Math.floor(Math.random()*(i + 1));
765			temp = arr[j];
766			arr[j] = arr[i];
767			arr[i] = temp;
768		}
769		return arr;
770	}
771
772	function getAction(e){
773	  let action = '';
774    switch(e.attr('id')){
775      case "main-menu-try-it-free":
776      case "studio-menu-try-it-free":
777        action = "click - Try it free";
778        break;
779      case "main-menu-request-demo":
780      case "product-menu-request-demo":
781        action = "click - Request demo";
782        break;
783      case "product-menu-start-now":
784        action = "click - Start now";
785        break;
786      case "studio-menu-sign-up":
787        action = "click - Sign up";
788        break;
789      case "studio-menu-log-in":
790        action = "click - Log in";
791        break;
792      case "watch-the-video-button":
793        action = "click - Testimonial video";
794        break;
795      case "onpage-cta-button":
796        if(e.attr('href').indexOf('//accounts') > -1){
797          action = "click - Get started free";
798        }
799        if($('html').hasClass('path-portal')){
800          action = "click - Request demo";
801        }
802        if(e.attr('href').indexOf('en-studio') > -1 && $('html').hasClass('path-studio')){
803          action = "click - Test drive";
804        } else if(e.attr('href').indexOf('trial') > -1){
805          action = "click - Try it free";
806        }
807        break;
808      case "testimonial-video-button":
809        action = "click - Testimonial video";
810        break;
811      case "product-pricing-button":
812        if($('body').hasClass('path-marketing') && e.parents('#ts-buy-calculator-product').length > 0) {
813          action = 'click - Buy now';
814        } else if($('body').hasClass('path-sales')) {
815          action = 'click - Buy now';
816        } else if($('body').hasClass('path-service')) {
817          action = 'click - Buy now';
818        }
819        break;
820      default:
821        action = 'click';
822        break;
823    }
824    return action;
825  }
826
827  var getUrlParameter = function getUrlParameter(sParam) {
828    var sPageURL = window.location.search.substring(1),
829      sURLVariables = sPageURL.split('&'),
830      sParameterName,
831      i;
832
833    for (i = 0; i < sURLVariables.length; i++) {
834      sParameterName = sURLVariables[i].split('=');
835
836      if (sParameterName[0] === sParam) {
837        return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
838      }
839    }
840  };
841
842} (jQuery, Drupal));
843

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.