PageSourceSearch

https://mst.hu/upload/sebesz/js/script.js

js mst.hu collected 2026-09-29 13:48:47 UTC 5,054 bytes, 226 lines download raw bytes

1function selectbox(){
2	jQuery('div.selectbox option:selected').each(function(){ 
3		jQuery(this).parents('div.selectbox').children('span').html(jQuery(this).html());
4	});
5}
6
7$(function(){
8	var $window = $(window);
9	var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
10	var touch = (iOS) ? 'touchstart' : 'click';
11
12function jump_top(){
13    if ($window.scrollTop() > 500){
14   if($('#jump-top.inactive').length > 0){
15   $('#jump-top').removeClass('inactive');
16   }}else{
17   if($('#jump-top.inactive').length == 0){
18   $('#jump-top').addClass('inactive');
19   }}
20}
21
22function isMobile(){
23	if( $('#mobile-menu-icon').is(':visible')){
24		$('body').addClass('mobile');
25	}else{
26		$('body').removeAttr('class');
27	}
28}
29
30function scroll_visible(parent){
31	$(parent).each(function(i){
32		var num = 200;
33		$this = $(this);
34var attr = $this.attr('data-top');
35if (typeof attr !== typeof undefined && attr !== false){
36num = parseInt(attr);
37}
38if ($(window).width() < 500) num-=100;
39if (($(window).scrollTop() + $(window).height())>= ($(this).offset().top)+num){
40            if (!$(this).hasClass('first-visible')){
41                $this.addClass('first-visible');
42				counter();
43           }
44        }
45	});
46
47}
48
49function counter(){
50$('.first-visible p.num').each(function(){
51  var $this = $(this);
52  var sum = $this.attr('data-num');
53  $({ Counter: 0 }).animate({ Counter: sum }, {
54    duration: 1400,
55    easing: 'swing',
56    step: function () {
57      $this.text(Math.ceil(this.Counter));
58    }
59  });
60});
61}
62
63var targetDiv = '.anime-start';
64if($(targetDiv).length){
65scroll_visible(targetDiv);
66
67$(window).scroll(function(){
68scroll_visible(targetDiv);
69});
70}
71
72if (document.documentMode || /Edge/.test(navigator.userAgent)) {
73    $('#news').addClass('msie');
74}
75
76jump_top();
77isMobile();
78
79if(jQuery.fn.dotdotdot && $('div.news-box').length){
80	$('div.news-box div.text').each(function(){
81		$(this).dotdotdot();
82	});
83}
84
85$(document).ready(function(){
86$('#main-menu').html($('#topmenupanel').html()).prepend('<div class="btns"></div>').children('.btns');
87$('#site-header .btns .btn:not(.username)').clone().appendTo($('#site-header #main-menu > .btns'));   
88    
89
90$('#mobile-menu-icon').click(function(){
91	$('body').toggleClass('menu-open');
92	$('#main-menu li ul').removeAttr('style');
93});
94
95$('#loggedin span.username').click(function(){
96	$(this).parent().toggleClass('open');
97});
98
99if (jQuery.fn.on)
100{
101$(document).on(touch,'.menu-open #main-menu li',function(){
102	var submenu = $(this).children('ul');
103	if(submenu.length){
104		submenu.slideToggle(300);
105	}
106});
107}
108else
109{
110$('.menu-open #main-menu li').live(touch,function(){
111	var submenu = $(this).children('ul');
112	if(submenu.length){
113		submenu.slideToggle(300);
114	}
115});
116}
117
118if (jQuery.fn.dotdotdot)
119{
120	$("article .cnt").dotdotdot();
121}
122
123$('#top-news-box').slick({
124	autoplay: true,
125	arrows:false,
126 dots: true,
127 speed: 800,
128 fade: true
129});
130
131$('#societies-slider').slick({
132	  dots: false,
133	slide: 'div.slide',
134	    autoplay: true,
135		infinite: true,
136		arrows:true,
137		speed: 1200,
138    slidesToShow: 4,
139  slidesToScroll: 4,
140  cssEase: 'ease',
141responsive: [
142    {
143      breakpoint: 992,
144      settings: {
145        slidesToShow: 3,
146        slidesToScroll: 3
147      }
148    },
149    {
150      breakpoint: 640,
151      settings: {
152        slidesToShow: 2,
153        slidesToScroll: 2
154      }
155    }
156  ]
157});
158
159if (jQuery.fn.on)
160{
161$('#jump-top').on(touch,function(){
162  $('html,body').animate({
163    scrollTop: 0
164  }, 400);
165});
166}
167else
168{
169$('#jump-top').live('touch',function(){
170  $('html,body').animate({
171    scrollTop: 0
172  }, 400);
173});
174}
175
176$(window).resize(function(){
177	isMobile();
178});
179
180$(window).scroll(function(){
181	jump_top();
182});
183});
184    
185    //###########################  keresés  ###########################
186	if(window.location.href.indexOf("info.aspx?sp=14") > -1){
187		  var myCallback = function() {
188		  if (document.readyState == 'complete') {  google.search.cse.element.go();  
189		
190		  } else {    
191		
192			google.setOnLoadCallback(function(){}, true);  
193			google.search.cse.element.go();
194			var searcher = google.search.cse.element.getElement('gs');
195		
196			var regex = /[?&]([^=#]+)=([^&#]*)/g,
197					url = document.location.search,
198					params = {},
199					match;
200				while(match = regex.exec(url)) {
201					params[match[1]] = match[2];
202				}
203		
204			var strReturn = params['q'];
205			var q = unescape(strReturn);
206			searcher.execute(q);
207			  }
208			};
209			
210		window.__gcse = {
211		  parsetags: 'explicit',
212		  callback: myCallback
213		};
214
215	(function() {
216    var cx = '002513711163784223951:apc5rqc1t68';
217		var gcse = document.createElement('script');
218		gcse.type = 'text/javascript';
219		gcse.async = true;
220		gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
221			'//www.google.com/cse/cse.js?cx=' + cx;
222		var s = document.getElementsByTagName('script')[0];
223		s.parentNode.insertBefore(gcse, s);
224	  })();	  
225}
226});

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.