PageSourceSearch

https://wid.org.pl/wp-content/themes/ifolio/assets/js/custom.js?ver=7.1.2

js wid.org.pl collected 2026-10-02 04:13:32 UTC 10,140 bytes, 317 lines download raw bytes

1(function(){
2
3  "use strict";
4
5  	$(window).load(function(){
6		var headerHeight = $('.header').outerHeight();
7		var heightBanner = $('.az-herosection').outerHeight();
8	    $(window).scroll(function() {
9	        var scroll = getCurrentScroll();
10	        if(scroll > headerHeight && scroll < heightBanner){
11	        	$('.header').addClass('header-fade');
12	        }else{
13	        	$('.header').removeClass('header-fade');
14	        }
15	        if(scroll > heightBanner){
16	        	$('.header').addClass('bg-fade');
17	        }else{
18	        	$('.header').removeClass('bg-fade');
19	        }
20	    });
21	    function getCurrentScroll() {
22	        return window.pageYOffset || document.documentElement.scrollTop;
23	    }
24        init_carousel();
25    });
26
27  	$(document).ready(function() {	
28  		ifolio_height_full();
29  		parallaxInit();
30        ifolio_height_equal();
31        ifolio_menu_fixed();
32
33  		//SLIDE HOME
34		$('.item-homeslide').each(function(){
35		    var bgImg = $(this).data('background');
36		    if(bgImg != ''){
37		        $(this).css({
38		          'background-image':'url('+bgImg+')'
39		        });
40		    }
41		});
42
43		//FUNFACT
44        $('.az-funfact').each(function(){
45          	var count_element = $(this).find('.number').attr('data-number');
46          	var $this = $(this);
47          	if (count_element != '') {
48	            $(this).find('.number').countTo({
49		            from: 0,
50		            to: count_element,
51		            speed: 1500,
52		            refreshInterval: 50,
53		        });
54	        };
55        });
56
57        //Scroll button
58	    $('.az-home-arrow').on('click',function(){
59	        var _parentSection = $(this).closest('.az-herosection');
60	        var _tagetSection =_parentSection.next().offset().top;
61	        $('html,body').animate({scrollTop:_tagetSection},'slow');
62	    });
63
64	    //SHOW SUBMENU
65		if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
66		  	// on Mobile
67		  	$('.az-main-menu .menu-item-has-children .caret').click( function(e) {
68		      	var $li_current = $(this).closest('.menu-item-has-children'),
69		          	$li_parrent = $('.az-main-menu .menu-item-has-children');
70		      	if ( $li_current.hasClass('show-submenu')) {
71		          	$li_current.removeClass('show-submenu');
72		      	} else {
73		          	$li_parrent.removeClass('show-submenu');
74		          	$li_current.addClass('show-submenu');
75		      	}
76		      	e.preventDefault();
77		      	e.stopPropagation();
78		  	});
79		}else {
80		  	// on Desktop
81		  	$(document).on('mouseenter', '.az-main-menu .menu-item-has-children',  function(){
82			   $(this).addClass('show-submenu');
83			}).on('mouseleave', '.az-main-menu .menu-item-has-children', function() {
84			   $(this).removeClass('show-submenu');
85			});
86		}
87
88		//SEARCH TOUCH
89		$('.touch-search').on('click',function(){
90			$(this).parent().find('.az-search-header').fadeIn(500);
91		});
92        $('.az-search-header .close-touch').on('click',function(){
93        	$(this).closest('.az-search-header').fadeOut(500);
94        });
95
96        //SKILL BAR
97	    $('.az-skillbar').each(function(){
98			var $bg_skill = $(this).attr('data-bgskill');
99			var $bg_skillbar = $(this).attr('data-bgskillbar');
100			var $percent = $(this).attr('data-percent');
101			$(this).find('.skillbar-bar').animate({
102				'width':$percent+'%'
103			},2000);
104			if($bg_skillbar!=''){
105				$(this).find('.skill-bar-bg').css('background',$bg_skillbar);
106			}
107			if($bg_skill!=''){
108				$(this).find('.skillbar-bar').css('background',$bg_skill);
109			}
110	    });
111
112	    //MENU MOBILE TOUCH
113	    $('.menu-togole').on('click',function(){
114	    	$(this).toggleClass('active');
115	    	$('.az-main-menu').slideToggle(500)
116	    });
117	    var heightHeader = $('header').outerHeight();
118
119	    //Height nav mobible
120	    var $widthDevice = $(window).width();
121	    var $heightDevide = $(window).height();
122	    if ($widthDevice < 768){
123	    	var heightNav = $heightDevide - heightHeader;
124	    	$('.az-main-menu').css({
125	    		'max-height':heightNav,
126	    		'overflow':'auto',
127	    	})
128	    }
129
130	    //Hero section top
131	    if(!$('.header').hasClass('header-trans')){
132	    	if($('.az-herosection').length){
133	    		$('.az-herosection').css('margin-top',heightHeader);
134	    	}
135	    	if($('.main-container').length && !$('.az-herosection').length){
136	    		$('.main-container').css('margin-top',heightHeader);
137	    	}
138	    }
139	    //VIDEO FITVIDS
140	    $(".main-container").fitVids();
141
142	    //Select chosen
143	    $('select').chosen();
144
145	    /*------------SHOP--------------*/
146
147	    // Target quantity inputs on product pages
148	    $( 'input.qty:not(.product-quantity input.qty)' ).each( function() {
149	        var min = parseFloat( $( this ).attr( 'min' ) );
150
151	        if ( min && min > 0 && parseFloat( $( this ).val() ) < min ) {
152	            $( this ).val( min );
153	        }
154	    });
155
156	    $( document ).on( 'click', '.plus, .minus', function() {
157
158	        // Get values 
159	        var $qty        = $( this ).closest( '.quantity' ).find( '.qty' ),
160	            currentVal  = parseFloat( $qty.val() ),
161	            max         = parseFloat( $qty.attr( 'max' ) ),
162	            min         = parseFloat( $qty.attr( 'min' ) ),
163	            step        = $qty.attr( 'step' );
164
165	        // Format values
166	        if ( ! currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0;
167	        if ( max === '' || max === 'NaN' ) max = '';
168	        if ( min === '' || min === 'NaN' ) min = 0;
169	        if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN' ) step = 1;
170
171	        // Change the value
172	        if ( $( this ).is( '.plus' ) ) {
173
174	            if ( max && ( max == currentVal || currentVal > max ) ) {
175	                $qty.val( max );
176	            } else {
177	                $qty.val( currentVal + parseFloat( step ) );
178	            }
179
180	        } else {
181
182	            if ( min && ( min == currentVal || currentVal < min ) ) {
183	                $qty.val( min );
184	            } else if ( currentVal > 0 ) {
185	                $qty.val( currentVal - parseFloat( step ) );
186	            }
187
188	        }
189
190	        // Trigger change event
191	        $qty.trigger( 'change' );
192	    });
193  	});
194
195    // Window Resize
196  	$( window ).resize(function() {
197		ifolio_height_full();
198		ifolio_height_equal();
199        ifolio_menu_fixed();
200		var heightHeader = $('header').outerHeight();
201	   	//Hero section top
202	    if(!$('.header').hasClass('header-trans')){
203	    	if($('.az-herosection').length){
204	    		$('.az-herosection').css('margin-top',heightHeader);
205	    	}
206	    	if($('.main-container').length && !$('.az-herosection').length){
207	    		$('.main-container').css('margin-top',heightHeader);
208	    	}
209	    }
210	});
211    /* ---------------------------------------------
212     Owl carousel
213    --------------------------------------------- */
214    function init_carousel(){
215		$('.owl-carousel').each(function(){
216			var config = $(this).data();
217			config.navText = ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'];
218			if($(this).hasClass('nav-style1')){
219				config.navText = ['<span class="lnr lnr-chevron-left"></span>','<span class="lnr lnr-chevron-right"></span>'];
220			}
221            config.autoplayTimeout = $(this).data('timeout');
222			var animateOut = $(this).data('animateout');
223			var animateIn = $(this).data('animatein');
224			if(typeof animateOut != 'undefined' ){
225			  config.animateOut = animateOut;
226			}
227			if(typeof animateIn != 'undefined' ){
228			  config.animateIn = animateIn;
229			}
230			var owl = $(this);
231			owl.owlCarousel(config);
232		});
233    }
234    /* ---------------------------------------------
235	   Full Height
236	--------------------------------------------- */
237	function ifolio_height_full(){
238	     (function($){
239			var heightoff = 0;
240			var heightHeader;
241			if($('.header').hasClass('header-trans')){
242		    	heightHeader = 0;
243		    }else{
244		    	heightHeader = $('header').outerHeight();
245		    }
246			var heightSlide = $(window).outerHeight() - heightoff - heightHeader;
247			$(".full-height").css("height",heightSlide);
248	    })(jQuery);
249	}
250	/* ---------------------------------------------
251	   Background parallax
252	--------------------------------------------- */
253    function parallaxInit() {
254      	//Mobile Detect
255      	var testMobile;
256      	var isMobile = {
257          	Android: function() {
258              	return navigator.userAgent.match(/Android/i);
259          	},
260          	BlackBerry: function() {
261            	return navigator.userAgent.match(/BlackBerry/i);
262          	},
263          	iOS: function() {
264              	return navigator.userAgent.match(/iPhone|iPad|iPod/i);
265          	},
266			Opera: function() {
267			  	return navigator.userAgent.match(/Opera Mini/i);
268			},
269			Windows: function() {
270			  	return navigator.userAgent.match(/IEMobile/i);
271			},
272			any: function() {
273			  	return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
274			}
275      	};
276		testMobile = isMobile.any();
277		if (testMobile == null){
278		  	$('.bg-parallax').each(function(){
279		      $(this).parallax('50%', 0.3);
280		  	});
281		}
282		if (isMobile.iOS()) {
283			$('.bg-prallax').each(function () {
284			    $(this).css({
285			        "background-size": "100% auto!important",
286			        "background-attachment": "scroll"
287			    });
288			});
289		}
290    }
291    //HEIGHT EQUAL
292    function ifolio_height_equal()
293    {
294        $('.az-height-equal').each(function(index, elem){        
295            var $this = $(this);
296            var $items = $this.find('.height-equal');
297            $items.css('height','auto');
298            var $max_height_item = $items.eq(0).outerHeight();
299            $items.each(function(index, elem) {
300                if ( $(elem).outerHeight() > $max_height_item) $max_height_item = $(elem).outerHeight();
301            });
302            $items.each(function(){
303                $(this).css({'height' : $max_height_item});
304            });
305        });
306    }
307    // Fixed Menu
308    function ifolio_menu_fixed()
309    {
310        var $top = $('#wpadminbar').length ? $('#wpadminbar').height() : 0;
311        if ( $('.header').length ) {
312            $('.header').css({
313               'top' : $top
314            });
315        }
316    }
317})(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.