PageSourceSearch

https://www.wigstonbowlingclub.co.uk/scripts/mainhandler.js

js wigstonbowlingclub.co.uk collected 2026-10-02 02:10:07 UTC 24,370 bytes, 798 lines download raw bytes

1var blnChanged, manu, range, strArea, blnUseFullList, blnUseCounties;
2var coords = {};
3blnUseFullList = false;
4blnUseCounties = true;
5
6$(document).ready(function () {
7   /** $('.width').text($(window).width() + 'px');
8	$(window).on("resize", function () {
9		$('.width').text($(window).width() + 'px');
10	});
11	
12	Set location in header and Favourites
13	******************************************/
14
15	/* Main favourites object - used to create and manage the favourites list */
16	var Favourites = (function ($) {
17		'use strict';
18
19		//constructor
20		function Favourites(list, settings) {
21			this.options = {
22				maxitems: 5,
23				cookiename: "favlocations",
24				searchurl: null
25			};
26			this.$list = $(list) || $();
27			this.locations = JSON.parse($.cookie(this.options.cookiename)) || [];
28
29			//extend defaults with any settings
30			$.extend(this.options, settings);
31
32			//add locations to the array
33			var index = 0;
34
35			for (index; index < this.locations.length; index++) {
36				this.add(this.locations[index]);
37			}
38
39			this.loadLocations();
40			this.bindRemoveButtons();
41			this.bindLocationLinkHandler();
42		}
43
44		//methods
45		Favourites.prototype = {
46			add: function (loc) {
47				var findloc = this.find(loc);
48				if ((this.locations.length < this.options.maxitems) && findloc === -1) {
49					this.locations.push(loc);
50					$.cookie(this.options.cookiename, JSON.stringify(this.locations), { path: '/' });
51				}
52			},
53			remove: function (loc) {
54				var location_index = this.find(loc);
55
56				if (location_index > -1) {
57					this.locations.splice(location_index, 1);
58					$.cookie(this.options.cookiename, JSON.stringify(this.locations), { path: '/' });
59					this.setCount();
60				} else {
61					console.log("location not found.");
62				}
63			},
64			find: function (loc) {
65				var location_index = -1;
66				for (var index = 0; index < this.locations.length; index++) {
67					if (this.locations[index] === loc) {
68						location_index = index;
69						break;
70					}
71				}
72				return location_index;
73			},
74			populateLocations: function () {
75				var self = this;
76
77				this.clearList();
78
79				$.each(this.locations, function (index, item) {
80
81					//get this locations name and id - format here is: name|id
82					var location = {
83						name: item.split('|')[0] || '',
84						id: item.split('|')[1] || 0
85					},
86						//create a new li element
87						$thisItem = $('<li/>').appendTo(self.$list[0]).addClass("wrap");
88
89					$thisItem.data("location", location.name);
90					$thisItem.data("location-id", location.id);
91
92					$thisItem.html('<button class="remove-icon">&times;</button> <a href="' + self.options.searchurl + '" class="fav-link">' + location.name + '</a>');
93				});
94			},
95			setCount: function () {
96				//set count value
97				var countelem = this.$list.prev().find('.count');
98				if (countelem.length > 0) {
99					countelem.text(this.locations.length);
100
101					//fade in searchbox if a section has been selected
102					if ($(".search-nav:visible .current").length > 0) {
103						$(".search-box").fadeIn(300);
104						if (this.locations.length > 0) {
105							$(".favourites").fadeIn(300);
106						}
107						else {
108							$(".favourites").fadeOut(300);
109						}
110					}
111				}
112			},
113			loadLocations: function () {
114				this.populateLocations();
115				this.setCount();
116			},
117			clearList: function () {
118				$(this.$list).find('li').remove();
119			},
120			bindRemoveButtons: function () {
121				var self = this;
122				$(document).on('click', '.remove-icon', function (e) {
123					var elem = $(this).parent();
124					e.preventDefault();
125					elem.slideUp('fast', function () {
126						self.remove(elem.data("location") + '|' + elem.data("location-id"));
127						elem.remove();
128					});
129				});
130			},
131			bindLocationLinkHandler: function () {
132				var self = this;
133				$(document).on("click", ".fav-link", function (e) {
134					var elem = $(this).parent();
135
136					self.forwardToSection(elem.data("location"), elem.data("location-id"), e);
137				});
138			},
139			forwardToSection: function (loc, locid, event) {
140				var section = $(".search-nav:visible .current a").text(),
141					qs = '?loc_Location=' + encodeURI(loc) + '&loc_exactlocation=' + locid;
142
143				if (section) {
144					if (event) {
145						event.currentTarget.href = event.currentTarget.href + qs + '&searchSite=' + section.toLowerCase();
146					} else {
147						window.location = this.options.searchurl + qs + '&searchSite=' + section.toLowerCase();
148					}
149				} else {
150				    alert("Please select a section above");
151				    return false;
152				}
153			}
154		};
155
156		return Favourites;
157	}(jQuery));
158
159	var favLocs = new Favourites("ul.favourites-list", { searchurl: "/home/search-handler.asp" });
160
161	$(".change-location").on("click", function (e) {
162	    $(this).add(".current-location").hide();
163	    $("#main-location-id").val("");
164		$("#main-location").removeClass("none").val("").focus();
165	});
166
167	/* stop menu links from directing if no location is set */
168	$(".search-nav li").on("click", function (e) {
169		var loc_id = parseInt($("#main-location-id").val());
170
171		if (isNaN(loc_id) || loc_id < 1) {
172			e.preventDefault();
173
174			//set section link
175			$(".search-nav li").each(function () {
176				$(this).removeClass("current");
177			});
178			$(e.currentTarget).addClass("current");
179
180			//fade in searchbox
181			$(".search-box").fadeIn(300);
182			if ($('.favourites-list li').length > 0) {
183				$(".favourites").fadeIn(300);
184			}
185			else {
186				$(".favourites").fadeOut(300);
187			}
188
189			//focus on the location
190			$("#main-location").focus();
191		};
192	});
193
194	$(".favourites .button").on("click", function (e) {
195		$(this).next(".favourites-list").slideToggle(300);
196	});
197
198	/**
199	Location autocomplete code - frontend
200	******************************************/
201	//If called from a post/edit page then exclude Counties
202	blnExcCounties = (blnUseCounties) ? "y" : "n";
203
204	$(function () {
205	    var locationsCache = {};
206
207	    $("#main-location").on("focus", function () {
208
209	        //blank the main location textbox when clicked on
210	        $("#main-location").val('');
211
212	        // scroll window to anchor by location search if small screen or tablet
213	        if ($(window).width() <= 1024) {
214	            scrollToAnchor('location-box-anchor');
215	        }
216	    });
217
218
219	    $("#main-location").autocomplete({
220	        minLength: 3,
221	        source: function (request, response) {
222	            var term = request.term;
223	            if (term in locationsCache) {
224	                response(locationsCache[term]);
225	                return;
226	            }
227
228	            $.getJSON("/scripts/getLocations.asp?json=true&counties=" + blnExcCounties, request, function (data, status, xhr) {
229	                locationsCache[term] = data;
230	                response(data);
231	            });
232	        },
233	        open: function (event, ui) {
234	            //set width the same as the input
235	            $(this).autocomplete("widget").css({
236	                "width": (($(this).width() + $(this).css("padding")) + "px")
237	            });
238	        },
239	        select: function (event, ui) {
240	            $("#mainlocation-id").val(ui.item.id);
241
242	            //Add location to existing locations array then save to cookie
243	            favLocs.add(ui.item.value + '|' + ui.item.id);
244	            favLocs.forwardToSection(ui.item.value, ui.item.id);
245	        }
246	    });
247	});
248
249	/**
250	Location autocomplete code - backend
251	******************************************/
252	$(function () {
253	    var locationsCache = {};
254
255	    $("#LOC_Location").autocomplete({
256	        minLength: 3,
257	        source: function (request, response) {
258	            var term = request.term;
259	            if (term in locationsCache) {
260	                response(locationsCache[term]);
261	                return;
262	            }
263
264	            $.getJSON("/scripts/getLocations.asp?json=true&counties=" + blnExcCounties, request, function (data, status, xhr) {
265	                locationsCache[term] = data;
266	                response(data);
267	            });
268	        },
269	        open: function (event, ui) {
270	            //set width the same as the input
271	            //$(this).css({
272	            //    "width": ($(this).width() + "px")
273	            //});
274	        },
275	        select: function (event, ui) {
276	            var location_field = $(this);
277
278	            //set location ID
279	            $("#LOC_ExactLocation").val(ui.item.id);
280
281	            //set the county and remove it from the town field
282	            var aryLocations = ui.item.value.split(", ");
283	            var county = aryLocations[aryLocations.length - 1];
284	            $("#LOC_County").val(county);
285
286	            //set location
287	            if (location_field.data("county") === false) {
288	                var newLocation = ui.item.value.replace(", " + county, "");
289	                location_field.val(ui.item.value.replace(", " + county, ""));
290	                return false;
291	            }
292	        }
293	    });
294	});
295
296	/**
297	Load makes selects
298	******************************************/
299	if ($("select#strMake").length) {
300
301		if (manu == undefined) {
302			manu = $.cookie('carMakeID');
303		}
304		if (range == undefined) {
305			range = $.cookie('carModelID');
306		}
307
308		manu = ((manu == null) || (manu == "null")) ? null : manu.replace(/\+/g, ' ');
309		range = ((range == null) || (range == "null")) ? null : range.replace(/\+/g, ' ');
310
311		$("select#strMake").doChainedSelects(true);
312
313		//Add change event to the manufacturer dropdown so it can load the models
314		$("select#strMake").on("change", function () {
315			blnChanged = true;
316			$(this).doChainedSelects();
317		});
318
319		//Only run this if we're editing or have existing ID's
320		if (manu != null || range != null) {
321			blnChanged = false;
322			$("select#strModel").doChainedSelects();
323		};
324	}
325
326	/**
327	THE FOLLOWING IS CODE LOADS EVENTS DATEPICKER ON SEARCH FORM
328	******************************************/
329	var bindEventDates = function () {
330
331		$("#strStartDate").datepicker({
332			showOn: "both",
333			buttonImage: "/images/icon-calendar.png",
334			buttonImageOnly: true,
335			dateFormat: 'dd/mm/yy',
336			minDate: 0,
337			firstDay: 1,
338			onSelect: function () {
339				var newDate = $(this).datepicker('getDate');
340				var d = newDate.getDate();
341				var m = newDate.getMonth();
342				var y = newDate.getFullYear();
343				//var maxDate = new Date(y, m, d + 30);
344				$('#strEndDate').datepicker('option', 'minDate', newDate); //.datepicker('option', 'maxDate', maxDate);
345			},
346			constrainInput: true
347		});
348
349		$("#strEndDate").datepicker({
350			showOn: "both",
351			buttonImage: "/images/icon-calendar.png",
352			buttonImageOnly: true,
353			dateFormat: 'dd/mm/yy',
354			minDate: 0,
355			firstDay: 1,
356			constrainInput: true,
357			beforeShow: function () {
358				var newDate = $('#strStartDate').datepicker('getDate');
359				if (newDate != null) {
360					var d = newDate.getDate();
361					var m = newDate.getMonth();
362					var y = newDate.getFullYear();
363					//var maxDate = new Date(y, m, d + 30);
364					$('#strEndDate').datepicker('option', 'minDate', newDate); //.datepicker('option', 'maxDate', maxDate);
365				}
366			}
367		});
368
369		//Today/Tomorrow/This weekend buttons
370		$('#weekend-link').on("click", function (e) {
371			e.preventDefault();
372
373			var newDate = new Date();
374			//as we dont have a method or property for the weekend days we calculate it based on todays getDay number
375			//and subtract it from the day of the week for saturday (6). As sunday day number is 0 we just add 1 to 
376			//saturdays number
377			var currentDayOfWeek = newDate.getDay();
378			var numDaysToMove = (6 - currentDayOfWeek) < 0 ? 0 : 6 - currentDayOfWeek;
379
380			newDate.setDate(newDate.getDate() + numDaysToMove);
381			$("#strStartDate").datepicker("setDate", newDate);
382
383			newDate.setDate(newDate.getDate() + 1);
384			$("#strEndDate").datepicker("setDate", newDate);
385
386			$('#refine-form').submit();
387		});
388	}
389
390	bindEventDates();
391
392	/**
393	Add a datepicker calendar to sidebar
394	******************************************/
395	var cusid = $('input[name=numVacID]').val();
396	//Set a date if the user has selected one
397	var selectedDate = ($('#strStartDate').val()) ? $('#strStartDate').val() : $(this).datepicker('getDate');
398
399	$('.opendatepicker').datepicker({
400		dateFormat: 'dd/mm/yy',
401		minDate: 0,
402		firstDay: 1,
403		defaultDate: selectedDate,
404		onSelect: function () {
405			var newDate = $(this).datepicker('getDate');
406			var d = newDate.getDate();
407			var m = newDate.getMonth() + 1; //getMonth is 0 based so add 1
408			var y = newDate.getFullYear();
409			window.location = '/events/?dteStartDate=' + d + '/' + m + '/' + y + '&dteEndDate=' + d + '/' + m + '/' + y + '&customerid=' + cusid;
410		},
411		constrainInput: true
412	});
413
414	/**
415	swap the prices around on property based on the type
416	******************************************/
417	$("input.search-type").on("change", function () {
418
419		$("#prices-sale").toggle();
420		$("#prices-rent").toggle();
421
422		var rentElems = $("#prices-rent").children('select, div');
423		var saleElems = $("#prices-sale").children('select, div');
424
425		if ($("#prices-sale").is(':hidden')) {
426			$.each(rentElems, function () {
427				$(this).removeAttr("disabled").toggleClass("disabled").show();
428			});
429			$.each(saleElems, function () {
430				$(this).attr("disabled", true).toggleClass("disabled").hide();
431			});
432		}
433		else {
434			$.each(saleElems, function () {
435				$(this).removeAttr("disabled").toggleClass("disabled").show();
436			});
437			$.each(rentElems, function () {
438				$(this).attr("disabled", true).toggleClass("disabled").hide();
439			});
440		}
441		//console.log('sale: ' + $("#prices-sale").is("visible") + '\nrent: ' + $("#prices-rent").is(":visible"));
442	});
443
444
445	/**
446	Bind outbound link tracking to all external links and open in new window
447	******************************************/
448	(function ($) {
449	    var $externalLinks = $('a').filter(function () {
450	        // checks hostnames match and removes any local js links
451	        return (this.hostname && location.hostname !== this.hostname) && (this.href.indexOf('javascript:') === -1);
452	    });
453
454	    $externalLinks.on("click", function (e) {
455	        recordOutboundLink('Outbound Links', this.href, this.rel)
456	    });
457
458	    // add target blank to all external links
459	    $externalLinks.attr("target", "_blank");
460	})(jQuery);
461
462    /**
463	Search results sorting field
464	******************************************/
465	$('#searchOrder select').change(function () {
466	    $(this).parents("form").submit();
467	});
468
469	/**
470	ALERTS LIGHTBOX
471	******************************************/
472	$(".cta-alerts").fancybox({
473		'padding': '20',
474		'width': 400,
475		'autoDimensions': true,
476		'type': 'iframe',
477		'onComplete': function () {
478			$('#fancybox-content').addClass('loadingOverlay');
479			$('#fancybox-frame').attr('scrolling', 'no');
480			$('#fancybox-frame').load(function () { // wait for frame to load and then gets it's height
481				$('#fancybox-content').height(($(this).contents().find('body').height() + 2));
482				$.fancybox.center();
483				$('#fancybox-content').removeClass('loadingOverlay');
484			});
485		}
486	});
487
488    /**
489    Generic Datepickers
490    ******************************************/
491	$('body').on('focus', '.datepicker[data-icon!="false"]:not(.hasDatepicker)', function () {
492	    $(this).datepicker({
493	        dateFormat: 'dd/mm/yy',
494	        minDate: 0,
495	        firstDay: 1,
496	        showOn: "both",
497	        buttonImage: "/images/icon-calendar.png",
498	        buttonImageOnly: true,
499	        constrainInput: true
500	    });
501	});
502
503	$('body').on('focus', '.datepicker[data-icon="false"]:not(.hasDatepicker)', function () {
504	    $(this).datepicker({
505	        dateFormat: 'dd/mm/yy',
506	        minDate: 0,
507	        firstDay: 1,
508	        constrainInput: true
509	    });
510	});
511
512	/**
513	Load Google Map
514	******************************************/
515	function loadGoogleMap(mapContainer) {
516
517		//default location to London
518		coords.lat = coords.lat || 51.511413;
519		coords.lng = coords.lng || -0.119047;
520		var location = new google.maps.LatLng(coords.lat, coords.lng);
521
522		var mapOptions = {
523			center: location,
524			zoom: 15,
525			scrollwheel: false,
526			mapTypeId: google.maps.MapTypeId.ROADMAP
527		};
528
529		var map = new google.maps.Map(document.getElementById(mapContainer), mapOptions);
530		var geocoder = new google.maps.Geocoder();
531
532		// get address if we have one, else use the coordinates above
533		if (map_address === null) {
534			map_address = coords.lat + ', ' + coords.lng;
535		}
536		//lookup the address and mark it on the map
537		geocoder.geocode({ 'address': map_address }, function (results, status) {
538			if (status == google.maps.GeocoderStatus.OK) {
539				setMarker(results[0].geometry.location);
540			} else {
541				setMarker(location);
542			}
543		});
544
545		function setMarker(location) {
546			map.setCenter(location);
547			var marker = new google.maps.Marker({
548				map: map,
549				draggable: true,
550				animation: google.maps.Animation.DROP,
551				position: location
552			});
553
554			google.maps.event.addListener(marker, 'click', toggleBounce);
555			map.setCenter(marker.getPosition());
556
557			google.maps.event.trigger(map, "resize");
558		}
559
560		function toggleBounce() {
561
562			if (marker.getAnimation() != null) {
563				marker.setAnimation(null);
564			} else {
565				marker.setAnimation(google.maps.Animation.BOUNCE);
566			}
567		}
568	};
569
570	/** Init any tabs **/
571	$("#tabs-min").tabs({
572		beforeActivate: function (event, ui) {
573			if (ui.newPanel[0].id === "tabs-map" && $('#location-map').is(':empty')) {
574				loadGoogleMap("location-map");
575			}
576		}
577	});
578
579	/** Init Google Map on any page that has the 'location-map' element but isnt in a tabs block **/
580	if($('#location-map').length > 0 && $('#location-map:visible').length > 0) {
581		loadGoogleMap("location-map");
582	}
583
584	/**
585	Refine Search in sidebar
586	******************************************/
587	$('.toggle-refine').on('click', function (e) {
588		e.preventDefault();
589
590		//only run on small screens
591		if ($(window).width() < 768) {
592			$(this).toggleClass('active');
593			$('#refine-form').slideToggle();
594		}
595	});
596
597    //submit the form when changing the distance
598	$('#refine-form select[name="miles"]').on('change', function () {
599	    $('#refine-form').submit();
600	});
601
602    /**
603	Faux fields in search
604	******************************************/
605	$('.faux-field__label').on('click', function (e) {
606	    e.preventDefault();
607	    var link = $(this);
608	    link.toggleClass('open');
609	    link.next('.faux-field__content').slideToggle(300);
610	});
611
612	/**
613	Add submenu class to sub navs
614	******************************************/
615	$('.sub-navigation li:has(ul li)').addClass('has-submenu');
616
617	/**
618	Add the current page URL to the share URL for each link when clicked
619	******************************************/
620	$('.share-btns li a:not(.mail)').on("click", function () {
621
622		//get current page title and truncate to 25chars
623		var pageTitle = document.title.truncate(25, true);
624
625		this.href = this.href + encodeURIComponent(window.location) + '&text=' + encodeURIComponent(pageTitle);
626	});
627
628    /**
629    placeholder attribute polyfill
630    *****************************************/
631	$('input, textarea').placeholder();
632
633    /**
634    Top bar menus
635    *****************************************/
636	$('.tab-bar .menu-icon, .hf-top-bar .menu-icon').on('click', function (e) {
637	    window.scrollTo(0, 0);
638	});
639});
640
641/* -------------------------
642 GENERAL FUNCTIONS
643------------------------- */
644function addClass(element, value) {
645	if (!element.className) {
646		element.className = value;
647	} else if (element.className.indexOf(value) == -1) {
648		newClassName = element.className;
649		newClassName += " ";
650		newClassName += value;
651		element.className = newClassName;
652	}
653}
654function hasClass(ele, cls) {
655	return ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
656}
657
658function removeClass(ele, cls) {
659	if (hasClass(ele, cls)) {
660		var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
661		ele.className = ele.className.replace(reg, ' ');
662	}
663}
664
665//Loading graphic functions
666function showLoading(elem) {
667	$(elem).hide();
668	//alert($(elem));
669	$(elem).siblings(".loadingPanel").show();
670}
671
672function hideLoading(elem) {
673	//alert($(elem));
674	$(elem).siblings(".loadingPanel").hide();
675	$(elem).show();
676}
677
678/* Analytics outbound links */
679function recordOutboundLink(category, action, opt_value) {
680	try {
681		_gaq.push(['_trackEvent', category, action, opt_value, 1, true]);
682	} catch (err) { }
683}
684
685/** JS has no dayofweek so create it and add to the date object **/
686var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
687var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
688
689Date.prototype.getMonthName = function (abbreviate) {
690	if (abbreviate) {
691		return months[this.getMonth()].substring(0, 3);
692	} else {
693		return months[this.getMonth()];
694	}
695};
696Date.prototype.getDayName = function () {
697	return days[this.getDay()];
698};
699
700function ResizeFancybox() {
701	$('#fancybox-content').addClass('loadingOverlay');
702	$('#fancybox-frame').attr('scrolling', 'no');
703	$('#fancybox-frame').load(function () { // wait for frame to load and then gets it's height
704		$('#fancybox-content').height($(this).contents().find('body').height());
705		$.fancybox.center();
706		$('#fancybox-content').removeClass('loadingOverlay');
707	});
708}
709
710/* truncate function */
711String.prototype.truncate = function (n, useWordBoundary) {
712	var toLong = this.length > n,
713		s_ = toLong ? this.substr(0, n - 1) : this;
714	s_ = useWordBoundary && toLong ? s_.substr(0, s_.lastIndexOf(' ')) : s_;
715	return toLong ? s_ + '..' : s_;
716};
717
718/* This handles the email link on the share icons, top right of page */
719function emailCurrentPage(){
720	window.location.href = "mailto:?subject=" + document.title + "&body=" + escape(window.location.href);
721}
722
723/* This navigates to location box anchor when location box clicked */
724function scrollToAnchor(anchorID) {
725	var aTag = $("a[name='" + anchorID + "']");
726	$('html,body').animate({ scrollTop: aTag.offset().top }, 'fast');
727}
728
729/*****
730 Polyfill for array filter
731***********************************/
732if (!Array.prototype.filter) {
733    Array.prototype.filter = function (fun/*, thisArg*/) {
734        'use strict';
735
736        if (this === void 0 || this === null) {
737            throw new TypeError();
738        }
739
740        var t = Object(this);
741        var len = t.length >>> 0;
742        if (typeof fun !== 'function') {
743            throw new TypeError();
744        }
745
746        var res = [];
747        var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
748        for (var i = 0; i < len; i++) {
749            if (i in t) {
750                var val = t[i];
751
752                // NOTE: Technically this should Object.defineProperty at
753                //       the next index, as push can be affected by
754                //       properties on Object.prototype and Array.prototype.
755                //       But that method's new, and collisions should be
756                //       rare, so use the more-compatible alternative.
757                if (fun.call(thisArg, val, i, t)) {
758                    res.push(val);
759                }
760            }
761        }
762
763        return res;
764    };
765}
766
767
768// Resize videos to retain aspect ratio when resized
769(function ($) {
770    var $allVideos = $(".cms-video iframe");
771
772    // Figure out and save aspect ratio for each video
773    $allVideos.each(function () {
774
775        var contentWidth = $('.page-content').width(),
776            ratio = 0.5625;
777
778        $(this).data('aspectRatio', ratio).removeAttr('height');
779
780        $(this).height(contentWidth * ratio);
781    });
782
783    // When the window is resized
784    $(window).resize(function () {
785
786        var contentWidth = $('.page-content').width();
787
788        // Resize all videos according to their own aspect ratio
789        $allVideos.each(function () {
790
791            var $el = $(this);
792            $el.height(contentWidth * $el.data('aspectRatio'));
793
794        });
795
796        // Kick off one resize to fix all videos on page load
797    }).resize();
798})(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.