PageSourceSearch

https://www.homeinfo.hu/assets/homeinfo2017/js/banner.goa.embeded.helper.js?1790166826.9587

js homeinfo.hu collected 2026-09-24 21:41:02 UTC 25,751 bytes, 669 lines download raw bytes

1;(function($){	
2
3	// Partner zonakhoz
4	window.partnerZoneIntervalTimeout = {};
5	window.partnerZoneInterval = {};
6
7	window.goAdverticum3.onReady(function( goa3 ) {
8		var $ = goa3.getjQuery();
9  
10		goa3.on('invoke', function ( jQueryEvent, goa3Event ) {					
11			var zone = goa3Event.zone;				
12			var $zone = $('#zone' + zone.id);			
13			var $banner;
14				if (zone.id == 5230907) // videos teszt
15					return;					
16			// Banner meghatározása
17			if ($zone.find('iframe').length)
18				$banner = $zone.find('iframe'); 		
19			else if ($zone.find('img').length)
20				$banner = $zone.find('img'); 					
21			else if ($zone.find('[class*="goa-inserterScript-"]').length)	 // partner altal kuldott zona lesz a banner
22			{			
23
24				var zoneWidth = $zone.width();
25				window.partnerZoneIntervalTimeout[zone.id] = 0;
26				window.partnerZoneInterval[zone.id] = setInterval(function () {					
27					// Legfeljebb 10x futttatjuk, ha nem talunk akkor is megall
28					window.partnerZoneIntervalTimeout[zone.id]++;
29					if (window.partnerZoneIntervalTimeout[zone.id] == 20) 
30					{
31						window.clearInterval(partnerZoneInterval[zone.id]);
32						console.log('Parner banner timed out ' +zone.id);
33					}	
34					// Kepet vagy iframet keresunk
35					if ($zone.find('[class*="goa-inserterScript-"] > div > iframe').length || $zone.find('[class*="goa-inserterScript-"] > a > img').length) 
36					{	
37						$banner = ($zone.find('[class*="goa-inserterScript-"] > div > iframe').length)
38							? $zone.find('[class*="goa-inserterScript-"] > div > iframe')
39							: $zone.find('[class*="goa-inserterScript-"] > a > img')
40						;
41						window.clearInterval(partnerZoneInterval[zone.id]);						
42						
43						// A Tartalom alatti ráfutó 				
44						if (zone.id == 5107848 || zone.id == 5107778 || zone.id == 5301905) //  Médiaajánlat + Éles	tudástár 				
45						{					
46							var staticAd = new StaticAd({zone:zone});	
47							return;				
48						}	
49						
50						if ($banner) 
51						{
52							var width = zoneWidth;													
53							if ($zone.parents('.secondary-block').length)					
54								width = $zone.parents('.secondary-block').width();
55								
56							$banner.css({				
57								'display':'block',
58								'width':width,
59								'height':zone.height * (width / zone.width) + 'px'				
60							});
61						}
62						
63						// Feluszo - scale fix felbontasokhoz
64						if (zone.displayName == 'swimmer') 
65						{				
66							if (zone.id == 4745980) // Tudástár - desktop (éles)
67								scaleFix(zone.id,1920);		
68							if (zone.id == 4745981) // Tudástár - mobil (éles)
69								scaleFix(zone.id,768);
70							if (zone.id == 5362102) // Blogtár - desktop (éles)
71								scaleFix(zone.id,1920);		
72							if (zone.id == 5362103) // Blogtár - mobil (éles)
73								scaleFix(zone.id,768);										
74						} 		
75						
76						if (zone.id == 4604167) // Éles
77							stickyInit(zone.id,$banner);	
78							
79						// Inspiraciótár képek között - masonry fix
80						if (zone.id == 5079850 || zone.id == 5129415) // Éles, Médiaajánlat
81						{									
82							var width_kepek_kozott = $zone.parents('.bannerWrapper').width() - 10;// padding:0 5;										
83							$banner.css({				
84								'display':'block',
85								'width':width_kepek_kozott, 
86								'height':zone.height * (width_kepek_kozott / zone.width) + 'px'				
87							});
88							masonryUpdate();
89						}								
90					}					
91				}, 400);	
92					
93			}
94			
95			// A partner altal kuldott adverticum zonakodban levo banner csak a setinterval functionben letezik, a lenti meretezesek nem futnak rajta
96			
97											
98			if ($zone.hasClass('nowrap') )
99				return;			
100							
101			// Beágyazott bannerek 				
102			if (zone.displayName == 'embedded') {					
103				
104				// Welcome
105				//20200608 CLS 
106				if (zone.id == 4697964 || zone.id == 4697944)
107				{						
108					$banner.css({				
109						'display':'block',
110						'width':'100%',
111						'max-width':'960px',
112						'height':'auto',
113						'margin':'0 auto',						
114					});
115					return;	
116				}	
117				// Az Oldalszponzoracionak fix merete van
118				if (zone.id == 4916403) 					
119					return;		
120					
121				// A Tartalom ráfutó 				
122				if (zone.id == 4616128 || zone.id == 2781985 || zone.id == 4976880) //  Médiaajánlat + Éles	tudástár 
122+ blogtár				
123				{
124					//$('#contentOverCloneFixed').find('img').attr('src',$banner.attr('src'));
125					var adaptiveAd = new AdaptiveAd({zone:zone});	
126					return;				
127				}					
128				// A Tartalom ráfutó mobil				
129				if (zone.id == 5125044) //   Éles tudástár 				
130				{					
131					var adaptiveAd = new AdaptiveAd({zone:zone});	
132					return;				
133				}					
134				// A Tartalom ráfutó 2 blogtár	kispartner			
135				if (zone.id == 6522962 || zone.id == 6522965) //   Éles blogtar 				
136				{					
137					var adaptiveAd = new AdaptiveAd({zone:zone});	
138					return;				
139				}					
140				// A Tartalom alatti ráfutó 1-2				
141				if (zone.id == 5107848 || zone.id == 5107778 || zone.id == 5301905 || zone.id == 7178765 || zone.id == 7178770 ) //  Médiaajánlat + Éles	tudástár 				
142				{					
143					//var adaptiveAd = new AdaptiveAd({zone:zone});	// 2022.07.15 OFF -keskenyebb banner lett, nem rafuto
144					var staticAd = new StaticAd({zone:zone});	
145					return;				
146				}					
147				// A Tartalom ajánló közötti ráfutó 				
148				if (zone.id == 5646824 || zone.id == 5646837 || zone.id == 5646841) //  Médiaajánlat + Éles	tudástár 								
149				{					
150					var staticAd = new StaticAd({zone:zone});	
151					return;				
152				}					
153				// A Tartalom alatti ráfutó 			
154				if (zone.id == 5899457 || zone.id == 5899458) //  Éles blogtár	 				
155				{					
156					var staticAd = new StaticAd({zone:zone});	
157					return;				
158				}			
159				
160				// A Slideshow bannernek saját mérete van
161				if (zone.id == 4621749) // Médiaajánlat					
162					return;				
163				if (zone.id == 4635513) // Éles					
164					return;				
165					
166				// A goodbye bannernek saját mérete van
167				if (zone.id == 4618818) // Médiaajánlat					
168					return;					
169				if (zone.id == 4618821) // Médiaajánlat	(mobil - jelenleg nincs goodbye mobil hasznalatban)				
170					return;				
171				if (zone.id == 4797387) // Éles	- tudastar				
172					return;				
173				if (zone.id == 4640901) // Éles	- inspiraciotar				
174					return;				
175				if (zone.id == 4661766) // Éles	- shop				
176					return;				
177				if (zone.id == 4623527) // Éles	- blogtar				
178					return;				
179				if (zone.id == 5235408) // OTP demo - inspiraciotar
180					return;				
181				if (zone.id == 5275221) // Sberbank demo - inspiraciotar
182					return;
183					
184if (zone.id == 5129415) // Insp kepek kozott paceholder teszt
185	return;
186				
187				// Wrapper egyedi megjeléshez, ha nem partner altal kuldott zona
188				if ( ! $zone.is('[class*="goa-inserterScript-"]'))								
189					$zone.wrap('<div class="bannerWrapper" id="bannerWrapper' + zone.id + '"><div class="bannerWrapperBody"></div></div>');
190							
191				// Oldalsáv  (Tudástár, Blogtár)
192				if (zone.id == 4616857) // Médiaajánlat	
193					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');					
194				if (zone.id == 4670949) // Éles	- oldalsav 1 
195					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');					
196				if (zone.id == 4712730) // Éles	- oldalsav 2 
197					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');					
198				if (zone.id == 4781467) // Éles	- oldalsav 3 
199					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');				
200				if (zone.id == 4690779) // Éles	- Blogtár oldalsav tapado
201					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');					
202				if (zone.id == 5427220) // Éles	- Blogtár oldalsav
203					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');					
204				if (zone.id == 6453106) // Éles	- Blogtár oldalsav2
205					$zone.parents('.bannerWrapper').wrap('<div class="secondary-block"></div>');		
206
207					
208				if ( ! $banner) 
209					return;
210				
211				// A banner méretet a kijelzőhöz igazítjuk
212				var width = $zone.width();					
213				
214				if ($zone.parents('.secondary-block').length)					
215					width = $zone.parents('.secondary-block').width();
216				
217				if ($zone.parents('.bannerWrapper').length)	
218					var width = $zone.parents('.bannerWrapper').width();
219									
220				$banner.css({				
221					'display':'block',
222					'width':width,
223					'height':zone.height * (width / zone.width) + 'px'				
224				});
225					
226
227				// Oldalsáv tapadó (Tudástár)
228				if (zone.id == 4617698) // Médiaajánlat	
229					stickyInit(zone.id,$banner);			
230				if (zone.id == 4604167) // Éles
231					stickyInit(zone.id,$banner);			
232				if (zone.id == 4675259) // Ügyfél: roto
233					stickyInit(zone.id,$banner);					
234					
235				// Oldalsáv tapadó (Blogtár) - ideiglenes 03.05-06.06 Aspectis - N2 erejéig
236				if (zone.id == 4690779) 
237					stickyInitBlogtar(zone.id,$banner);				
238				
239				// Inspiraciótár képek között - masonry fix
240				if (zone.id == 5079850 /*|| zone.id == 5129415*/) // Éles, Médiaajánlat
241				{									
242					var width_kepek_kozott = $zone.parents('.bannerWrapper').width() - 10;// padding:0 5;										
243					$banner.css({				
244						'display':'block',
245						'width':width_kepek_kozott, 
246						'height':zone.height * (width_kepek_kozott / zone.width) + 'px'				
247					});
248					masonryUpdate();
249				}					
250				
251				// Inspiraciótár - Kép mellett - margin fix
252				if (zone.id == 4621708 || zone.id == 5125047) 
253				{
254					$zone.css({				
255						'margin-top':'20px'		
256					});
257				}	
258				
259				// Uj welcome bannerek
260				// 4609987 = Médiaajánlat - Tudástár
261				// 4697944 = Tudástár
262				// 4755503 = Inspirációtár
263				// 4907039 = Blogtár
264				// 5235406 = OTP demo - Tudástár 
265				// 5275212 = Sberbank demo - Tudástár 
266				if (zone.id == 4609987 || zone.id == 4697944 || zone.id == 4755503 || zone.id == 4907039 || zone.id == 5235406 || zone.id == 5275212 || zone.id == 5904232) 
267				{					
268					// inps szuro fix
269					//if ( $.fn.stick_in_parent && $('#categoryfilter2016').length )
270						//$(".secondary").trigger("sticky_kit:recalc");
271					
272					var $header = $('#site-header');
273					var $headerPush = $('#site-header-push');
274					var $hibar = $('#hibar');
275					$header.css({'position':'relative','top':0});
276					$headerPush.hide();
277					$hibar.hide();
278					
279					$bannerWrapper = $('#bannerWrapper' + zone.id);					
280					$bannerWrapper.css({'position':'relative','background':'#555','padding':0,'overflow':'hidden','padding-top':'20px','padding-bottom':'20px'});
281					//$bannerWrapper.append('<div id="bannerWrapperClose'+zone.id+'" style="cursor:pointer;height:48px;font-size:14px;line-height:40px;overflow:hidden;background:#555;color:#fff;text-align:center;white-space:nowrap;">Hírdetés bezárása (X)</div>');
282					$bannerWrapper.append('<div id="bannerWrapperCloseX'+zone.id+'" style="position:absolute;top:30px;right:30px;cursor:pointer;width:48px;height:48px;line-height:48px;overflow:hidden;text-align:center;box-shadow:0 0 4px 0px rgba(0, 0, 0, 0.75);background:#555;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;border:2px solid #777;"><img style="position:relative;top:4px;"  src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDIzLjMzMSAyMy4zMzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIzLjMzMSAyMy4zMzE7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4Ij4KPGc+Cgk8cGF0aCBkPSJNMTYuMDQzLDExLjY2N0wyMi42MDksNS4xYzAuOTYzLTAuOTYzLDAuOTYzLTIuNTM5LDAtMy41MDJsLTAuODc1LTAuODc1ICAgYy0wLjk2My0wLjk2NC0yLjUzOS0wLjk2NC0zLjUwMiwwTDExLjY2Niw3LjI5TDUuMDk5LDAuNzIzYy0wLjk2Mi0wLjk2My0yLjUzOC0wLjk2My0zLjUwMSwwTDAuNzIyLDEuNTk4ICAgYy0wLjk2MiwwLjk2My0wLjk2MiwyLjUzOSwwLDMuNTAybDYuNTY2LDYuNTY2bC02LjU2Niw2LjU2N2MtMC45NjIsMC45NjMtMC45NjIsMi41MzksMCwzLjUwMWwwLjg3NiwwLjg3NSAgIGMwLjk2MywwLjk2MywyLjUzOSwwLjk2MywzLjUwMSwwbDYuNTY3LTYuNTY1bDYuNTY2LDYuNTY1YzAuOTYzLDAuOTYzLDIuNTM5LDAuOTYzLDMuNTAyLDBsMC44NzUtMC44NzUgICBjMC45NjMtMC45NjMsMC45NjMtMi41MzksMC0zLjUwMUwxNi4wNDMsMTEuNjY3eiIgZmlsbD0iI0ZGRkZGRiIvPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=" /></div>');
283				
284					
285					
286					$banner.css({				
287						'display':'block',
288						'width':'960px',
289						'height':'720px'				
290					});
291					window.scrollTo(0, 0);
292					$bannerWrapper.css({height:0}).animate({height:760},3000,function(){});		/* 720 + padding (top:20 + bottom:20)*/			
293											
294					$bannerWrapper.on('click','#zone'+zone.id+',#bannerWrapperCloseX'+zone.id,function(e){
295						//Bezár animáció 
296						var duration = 300;
297						var top = ($hibar.length) ? 54 : 0;
298						$bannerWrapper.animate({height:0},duration,function(){$(this).remove()});						
299						$header.animate({top:top},duration,function(){
300							$header.css({'position':'fixed','top':top});
301							$headerPush.show();
302							$hibar.show();
303						});					
304					});				
305				}
306				
307				// Mobilos welcome bannerek
308				// 5095720 = Médiaajánlat - Tudástár 
309				// 4697964 = Tudástár 
310				// 4755504 = Inspirációtár 
311				// 4907040 = Blogtár 	
312				// 5235407 = OTP demo - Tudástár 				
313				// 5275216 = Sberbank demo - Tudástár 				
314				if (zone.id == 5095720 || zone.id == 4697964 || zone.id == 4755504 || zone.id == 4907040 || zone.id == 5235407 || zone.id == 5275216 || zone.id == 5904235) 
315				{
316					var $header = $('#site-header');
317					var $headerPush = $('#site-header-push');
318					var $hibar = $('#hibar');
319					$header.css({'position':'relative','top':0});
320					$headerPush.hide();
321					$hibar.hide();
322					
323					$bannerWrapper = $('#bannerWrapper' + zone.id);
324					$bannerWrapper.css({'position':'relative','background':'#fff','padding':0,'overflow':'hidden'});
325					$bannerWrapper.append('<div id="bannerWrapperClose'+zone.id+'" style="height:48px;font-size:14px;line-height:40px;overflow:hidden;background:#fff;color:#fff;text-align:center;white-space:nowrap;"><span style="display: inline-block;background:#F44336;padding:0 15px;border-radius:3px;font-size:12px;font-weight:bold;">Hírdetés bezárása (X)</span></div>');
326					
327					//$bannerWrapper.after('<div id="bannerWrapperPush'+zone.id+'" style="height:'+$bannerWrapper.outerHeight()+'px"></div>');
328					//$header.css({'top':$bannerWrapper.outerHeight()});
329						
330					$bannerWrapper.on('click','#zone'+zone.id+',#bannerWrapperClose'+zone.id,function(e){
331						//Bezár animáció 
332						var duration = 300;
333						$bannerWrapper.animate({height:0},duration,function(){$(this).remove()});
334						//$('#bannerWrapperPush'+zone.id).animate({height:0},duration,function(){$(this).remove()});
335						var top = ($hibar.length) ? 54 : 0;
336						$header.animate({top:top},duration,function(){
337							$header.css({'position':'fixed','top':top});
338							$headerPush.show();
339							$hibar.show();
340						});					
341						
342					});
343				}	
344
345				// Cube - cikkben
346				// 5152514 = Médiaajánlat - Tudástár
347				// 5349866 = Tudástár
348				// 5351835 = Blogtár
349				// 5235409 = OTP demo - Blogtár
350				// 5275225 = Sberbank demo - Blogtár
351				if (zone.id == 5152514 || zone.id == 5351835 || zone.id == 5349866 || zone.id == 5235409 || zone.id == 5275225) 
352				{				
353					var $bannerWrapperBg = $('<div/>');					
354					var $bannerWrapper = $('#bannerWrapper' + zone.id);					
355					$bannerWrapperBg.css({'width':'100%','background':'#f1f1f1','margin-top':'44px','padding-top':'20px'});										
356					$bannerWrapper.css({'max-width':'600px','margin-top':'0','margin-left':'auto','margin-right':'auto'});
357					$bannerWrapper.wrap($bannerWrapperBg);
358					var cube_width = $bannerWrapper.width();										
359					$banner.css({				
360						'display':'block',
361						'width':cube_width, 
362						'height':zone.height * (cube_width / zone.width) + 'px'				
363					});							
364					
365				}
366			}
367			
368			// Feluszo - scale fix felbontasokhoz
369			if (zone.displayName == 'swimmer') 
370			{				
371				if (zone.id == 4745980) // Tudástár - desktop (éles)
372					scaleFix(zone.id,1920);		
373				if (zone.id == 4745981) // Tudástár - mobil (éles)
374					scaleFix(zone.id,768);	
375					
376				if (zone.id == 5397536) // Inspirációtár - desktop (éles)
377					scaleFix(zone.id,1920);		
378				if (zone.id == 5397538) // Inspirációtár - mobil (éles)
379					scaleFix(zone.id,768);
380					
381				if (zone.id == 5362102) // Blogtár - desktop (éles)
382					scaleFix(zone.id,1920);		
383				if (zone.id == 5362103) // Blogtár - mobil (éles)
384					scaleFix(zone.id,768);							
385			} 	
386
387			// Welcome bannerek
388			if (zone.displayName == 'interstitial') 
389			{
390				
391				// Hatter kattintasra is zarodjon be a layer (2017.11.08 - Tamas)
392				$('#goa-background-' + zone.id).on('click',function(){										
393					$('#goa-next-' + zone.id).trigger('click');
394				});
395				$('#goa-bannerWrapper-' + zone.id).on('click',function(){										
396					$('#goa-next-' + zone.id).trigger('click');
397				});		
398				
399				// css helyett jssel oldjuk meg a meretezest (.css nem tudja az !important stringet)								
400				if ((screen.width < 779))
401				{
402					var ratio = screen.width / 768;
403					var width = 720 * ratio * 0.8; // kicsivel legyen kisebb
404					var height = 960 * ratio * 0.8;	// 	kicsivel legyen kisebb		
405				}
406				else{
407					var ratio = screen.width / 1920;
408					var width = 960 * ratio;
409					var height = 720 * ratio;									
410				}
411				$('#goa-top-' + zone.id).attr('style', 'width:auto!important;height:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important; background:none!important;')
412				$('#goa-layerWrapper-' + zone.id)
413					.attr('style', 'position:fixed;z-index:1105;margin:0;padding:0;border:0;outline:0;width:'+width+'px!important; height:'+height+'px!important; left:50%!important;top:50%!important;')
414					.css({					
415						'-webkit-transform' : 'translate(-50%,-50%)',
416						'-moz-transform'    : 'translate(-50%,-50%)',
417						'-ms-transform'     : 'translate(-50%,-50%)',
418						'-o-transform'      : 'translate(-50%,-50%)',
419						'transform'         : 'translate(-50%,-50%)'					
420					})
421					.find('#goa-bannerWrapper-' + zone.id).css({width:'100%',height:'100%'})
422					.find('img').css({width:'100%',height:'100%'});
423				;					
424			}	
425			
426		});	
427		
428		
429		/* 2021.05.27 staticAD:  tartalom rafuto html elemeivel,d e nem fut ra. ugyfel keres volt */		
430		var StaticAd = function( config ) 
431		{
432			this.$ = goa3.getjQuery();
433			
434			if ( ! this.$('#adaptive-ad-stylesheet').length)
435				this.$('head').append(this.$( '<link />' ).attr( { 
436					id:'adaptive-ad-stylesheet', 
437					rel: 'stylesheet', 
438					type: 'text/css', 
439					href: 'https://www.homeinfo.hu/assets/homeinfo2017/css/banner.adaptive-ad.css?20200214' 
440				}));
441			
442			this.zone = config.zone;
443			this.$zone = this.$( '#zone' + this.zone.id );
444			
445			this.$zone.before('<div class="adaptive-ad-before" id="adaptive-ad-before-' + this.zone.id + '">Hirdetés</div>'); //2020.02.14
446			this.$zone.wrap('<div class="adaptive-ad" id="adaptive-ad-' + this.zone.id + '"></div>');
447			
448			this.$container = this.$( '#adaptive-ad-' + this.zone.id );
449			//this.$container.css({'height':this.zone.height * (this.$zone.width() / this.zone.width)});									
450			//this.$container.css({'aspect-ratio':this.zone.width/this.zone.height});									
451			
452		}		
453	
454		/* Tartalom rafuto */		
455		var AdaptiveAd = function( config ) 
456		{
457			this.$ = goa3.getjQuery();
458			
459			if ( ! this.$('#adaptive-ad-stylesheet').length)
460				this.$('head').append(this.$( '<link />' ).attr( { 
461					id:'adaptive-ad-stylesheet', 
462					rel: 'stylesheet', 
463					type: 'text/css', 
464					href: 'https://www.homeinfo.hu/assets/homeinfo2017/css/banner.adaptive-ad.css?20200214' 
465				}));
466			
467			this.zone = config.zone;
468			this.$zone = this.$( '#zone' + this.zone.id );
469			
470			this.$zone.before('<div class="adaptive-ad-before" id="adaptive-ad-before-' + this.zone.id + '">Hirdetés</div>'); //2020.02.14
471			this.$zone.wrap('<div class="adaptive-ad" id="adaptive-ad-' + this.zone.id + '"></div>');
472			
473			this.$container = this.$( '#adaptive-ad-' + this.zone.id );
474			this.$container.css({'height':this.zone.height * (this.$zone.width() / this.zone.width)});
475						
476			this.$container.after('<div class="adaptive-ad-placeholder" id="adaptive-ad-placeholder-' + this.zone.id + '"></div>');
477			
478			this.$placeholder = this.$( '#adaptive-ad-placeholder-' + this.zone.id );
479			
480			// margin levesszuk az elozo elemrol 2020.02.28 -off
481			//this.$container.prev().prev().attr('style',';margin-bottom:0!important;');
482			
483			this.init( config );
484
485			this.$( window ).on( 'scroll' , this.$.proxy( this.scroll, this ) );
486			this.$( window ).on( 'resize' , this.$.proxy( this.init, this ) );
487			this.$( window ).on( 'resize' , this.$.proxy( this.scroll, this ) );
488			
489			// jelenleg nem tudjuk garantalni, hogy a tapado elott toltson be a rafuto banner, 
490			// ha utana tolt be, akkor valtozik a tartalom magassaga, emiatt frissiteni kell a kontenereket
491			/*var $primary = $('.primary');
492			var $secondary = $('.secondary');
493			if ($primary.length && $secondary.length)
494			{
495				var maxHeight = Math.max($primary.height(), $secondary.height());
496			
497				if (screen.width > 1035) 
498				{			
499					$secondary.css({'height':maxHeight});
500					$primary.css({'height':maxHeight});
501				}
502			}*/
503		}		
504		AdaptiveAd.prototype.init = function( config ) 
505		{
506			this.fixedHeaderHeight = 76;
507
508			this.containerTop = this.$container.offset().top;
509			this.containerWidth = this.$container.width();
510
511			this.isNotFixed = true;
512		}
513
514		AdaptiveAd.prototype.scroll = function( e ) 
515		{   
516			this.containerWidth = this.$container.width();
517			this.containerHeight = this.$container.innerHeight();
518			this.containerPaddingTop = this.containerHeight - this.$container.height();
519			
520			var currentScrollTop = this.$( window ).scrollTop();
521			var currentPos = this.containerTop - currentScrollTop;
522			
523			if( currentPos <= this.fixedHeaderHeight ) 
524			{
525				var top = this.fixedHeaderHeight - this.containerPaddingTop;
526				if( this.isNotFixed ) {           
527					this.$placeholder.css( { width: this.$container.width(), height: this.$container.height() + this.containerPaddingTop } );
528					this.$container.addClass( 'fixed' ).css({
529						top: top,
530						width: this.containerWidth
531					});
532					this.isNotFixed = false;					
533				}
534
535				var placeholderBottomPos =  ( this.$placeholder.offset().top - currentScrollTop ) + this.$placeholder.height() - top;
536				this.$container.css({ height: placeholderBottomPos < 0 ? 0 : placeholderBottomPos });
537
538			} 
539			else 
540			{
541				this.isNotFixed = true;
542
543				this.$container.removeClass('fixed');
544				this.$container.removeAttr('style');
545				this.$placeholder.removeAttr('style');
546
547				this.containerTop = this.$container.offset().top;
548			}
549		}	
550	
551	
552	});
553
554	
555	function scaleFix(zoneID,zoneOrigWidth) 
556	{
557		
558		var actualInnerWidth = document.body.clientWidth;     //screen.width helyett, ami a scrollbart istartalmazza
559		//var actualInnerWidth = document.body.scrollWidth;		
560				
561		var wrapper = document.getElementById('goa-bannerWrapper-' + zoneID);
562		var scale = actualInnerWidth / zoneOrigWidth;
563		
564		wrapper.style.webkitTransformOrigin = '100% 100%';		
565		wrapper.style.webkitTransform = 'scale('+scale+')';	
566		
567		wrapper.style.MozTransformOrigin = '100% 100%';		
568		wrapper.style.MozTransform = 'scale('+scale+')';	
569		
570		wrapper.style.msTransformOrigin = '100% 100%';	
571		wrapper.style.msTransform = 'scale('+scale+')';	
572		
573		wrapper.style.OTransformOrigin = '100% 100%';
574		wrapper.style.OTransform = 'scale('+scale+')';		
575		
576		wrapper.style.transformOrigin = '100% 100%';
577		wrapper.style.transform = 'scale('+scale+')';	
578	}
579	
580	function masonryUpdate() 
581	{
582		if ( ! $.fn.masonry) 
583		{
584			//console.log('timeout');
585			setTimeout(function(){ masonryUpdate(); } , 500);
586			return;
587		}	
588		$('.masonry-container').masonry('layout');	
589		$('.grid').masonry('layout');	
590	}
591	
592	function stickyInit(zoneID,$banner) 
593	{
594		if (  ! window.stick_in_parentInserted)
595		{
596			//console.log('loaded');
597			loadScript('https://www.homeinfo.hu/assets/homeinfo2017/js/jquery.sticky-kit.min.js');
598		}
599		if ( ! $.fn.stick_in_parent) 
600		{
601			//console.log('timeout');
602			setTimeout(function(){ stickyInit(zoneID,$banner); } , 500);
603			return;
604		}		
605		
606		// Méret módosítás
607		
608		var oWidth = $banner.width();
609		var oHeight = $banner.height();
610		var nWidth;
611		var nHeight;
612		
613		if (screen.width < 1035) 
614		{
615			nWidth = oWidth / 2;
616			nHeight = oHeight * (nWidth / oWidth);
617		}		
618		
619		if (screen.width < 500) 
620		{
621			nWidth = oWidth;
622			nHeight = oHeight;
623		}
624		
625		$banner.css({				
626			'width': nWidth,
627			'height':nHeight				
628		});		
629		
630		// Tapadás
631		
632		//$(window).on('load', function() {	// window onload mar nem fut itt
633		
634			//console.log('stick_in_parent');
635			var $primary = $('.primary');
636			var $secondary = $('.secondary');
637			var maxHeight = Math.max($primary.height(), $secondary.height());
638			
639			if (screen.width > 1035) 
640			{			
641				$secondary.css({'height':maxHeight});
642				$primary.css({'height':maxHeight});
643					
644				$('#bannerWrapper' + zoneID).stick_in_parent({offset_top:76});
645			}	
646				
647		//});		
648	}
649	
650	function loadScript(url)
651	{
652		var script = document.createElement('script');
653		script.type = 'text/javascript';
654		script.src = url;
655		document.getElementsByTagName('head')[0].appendChild(script);	
656		window.stick_in_parentInserted = true;
657	}	
658	
659	function stickyInitBlogtar(zoneID,$banner) 
660	{
661		if (screen.width > 1035) 
662			$('#bannerWrapper'+zoneID).parent().css({'border-bottom':0}).stick_in_parent({offset_top:76});
663		
664	}
665	
666
667		
668	
669})(jQuery);		

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.