PageSourceSearch

https://bushmanbarber.pl/wp-content/themes/mtl-gct/js/master.js?ver=4.1.21

js bushmanbarber.pl collected 2026-10-07 20:52:39 UTC 12,447 bytes, 360 lines download raw bytes

1jQuery(document).ready(function() {
2	
3	
4	/*jQuery(".animsition-overlay").animsition({
5	    inClass: 'overlay-slide-in-top',
6	    outClass: 'overlay-slide-out-top',
7	    inDuration: 1500,
8	    outDuration: 800,
9	    //linkElement: '.animsition-link',
10	    linkElement: 'a:not([target="_blank"]):not([href^="#"]):not([href^="tel:"]):not([href^="mailto:"]):not([class="quick-view"]):not([class="fancybox-item fancybox-close"]):not([class="button ajax_add_to_cart_button btn btn-default"]):not([class="bx-prev"]):not([class="bx-next"]):not([class="wishlist_change_button"]):not([id="wishlist_button"]):not([class="iframe mtl-line"]):not([class="span_link no-print"]):not([class="fancybox"]):not([class="fancybox shown"]):not([class="fancybox-nav fancybox-prev"]):not([class="fancybox-nav fancybox-next"]):not([class="fancybox-item fancybox-close"]):not([id="view_scroll_right"]):not([id="view_scroll_left"]):not([class="color_pick"]):not([class="mtl-all-images"]):not([class="mtl-cart-minus product_quantity_down"]):not([class="mtl-cart-minus product_quantity_up"]):not([id="wishlist_button"]):not([class="mtl-btn left small mtl-back"]):not([data-rokbox=""])',
11	    loading: true,
12	    loadingParentElement: 'body', //animsition wrapper element
13	    loadingClass: 'animsition-loading',
14	    loadingInner: '', // e.g '<img src="loading.svg" />'
15	    timeout: false,
16	    timeoutCountdown: 500,
17	    onLoadEvent: true,
18	    browser: [ 'animation-duration', '-webkit-animation-duration'],
19	    // "browser" option allows you to disable the "animsition" in case the css property in the array is not supported by your browser.
20	    // The default setting is to disable the "animsition" in a browser that does not support "animation-duration".
21	    overlay : false,
22	    overlayClass : 'animsition-overlay-slide',
23	    overlayParentElement : 'body',
24	    transition: function(url){ window.location.href = url; }
25	}).one('animsition.inEnd', function(){
26
27		var lazyVideos = [].slice.call(document.querySelectorAll("video.lazy"));
28		
29		if ("IntersectionObserver" in window) {
30		  var lazyVideoObserver = new IntersectionObserver(function(entries, observer) {
31		    entries.forEach(function(video) {
32		      if (video.isIntersecting) {
33		        for (var source in video.target.children) {
34		          var videoSource = video.target.children[source];
35		          if (typeof videoSource.tagName === "string" && videoSource.tagName === "SOURCE") {
36		            videoSource.src = videoSource.dataset.src;
37		          }
38		        }
39		
40		        video.target.load();
41		        video.target.classList.remove("lazy");
42		        lazyVideoObserver.unobserve(video.target);
43		      }
44		    });
45		  });
46		
47		  lazyVideos.forEach(function(lazyVideo) {
48		    lazyVideoObserver.observe(lazyVideo);
49		  });
50		}
51
52	});*/
53	
54	
55	
56	
57	
58	
59	jQuery('a[href*="#"]').on('click',function (e) {    
60	    e.preventDefault();
61	    var target = this.hash;
62	    jQuery.target = jQuery(target);
63	    
64	    jQuery('html, body').stop().animate({
65		     'scrollTop': jQuery.target.offset().top - 150
66		}, 900, 'swing');
67
68	});
69/*
70	jQuery('img.svg').each(function(){
71	    var jQueryimg = jQuery(this);
72	    var imgID = jQueryimg.attr('id');
73	    var imgClass = jQueryimg.attr('class');
74	    var imgURL = jQueryimg.attr('src');
75	
76	    jQuery.get(imgURL, function(data) {
77	        // Get the SVG tag, ignore the rest
78	        var jQuerysvg = jQuery(data).find('svg');
79	
80	        // Add replaced image's ID to the new SVG
81	        if(typeof imgID !== 'undefined') {
82	            jQuerysvg = jQuerysvg.attr('id', imgID);
83	        }
84	        // Add replaced image's classes to the new SVG
85	        if(typeof imgClass !== 'undefined') {
86	            jQuerysvg = jQuerysvg.attr('class', imgClass+' replaced-svg');
87	        }
88	
89	        // Remove any invalid XML tags as per http://validator.w3.org
90	        jQuerysvg = jQuerysvg.removeAttr('xmlns:a');
91	    	
92	    	if (jQuery.browser.mozilla) {
93	        	if (imgClass == 'svg icon-container') {
94	        		jQuerysvg = jQuerysvg.attr('viewBox', '0 0 30 24');
95	        	}
96	        }
97	
98	        // Replace image with new SVG
99	        jQueryimg.replaceWith(jQuerysvg); 
100	
101	    }, 'xml');
102	
103	}); */
104	
105	
106	/*
107	jQuery(".owl-carousel").owlCarousel({
108		items : 5,
109		autoPlay : true,
110	}); */
111	
112	jQuery(".gallery-item a").attr("data-rokbox","").attr("data-rokbox-album","album");
113	jQuery(".wp-block-gallery li a").attr("data-rokbox","").attr("data-rokbox-album","album");
114	jQuery(".wp-block-image a").attr("data-rokbox","").attr("data-rokbox-album","album");
115	
116	/*
117	jQuery('#pxl-fullpage').fullpage({
118		fixedElements: '#mtl-top-surround',
119		//anchors: ['firstPage', 'secondPage', '3rdPage'],
120		navigation: true,
121		navigationPosition: 'right',
122		//navigationTooltips: ['First page', 'Second page', 'Third and last page'],
123		responsiveWidth: 1279,
124		verticalCentered: false,
125		scrollingSpeed: 900
126	}); */
127	
128	
129	jQuery(".wp-block-gallery").lightSlider({
130        gallery: true,
131	    item: 1,
132	    loop:true,
133	    slideMargin: 0,
134	    thumbItem: 3,
135	    auto: true,
136	    speed: 500,
137	    slideEndAnimation: true,
138        pause: 5000,
139        controls: true,
140        prevHtml: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewB
140ox="0 0 50 50" version="1.1"><path d="M 11.957031 13.988281 C 11.699219 14.003906 11.457031 14.117188 11.28125 14.308594 L 1.015625 25 L 11.28125 35.691406 C 11.527344 35.953125 11.894531 36.0625 12.242188 35.976563 C 12.589844 35.890625 12.867188 35.625 12.964844 35.28125 C 13.066406 34.933594 12.972656 34.5625 12.71875 34.308594 L 4.746094 26 L 48 26 C 48.359375 26.003906 48.695313 25.816406 48.878906 25.503906 C 49.058594 25.191406 49.058594 24.808594 48.878906 24.496094 C 48.695313 24.183594 48.359375 23.996094 48 24 L 4.746094 24 L 12.71875 15.691406 C 13.011719 15.398438 13.09375 14.957031 12.921875 14.582031 C 12.753906 14.203125 12.371094 13.96875 11.957031 13.988281 Z " fill="#fff"></path></svg>',
141        nextHtml: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" version="1.1"><path d="M 38.035156 13.988281 C 37.628906 13.980469 37.257813 14.222656 37.09375 14.59375 C 36.933594 14.96875 37.015625 15.402344 37.300781 15.691406 L 45.277344 24 L 2.023438 24 C 1.664063 23.996094 
1411.328125 24.183594 1.148438 24.496094 C 0.964844 24.808594 0.964844 25.191406 1.148438 25.503906 C 1.328125 25.816406 1.664063 26.003906 2.023438 26 L 45.277344 26 L 37.300781 34.308594 C 36.917969 34.707031 36.933594 35.339844 37.332031 35.722656 C 37.730469 36.105469 38.363281 36.09375 38.746094 35.691406 L 49.011719 25 L 38.746094 14.308594 C 38.5625 14.109375 38.304688 13.996094 38.035156 13.988281 Z " fill="#fff"></path></svg>',
142        galleryMargin: 20,
143        thumbMargin: 30,
144        pauseOnHover: true,	
145    }); 
146	
147	
148	
149	var instaItemWidth = jQuery('.pxl-fotobox .grid__item-img').width();
150	jQuery('.pxl-fotobox .grid__item-img, .pxl-fotobox .grid__item-img canvas').height(instaItemWidth);
151	jQuery(window).resize(function(){
152		instaItemWidth = jQuery('.pxl-fotobox .grid__item-img').width(); 
153	    jQuery('.pxl-fotobox .grid__item-img, .pxl-fotobox .grid__item-img canvas').height(instaItemWidth);
154	});
155	
156	
157	
158	
159	
160	
161	$description = jQuery(".pxl-description");
162
163	jQuery('.pxl-house-pick-svg a').hover(function() {
164	    
165		//$(this).attr("class", "enabled heyo");
166		if (jQuery(this).attr('data-name')) {
167	    	$description.addClass('active');
168	    }
169	    $description.html(jQuery(this).attr('data-name'));
170	    
171	    if (jQuery(this).attr('data-sold')) {
172	    	$description.append('<span class="sold">'+jQuery(this).attr('data-sold')+'</span>');
173	    }
174	    if (jQuery(this).attr('data-reserved')) {
175	    	$description.append('<span class="reserved">'+jQuery(this).attr('data-reserved')+'</span>');
176	    }
177	    
178	    jQuery(this).mousemove(function(e){
179		  
180		  $description.css({
181		    left:  e.pageX,
182		    top:   e.pageY - 70
183		  });
184		  
185		});
186	    
187	}, function() {
188		$description.removeClass('active');
189	});
190	
191	
192	
193	
194	// Animated Elements
195	
196	if (jQuery(window).width() >= 1280) {
197	
198		jQuery('.pxl-box-img, .pxl-icon-box, .pxl-text-box-icon, .pxl-location-img, .pxl-footer-right-container, .pxl-fotobox-item-1, .pxl-fotobox-item-2, .type-mtl_news').addClass("pxl-animation-hidden").viewportChecker({
199		    classToAdd: 'pxl-animation-visible animated fadeInUp',
200			offset: 140
201		});
202		    
203		jQuery('.pxl-house-pick, .pxl-contact-form').addClass("pxl-animation-hidden").viewportChecker({
204		 classToAdd: 'pxl-animation-visible animated fadeIn',
205		 offset: 140
206		});
207		
208		jQuery('.lSSlideOuter, .pxl-location-map, .pxl-fotobox-item-3').addClass("pxl-animation-hidden").viewportChecker({
209		 classToAdd: 'pxl-animation-visible animated fadeInRight',
210		 offset: 140
211		});
212		
213		jQuery('.pxl-title, .pxl-text-box-text, .pxl-location-address, .pxl-footer-slogan .pxl-small-title, .pxl-footer-slogan-subtitle, .pxl-footer-left-container').addClass("pxl-animation-hidden").viewportChecker({
214		 classToAdd: 'pxl-animation-visible animated fadeInLeft',
215		 offset: 140
216		});
217	
218	}
219	
220	
221	
222
223});
224
225
226// Mobile Menu Modal
227jQuery(document).ready(function(){
228	var modalTriggerBts = jQuery('a[data-type="cd-modal-trigger"]'),
229		coverLayer = jQuery('.cd-cover-layer');
230
231	var duration = 600,
232		epsilon = (1000 / 60 / duration) / 4,
233		firstCustomMinaAnimation = bezier(.63,.35,.48,.92, epsilon);
234
235	modalTriggerBts.each(function(){
236		initModal(jQuery(this));
237	});
238
239	function initModal(modalTrigger) {
240		var modalTriggerId =  modalTrigger.attr('id'),
241			modal = jQuery('.cd-modal[data-modal="'+ modalTriggerId +'"]'),
242			svgCoverLayer = modal.children('.cd-svg-bg'),
243			paths = svgCoverLayer.find('path'),
244			pathsArray = [];
245		//store Snap objects
246		pathsArray[0] = Snap('#'+paths.eq(0).attr('id')),
247		pathsArray[1] = Snap('#'+paths.eq(1).attr('id')),
248		pathsArray[2] = Snap('#'+paths.eq(2).attr('id'));
249
250		//store path 'd' attribute values	
251		var pathSteps = [];
252		pathSteps[0] = svgCoverLayer.data('step1');
253		pathSteps[1] = svgCoverLayer.data('step2');
254		pathSteps[2] = svgCoverLayer.data('step3');
255		pathSteps[3] = svgCoverLayer.data('step4');
256		pathSteps[4] = svgCoverLayer.data('step5');
257		pathSteps[5] = svgCoverLayer.data('step6');
258		
259		//open modal window
260		modalTrigger.on('click', function(event){
261			event.preventDefault();
262			modal.addClass('modal-is-visible');
263			coverLayer.addClass('modal-is-visible');
264			animateModal(pathsArray, pathSteps, duration, 'open');
265		});
266
267		//close modal window
268		modal.on('click', '.modal-close', function(event){
269			event.preventDefault();
270			modal.removeClass('modal-is-visible');
271			coverLayer.removeClass('modal-is-visible');
272			animateModal(pathsArray, pathSteps, duration, 'close');
273		});
274	}
275
276	function animateModal(paths, pathSteps, duration, animationType) {
277		var path1 = ( animationType == 'open' ) ? pathSteps[1] : pathSteps[0],
278			path2 = ( animationType == 'open' ) ? pathSteps[3] : pathSteps[2],
279			path3 = ( animationType == 'open' ) ? pathSteps[5] : pathSteps[4];
280		paths[0].animate({'d': path1}, duration, firstCustomMinaAnimation);
281		paths[1].animate({'d': path2}, duration, firstCustomMinaAnimation);
282		paths[2].animate({'d': path3}, duration, firstCustomMinaAnimation);
283	}
284
285	function bezier(x1, y1, x2, y2, epsilon){
286		//https://github.com/arian/cubic-bezier
287		var curveX = function(t){
288			var v = 1 - t;
289			return 3 * v * v * t * x1 + 3 * v * t * t * x2 + t * t * t;
290		};
291
292		var curveY = function(t){
293			var v = 1 - t;
294			return 3 * v * v * t * y1 + 3 * v * t * t * y2 + t * t * t;
295		};
296
297		var derivativeCurveX = function(t){
298			var v = 1 - t;
299			return 3 * (2 * (t - 1) * t + v * v) * x1 + 3 * (- t * t * t + 2 * v * t) * x2;
300		};
301
302		return function(t){
303
304			var x = t, t0, t1, t2, x2, d2, i;
305
306			// First try a few iterations of Newton's method -- normally very fast.
307			for (t2 = x, i = 0; i < 8; i++){
308				x2 = curveX(t2) - x;
309				if (Math.abs(x2) < epsilon) return curveY(t2);
310				d2 = derivativeCurveX(t2);
311				if (Math.abs(d2) < 1e-6) break;
312				t2 = t2 - x2 / d2;
313			}
314
315			t0 = 0, t1 = 1, t2 = x;
316
317			if (t2 < t0) return curveY(t0);
318			if (t2 >
318 t1) return curveY(t1);
319
320			// Fallback to the bisection method for reliability.
321			while (t0 < t1){
322				x2 = curveX(t2);
323				if (Math.abs(x2 - x) < epsilon) return curveY(t2);
324				if (x > x2) t0 = t2;
325				else t1 = t2;
326				t2 = (t1 - t0) * .5 + t0;
327			}
328
329			// Failure
330			return curveY(t2);
331
332		};
333	};
334});
335
336
337
338addToHomescreen();
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

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.