PageSourceSearch

https://texaco.nl/wp-content/themes/texaco/js/script.js?ver=1.0.0

js texaco.nl collected 2026-10-09 22:10:35 UTC 4,705 bytes, 222 lines download raw bytes

1$(function() {
2
3	winWidth = $(window).width();
4	winHeight = $(window).height();
5
6	function isMobile() {
7		if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
8			return true;
9		} else if ($(window).width() < 1200) {
10			return true;
11		} else {
12			return false;
13		}
14	}
15
16// tiny helper function to add breakpoints
17function getGridSize() {
18	return	(winWidth < 600) ? 2 :
19	(winWidth < 900) ? 3 : 4;
20}
21
22//flex header
23$(window).scroll(function(){
24	if($(window).scrollTop() <= 0) {
25		$('header').removeClass('headerScroll')
26	} else {
27		$('header').addClass('headerScroll')
28	}
29});
30
31// resize functions
32$(window).resize(function(){
33	if (isMobile() == false) {
34		$('#hero .parallax').parallax({ speed: 0.25, axis: 'y' });
35		$('#footerHero .parallax').parallax({ speed: 0.05, axis: 'y' });
36	} else {
37		$('#hero .parallax').css('background-attachment','scroll');
38		$('#footerHero .parallax').css('background-attachment','scroll');
39	}
40});
41$(window).resize();
42
43// menu
44$('.menu-button').click(function(){
45	$('.menu').toggleClass('showMenu');
46});
47$('#nav li:has(ul)').prepend('<span class="navClick"><i class="navArrow fa fa-caret-down"></i></span>');
48
49$('.menu').on('click', '.menu-item-has-children', function() {
50	if (isMobile() == true) {
51		if ($(this).hasClass('menu-item-clicked')) {
52			$(this).find('.navClick .navArrow').first().toggleClass('navRotate');
53			$(this).removeClass('menu-item-clicked');
54		} else {
55			$(this).children('ul').slideDown(200);
56			$(this).find('.navClick .navArrow').first().toggleClass('navRotate');
57			$(this).addClass('menu-item-clicked');
58			return false;
59		}
60	}
61});
62
63$('.menu').on('click', '.navClick', function() {
64	$(this).siblings('ul').slideToggle(200);
65	$(this).find('.navClick .navArrow').first().toggleClass('navRotate');
66});
67
68// set height videoframe
69$(document).ready(function(){
70	var videoEmbed = $('.videoEmbed iframe');
71	var videoWidth = $(videoEmbed).width();
72	$(videoEmbed).height(videoWidth / (16/9));
73});
74
75// set equal heights
76$(document).ready(function() {
77	if (getGridSize() != 1) {
78		equalHeight($('.equalItem'));
79	}
80});
81
82// Initialize Swipers
83var swiper1 = new Swiper('.actionSwiperContainer', {
84	slidesPerView: 1,
85	spaceBetween: 4,
86	// autoplay: {
87	// 	delay: 3000,
88	// },
89	loop: true,
90	centerInsufficientSlides: true,
91	navigation: {
92		nextEl: '.swiperNext',
93		prevEl: '.swiperPrev',
94		// disabledClass: 'swiperNone',
95	},
96	pagination: {
97		el: '.swiperPagination',
98		clickable: true,
99	},
100	autoplay: {
101		delay: 5000,
102	},
103	// breakpoints: {
104	// 	1200: {
105	// 		slidesPerView: 4,
106	// 		spaceBetween: 40,
107	// 	},
108	// 	900: {
109	// 		slidesPerView: 3,
110	// 		spaceBetween: 30,
111	// 	},
112	// 	600: {
113	// 		slidesPerView: 2,
114	// 		spaceBetween: 20,
115	// 	},
116	// }
117});
118
119var swiper2 = new Swiper('.imageSwiperContainer', {
120	slidesPerView: 4,
121	spaceBetween: 20,
122	autoplay: {
123		delay: 3000,
124	},
125	loop: true,
126	centerInsufficientSlides: true,
127	// navigation: {
128	// 	nextEl: '.swiperNext',
129	// 	prevEl: '.swiperPrev',
130	// 	// disabledClass: 'swiperNone',
131	// },
132	// pagination: {
133	// 	el: '.swiperPagination',
134	// 	clickable: true,
135	// },
136	breakpoints: {
137		1200: {
138			slidesPerView: 4,
139			spaceBetween: 40,
140		},
141		900: {
142			slidesPerView: 3,
143			spaceBetween: 30,
144		},
145		600: {
146			slidesPerView: 2,
147			spaceBetween: 20,
148		},
149	}
150});
151
152var swiper3 = new Swiper('.logoSwiperContainer', {
153	slidesPerView: 6,
154	spaceBetween: 20,
155	autoplay: {
156		delay: 3000,
157	},
158	loop: true,
159	centerInsufficientSlides: true,
160	// navigation: {
161	// 	nextEl: '.swiperNext',
162	// 	prevEl: '.swiperPrev',
163	// 	// disabledClass: 'swiperNone',
164	// },
165	pagination: {
166		el: '.swiperPagination',
167		clickable: true,
168	},
169	breakpoints: {
170		1200: {
171			slidesPerView: 5,
172			spaceBetween: 40,
173		},
174		900: {
175			slidesPerView: 3,
176			spaceBetween: 30,
177		},
178		600: {
179			slidesPerView: 2,
180			spaceBetween: 20,
181		},
182	}
183});
184
185// change svg images to inline svg
186$(document).ready(function() {
187	$('img[src$=".svg"]').each(function() {
188		var $img = jQuery(this);
189		var imgURL = $img.attr('src');
190		var attributes = $img.prop("attributes");
191
192		$.get(imgURL, function(data) {
193			var $svg = jQuery(data).find('svg');
194			$svg = $svg.removeAttr('xmlns:a');
195			$.each(attributes, function() {
196				$svg.attr(this.name, this.value);
197			});
198			$img.replaceWith($svg);
199		}, 'xml');
200	});
201});
202
203}); //end
204
205// show and hide contentblocks
206function toggleItems(itemID) {
207	var setItem = $('#' + itemID);
208	$(setItem).slideToggle(200);
209	$(setItem).siblings('.itemMore').slideUp();
210	return false;
211};
212
213function equalHeight(group) {
214	var highestCol = 0;
215	group.each(function() {
216		var thisHeight = $(this).height();
217		if(thisHeight > highestCol) {
218			highestCol = thisHeight;
219		}
220	});
221	group.height(highestCol);
222};

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.