PageSourceSearch

https://hola.hu/site/themes/Divi-child/dist/js/onlineGPS.js?ver=1790900455

js hola.hu collected 2026-10-02 00:21:39 UTC 15,278 bytes, 551 lines download raw bytes

1$ = jQuery;
2
3
4$(document).ready(function(){
5	eBoardingModuleMoreInfo();
6	mobileFleetTabCarousel();
7	pulsingAnimations();
8	correctPulsingAnimationContainerAspectRatio();
9	equalOpeningColumnHeights();
10	customLoginPopupButtunBind();
11	$(window).resize(function(){
12		equalOpeningColumnHeights();
13		correctPulsingAnimationContainerAspectRatio();
14	});
15	carousels();
16	ratings_read_more_button();
17	openableFunctions();
18	openableFunctionSwitches();
19	openablePrices();
20	setTimeout(function() {
21    	mobileMenuItemHasChildren();
22    }, 700);
23});
24
25function mobileMenuItemHasChildren(){
26    var $menu = $('.et_mobile_menu'),
27    top_level_link = '.et_mobile_menu .menu-item-has-children > a';
28    
29    $menu.find('a').each(function() {
30        $(this).off('click');
31        if ( $(this).is(top_level_link) ) {
32            $(this).attr('href', '#');
33        }
34
35        if ( ! $(this).siblings('.sub-menu').length ) {
36        	if($(this).parent().hasClass('menu-item-6040')){
37	        	$(this).click(function(e){
38	        		e.preventDefault();
39	        		$('.mobile_nav').removeClass('opened').addClass('closed');
40	        	});
41	        }else{
42	        	$(this).on('click', function(event) {
43	                $(this).parents('.mobile_nav').trigger('click');
44	            });
45	        }
46        } 
47        else {
48            $(this).on('click', function(event) {
49                event.preventDefault();
50                $(this).parent().toggleClass('visible');
51            });
52        }
53    });
54    
55	/*$('.mobile_menu_bar.mobile_menu_bar_toggle').click(function(){
56		$('#mobile_menu .menu-item-has-children').each(function(i, e){
57			$(e).addClass('closed');
58		});
59
60		$('#mobile_menu .menu-item-has-children>ul').each(function(i, e){
61			$(e).slideUp(0);
62		});
63	});
64
65	$('#mobile_menu .menu-item-has-children>a').click(function(e){
66		e.preventDefault();
67		if($(this).parent().hasClass('closed')){
68			var self = $(this);
69			self.siblings('ul').slideDown(300, function(){
70				self.parent().removeClass('closed').addClass('opened');
71			});
72		}
73	});*/
74}
75
76function mobile_menu_close_button(){
77	$('#mobile_menu .menu-item-6040>a').click(function(e){
78		e.preventDefault();
79		//$('.mobile_menu_bar_toggle').click();
80	});
81}
82
83function openablePrices(){
84	$('.openable-price .et-last-child').each(function(index, element){
85		$(element).slideUp(0);
86		if(index == 0){
87			$(element).parent().addClass('opened');
88			$(element).slideDown(0);
89		}
90	});
91	$('.openable-price .et_pb_column:not(.et-last-child)').click(function(){
92		var container = $(this).parent();
93		if(!container.hasClass('opened')){
94			var otherContainer = $('.openable-price.opened');
95
96			otherContainer.removeClass('opened');
97			otherContainer.children('.et-last-child').slideUp(300);
98
99			container.addClass('opened');
100			container.children('.et-last-child').slideDown(300);
101		}			
102	});
103}
104
105function openableFunctionSwitches(){
106	$('.openable-function-switch .openable-content').each(function(index, element){
107		$(element).slideUp(0);
108		if(index == 0){
109			$(element).parent().parent().addClass('opened');
110			$(element).slideDown(0);
111		}
112	});
113	$('.openable-function-switch .openable-title').click(function(){
114		var container = $(this).parent().parent();
115		if(!container.hasClass('opened')){
116			var otherContainer = $('.openable-function-switch.opened');
117
118			otherContainer.removeClass('opened');
119
120			if(otherContainer.find('.et_pb_module.et_pb_code').length > 0){
121				otherContainer.find('.openable-content').slideUp(150, function(){
122					otherContainer.find('.et_pb_module.et_pb_code').slideUp(150);
123				});
124			}else{
125				otherContainer.find('.openable-content').slideUp(300);
126			}
127
128			container.addClass('opened');
129
130			if(container.find('.et_pb_module.et_pb_code').length > 0){
131				container.find('.et_pb_module.et_pb_code').slideDown(150, function(){
132					container.find('.openable-content').slideDown(150);
133				});
134			}else{
135				container.find('.openable-content').slideDown(300);
136			}
137		}			
138	});
139}
140
141function openableFunctions(){
142	$('.openable-function .openable-content').each(function(index, element){
143		$(element).slideUp(0);
144	});
145	$('.openable-function .openable-title').click(function(){
146		var container = $(this).parent().parent();
147		if(container.hasClass('opened')){
148			container.removeClass('opened');
149
150			if(container.find('.et_pb_module.et_pb_code').length > 0){
151				container.find('.openable-content').slideUp(150, function(){
152					container.find('.et_pb_module.et_pb_code').slideUp(150);
153				});
154			}else{
155				container.find('.openable-content').slideUp(300);
156			}
157		}else{
158			container.addClass('opened');
159
160			if(container.find('.et_pb_module.et_pb_code').length > 0){
161				container.find('.et_pb_module.et_pb_code').slideDown(150, function(){
162					container.find('.openable-content').slideDown(150);
163				});
164			}else{
165				container.find('.openable-content').slideDown(300);
166			}
167		}			
168	});
169}
170
171function ratings_read_more_button(){
172	var height = '105';
173	var heightNum = 105;
174	var showMore = 'Mutass többet';
175	var showLess = 'Mutass kevesebbet';
176
177	if($('.alapnyomkovetes-velemeny-box').hasClass('velemeny-height-51')){
178		height = '51';
179		heightNum = 51;
180		showMore = 'Több';
181		showLess = 'Kevesebb';
182	}
183
184	$(window).resize(function(){
185		if($(window).innerWidth() > 767){
186			$('.alapnyomkovetes-velemeny-box .et_pb_text>.et_pb_text_inner').css('height', 'initial');
187			$('.hola-read-more-button').removeClass('opened').addClass('closed').html(showMore);
188		}else{
189			$('.alapnyomkovetes-velemeny-box .et_pb_text>.et_pb_text_inner').each(function(index,element){
190				$(element).css('height', height + 'px');
191			});
192			$('.hola-read-more-button').removeClass('opened').addClass('closed').html(showMore);
193		}
194	});
195
196	$('.alapnyomkovetes-velemeny-box .et_pb_text>.et_pb_text_inner').each(function(index, element){
197		var p = $(element).find('p');
198
199		if(p.innerHeight() > 100){
200			$(element).append('<div class="hola-read-more-button closed">' + showMore + '</div>');
201			$(element).css('height', height + 'px');
202		}
203	});
204
205	/*$('.hola-read-more-button').click(function(e){
206		var button = $(this);
207
208		if(button.hasClass('closed')){
209			button.parent().animate({
210				height: button.siblings('p').innerHeight() + 30
211			}, 350, function(){
212				button.removeClass('closed').addClass('opened').html(showLess);
213			});
214		}else if(button.hasClass('opened')){
215			button.removeClass('opened').addClass('closed').html(showMore);
216			button.parent().animate({
217				height: height
218			}, 350);
219		}
220	});*/
221
222	$('.alapnyomkovetes-velemeny-box .et_pb_text_inner').click(function(e){
223		var button = $(this).find('.hola-read-more-button');
224
225		if(button.hasClass('closed')){
226			button.parent().animate({
227				height: button.siblings('p').innerHeight() + 30
228			}, 350, function(){
229				button.removeClass('closed').addClass('opened').html(showLess);
230			});
231		}else if(button.hasClass('opened')){
232			button.removeClass('opened').addClass('closed').html(showMore);
233			button.parent().animate({
234				height: height
235			}, 350);
236		}
237	});
238}
239
240function carousels(){
241	ratings_carousel();
242	references_carousel();
243}
244
245function references_carousel(){
246	if($('.referenciak.owl-carousel').length > 0){
247		$('.referenciak.owl-carousel').owlCarousel({
248			responsive:{
249				autoplay: true,
250				0:{
251					margin: 8,
252					autoplay: true,
253					autoplayHoverPause: true,
254					items: 2,
255					loop: true,
256					nav: true,
257					dots: true,
258					navText: ['<img src="/site/uploads/2021/10/blue-left.svg">', '<img src="/site/uploads/2021/10/blue-right.svg">']
259				},
260				768:{
261					margin: 16,
262					autoplay: true,
263					autoplayHoverPause: true,
264					items: 6,
265					loop: true,
266					nav: false,
267					dots: false,
268					navText: ['<img src="/site/uploads/2021/10/arrow-left.svg">', '<img src="/site/uploads/2021/10/arrow-right.svg">']
269				}
270			}
271			
272		});
273	}
274}
275
276function ratings_carousel(){
277	if($('.logigps-velemenyek.owl-carousel').length > 0){
278		$('.logigps-velemenyek.owl-carousel').owlCarousel({
279			autoplay: false,
280			autoplayHoverPause: true,
281			nav: true,
282			autoplayTimeout: 10000,
283			autoplayHoverPause: true,
284			responsive:{
285				0: {
286					items: 1,
287					loop: true,
288					nav: false,
289					dots: true,
290					navText: ['<img src="/site/uploads/2021/10/blue-left.svg">', '<img src="/site/uploads/2021/10/blue-right.svg">']
291				},
292				980: {
293					items: 3,
294					loop: true,
295					nav: false,
296					dots: true,
297					navText: ['<img src="/site/uploads/2021/10/blue-left.svg">', '<img src="/site/uploads/2021/10/blue-right.svg">']
298				}
299			}
300		});
301	}
302}
303
304/* old function ratings_carousel(){
305	if($('.velemenyek-fooldal.owl-carousel').length > 0){
306		$('.velemenyek-fooldal.owl-carousel').owlCarousel({
307			autoplay: false,
308			autoplayHoverPause: true,
309			nav: true,
310			autoplayTimeout: 10000,
311			autoplayHoverPause: true,
312			responsive:{
313				0: {
314					items: 1,
315					loop: true,
316					margin: 20,
317					nav: true,
318					dots: true,
319					navText: ['<img src="/site/uploads/2021/10/blue-left.svg">', '<img src="/site/uploads/2021/10/blue-right.svg">']
320				},
321				768: {
322					items: 3,
323					loop: true,
324					margin: 20,
325					nav: true,
326					dots: true,
327					navText: ['<img src="/site/uploads/2021/10/blue-left.svg">', '<img src="/site/uploads/2021/10/blue-right.svg">']
328				}
329			}
330		});
331	}
332}*/
333
334function correctPulsingAnimationContainerAspectRatio(){
335	$('.pulsing-container').each(function(){
336		$(this).height($(this).width() / 2);
337	});
338}
339
340function equalOpeningColumnHeights(){
341
342	$('#equal-opening-column-heights>div').each(function(){
343		$(this).find('.e-boarding-bonus-info, .e-boarding-close').css('display', 'none');
344		$(this).find('.e-boarding-read-more').css('display', 'block');
345	});
346
347	if (window.innerWidth > 900) {
348		var column_height = 0;
349
350		$('#equal-opening-column-heights>div').each(function(){
351			$(this).css('padding-bottom', '60px');
352			if($(this).height() > column_height){
353				column_height = $(this).height();
354			}
355		});
356
357		$('#equal-opening-column-heights>div').each(function(){
358			$(this).attr('data-padding-bottom', column_height - $(this).height() + parseInt($(this).css('padding-bottom')));
359			$(this).css('padding-bottom', column_height - $(this).height() + parseInt($(this).css('padding-bottom')));
360		});
361	} else {
362		$('#equal-opening-column-heights>div').each(function(){
363			$(this).attr('data-padding-bottom', 60);
364			$(this).css('padding-bottom', 60);
365		});
366	}	
367}
368
369function pulsingAnimations(){
370	if($('.pulsing-container').length > 0){
371		pulsingAnimationFunction('purple');
372		pulsingAnimationFunction('blue');
373		pulsingAnimationFunction('yellow');
374	}
375}
376
377function pulsingAnimationFunction(color){
378	var containers = document.getElementsByClassName(color + '-pulsing');
379	var container = null;
380	for(var i = 0; i < containers.length; i++){
381		container = containers[i];
382		var animData = {
383	        container: container,
384	        renderer: 'svg',
385	        rendererSettings: { progressiveLoad:'true', preserveAspectRatio: 'xMaxYMax slice' },
386	        loop: true,
387	        prerender: false,
388	        autoplay: true,
389	        autoloadSegments: false,
390	        path: '/site/uploads/svg/' + color + '.json'
391	    };
392
393	    var anim;
394		///betöltésre
395	    //anim = bodymovin.loadAnimation(animData);
396	    /* KÉSŐBBRE EZ JÓ LEHET
397	    function fLaunch() {
398		    container.removeEventListener('mouseenter', fLaunch);
399		    anim.playSegments([anim.currentTime,135], true);
400		    anim.loop = true;
401		    container.addEventListener('mouseleave', fReverse);
402		}
403
404		function fReverse() {
405		    container.removeEventListener('mouseleave', fReverse);
406		    container.addEventListener('mouseenter', fLaunch);
407		    anim.loop = false;
408		}*/
409	}
410}
411
412var animationDone = true;
413
414function eBoardingModuleMoreInfo(){
415	$('.e-boarding-opener-button a').click(function(e){
416		e.preventDefault();
417
418		var container = $(this).parent().parent().parent();
419
420		if(container.hasClass('e-boarding-read-more')){
421
422			container.css('display', 'none');
423
424			container.siblings('.e-boarding-close').css('display', 'block');
425
426			container.siblings('.e-boarding-bonus-info').show(300);
427
428			if(!container.parent().hasClass('no-additional-padding')){
429				container.parent().animate({
430					'padding-bottom': 60
431				}, 300);
432			}			
433		}else if(container.hasClass('e-boarding-close')){
434			console.log('asd');
435			container.css('display', 'none');
436
437			container.siblings('.e-boarding-read-more').css('display', 'block');
438
439			container.siblings('.e-boarding-bonus-info').hide(300);
440
441			if(!container.parent().hasClass('no-additional-padding')){
442				container.parent().animate({
443					'padding-bottom': container.parent().data('padding-bottom')
444				}, 300);
445			}
446		}
447	});
448}
449
450function mobileFleetTabCarousel(){
451	$('.tab-carousel-item:not(".active-tab")').each(function(){
452		$(this).slideUp(0);
453	});
454
455	$('.tab-carousel-button').click(function(){
456		showActiveTab($(this));
457	});
458}
459
460function showActiveTab(button){
461	if(!button.hasClass('active-button') && animationDone){
462		animationDone = false;
463		$('.active-button').removeClass('active-button');
464		button.addClass('active-button');
465		$(this).removeClass('active-tab');
466		$('.tab-carousel-item.active-tab').slideUp(300);
467		var tab_name = button.attr('id').substring(7, button.attr('id').length);
468		$('.tab-carousel-item.' + tab_name + '-tab').addClass('active-tab').slideDown(300, function(){
469			animationDone = true;
470		});
471	}
472	
473}
474
475function customLoginPopupButtunBind(){
476
477	if ($('body').hasClass('et-fb-preview--desktop') === false) {
478
479		var binded = false;
480		$("#custom-login-popup-layer").hide();
481
482		setInterval(function(){
483			if ($(".menu-item-26620 > a, .menu-item-26620 > a").lenght > 0) {
484				clearInterval(binded);
485			}
486			var button = $(".menu-item-26620 > a");
487
488			if ($(window).innerWidth() < 1300) {//mobil
489				button = $('.menu-item-26620 > a');
490			}
491
492			var popupContainer = $("#custom-login-popup-container");
493			var customPopupLayer = $("#custom-login-popup-layer");
494			var closeable = false;
495
496			$(button).unbind('click');
497			$(button).bind('click', function(e){
498				e.preventDefault();
499
500				if ($(popupContainer).css("display") == "block") {
501					closeable = false;
502					$(popupContainer).fadeOut(300);
503					$(customPopupLayer).hide(300);
504					$(button).removeClass('opened');
505				} else {
506					closeable = true;
507					$(popupContainer).fadeIn(300);
508					$(customPopupLayer).show(300);
509					$(button).addClass('opened');
510				}
511			});
512
513			$(customPopupLayer).unbind('click');
514			$(customPopupLayer).bind('click', function(e){
515				e.preventDefault();
516				$(popupContainer).fadeOut(300);
517				$(customPopupLayer).hide(300);
518				$(button).removeClass('opened');
519			});
520
521			customLoginPopupButtonPosition();
522
523		}, 500);
524	}
525}
526
527function customLoginPopupButtonPosition(){
528	var posX = 0;
529	var posY = 0;
530	var posXOffset = 20;
531	var posYOffset = 24;
532	var selector = "";
533	if ($(window).innerWidth() < 1300) {//mobil
534		selector = "#mobile_menu .menu-item-26620";
535		posX = '5%';
536		posY = '50%';
537	} else {//asztali
538		selector = "#top-menu .menu-item-26620";
539		var loginButton = $(selector);
540		if (loginButton.length > 0) {
541			posX = ($(window).width() - (loginButton.offset().left + loginButton.outerWidth()) + posXOffset);
542			posY = (loginButton.offset().top + loginButton.outerHeight() + posYOffset);
543		}
544	}
545	var loginButton = $(selector);
546
547	if (loginButton.offset() !== undefined) {
548		$("#custom-login-popup-container").css('right', posX);
549		$("#custom-login-popup-container").css('top', posY);
550	}	
551}

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.