PageSourceSearch

https://www.adactive.co.il/wp-content/themes/adactive/assets/js/page.js?1791446015

js adactive.co.il collected 2026-10-08 07:54:04 UTC 25,127 bytes, 903 lines download raw bytes

1$(document).ready(function(){
2	initPage();
3});
4function initPage() {
5	inProgress = false;
6	prevError = $('.error-domain').text();
7	$("select").select2();
8	onScrollInit($('.doit'));
9
10	//tooltip
11	var mouseLeaveTimer;
12	$('.hasTooltip').tooltip({
13		position: {
14			my: "center bottom-10",
15			at: "center top",
16			using: function( position, feedback ) {
17				$( this ).css( position );
18				$( "<div>" )
19				.addClass( "arrow" )
20				.addClass( feedback.vertical )
21				.addClass( feedback.horizontal )
22				.appendTo( this );
23			}
24		},
25		open: function(){
26			// make sure all other tooltips are closed when opening a new one
27			$('.hasTooltip').not(this).tooltip('close');
28		}
29	}).on('mouseleave', function(e){
30		var that = this;
31		// close the tooltip later (maybe ...)
32		mouseLeaveTimer = setTimeout(function(){
33			$(that).tooltip('close');
34		}, 100);
35		// prevent tooltip widget to close the tooltip now
36		e.stopImmediatePropagation();
37	});
38	$(document).on('mouseenter', '.ui-tooltip', function(e){
39		// cancel tooltip closing on hover
40		clearTimeout(mouseLeaveTimer);
41	});
42	$(document).on('mouseleave', '.ui-tooltip', function(){
43		// make sure tooltip is closed when the mouse is gone
44		$('.hasTooltip').tooltip('close');
45	});
46
47
48	$(window).scroll(function () {
49		if ($(this).scrollTop() > 60) {
50			if ($(".header").hasClass("be-dark")) {
51				return;
52			}
53			$(".header").addClass("be-dark");
54		} else {
55			$(".header").removeClass("be-dark");
56		}
57	});
58
59	$(".side-help-arrow").click(function () {
60		$(".popup_type").fadeIn();
61	});
62	$(".side-help-arrow").click(function () {
63
64		if ($(this).hasClass("active")) {
65			$(this).closest(".side-help").removeClass("hide-me");
66		} else {
67			$(this).closest(".side-help").addClass("hide-me");
68		}
69		$(this).toggleClass("active");
70	});
71	//input file style
72	$('.inputfile').attr('data-multiple-caption','{count} files selected');
73	var inputs = document.querySelectorAll( '.inputfile' );
74	Array.prototype.forEach.call( inputs, function( input ){
75		var inp = $(input);
76		var form_file = inp.closest('.form_file'),
77			label	 = form_file.find('label'),
78			labelVal = label.innerHTML;
79
80
81		input.addEventListener('change',function(e){
82			var fileName = '';
83			if( this.files && this.files.length > 1 )
84				fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length );
85			else
86				fileName = e.target.value.split( '\\' ).pop();
87
88			if( fileName ){
89				label.find('.my-file').html(fileName);
90				inp.closest('.form_file').addClass('active');
91			} else {
92				form_file.find('.inputfile').val('');
93				label.find('.my-file').html('');
94				inp.closest('.form_file').removeClass('active');
95			}
96		});
97	});
98	$('.form_file .close a').on('click', function(){
99		var form_file = $(this).closest('.form_file');
100		form_file.find('.my-file').html('');
101		form_file.removeClass('active');
102		form_file.find('.inputfile').val('');
103	});
104
105	if ($(window).width() < 800) {
106		$("#menu").mmenu({
107			offCanvas: {
108				position: "right"
109			},
110			dragOpen: {
111				open: true,
112			}
113		}).on("opening.mm", function () {
114			window.headerScroll = $(window).scrollTop();
115			$(".header").css({ position: "absolute", top: window.headerScroll });
116			$(".menu_bt").addClass("active");
117		}).on("closed.mm", function () {
118			$(".header").css({ position: "fixed", top: 0 });
119			$(".menu_bt").removeClass("active");
120		});
121	}
122	if ($(".blue_slick").length > 0) {
123        $('.blue_slick').slick({
124            arrows: false,
125            dots: true,
126            rtl: true,
127            infinite: true,
128            fade: true,
129            slidesToShow: 1,
130            slidesToScroll: 1,
131            autoplay: true,
132            autoplaySpeed: 2500,
133            speed: 1000
134        });
135    }
136    if ($(".slide_cowork").length > 0) {
137        $('.slide_cowork').slick({
138            prevArrow: $(".slide_cowork_wrap").find('.team-gal-prev'),
139			nextArrow: $(".slide_cowork_wrap").find('.team-gal-next'),
140            dots: true,
141            rtl: true,
142            infinite: true,
143            fade: true,
144            slidesToShow: 1,
145            slidesToScroll: 1,
146            autoplay: true,
147            autoplaySpeed: 9000,
148            speed: 1000
149        });
150    }
151   
152    if ($(".slide_b2b").length > 0) {
153        $('.slide_b2b').slick({
154            rtl:true,
155            arrows: false,
156            dots: false,
157            infinite: false,
158            centerMode: false,
159            slidesToShow: 4,
160            slidesToScroll: 1,
161            autoplay: true,
162            autoplaySpeed: 3000,
163            responsive: [
164
165                {
166                    breakpoint: 1200,
167                    settings: {
168                        slidesToShow: 3
169                    }
170                },
171                {
172                    breakpoint: 980,
173                    settings: {
174                        slidesToShow: 2
175                    }
176                },
177                {
178                    breakpoint: 680,
179                    settings: {
180						//mobileFirst:true,
181						//centerMode: true,
182						//centerPadding: '40px',
183                        slidesToShow: 1,
184                        autoplay: false
185                    }
186                }
187            ]
188
189        });
190    }
191
192
193}
194
195$(function() {
196	$('.popup_in').on('scroll', function(){
197		if($(this).scrollTop() > $(".report_main").position().top) {
198			$(".report_form_stiky").addClass("fixed");
199		} else {
200			$(".report_form_stiky").removeClass("fixed");
201		}
202	});
203});
204
205// function closePop() {
206// 	$(".popup_close").click(function () {
207// 		$(".popup_wrap").fadeOut();
208// 	});
209// }
210
211$(function () {
212	$('.header-main-link.has-drop-down').on('click focus', function (e) {
213		// e.preventDefault();
214		// console.log('open');
215		// $(this).closest('.arrow-down').toggleClass('closed');
216	})
217})
218
219
220$(function () {
221	$('.recomendations-container').slick({
222		slidesToShow: 1,
223		dots: true,
224		arrows: false,
225		slidesToScroll: 1,
226		rtl: true,
227		infinite: true,
228		autoplay: true,
229		// speed: 750,
230		autoplaySpeed: 5000,
231		cssEase: 'linear',
232		pauseOnHover: true
233		// variableWidth: true,
234		// centerMode: true
235	});
236	$(function () {
237		$('.recomendations-container, .results-container, .team-gallery-container').css({ visibility: 'visible' });
238	})
239
240	$('.team-gallery-container:not(.team-gallery-about-container)').slick({
241		slidesToShow: 5,
242		dots: false,
243		slidesToScroll: 1,
244		cssEase: 'linear',
245		rtl: true,
246		infinite: true,
247		autoplay: false,
248		speed: 500,
249		prevArrow: $(".team-gallery-button-container").find('.team-gal-prev'),
250		nextArrow: $(".team-gallery-button-container").find('.team-gal-next'),
251		responsive: [
252
253			{
254				breakpoint: 1200,
255				settings: {
256					slidesToShow: 3
257				}
258			},
259			{
260				breakpoint: 800,
261				settings: {
262					slidesToShow: 2
263				}
264			},
265			{
266				breakpoint: 680,
267				settings: {
268					slidesToShow: 1
269				}
270			}
271		]
272	});
273
274	$('.results-container:not(.expand)').slick({
275		slidesToShow: 4,
276		dots: false,
277		slidesToScroll: 1,
278		cssEase: 'linear',
279		rtl: true,
280		infinite: true,
281		arrows: true,
282		prevArrow: $(".results-container-wrap").find('.team-gal-prev'),
283		nextArrow: $(".results-container-wrap").find('.team-gal-next'),
284		responsive: [
285
286			{
287				breakpoint: 1200,
288				settings: {
289					slidesToShow: 3
290				}
291			},
292			{
293				breakpoint: 800,
294				settings: {
295					slidesToShow: 2
296				}
297			},
298			{
299				breakpoint: 680,
300				settings: {
301					slidesToShow: 1
302				}
303			}
304		]
305	});
306	// if ($('.loader-text').length) {
307	// 	$('.loader-text').slick({
308	// 		slidesToShow: 1,
309	// 		dots: false,
310	// 		slidesToScroll: 1,
311	// 		// autoplaySpeed: 1500,
312	// 		autoplay: true,
313	// 		cssEase: 'linear',
314	// 		rtl: true,
315	// 		fade: true,
316	// 		infinite: true,
317	// 	})
318	// }
319})
320
321quotes = $(".item-changing");
322var initQuotes = function () {
323	quoteIndex = -1;
324	stopQuotes();
325	function showNextQuote() {
326		++quoteIndex;
327		quotes.eq(quoteIndex % quotes.length)
328			.fadeIn(1600)
329			.delay(1600)
330			.fadeOut(1600, showNextQuote);
331	}
332	showNextQuote();
333};
334
335function stopQuotes() {
336	quotes.stop(true);
337	quotes.hide(0);
338}
339
340function stopReport() {
341	stopQuotes();
342	if (typeof window.showReportTimeout == 'undefined' && typeof req != 'undefined') {
343		req.abort();
344		inProgress = false;
345		return;
346	} else {
347		clearTimeout(window.showReportTimeout);
348	}
349}
350
351
352function toggle(ele) {
353	toggleContainer = $(ele).closest(".toggleContainer");
354	if ($(toggleContainer).hasClass("active")) {
355		$(toggleContainer).removeClass("active");
356		$(toggleContainer).find(".toggleInner").eq(0).slideUp();
357	} else {
358		//$(".toggleContainer.active").find(".toggleInner").eq(0).hide();
359		//$(".toggleContainer.active").removeClass("active");
360		$(toggleContainer).addClass("active");
361		$(toggleContainer).find(".toggleInner").eq(0).slideDown();
362	}
363}
364
365$(document).ready(function () {
366	var $scrollbar = $("#scrollbar1");
367
368	$scrollbar.tinyscrollbar();
369});
370
371
372$(window).on("scroll", function () {
373	if ($(this).scrollTop() > 800) {
374		$(".back_top").fadeIn(800);
375	} else {
376		$(".back_top").fadeOut();
377	}
378});
379
380function backToTop() {
381	$("html,body").animate({ scrollTop: 0 }, 800, function () { $(".back_top").fadeOut(800); });
382}
383
384$(function () {
385	var map = $('.google-map');
386	var height = $('.contact-info-lt').height();
387	map.height(height);
388})
389
390$(function () {
391	$('.wpcf7').on('wpcf7mailsent', function (e) {
392		var $targetInput = $(this).find('input[type=submit]');
393		var value = $targetInput.val();
394		setStateValid($targetInput, value);
395	})
396})
397
398function setStateValid($targetInput, value) {
399	$targetInput.val("נשלח בהצלחה!");
400	$targetInput.attr('disabled', 'disabled');
401	setTimeout(function () {
402		$targetInput.val(value);
403		$targetInput.removeAttr('disabled');
404	}, 2500);
405}
406
407
408$(function () {
409	// $('.website_check_container input').on('keypress', function(e) {
410	// 	var charCode = e.which || e.keyCode;
411	// 	var testString = String.fromCharCode(charCode);
412	// 	var pattern = /[a-zA-Z.:/]/;
413	// 	if (testString.match(pattern)) {
414	// 		return true;
415	// 	}
416	// 	return false;
417	// })
418})
419
420
421$(function () {
422	var $targetBtn = $('.load-more-posts');
423	if ($targetBtn.length) {
424		postsPage = 1;
425		$targetBtn.on('click', loadMorePosts)
426	}
427})
428
429function loadMorePosts(e) {
430	e.preventDefault();
431	if (typeof ajaxLoading == 'undefined') {
432		ajaxLoading = false;
433	}
434	else if (ajaxLoading) {
435		return;
436	}
437	ajaxLoading = true;
438	$('.loader-container').css({ 'visibility': 'visible' });
439	$('.loader-container').show();
440	$(".load-more-posts").hide();
441	setTimeout(function () {
442		$.post("", { pageNum: ++postsPage }, function (data) {
443			$('.loader-container').css({ 'visibility': 'hidden' });
444			$('.loader-container').hide();
445			$(".load-more-posts").show();
446			$('.posts-container').append(data['content']);
447			ajaxLoading = false;
448			if (data.maxpages < postsPage) {
449				$('.load-more-posts').hide();
450			}
451		}, 'json');
452	}, 1000);
453}
454function onScrollInit(items) {
455	items.each(function () {
456		var osElement = $(this),
457			osAnimationClass = osElement.attr('data-animation'),
458			osAnimationDelay = osElement.attr('data-animated-delay');
459		osAnimationDuration = osElement.attr('data-animated-duration');
460		osElement.css({
461			'-webkit-animation-delay': osAnimationDelay,
462			'-moz-animation-delay': osAnimationDelay,
463			'animation-delay': osAnimationDelay,
464			'-webkit-animation-duration': osAnimationDuration,
465			'-moz-animation-duration': osAnimationDuration,
466			'animation-duration': osAnimationDuration
467		});
468		osElement.waypoint(function () {
469			osElement.addClass('animated').addClass(osAnimationClass);
470			if (osElement.hasClass("doit_svg")) {
471				//osElement.find("svg").hide();
472				durationSet = (parseInt(osAnimationDelay) + 1.5) * 1000;
473				setTimeout(function () {
474					osElement.find("svg").show();
475				}, durationSet);
476			}
477		}, { offset: '80%' });
478	});
479}
480
481shoudStop = false;
482
483function isUrl(string) {
484	var matcher = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/;
485	return matcher.test(string);
486}
487
488$('.check-website').on('click', function (e) {
489	// alert(isUrl($('.check-input').val()));
490	window.continueChangeQuote = false;
491	if (typeof inProgress != 'undefined' && inProgress) {
492		return;
493	}
494	makeRequest(e);
495	$(e.target).closest('.check-input').val('');
496	$('.check-input').trigger('change');
497});
498
499function makeRequest(e) {
500	// $('.changing-item:visible').hide(0);
501	initQuotes();
502	if (typeof inProgress == 'undefined') {
503		return;
504	}
505	secondPopup = $('.bg-loader').is(':visible');
506	$errorDiv = !secondPopup ? $('.section-top .error-domain') : $('.loader-stp1 .error-domain');
507	if (typeof e != "undefined" && e.type == 'click' || (typeof e != "undefined" && e.key == 'Enter')) {
508		inProgress = true;
509		requestData = $('.check-input').eq(1).val() || $('.check-input').eq(0).val();
510		if (!requestData) {
511			$errorDiv.fadeIn();
512			inProgress = false;
513			return false;
514		}
515		$('.popup-check').fadeIn();
516		$("body").addClass("noscroll");
517		$('.loader-stp2').fadeIn();
518		$('.loader-stp1').hide();
519		$('.popup-report').find('tbody').remove();
520		// setTimeout(function () {
521		req = $.get({ url: homeUrl + '/?sem=' + requestData }, function (res) {
522			$('.check-input').each(function (index, el) {
523				$(el).val('');
524			})
525			response = JSON.parse(res);
526			if ('error' in response && response.error == 'none') {
527				$('.error-domain').text('לא נמצאו תוצאות לדומיין הנבדק');
528				setTimeout(function(){
529					window.location = ("https://www.adactive.co.il/contact/");
530
531				}, 5000);
532				toggleReportStepsOverlay();
533				inProgress = false;
534				return false;
535			}
536			if ('error' in response && response.error == 'client') {
537				$('.error-domain').text('אתה כבר נהנה מהטכנולוגיה הבלעדית שלנו :)');
538				toggleReportStepsOverlay();
539				inProgress = false;
540				return false;
541			}
542			if ('error' in response && response.error == 'blocked') {
543				$('.error-domain').text('מה כבר ביקשנו ממך, כתובת אתר אמיתית?');
544				toggleReportStepsOverlay();
545				inProgress = false;
546				return false;
547			}
548			if ('error' in response && response.error == 'limit') {
549				$('.error-domain').text('לא ניתן להריץ בדיקות נוספות ב-24 שעות הקרובות');
550				toggleReportStepsOverlay();
551				inProgress = false;
552				return false;
553			}
554			else if ('error' in response && response.error != 'none') {
555				// if (typeof prevError != 'undefined') {
556				$('.error-domain').text('');
557				$('.error-domain').text(prevError);
558				// }
559				toggleReportStepsOverlay();
560				inProgress = false;
561				return false;
562			}
563			showReport();
564		});
565		// }, 4000)
566	}
567}
568
569function showReport() {
570	// if (response.table && response.diagram || response.table && !response.diagram) {
571	if (response.table) {
572		window.showReportTimeout = setTimeout(function () {
573			$errorDiv.fadeOut();
574			$('.report-body-rows').html('');
575			generateReportBody($('.report-body-rows'), response);
576			// $('.op-1').text(response.diagram.opponent.domain);
577			$('.op-1').text(response.domain.op);
578			// $('.your-site').text(response.diagram.me.domain);
579			$('#wpcf7-f41-o2 > form > div.clearfix.popup-keywords-main-container > div.footer-contact-form-holder.right.hide-me-input > span > input').val(response.domain.me);
580			// $('.your-website input').val(response.domain.me);
581			$('.popup-report div.sub-title > p > strong').addClass('pink');
582			// $('.popup-report .title').eq(0).html('היי, <span class="main_domain">' + response.diagram.me.domain + '</span> נראה שיש לנו הרבה על מה לדבר :)');
583			// $('.popup-report .title').eq(0).html('היי <span class="main_domain">' + response.domain.me + '</span><br/> נראה שיש לנו הרבה על מה לדבר 😉');
584			var replaceValue = response.domain.me;
585			var currentHtml = $('.popup-report .title').eq(0).html();
586			var newHtml = currentHtml.replace('{domain}', '<span class="main_domain">' + replaceValue + '</span>');
587			$('.popup-report .title').eq(0).html(newHtml);
588
589			$('.popup-report').fadeIn();
590			inProgress = false;
591		}, quotes.length * 2000);
592	}
593}
594
595function toggleReportStepsOverlay() {
596	if ($(window).width() < 800) {
597		var fadeInTarget = $('.home').length ? '.loader-stp2' : '.loader-stp1'
598		var fadeOutTarget = $('.home').length ? '.loader-stp1' : '.loader-stp2'
599		$(fadeOutTarget).fadeOut(0);
600		if (!$('.home').length) {
601			$(fadeInTarget).fadeIn();
602			$(fadeOutTarget).hide();
603			$errorDiv.fadeIn(0);
604			return;
605		}
606	}
607	else {
608		var fadeOutTarget = $('.home').length ? '.loader-stp1' : '.loader-stp2'
609		var fadeInTarget = $('.home').length ? '.loader-stp2' : '.loader-stp1'
610	}
611	if($('.home').length) {
612		$('.popup-check').fadeOut(0);
613	}
614	$errorDiv.fadeIn(0);
615	$(fadeOutTarget).fadeOut(0);
616	$(fadeInTarget).fadeIn();
617}
618
619
620function generateReportBody($targetElement, reportData) {
621	// if (reportData.table.keywords) {
622	if (reportData.table) {
623		// var reportData = reportData.table.keywords;
624		var reportData = reportData.table;
625		if (reportData) {
626			// body = $('<tbody></tbody>');
627			getTable(reportData, $targetElement);
628			// $targetElement.append(body);
629			$targetElement.show();
630		} else {
631			$targetElement.hide();
632		}
633	}
634	$('.loader-stp2').fadeOut();
635	// $('.hide-me-input input').val(reportData.diagram.me.domain);
636	// var sets = [{ sets: [reportData.diagram.me.domain], size: reportData.diagram.me.keywords },
637	// { sets: [response.diagram.opponent.domain], size: reportData.diagram.opponent.keywords },
638	// { sets: [reportData.diagram.me.domain, response.diagram.opponent.domain], size: reportData.diagram.opponent.common_keywords }];
639	// colourMap = {};
640	// colourMap[reportData.diagram.me.domain] = "#62d8fd";
641	// colourMap[response.diagram.opponent.domain] = "#FF4D00";
642	// var chart = venn.VennDiagram();
643	// d3.select("#venn").datum(sets).call(chart);
644}
645
646$('.check-input').on('change keyup focus focusout', function (e) {
647	switch (e.type) {
648		case 'focus':
649			handleFocusWebsiteCheck(e);
650			if($(e.target).val()==""){
651				$(e.target).val("www.");
652			}
653			break
654		case 'focusout':
655			if($(e.target).val()=="www."){
656				$(e.target).val("");
657			}
658			handleFocusOutWebsiteCheck(e);
659			handleChangeWebsiteCheck(e);
660			break
661		case 'change':
662			handleChangeWebsiteCheck(e);
663			break;
664		case 'keyup':
665			window.continueChangeQuote = false
666			handleEmptyInput(e)
667			break;
668	}
669})
670
671function getTable(reportData, target) {
672	$.each(reportData, function (index, record) {
673		this.append($('<div class="report-row flex"></div>').append([
674			$('<div class="report-type"></div>').text(record.keyword),
675			$('<div class="report-num""></div>').text(record.main_domain_ranking),
676		]));
677	}.bind(target));
678}
679
680function handleChangeWebsiteCheck(eventObject) {
681	if (eventObject.target.value.length) {
682		$(eventObject.target).css({ direction: 'ltr' });
683		// $(eventObject.target).addClass('check-website-center-padding');
684		return true;
685	}
686	$(eventObject.target).css({ direction: 'rtl' });
687}
688
689function handleEmptyInput(eventObject) {
690	if (eventObject.target.value.length) {
691		$('.error-domain').fadeOut();
692		$(eventObject.target).css({ direction: 'ltr' });
693		makeRequest(eventObject);
694		return true;
695	}
696	if (typeof prevError != 'undefined') {
697		$('.error-domain').text(prevError);
698	}
699	// $errorDiv.fadeIn();
700	// $(eventObject.target).removeClass('check-website-center-padding');
701	$(eventObject.target).css({ direction: 'ltr' });
702}
703
704function handleFocusWebsiteCheck(eventObject) {
705	$(eventObject.target).css({ direction: 'ltr' });
706}
707
708function handleFocusOutWebsiteCheck(eventObject) {
709	$(eventObject.target).css({ direction: 'rtl' });
710}
711
712function openPopKey() {
713	$(".popup-keywords").fadeIn();
714	var API = $("#menu").data("mmenu");
715	if (API.length) {
716		API.close();
717	}
718}
719function openPopCheck(e) {
720	$(".popup-check").fadeIn();
721	$('.loader-stp1').show();
722	if (inProgress) {
723		return;
724	}
725	makeRequest(e);
726	$('.loader-stp1').find('.check-input').val('');
727	$("body").addClass("noscroll");
728	var API = $("#menu").data("mmenu");
729	if (API) {
730		API.close();
731	}
732}
733function openCv(target){
734	setCvPopupTitle($(target));
735	$(".popup-cv").fadeIn();
736}
737function setCvPopupTitle($target) {
738	var title = $target.offsetParent().find('.title').text();
739	$(".popup-cv .title span").text(title);
740	setEmailSubject(title);
741}
742function setEmailSubject(text) {
743	$('[name=subject-cv]').val(text);
744}
745function closePop() {
746	$(".popup_close").click(function () {
747		$(".popup_wrap").fadeOut();
748		$("body").removeClass("noscroll");
749		$('.error-domain:visible').fadeOut();
750	});
751}
752
753/*$(function () {
754	if ($(window).width() < 600) {
755		$(window).scroll(function () {
756			var footerPosition = $('.footer').position().top;
757
758			if ($(window).scrollTop() + $(window).outerHeight() > footerPosition || $(window).scrollTop() < 400) {
759				$('.m-sticky').fadeOut();
760			} else {
761				if ($(window).scrollTop() > 400) {
762					$('.m-sticky').fadeIn();
763				}
764			}
765		});
766	}
767})*/
768
769
770
771$(function () {
772	$('.popup-keywords .wpcf7').on('select2-selecting', function (e) {
773		$('[name="email-responsible"]').val(window.responsibleEmails[e.val])
774	})
775})
776
777$(function () {
778	$('[href="#showPopupKeywords"]').attr('target', '');
779	$('.popup-keywords-action-btn').on('click', showPopupKeywords)
780})
781
782
783function showPopupKeywords(e) {
784	e.preventDefault();
785	var $popupKeywords = $('.popup-keywords');
786	$popupKeywords.fadeToggle();
787}
788
789document.addEventListener('wpcf7mailsent', function (event) {
790	thankYouUrlSet = thankYouUrl;
791	if (event.detail.contactFormId == '1014') {
792		thankYouUrlSet = thankYouUrls['careers'];
793	}
794	if (event.detail.contactFormId == '33') {
795		thankYouUrlSet = thankYouUrls['contact'];
796	}
797	if (event.detail.contactFormId == '5') {
798		thankYouUrlSet = thankYouUrls['footer'];
799	}
800	if (event.detail.contactFormId == '42') {
801		thankYouUrlSet = thankYouUrls['partners'];
802	}
803	if (event.detail.contactFormId == '41') {
804		thankYouUrlSet = thankYouUrls['report'];
805	}
806	setTimeout(function () {
807		location = thankYouUrlSet;
808	}, 1000)
809}, false);
810
811$('.showCheckWebSite').on('click', openPopCheck);
812$()
813
814if($(window).width() < 800) {
815	$('.goToContactUs').on('click', goToForm);
816}
817
818
819function goToForm(){
820	newTop = $(".form_target:visible").eq(0).offset().top + 100;
821	$(".popup_in").animate({scrollTop:newTop},800);
822}
823if($('[name="newsletter[]"]').length) {
824	$('[name="newsletter[]"]').prop('checked', true)
825}
826
827document.addEventListener("DOMContentLoaded", function() {
828    const container = document.querySelector('.logos-gallery-container');
829    if (!container) return;
830
831    // הגדרות מהירות
832    const slideDuration = 800; // מהירות ההחלקה (0.8 שניות)
833    const pauseTime = 2000;    // זמן המתנה בין לוגו ללוגו
834    let interval;
835
836    // פונקציה לבניית המבנה הנכון (Track)
837    function setupSliderStructure() {
838        // בודקים אם כבר יצרנו את ה-track כדי לא ליצור כפילויות
839        if (container.querySelector('.slider-track')) return;
840
841        // יצירת הרכבת (Track)
842        const track = document.createElement('div');
843        track.className = 'slider-track';
844
845        // העברת כל הלוגואים לתוך הרכבת
846        while (container.firstChild) {
847            track.appendChild(container.firstChild);
848        }
849
850        // הוספת הרכבת חזרה לקונטיינר
851        container.appendChild(track);
852    }
853
854    function startProSlider() {
855        if (window.innerWidth < 768) {
856            setupSliderStructure(); // מוודא שהמבנה קיים
857            
858            const track = container.querySelector('.slider-track');
859            if (!track) return;
860
861            interval = setInterval(() => {
862                const items = track.querySelectorAll('.logo-item');
863                if (items.length === 0) return;
864
865                const firstItem = items[0];
866                const itemWidth = firstItem.offsetWidth;
867
868                // 1. הזזת הרכבת שמאלה (כדי להכניס את הלוגו הבא מימין)
869                track.style.transition = `transform ${slideDuration}ms cubic-bezier(0.4, 0.0, 0.2, 1)`;
870                track.style.transform = `translateX(-${itemWidth}px)`; // מזיזים שמאלה
871
872                // 2. סידור מחדש בסיום האנימציה
873                setTimeout(() => {
874                    // ביטול אנימציה לרגע
875                    track.style.transition = 'none';
876                    
877                    // החזרת הרכבת לנקודת האפס (ויזואלית זה לא משתנה כי נחליף את האיברים)
878                    track.style.transform = 'translateX(0)';
879                    
880                    // העברת הלוגו הראשון לסוף התור
881                    track.appendChild(firstItem);
882
883                }, slideDuration);
884
885            }, pauseTime);
886        }
887    }
888
889    // הפעלה ראשונית
890    startProSlider();
891
892    // טיפול בשינוי גודל מסך
893    window.addEventListener('resize', () => {
894        clearInterval(interval);
895        // איפוס סגנונות במקרה שעוברים לדסקטופ
896        const track = container.querySelector('.slider-track');
897        if (track) {
898             track.style.transform = 'translateX(0)';
899             track.style.transition = 'none';
900        }
901        startProSlider();
902    });
903});

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.