PageSourceSearch

https://kompresorypema.cz/wp-content/themes/industrypress/js/custom.js?ver=6.8.11

js kompresorypema.cz collected 2026-10-08 06:39:58 UTC 13,868 bytes, 556 lines download raw bytes

1/***************************************************************************************************************
2||||||||||||||||||||||||        CUSTOM SCRIPT FOR INDUSTRY PRESS            ||||||||||||||||||||||||||||||||||||
3****************************************************************************************************************
4||||||||||||||||||||||||||||              TABLE OF CONTENT                  ||||||||||||||||||||||||||||||||||||
5****************************************************************************************************************
6****************************************************************************************************************
701. Revolution slider
802. Sticky header
903. Fact counter
1004. accrodion
1105. BrandCarousel
1206. SelectDropdown
1307. ScrollToTop 
1408. Vertical slider 
1509. Contact info Carousel
1610. Project Layout
1711. Cart Touch Spin
1812. PriceFilter
1913. Cart touch spin
2014. Single product carousel 
2115. Related project carousel
2216. Fancybox activator
2317. ContactFormValidation
2418. Scoll to target
25
26****************************************************************************************************************
27||||||||||||||||||||||||||||            End TABLE OF CONTENT                ||||||||||||||||||||||||||||||||||||
28****************************************************************************************************************/
29
30(function($) {
31
32	"use strict";
33
34//------like end-----
35var bunch_theme = {			
36		count: 0,
37		likeit: function(options, selector)
38		{
39			options.action = '_bunch_ajax_callback';
40			
41			if( $(selector).data('_bunch_like_it') === true ){
42				bunch_theme.msg( 'You have already done this job', 'error' );
43				return;
44			}
45			
46			$(selector).data('_bunch_like_it', true );
47
48			bunch_theme.loading(true);
49			
50			$.ajax({
51				url: ajaxurl,
52				type: 'POST',
53				data:options,
54				dataType:"json",
55				success: function(res){
56
57					try{
58						var newjason = res;
59
60						if( newjason.code === 'fail'){
61							$(selector).data('_bunch_like_it', false );
62							bunch_theme.loading(false);
63							bunch_theme.msg( newjason.msg, 'error' );
64						}else if( newjason.code === 'success' ){
65							bunch_theme.loading(false);
66							$(selector).data('_bunch_like_it', true );
67							bunch_theme.msg( newjason.msg, 'success' );
68						}
69						
70					}
71					catch(e){
72						bunch_theme.loading(false);
73						$(selector).data('_bunch_like_it', false );
74						bunch_theme.msg( 'There was an error with request '+e.message, 'error' );
75						
76					}
77				}
78			});
79		},
80		loading: function( show ){
81			if( $('.ajax-loading' ).length === 0 ) {
82				$('body').append('<div class="ajax-loading" style="display:none;"></div>');
83			}
84			
85			if( show === true ){
86				$('.ajax-loading').show('slow');
87			}
88			if( show === false ){
89				$('.ajax-loading').hide('slow');
90			}
91		},
92		
93		msg: function( msg, type ){
94			if( $('#pop' ).length === 0 ) {
95				$('body').append('<div style="display: none;" id="pop"><div class="pop"><div class="alert"><p></p></div></div></div>');
96			}
97			if( type === 'error' ) {
98				type = 'danger';
99			}
100			var alert_type = 'alert-' + type;
101			
102			$('#pop > .pop p').html( msg );
103			$('#pop > .pop > .alert').addClass(alert_type);
104			
105			$('#pop').slideDown('slow').delay(5000).fadeOut('slow', function(){
106				$('#pop .pop .alert').removeClass(alert_type);
107			});
108			
109			
110		},
111		
112	};
113	
114//------like end-----	
115
116// RevolutionSliderActiver
117function revolutionSliderActiver () {
118	if ($('.rev_slider_wrapper #slider1').length) {
119		$("#slider1").revolution({
120			sliderType:"standard",
121			sliderLayout:"auto",
122			delay:5000,
123            hideTimerBar:"off",
124            onHoverStop:"off",
125			navigation: {
126				arrows:{enable:true} 
127			}, 
128			gridwidth:1170,
129			gridheight:580 
130		});
131	}
132}
133
134
135//  Main menu
136function mainmenu() {
137 //Submenu Dropdown Toggle
138 if ($('.main-menu li.dropdown ul').length) {
139  $('.main-menu li.dropdown').append('<div class="dropdown-btn"></div>');
140
141  //Dropdown Button
142  $('.main-menu li.dropdown .dropdown-btn').on('click', function() {
143   $(this).prev('ul').slideToggle(500);
144  });
145 }
146
147}
148
149
150//  Fact counter
151function CounterNumberChanger () {
152	var timer = $('.timer');
153	if(timer.length) {
154		timer.appear(function () {
155			timer.countTo();
156		});
157	}
158
159}
160
161// Search Popup
162if ($('.top-search-box .btn-triger').length) {
163	$(".top-search-box .btn-triger").on('click', function(e) {
164		e.preventDefault();
165		// animate
166		$(this).toggleClass('opened');
167		$('.top-search-box .search-box').fadeToggle();
168	});
169}
170
171// testimonial Slider
172function testimonialSlider() {
173    if ($('.testimonials-item').length) {
174        $('.testimonials-item').owlCarousel({
175            loop:true,
176            margin:30,
177            nav:true,
178            dots: true,
179            autoplayHoverPause:false,
180            autoplay: 6000,
181            smartSpeed: 1000,
182            navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ],
183            responsive:{
184                0: {
185                    items: 1
186                },
187                600: {
188                    items: 2
189                },
190                1000: {
191                    items: 3
192                },
193                1001: {
194                    items: 3
195                }
196            }
197        });
198    }
199}
200
201
202// Brand Carousel
203function brandCarousel () {
204    if ($('.brand').length) {
205        $('.brand').owlCarousel({
206            dots: false,
207            loop:true,
208            margin:20,
209            nav:true,
210            navText: [
211                '<i class="fa fa-angle-left"></i>',
212                '<i class="fa fa-angle-right"></i>'
213            ],
214            autoplayHoverPause: false,
215            autoplay: 6000,
216            smartSpeed: 1000,
217            responsive:{
218                0:{
219                    items:1
220                },
221                600:{
222                    items:2
223                },
224                800:{
225                    items:3
226                },
227                1024:{
228                    items:4
229                },
230                1100:{
231                    items:4
232                },
233                1200:{
234                    items:5
235                }
236            }
237        });    		
238    }
239}
240
241
242
243// Select menu 
244function selectDropdown () {
245  if($(".selectmenu").length) {
246    $( ".selectmenu" ).selectmenu();
247  }
248}
249
250
251//  Mainmenu Sticky
252function stickyMainmenu() {
253    if ($('.stricky').length) {
254        var strickyScrollPos = 100;
255        if ($(window).scrollTop() > strickyScrollPos) {
256            $('.stricky').addClass('stricky-fixed');
257            $('.scroll-to-top').fadeIn(500);
258        } else if ($(this).scrollTop() <= strickyScrollPos) {
259            $('.stricky').removeClass('stricky-fixed');
260            $('.scroll-to-top').fadeOut(500);
261        }
262    }
263}
264
265
266//  scoll to Top
267function scrollToTop() {
268    if ($('.scroll-to-target').length) {
269        $(".scroll-to-target").on('click', function() {
270            var target = $(this).attr('data-target');
271            // animate
272            $('html, body').animate({
273                scrollTop: $(target).offset().top
274            }, 1000);
275
276        });
277    }
278}
279
280
281//vertical slider 
282function horizenl(){
283    $('.bxslider').bxSlider({
284	   mode: 'vertical',
285	   slideMargin: 5
286     
287        
288	});
289}
290
291
292//Accordion Box
293function accordion() {
294    if($('.accordion-box').length){
295        $(".accordion-box").on('click', '.accord-btn', function() {
296
297            if($(this).hasClass('active')!==true){
298            $('.accordion .accord-btn').removeClass('active');
299
300            }
301
302            if ($(this).next('.accord-content').is(':visible')){
303                $(this).removeClass('active');
304                $(this).next('.accord-content').slideUp(500);
305            }else{
306                $(this).addClass('active');
307                $('.accordion .accord-content').slideUp(500);
308                $(this).next('.accord-content').slideDown(500);	
309            }
310        });	
311    }
312}
313
314
315// Contact info Carousel
316function contactInfo() {
317    if ($('.contact-info-carousel').length) {
318        $('.contact-info-carousel').owlCarousel({
319            loop: true,
320            margin: 0,
321            nav: false,
322            navText: [
323                '<i class="fa fa-angle-left"></i>',
324                '<i class="fa fa-angle-right"></i>'
325            ],
326            dots: true,
327            autoWidth: false,
328            autoplay: true,
329            autoplayTimeout: 3000,
330            autoplayHoverPause: true,
331            responsive: {
332                0: {
333                    items: 1,
334                    autoWidth: false
335                },
336                480: {
337                    items: 1,
338                    autoWidth: false
339                },
340                600: {
341                    items: 1,
342                    autoWidth: false
343                },
344                1000: {
345                    items: 1,
346                    autoWidth: false
347                }
348            }
349        });
350    }
351    
352}
353
354
355// Project
356function galleryMasonaryLayout() {
357    if ($('.masonary-layout').length) {
358        $('.masonary-layout').isotope({
359            layoutMode: 'masonry'
360        });
361    }
362
363    if ($('.post-filter').length) {
364        $('.post-filter li').children('span').on('click', function() {
365            var Self = $(this);
366            var selector = Self.parent().attr('data-filter');
367            $('.post-filter li').children('span').parent().removeClass('active');
368            Self.parent().addClass('active');
369
370
371            $('.filter-layout').isotope({
372                filter: selector,
373                animationOptions: {
374                    duration: 500,
375                    easing: 'linear',
376                    queue: false
377                }
378            });
379            return false;
380        });
381    }
382
383    if ($('.post-filter.has-dynamic-filter-counter').length) {
384      
385        var activeFilterItem = $('.post-filter.has-dynamic-filter-counter').find('li');
386
387        activeFilterItem.each(function() {
388            var filterElement = $(this).data('filter');
389            console.log(filterElement);
390            var count = $('.gallery-content').find(filterElement).length;
391
392            $(this).children('span').append('<span class="count"><b>' + count + '</b></span>');
393        });
394    }
395}
396
397
398
399
400// Cart Touch Spin
401function cartTouchSpin() {
402    if ($('.quantity-spinner').length) {
403        $("input.quantity-spinner").TouchSpin({
404            verticalbuttons: true
405        });
406    }
407}
408
409
410
411//  Price Filter
412function priceFilter () {
413	if($('.range-slider-price').length){
414
415		var priceRange = document.getElementById('range-slider-price');
416
417		noUiSlider.create(priceRange, {
418			start: [ 60, 100 ],
419			limit: 200,
420			behaviour: 'drag',
421			connect: true,
422			range: {
423				'min': 30,
424				'max': 200
425			}
426		});
427
428		var limitFieldMin = document.getElementById('min-value-rangeslider');
429		var limitFieldMax = document.getElementById('max-value-rangeslider');
430		
431		priceRange.noUiSlider.on('update', function( values, handle ){
432			(handle ? limitFieldMax : limitFieldMin).value = values[handle];
433		});
434	}
435}
436
437
438// 17. single product carousel
439function singleProduct () {
440    
441  $('.flexslider').flexslider({
442    animation: "slide",
443    controlNav: "thumbnails"
444  });
445
446
447}
448
449
450// Related project 
451function relproject () {
452	if ($('.related-product-items').length) {
453		$('.related-product-items').owlCarousel({
454		    loop: true,
455		    margin: 30,
456		    nav: true,
457		    dots: false,
458            navText: [
459                '<i class="fa fa-angle-left"></i>',
460                '<i class="fa fa-angle-right"></i>'
461            ],
462		    autoplay: true,
463		    autoplayTimeout: 5000,
464		    autoplayHoverPause: true,
465		    responsive: {
466		        0:{
467		            items:1
468		        },
469		        480:{
470		            items:1
471		        },
472		        600:{
473		            items:2
474		        },
475		        1000:{
476		            items:3
477		        },
478		        1200:{
479		            items:3
480		        }
481		    }
482		});
483	}
484}
485
486
487// ProjectWork fancybox activator 
488function projectWork() {
489    var galleryFcb = $('.fancybox');
490    if (galleryFcb.length) {
491        galleryFcb.fancybox({
492            openEffect: 'elastic',
493            closeEffect: 'elastic',
494            helpers: {
495                media: {}
496            }
497        });
498    }
499}
500
501$('.jolly_like_it').click(function(e) {
502			
503	e.preventDefault();
504	
505	var opt = {subaction:'likeit', data_id:$(this).attr('data-id')};
506	bunch_theme.likeit( opt, this );
507	
508	return false;
509});/**like end*/
510
511// Dom Ready Function
512jQuery(document).on('ready', function () {
513	(function ($) {
514        // add your functions
515        revolutionSliderActiver ();
516        mainmenu ();
517        CounterNumberChanger ();
518        testimonialSlider ();
519        brandCarousel ();
520        selectDropdown ();
521        scrollToTop ();
522        horizenl ();
523        accordion ();
524        contactInfo ();
525        cartTouchSpin ();
526        priceFilter ();
527        relproject ();
528        projectWork ();
529
530        
531	})(jQuery);
532});
533
534
535
536// window scroll event
537jQuery(window).on('scroll', function() {   
538  (function ($) {
539    stickyMainmenu ();
540      
541      
542  })(jQuery); 
543});
544
545
546// instance of fuction while Window Load event
547jQuery(window).on('load', function() {
548    (function($) {
549        galleryMasonaryLayout();
550        singleProduct();
551        
552    })(jQuery);
553});
554
555
556})(window.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.