PageSourceSearch

https://www.olaevia.gr/js/script.js?v=1790335461

js olaevia.gr collected 2026-09-25 11:25:22 UTC 5,952 bytes, 250 lines download raw bytes

1function updateTime()
2{
3	
4	$.ajax({
5					url: "time.php",
6					cache: false,
7					success: function(html) {
8						$("#date").html( html);														
9			}
10	});
11}
12function initBgLines()
13{
14	
15	jQuery('.market-blk').not('.nobgline').each(function(){
16		var $el=jQuery(this);
17		
18		if($el.find('.bgline').length==0)
19		{
20			$el.find('> .container:first').prepend('<span class="bgline bgline_right"></span>');
21		}
22	});
23}
24function fixBgLines()
25{
26	if(jQuery('.bgline').length>0 && window.innerWidth>479)
27	{
28		jQuery('.bgline').each(function(){
29			jQuery(this).parents('.market-blk').addClass('has_bgline');
30			//var el='#'+jQuery(this).data('until');
31			var el=jQuery(this).next('.market-sec').find('>h2');
32			//jQuery(el).css('border-bottom','1px solid #ccc');
33			var el_off=jQuery(el).offset();
34			var el_pos=jQuery(el).position();
35			if(jQuery(this).hasClass('bgline_left'))
36			{
37				var new_right=el_off.left - 30;
38				jQuery(this).css('right',new_right);
39				
40			}
41			else if(jQuery(this).hasClass('bgline_right'))
42			{
43				var elw=jQuery(el).innerWidth();
44				var new_left=el_pos.left + elw+30;
45				//console.log(el+' width: '+elw);
46				//console.log(el+' line: '+new_left);
47				jQuery(this).css('left',new_left);
48			}
49			jQuery(this).css('top',el_pos.top+10);
50			
51			
52			
53		});
54		//console.log('fixBgLines');
55	}
56}
57var searchitems_xhr=null;
58jQuery(document).ready(function()
59{
60      initBgLines();
61	  fixBgLines();
62		$(window).resize(function() {
63			fixBgLines();
64		});
65	  /*
66	  //disable right click
67	  $(document).bind("contextmenu",function(e){
68              return false;
69       }); 
70	   */
71	   jQuery('.nav').clone().appendTo('.side_bar');
72		jQuery('.menu').click(function(){
73        	jQuery('body').toggleClass('open');
74       	});	
75			
76		/*jQuery('.menu').click(function(){
77			if(jQuery('.form_blog.hide').is(':visible'))
78			{
79				jQuery('.form_blog.hide').slideToggle();
80			}
81			jQuery('.navigation > ul').slideToggle();
82		});*/
83		
84		/*
85		jQuery('#navsearch').click(function(){
86			if(jQuery('.navigation > ul').is(':visible'))
87			{
88				jQuery('.navigation > ul').slideToggle();
89			}
90			jQuery('.form_blog').slideToggle();
91		});
92		*/
93		jQuery('.nav > ul > li > a').on('click',function(){
94			var ww = window.innerWidth;
95			if(ww<=767)
96			{
97				var navthis=jQuery(this).parent('li');
98				jQuery('.nav > ul > li').not(navthis).removeClass('active').find('.upsubmenu').hide();
99				if(jQuery('.upsubmenu',navthis).length>0)
100				{
101					if(jQuery('.upsubmenu',navthis).is(':visible'))
102					{
103						jQuery('.upsubmenu',navthis).slideUp('fast');
104						jQuery(navthis).removeClass('active');
105						//jQuery('.header').removeClass('moving');
106					}
107					else
108					{
109						jQuery('.upsubmenu',navthis).slideDown('fast');
110						jQuery(navthis).addClass('active');
111						//jQuery('.header').addClass('moving');
112					}
113					return false;
114				}
115			}
116		});
117		
118		$(window).scroll(function(){
119			var maxt=200;
120			if(window.innerWidth<768)
121			{
122				maxt=100;
123			}
124			if (jQuery(this).scrollTop() > maxt) {
125				 jQuery(".header_bg").addClass('fixed');
126			} else {
127				 jQuery(".header_bg").removeClass('fixed');
128			}
129			
130			
131		});
132		
133	
134		
135		
136		jQuery('.cycle-slideshow-cont').each(function(){
137			var $slider = jQuery(this);
138			var slides=$slider.attr('data-cycle-slides');
139			
140			var gallery_id=$slider.attr('data-gallery-id');
141			$slider.find($slider.attr('data-cycle-slides')).each(function(){
142				//if(jQuery(this).length==0 || jQuery(this).find('li').length==0)
143				if(jQuery(this).find('li').length==0)
144				{
145					jQuery(this).remove();
146				}
147			});
148			
149			if($slider.find(slides).length>1)
150			{
151			
152				$slider.cycle({
153					prev:jQuery('.cycle-buttons[rel='+gallery_id+']').find('a.cycle-prev'),
154					next:jQuery('.cycle-buttons[rel='+gallery_id+']').find('a.cycle-next')
155				});
156			}
157			else
158			{
159				jQuery('.cycle-buttons[rel='+gallery_id+']').hide();
160			}
161	});
162	
163	var srch_to=0;
164	jQuery("#searcharticles").on('keyup',function(e){
165		var code = (e.keyCode ? e.keyCode : e.which);
166		var $me=jQuery(this);
167		var searchval=jQuery.trim($me.val());
168		
169				
170		if(code == 13 && searchval!='') {
171			jQuery('#advanced_search_frm').submit();
172			return false;
173		}
174		
175		jQuery('#searchresults').hide().empty();
176		if(searchval.length>1 )
177		{
178			if(srch_to)
179			{
180				clearTimeout(srch_to);
181			}
182			srch_to=setTimeout(function(){
183					$me.addClass('loading');
184					searchitems_xhr=jQuery.ajax({
185						url: 'search_articles.php',
186						type: 'POST',
187						dataType: 'html',
188						data: {term:encodeURIComponent(searchval)},
189						cache: false,
190						beforeSend : function()    {           
191							if(searchitems_xhr != null) {
192								$me.removeClass('loading');
193								searchitems_xhr.abort();
194							}
195						},
196						success: function(data) {
197							$me.removeClass('loading');
198							if(data && data.length>0)
199							{
200								jQuery('#searchresults').html(data).slideDown();
201							}
202							searchitems_xhr=null;
203							
204							
205								
206						
207					  }
208					});
209				},400);
210			
211		}
212		
213		
214		
215		
216		
217	});
218	jQuery(document).on('click','#searchresults span.close',function(){
219			jQuery('#searchresults').hide().empty();
220			return false;
221	});
222	jQuery(document).on('click',function(e){
223		if (jQuery('#searchresults').is(':hover')==false) {
224			jQuery('#searchresults').hide().empty();
225				
226		}
227		
228	});
229	
230	jQuery('.sub_cnt ul li.has_subcats > em').on('click',function(){
231		var $subcats=jQuery(this).next('.subcatalog');
232		console.log($subcats.length);
233		if($subcats.is(':visible'))
234		{
235			$subcats.slideUp();
236		}
237		else
238		{
239			jQuery('.subcatalog').not($subcats).slideUp();
240			$subcats.slideDown();
241		}
242	});
243	jQuery('.subcatalog > i').on('click',function(e){
244		jQuery('.subcatalog').slideUp();
245		e.stopPropagation();
246	});
247	
248	
249	
250});

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.