PageSourceSearch

https://crownbuzzelectrical.co.uk/media/js/scripts.js

js crownbuzzelectrical.co.uk collected 2026-10-06 20:00:59 UTC 4,600 bytes, 168 lines download raw bytes

1$(document).foundation()
2$(document).ready(function(){
3
4	// Make Stuff Stick
5	$(".stickme").stick_in_parent({
6		offset_top: 70,
7	});
8
9	// Make Badges for Reviews
10	$('.review').each(function(){
11		var name = $( this ).find('.author').text();
12		var initial = name.substr(0,1);
13
14		$( this ).find('.revName').text(initial);
15	});
16
17	// Sliders
18	$('.slideShow').slick({
19		autoplay: true,
20		vertical: true,
21		autoplaySpeed: 7000,
22		pauseOnHover: false,
23		pauseOnFocus: false,
24	});
25	$('.postTicker').slick({
26		slidesToShow: 3,
27		autoplay: false,
28		nextArrow: '.postTickerButtons .slideRight',
29		prevArrow: '.postTickerButtons .slideLeft',
30		responsive: [{
31			breakpoint: 1024,
32			settings: {
33			slidesToShow: 2,
34			}
35		},
36		{
37			breakpoint: 640,
38			settings: {
39			slidesToShow: 1,
40			},
41		}
42		]
43	});
44	$('.revTicker').slick({
45		slidesToShow: 3,
46		autoplay: false,
47		nextArrow: '.revTickerButtons .slideRight',
48		prevArrow: '.revTickerButtons .slideLeft',
49		responsive: [{
50			breakpoint: 1024,
51			settings: {
52			slidesToShow: 2,
53			}
54		},
55		{
56			breakpoint: 640,
57			settings: {
58			slidesToShow: 1,
59			},
60		}
61		]
62	});
63
64	// Accordions
65	$('.accordion h3').click(function(){
66		$('.infoBox').slideUp('fast');
67		$( this ).next('.infoBox').slideToggle('fast');
68	});
69
70	// Menu and Sub Menu Jiggery
71	$('.showMenu').click(function(){
72		$('nav').toggleClass('viz');
73		$( this ).find('i').toggleClass('fa-stream fa-times')
74	});
75	$('nav ul li:has(ul) > a').click(function(e){
76		e.preventDefault();
77		var nextUlSub = $( this ).next('ul.sub-menu');
78		var nextSub = $(this).next('ul.sub-menu');
79		if(!nextSub.is(":visible")){
80			$("ul.sub").slideUp();
81		}
82		$( this ).next('ul.sub-menu').slideToggle('fast');
83	});
84
85	// Make a slider on Mobile
86	$(window).on('load resize', function () {
87		if ($(window).width() < 640) {
88			// $('.headerText').insertAfter('.sliderContainer');
89			$('.mobileSlider').slick({
90				autoplay: true,
91				arrows: false,
92			});
93		}
94		else{
95			// $('.sliderContainer').insertAfter('.headerText');
96		}
97	});
98
99	// Gallery Jiggery Pokery
100	var thumbWidth = $('.gallery .columns:first-of-type').outerWidth();
101	$('.gallery .columns').height(thumbWidth);
102
103	$('.gallery .columns').each(function(){
104		if($(this).find('img').length > 0){
105			var imgSrc = $(this).find('img').prop('src');
106			$(this).css('background-image','url(' + imgSrc + ')');
107		}
108	});
109	$(".gallery .columns:nth-child(14n + 7)").attr('uk-parallax','bgy: -150');
110	$(".gallery .columns:nth-child(14n + 8)").attr('uk-parallax','bgy: 150');
111
112
113	// Make inline image a background
114	$('.slideShow .slide, .bgMe').each(function(){
115		if($(this).find('img').length > 0){
116			var imgSrc = $(this).find('img').prop('src');
117			$(this).css('background-image','url(' + imgSrc + ')');
118		}
119		$('.slide img, .bgMe img').hide();
120	});
121
122	// Go next Section
123	$(".goDown").click(function() {
124		$([document.documentElement, document.body]).animate({
125			scrollTop: $(".trio").offset().top -70
126		}, 2000);
127	});
128
129	// Go to Reviews
130	$(".goRevs").click(function() {
131		$([document.documentElement, document.body]).animate({
132			scrollTop: $(".reviews").offset().top -70
133		}, 2000);
134	});
135
136	// Create Active Class
137	var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
138	$("nav ul li a").each(function() {
139	    if ($(this).attr("href") == pgurl || $(this).attr("href") == '')
140	        $(this).addClass("active");
141	})
142	// Print the year
143	$(".year").text((new Date).getFullYear());
144
145	// Clone menu and add to footer
146	$('nav ul').clone().insertAfter('.menuHeading');
147
148	// M A P  C O N F I G U R A T I O N
149	//Where the map is centered.
150	var mymap = L.map('map').setView([51.4889,-0.03324], 9); //Last digit controls Zoom - higher is closer.
151	// Where the map marker is.
152	var marker = L.marker([51.4889,-0.03324]).addTo(mymap);
153	//Create a Circle.
154	var circle = L.circle([51.4889,-0.03324],{
155	    color: '#333', // Colour of outline.
156	    weight: 0, // Weight of stroke.
157	    fillColor: '#333', // Colour of center.
158	    fillOpacity: 0.3, // Opacity.
159	    radius: 20000, //Radius in Metres.
160	}).addTo(mymap);
161	marker.bindPopup("<h4>Our Office</h4><p>Our primary work area.</p>");
162	// Access Map Tiles and Validate.
163	L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
164	    maxZoom: 18,
165	    id: 'mapbox.streets',
166	    accessToken: 'pk.eyJ1IjoibWFubGlrZWFkZSIsImEiOiJjam1oaWN3OXIyZmhlM3BwdHk5bHVrbnJlIn0.XCNcqQdpX_Ydq2yPtmQYdA'
167	}).addTo(mymap);
168});

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.