PageSourceSearch

https://www.machovka.cz/script/default.js?

js machovka.cz collected 2026-09-28 13:48:37 UTC 15,663 bytes, 522 lines download raw bytes

1
2var headerBoxWidth = $('header .box').width();
3var headerNavUlWidth = $('header nav').outerWidth(true);
4
5if ($('header .search_box').length){
6    var headerSearchWidth = $('header .search_box').outerWidth(true);
7}else{
8    var headerSearchWidth = 0;
9}
10
11if ($('header .lang').length){
12    var headerLangWidth = $('header .lang').outerWidth(true);
13}else{
14    var headerLangWidth = 0;
15}
16
17var elementCount = headerNavUlWidth + headerSearchWidth + headerLangWidth;
18
19
20
21var headerSmallNavUlWidth = $('header.icons nav').outerWidth(true);
22var headerSmallSearchWidth = $('header.icons .search_box').outerWidth(true);
23var elementSmallCount = headerSmallNavUlWidth + headerSmallSearchWidth + headerLangWidth;
24
25var webScript = function(){
26
27   if ( headerBoxWidth - 20 < elementCount){
28
29      $('header').addClass('icons')
30      $('.ipad_menu').addClass('active')
31      headerBoxWidth = $('header .box').width();
32      
33      headerSmallNavUlWidth = $('header.icons nav').outerWidth(true);
34      headerSmallSearchWidth = $('header.icons .search_box').outerWidth(true);
35     
36
37      if ( headerBoxWidth - 20 < elementSmallCount){
38         $('header').addClass('icons small')
39         $('.ipad_menu').addClass('active small')
40      }else{
41         $('header').removeClass('small')
42         $('.ipad_menu').removeClass('small')
43         headerSmallNavUlWidth = $('header.icons nav').outerWidth(true);
44         if ($('header.icons .search_box').length){
45             headerSmallSearchWidth = $('header.icons .search_box').outerWidth(true);
46         }else{
47             headerSmallSearchWidth = 0;
48         }
49
50         elementSmallCount = headerSmallNavUlWidth + headerSmallSearchWidth + headerLangWidth;
51      }
52      
53   }else{
54      $('header').removeClass('icons')
55      $('.ipad_menu').removeClass('active')
56      headerBoxWidth = $('header .box').width();
57      headerNavUlWidth = $('header nav').outerWidth(true);
58      if ($('header .search_box').length){
59          headerSearchWidth = $('header .search_box').outerWidth(true);
60      }else{
61          headerSearchWidth = 0;
62      }
63
64       if ($('header .lang').length){
65           headerLangWidth = $('header .lang').outerWidth(true);
66       }else{
67           headerLangWidth = 0;
68       }
69
70      elementCount = headerNavUlWidth + headerSearchWidth + headerLangWidth; 
71
72   }
73   
74   if ( headerBoxWidth - 20 < elementSmallCount){
75         $('header').addClass('icons small')
76         $('.ipad_menu').addClass('active small')
77   }
78
79
80
81}
82
83   
84$(window).on('load', function() {  
85 
86      webScript();    
87      setTimeout(function() {
88         $('.message_centering').addClass('active');
89      },200);
90   
91
92});
93   
94   
95$(document).ready(function(){ 
96
97  var windowWidth = $(window).width();
98  var windowHeight = $(window).height();
99
100   if ($(":radio").length || $(":checkbox").length) {
101        $.uniform.restore();
102    }
103
104    if ($(":radio").length) {
105        $(":radio").uniform({checkboxClass: 'radio'});
106    }
107    if ($(":checkbox").length) {
108        $(":checkbox:not(.c-tgl)").uniform({checkboxClass: 'checker'});
109    }
110
111
112
113
114    if ($(".partners_list").length) {
115        setTimeout(function () {
116            if (window.location.hash) {
117                var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
118                if ($('header').css('position') == 'fixed') {
119                    var value = $('header').outerHeight() + 20
120                } else {
121                    var value = 20
122                }
123                var offset = $('.partners_list .item[name=' + hash + ']').offset().top - value;
124                $('html,body').animate({scrollTop: offset}, 1200);
125            }
126        }, 500);
127    }
128
129
130    if ($(".go_form_box").length) {
131        $('.go_form_box').click(function () {
132            if ($(this).parent().hasClass('active')) {
133            } else {
134                var thisHref = $(this).attr('href')
135                var split = thisHref.split("#");
136                var afterSplit = "Error parsing url";
137                if (split[1] != null) {
138                    afterSplit = split[1];
139                }
140                if ($('#' + afterSplit).length) {
141
142                    var offset = $('#' + afterSplit).offset().top
143                    if ($('header').css('position') == 'absolute') {
144                        var headerHeight = 15
145                    } else {
146                        var headerHeight = $('header').outerHeight();
147                    }
148                    $('html,body').animate({scrollTop: offset - headerHeight}, 600);
149                }
150            }
151        });
152
153        if(window.location.hash) {
154            var hash = window.location.hash.substring(1)
155
156            setTimeout(function() {
157                var offset = $('#'+hash).offset().top
158                if ( $('header').css('position') == 'absolute' ){
159                    var headerHeight = 15
160                }else{
161                    var headerHeight = $('header').outerHeight();
162                }
163
164                $('html,body').animate({ scrollTop: offset - headerHeight }, 600);
165            },600);
166
167        }
168    }
169
170
171
172
173
174   $('button:not(.scroll_top):not(.lines-button):not(.icon)').on('click', function(){
175      if ( $(this).hasClass('active') ){
176   		$(this).removeClass('active')
177   		$(this).parent().attr('aria-expanded', "false");
178         $(this).attr('aria-expanded', "false");
179   	} else {
180   		$(this).addClass('active')
181   		$(this).parent().attr('aria-expanded', "true");
182         $(this).attr('aria-expanded', "true");
183   	}
184   });
185   
186   $(document).keyup(function(e) {
187      if (e.shiftKey && e.key === 'Tab') {
188         if ( ($(e.target).attr('aria-expanded') == 'true') || ($(e.target).parent().find('button:first').attr('aria-expanded') == 'true') ){
189            $(e.target).parent().find('button:first').removeClass('active')
190      		$(e.target).parent().attr('aria-expanded', "false");
191            $(e.target).parent().find('button:first').attr('aria-expanded', "false");
192         }        
193      }                 
194   });
195   
196   
197   $('header .search_box .icon').click(function(){ 
198      $('header .search_box').addClass('active');
199      setTimeout(function() {
200         $('header .search_box input[type=text]').focus();
201      },50); 
202   });
203   
204   /*
205   $('header .lang span').click(function(){ 
206      if ( $(this).hasClass('active') ){
207         $(this).removeClass('active')   
208         $(this).parent().find('.hide').slideUp();   
209      }else{
210         $(this).addClass('active')
211         $(this).parent().find('.hide').slideDown();
212      } 
213   });
214   */ 
215   
216   $('html').click(function(e){
217      var thisClass = $(e.target).attr('class')  
218
219      if( (thisClass == 'open_lang active') ||(thisClass == 'open_lang') || (thisClass == 'choose_lang')){   
220      }else{     
221         $('header .lang span').removeClass('active')
222         /*
223         $('header .lang .hide').slideUp(); 
224         */     
225      }
226   });
227 
228   $('html').click(function(e){
229      var thisClass = $(e.target).attr('class')
230      if( (thisClass == 'search_field') || (thisClass == 'icon')){
231      }else{
232         $("header .search_box").removeClass('active')
233         $('header .search_box input[type=text]').blur(); 
234      }
235   });
236     
237   $('header .search_box form button').click(function(e){
238      var count = $('header .search_box input[type=text]').val().length
239      if ( count == 0 ){
240         $("header .search_box").removeClass('active')
241         $('header .search_box input[type=text]').blur(); 
242         return false;
243      }
244      
245   });
246
247
248    $('.ipad_menu ul li .arrow_expand').click(function(){
249      $(this).siblings('ul').slideToggle();
250   });
251
252
253   $('header nav ul li ul li:nth-child(1)').each(function(){
254      if ( $(this).hasClass('active')){
255         $( this ).parent('ul').addClass( "special" );
256      }   
257   });
258
259   $('header .lang button').click(function(){
260      $('header .lang .hide').slideToggle('active');
261   });
262
263   $( "header nav ul li ul li:first-child" ).hover(function() {
264      $( this ).parent().addClass( "hover_efekt" );
265   }, function() {
266      $( this ).parent().removeClass( "hover_efekt" );
267   }); 
268   
269   $( "header .search_box form button" ).hover(function() {
270      $( this ).parents('.search_box').addClass( "hover_efekt" );
271   }, function() {
272      $( this ).parents('.search_box').removeClass( "hover_efekt" );
273   }); 
274
275
276   
277   load_carousels(); 
278    
279    $(".aside_slider.version_1:not(.stop)").owlCarousel({
280      items : 1, 
281      navigation: false,
282      navigationText: ["",""],
283      transitionStyle : "fade",
284      pagination: false,
285      autoPlay: 6000,
286      singleItem: true,
287      slideSpeed : 2000,
288      smartSpeed : 2000,
289      paginationSpeed : 1000,
290      stopOnHover:false,
291      touchDrag  : false,
292      mouseDrag  : false,
293      addClassActive : true
294    });  
295    
296    $(".action_slider:not(.stop)").owlCarousel({
297      items : 1, 
298      navigation: false,
299      navigationText: ["",""],
300      transitionStyle : "fade",
301      pagination: true,
302      autoPlay: 6000,
303      singleItem: true,
304      slideSpeed : 2000,
305      smartSpeed : 2000,
306      paginationSpeed : 1000,
307      stopOnHover:false,
308      touchDrag  : false,
309      mouseDrag  : false,
310      addClassActive : true
311    });  
312    
313    $(".gallery_slider:not(.stop)").owlCarousel({
314      items: 4,
315      itemsDesktop : [1500, 4],
316      itemsTablet : [1024, 3],
317      itemsTabletSmall : [960, 2],
318      itemsMobile : [400, 1],
319      navigation: true,
320      navigationText : ["", ""],
321      pagination: false,
322      loop: true,
323      autoPlay : false,
324      stopOnHover: false,
325      scrollPerPage: false,
326      mouseDrag: true,
327      touchDrag: true,
328      slideSpeed : 1000,
329      paginationSpeed : 1000
330   });
331   
332   $(".partner_slider:not(.stop)").owlCarousel({
333      items: 5,
334      itemsDesktop : [1500, 5],
335      itemsTablet : [1024, 4],
336      itemsTabletSmall : [960, 3],
337      itemsMobile : [400, 2],
338      navigation: true,
339      navigationText : ["", ""],
340      pagination: false,
341      loop: true,
342      autoPlay : 5000,
343      stopOnHover: false,
344      scrollPerPage: false,
345      mouseDrag: true,
346      touchDrag: true,
347      slideSpeed : 1000,
348      paginationSpeed : 1000
349   });
350   
351   $(".news.version_3 .hp_news_list .news_slider:not(.stop)").owlCarousel({
352      items : 1, 
353      navigation: true,
354      navigationText: ["",""],
355      pagination: true,
356      loop: true,
357      singleItem : true,
358      transitionStyle : "goDown",
359      autoPlay : false, //6000,
360      activeClass : 'active',
361      autoHeight : true,
362      autoplayHoverPause: true,
363      mouseDrag: false,
364      touchDrag: true,
365   });
366
367    $(".hp_deska_list.deska_list.version_2 .deska_slider:not(.stop)").owlCarousel({
368        items: 3,
369        itemsDesktop : [1500, 3],
370        itemsTablet : [1024, 2],
371        itemsTabletSmall : [960, 2],
372        itemsMobile : [600, 1],
373        navigation: true,
374        navigationText : ["", ""],
375        pagination: false,
376        loop: true,
377        autoPlay : false,
378        stopOnHover: false,
379        scrollPerPage: false,
380        mouseDrag: true,
381        touchDrag: true,
382        slideSpeed : 1000,
383        paginationSpeed : 1000
384    });
385        
386   $('.open_close_navigation').click(function(){
387      if($(this).find('.lines-button').hasClass('close')){
388         var menuHeight = $('.ipad_menu').outerHeight();
389         $(this).find('.lines-button').removeClass('close');
390         $('.ipad_menu').removeClass('move').css({'top' : -menuHeight});
391         $(this).find('.lines-button').attr('aria-expanded', "false");
392      }else{
393         $(this).find('.lines-button').addClass('close');
394         $('.ipad_menu').addClass('move');
395         $(this).find('.lines-button').attr('aria-expanded', "true");
396      }
397   });
398   
399   $('.ipad_menu ul li .icon, .ipad_menu ul li a.return_false').click(function(){
400      if( $(this).parents('li').find('.icon').hasClass('active') ){
401         $(this).parents('li').find('.icon').removeClass('active')
402         $(this).parents('li').find('a').removeClass('active')
403         $(this).parent().find('ul').slideUp();
404      }else{
405         var offset = $(this).offset().top - 10;
406         $(this).parents('li').find('.icon').addClass('active')
407         $(this).parents('li').find('a').addClass('active')
408         $(this).parent().find('ul').slideDown();
409         if ($('header').css('position') == 'absolute'){
410            $('html,body').animate({ scrollTop: offset }, 600);
411         }
412      }
413   }); 
414
415      
416   
417   $('.contact_list .item .top').click(function(){
418      if( $(this).parents('.item').hasClass('active') ){
419         $(this).parents('.item').removeClass('active')
420         $(this).parents('.item').find('.hide').slideUp();
421      }else{
422         $(this).parents('.item').addClass('active')
423         $(this).parents('.item').find('.hide').slideDown();
424      }
425   }); 
426   
427   $('.contact_list .item .open').click(function(){
428      if( $(this).parents('.person').hasClass('active') ){
429         var thisText = $(this).attr('data-title')
430         $(this).parents('.person').removeClass('active')
431         $(this).parents('.person').find('.hidden').slideUp();
432         $(this).text(thisText)
433      }else{
434         var thisText = $(this).attr('data-title2')
435         $(this).parents('.person').addClass('active')
436         $(this).parents('.person').find('.hidden').slideDown();
437         $(this).text(thisText)
438      }
439      return false;
440   }); 
441
442   $( ".news_list .item a, .category_list .item a, .release_list .item a, .partners_list .item a, .contact_list .item .top" ).hover(function() {
443      $( this ).parents('.item').addClass( "hover_efekt" );
444   }, function() {
445      $( this ).parents('.item').removeClass( "hover_efekt" );
446   }); 
447   
448
449   $(".prihlaska_button").click(function() {
450      $('#circlet_form #s_name').focus();
451      findInsiders($('.application_popup'));
452   });
453
454   $(".application_popup .box .btn").click(function() {
455      $('.prihlaska_button').focus();   
456   });   
457
458   $(".omluvenka_button").click(function() {
459      $('#apologize_form #s_name_parent').focus();
460      findInsiders($('.apologize_popup'));
461   });
462
463   $(".apologize_popup .box .btn").click(function() {
464      $('.omluvenka_button').focus();
465   });
466   
467
468   $('footer .form form input[type=submit]').click(function(){
469      setTimeout(function(){ 
470         $('.control_popup .box button').focus();
471      }, 50);      
472   });
473
474   $('.control_popup .box .btn').click(function(){
475      $('input[type=submit]').focus();
476   });
477   
478
479
480  
481    
482});  
483
484                                                    
485$(window).resize(function(){
486  webScript();
487});
488
489
490function load_carousels() {
491	  
492	reloadImg(); 
493	
494	$(".main_slider:not(.stop)").owlCarousel({
495      items : 1, 
496      navigation: false,
497      navigationText: ["",""],
498      transitionStyle : "fade",
499      pagination: true,
500      autoPlay: 6000,
501      singleItem: true,
502      slideSpeed : 2000,
503      smartSpeed : 2000,
504      paginationSpeed : 1000,
505      stopOnHover:false,
506      touchDrag  : false,
507      mouseDrag  : false,
508      addClassActive : true,
509      afterInit: function (elem) { 
510         var thisItem = elem.find('.owl-item.active .slider-lazy');
511         var thisSrc = thisItem.attr('data-src');
512         thisItem.attr('src',thisSrc);
513         thisItem.parent().attr('style','background-image: url('+thisSrc+')');
514      },
515      afterMove: function (elem) {   
516         var thisItem = elem.find('.owl-item.active .slider-lazy');
517         var thisSrc = thisItem.attr('data-src')
518         thisItem.parent().attr('style','background-image: url('+thisSrc+')');
519         //thisItem.removeClass("slider-lazy");
520      }
521   }); 
522}

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.