PageSourceSearch

https://www.zumatours.net/wp-content/themes/trek/js/plugins.js?ver=fdc1a72b35e390d328a7fa3744a2097b

js zumatours.net collected 2026-10-08 23:03:05 UTC 26,294 bytes, 616 lines download raw bytes

1var $=jQuery;
2jQuery.noConflict();
3// Avoid `console` errors in browsers that lack a console.
4(function() {
5    var method;
6    var noop = function noop() {};
7    var methods = [
8        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
9        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
10        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
11        'timeStamp', 'trace', 'warn'
12    ];
13    var length = methods.length;
14    var console = (window.console = window.console || {});
15
16    while (length--) {
17        method = methods[length];
18
19        // Only stub undefined methods.
20        if (!console[method]) {
21            console[method] = noop;
22        }
23    }
24}());
25
26  !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?"http":"https";if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
27
28// Customize twitter feed
29
30jQuery(document).ready(function($) {
31	
32 jQuery(".tweet .e-entry-title").css("color","#ffffff");
33});
34
35jQuery(document).ready(function($) {
36jQuery('[data-tip]').each( function() {
37    jQuery(this).tooltip({ 
38        placement: jQuery(this).data('tip')
39    });
40});
41});
42   // FAQs
43    var $faqs = jQuery("#faq .faq");
44    $faqs.click(function () {
45        var $answer = jQuery(this).find(".answer");
46        $answer.slideToggle('fast');
47    });
48		
49		jQuery(document).ready(function(){
50    jQuery('.carousel').carousel({
51      interval: false
52    });
53  });
54	
55	jQuery('.accordion-container').hide(); 
56	jQuery('.accordion-heading:first').addClass('active').next().show();
57	jQuery('.accordion-heading').click(function(){
58		if( jQuery(this).next().is(':hidden') ) { 
59			jQuery('.accordion-heading').removeClass('active').next().slideUp();
60			jQuery(this).toggleClass('active').next().slideDown();
61		}
62		return false;
63	});
64	
65	jQuery(document).ready(function() {
66		jQuery(".tab_content").hide();
67		jQuery("ul.tabs li:first").addClass("active").show();
68		jQuery(".tab_content:first").show();
69		jQuery("ul.tabs li").click(function() {
70			jQuery("ul.tabs li").removeClass("active");
71			jQuery(this).addClass("active");
72			jQuery(".tab_content").hide();
73			var activeTab = jQuery(this).find("a").attr("href");
74			if (jQuery.browser.msie) {jQuery(activeTab).show();}
75			else {jQuery(activeTab).fadeIn();}
76			return false;
77		});
78	});
79
80// Plugins
81
82/**
83 * @preserve
84 * Project: Bootstrap Hover Dropdown
85 * Author: Cameron Spear
86 * Version: v2.2.1
87 * Contributors: Mattia Larentis
88 * Dependencies: Bootstrap's Dropdown plugin, jQuery
89 * Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
90 * License: MIT
91 * Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
92 */
93!function(e,n){var o=e();e.fn.dropdownHover=function(t){return"ontouchstart"in document?this:(o=o.add(this.parent()),this.each(function(){function r(){d.parents(".navbar").find(".navbar-toggle").is(":visible")||(n.clearTimeout(a),n.clearTimeout(i),i=n.setTimeout(function(){o.find(":focus").blur(),v.instantlyCloseOthers===!0&&o.removeClass("open"),n.clearTimeout(i),d.attr("aria-expanded","true"),s.addClass("open"),d.trigger(h)},v.hoverDelay))}var a,i,d=e(this),s=d.parent(),u={delay:500,hoverDelay:0,instantlyCloseOthers:!0},l={delay:e(this).data("delay"),hoverDelay:e(this).data("hover-delay"),instantlyCloseOthers:e(this).data("close-others")},h="show.bs.dropdown",c="hide.bs.dropdown",v=e.extend(!0,{},u,t,l);s.hover(function(e){return s.hasClass("open")||d.is(e.target)?void r(e):!0},function(){n.clearTimeout(i),a=n.setTimeout(function(){d.attr("aria-expanded","false"),s.removeClass("open"),d.trigger(c)},v.delay)}),d.hover(function(e){return s.hasClass("open")||s.is(e.target)?void r(e):!0}),s.find(".dropdown-submenu").each(function(){var o,t=e(this);t.hover(function(){n.clearTimeout(o),t.children(".dropdown-menu").show(),t.siblings().children(".dropdown-menu").hide()},function(){var e=t.children(".dropdown-menu");o=n.setTimeout(function(){e.hide()},v.delay)})})}))},e(document).ready(function(){e('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window);
94 //ROLL ON HOVER
95jQuery(function() {
96jQuery(".mask").css("opacity","0");
97jQuery(".mask").hover(function () {
98jQuery(this).stop().animate({
99opacity: .7
100}, "slow");
101},
102function () {
103jQuery(this).stop().animate({
104opacity: 0
105}, "slow");
106});
107
108});
109
110
111
112
113jQuery(document).ready(function(){
114	var didScroll = false;
115
116	var $arrow = jQuery('#back-to-top');
117
118	$arrow.click(function(e) {
119		jQuery('body,html').animate({ scrollTop: "0" }, 750, 'easeOutExpo' );
120		e.preventDefault();
121	})
122
123	jQuery(window).scroll(function() {
124		didScroll = true;
125	});
126
127	setInterval(function() {
128		if( didScroll ) {
129			didScroll = false;
130
131			if( jQuery(window).scrollTop() > 1000 ) {
132				$arrow.css('display', 'block');
133			} else {
134				$arrow.css('display', 'none');
135			}
136		}
137	}, 250);
138});
139
140jQuery(document).ready(function() {
141
142jQuery.validator.setDefaults({
143		errorClass : "help-inline"
144	});
145
146		jQuery('#registration-form').validate({
147	    rules: {
148	      name: {
149	        minlength: 2,
150	        required: true
151	      },
152	      email: {
153	        required: true,
154	        
155	      },
156	      phone: {
157	      	minlength: 2,
158	        required: true
159	      },
160	      
161	    },
162			highlight: function(element) {
163				jQuery(element).closest('.control-group').removeClass('success').addClass('error');
164			},
165			success: function(element) {
166				element
167				.text('OK!').addClass('valid')
168				.closest('.control-group').removeClass('error').addClass('success');
169			}
170	  });
171
172}); // end document.ready
173var bumpIt = function() {
174      jQuery('body').css('margin-bottom', jQuery('.footer-holder').height());
175    },
176    didResize = false;
177
178bumpIt();
179
180jQuery(window).resize(function() {
181  didResize = true;
182});
183setInterval(function() {
184  if(didResize) {
185    didResize = false;
186    bumpIt();
187  }
188}, 250);
189
190jQuery(window).load(function(){
191	
192        jQuery('.trekFadeIn').waypoint(function() {
193     
194            jQuery(this).find('.banner-home').addClass('show animated fadeInUp');
195						jQuery(this).find('.navbar').addClass('show animated fadeInDown');
196						
197              }, {
198            triggerOnce : true,
199            offset : function() {
200                return jQuery(window).height() - jQuery(this).outerHeight() + jQuery(this).height() - 0;
201            }
202														});
203			
204});
205
206/*
207
208Holder - 1.9 - client side image placeholders
209(c) 2012-2013 Ivan Malopinsky / http://imsky.co
210
211Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
212Commercial use requires attribution.
213
214*/
215
216var Holder = Holder || {};
217(function (app, win) {
218
219var preempted = false,
220fallback = false,
221canvas = document.createElement('canvas');
222
223//getElementsByClassName polyfill
224document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
225
226//getComputedStyle polyfill
227window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
228
229//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
230function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}};
231
232//https://gist.github.com/991057 by Jed Schmidt with modifications
233function selector(a){
234	a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
235	var ret=[];	b!=null&&(b.length?ret=b:b.length==0?ret=b:ret=[b]);	return ret;
236}
237
238//shallow object property extend
239function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
240
241//hasOwnProperty polyfill
242if (!Object.prototype.hasOwnProperty)
243	Object.prototype.hasOwnProperty = function(prop) {
244		var proto = this.__proto__ || this.constructor.prototype;
245		return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
246	}
247
248function text_size(width, height, template) {
249	var dimension_arr = [height, width].sort();
250	var maxFactor = Math.round(dimension_arr[1] / 16),
251		minFactor = Math.round(dimension_arr[0] / 16);
252	var text_height = Math.max(template.size, maxFactor);
253	return {
254		height: text_height
255	}
256}
257
258function draw(ctx, dimensions, template, ratio) {
259	var ts = text_size(dimensions.width, dimensions.height, template);
260	var text_height = ts.height;
261	var width = dimensions.width * ratio, height = dimensions.height * ratio;
262	var font = template.font ? template.font : "sans-serif";
263	canvas.width = width;
264	canvas.height = height;
265	ctx.textAlign = "center";
266	ctx.textBaseline = "middle";
267	ctx.fillStyle = template.background;
268	ctx.fillRect(0, 0, width, height);
269	ctx.fillStyle = template.foreground;
270	ctx.font = "bold " + text_height + "px "+font;
271	var text = template.text ? template.text : (dimensions.width + "x" + dimensions.height);
272	if (ctx.measureText(text).width / width > 1) {
273		text_height = template.size / (ctx.measureText(text).width / width);
274	}
275	//Resetting font size if necessary
276	ctx.font = "bold " + (text_height * ratio) + "px "+font;
277	ctx.fillText(text, (width / 2), (height / 2), width);
278	return canvas.toDataURL("image/png");
279}
280
281function render(mode, el, holder, src) {
282	var dimensions = holder.dimensions,
283		theme = holder.theme,
284		text = holder.text ? decodeURIComponent(holder.text) : holder.text;
285	var dimensions_caption = dimensions.width + "x" + dimensions.height;
286	theme = (text ? extend(theme, {	text: text }) : theme);
287	theme = (holder.font ? extend(theme, {font: holder.font}) : theme);
288
289	var ratio = 1;
290	if(window.devicePixelRatio && window.devicePixelRatio > 1){
291		ratio = window.devicePixelRatio;
292	}
293
294	if (mode == "image") {
295		el.setAttribute("data-src", src);
296		el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
297		
298		if(fallback || !holder.auto){
299		    el.style.width = dimensions.width + "px";
300		    el.style.height = dimensions.height + "px";
301		}
302	
303		if (fallback) {
304			el.style.backgroundColor = theme.background;
305			
306		}
307		else{
308			el.setAttribute("src", draw(ctx, dimensions, theme, ratio));
309		}
310	} else {
311		if (!fallback) {
312			el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")";
313			el.style.backgroundSize = dimensions.width+"px "+dimensions.height+"px";
314		}
315	}
316};
317
318function fluid(el, holder, src) {
319	var dimensions = holder.dimensions,
320		theme = holder.theme,
321		text = holder.text;
322	var dimensions_caption = dimensions.width + "x" + dimensions.height;
323	theme = (text ? extend(theme, {
324		text: text
325	}) : theme);
326
327	var fluid = document.createElement("div");
328
329	fluid.style.backgroundColor = theme.background;
330	fluid.style.color = theme.foreground;
331	fluid.className = el.className + " holderjs-fluid";
332	fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%")>0?"":"px");
333	fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%")>0?"":"px");
334	fluid.id = el.id;
335	
336	el.style.width=0;
337	el.style.height=0;
338	
339	if (theme.text) {
340		fluid.appendChild(document.createTextNode(theme.text))
341	} else {
342		fluid.appendChild(document.createTextNode(dimensions_caption))
343		fluid_images.push(fluid);
344		setTimeout(fluid_update, 0);
345	}
346
347	el.parentNode.insertBefore(fluid, el.nextSibling)
348	
349	if(window.jQuery){
350	    jQuery(function($){
351		jQuery(el).on("load", function(){
352		   el.style.width = fluid.style.width;
353		   el.style.height = fluid.style.height;
354		   jQuery(el).show();
355		   jQuery(fluid).remove();
356		});
357	    })
358	}
359}
360
361function fluid_update() {
362	for (i in fluid_images) {
363		if(!fluid_images.hasOwnProperty(i)) continue;
364		var el = fluid_images[i],
365			label = el.firstChild;
366
367		el.style.lineHeight = el.offsetHeight+"px";
368		label.data = el.offsetWidth + "x" + el.offsetHeight;
369	}
370}
371
372function parse_flags(flags, options) {
373
374	var ret = {
375		theme: settings.themes.gray
376	}, render = false;
377
378	for (sl = flags.length, j = 0; j < sl; j++) {
379		var flag = flags[j];
380		if (app.flags.dimensions.match(flag)) {
381			render = true;
382			ret.dimensions = app.flags.dimensions.output(flag);
383		} else if (app.flags.fluid.match(flag)) {
384			render = true;
385			ret.dimensions = app.flags.fluid.output(flag);
386			ret.fluid = true;
387		} else if (app.flags.colors.match(flag)) {
388			ret.theme = app.flags.colors.output(flag);
389		} else if (options.themes[flag]) {
390			//If a theme is specified, it will override custom colors
391			ret.theme = options.themes[flag];
392		} else if (app.flags.text.match(flag)) {
393			ret.text = app.flags.text.output(flag);
394		} else if(app.flags.font.match(flag)){
395			ret.font = app.flags.font.output(flag);
396		}
397		else if(app.flags.auto.match(flag)){
398			ret.auto = true;
399		}
400	}
401
402	return render ? ret : false;
403
404};
405
406if (!canvas.getContext) {
407	fallback = true;
408} else {
409	if (canvas.toDataURL("image/png")
410		.indexOf("data:image/png") < 0) {
411		//Android doesn't support data URI
412		fallback = true;
413	} else {
414		var ctx = canvas.getContext("2d");
415	}
416}
417
418var fluid_images = [];
419
420var settings = {
421	domain: "holder.js",
422	images: "img",
423	bgnodes: ".holderjs",
424	themes: {
425		"gray": {
426			background: "#eee",
427			foreground: "#aaa",
428			size: 12
429		},
430			"social": {
431			background: "#3a5a97",
432			foreground: "#fff",
433			size: 12
434		},
435			"industrial": {
436			background: "#434A52",
437			foreground: "#C2F200",
438			size: 12
439		}
440	},
441	stylesheet: ".holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}"
442};
443
444
445app.flags = {
446	dimensions: {
447		regex: /^(\d+)x(\d+)$/,
448		output: function (val) {
449			var exec = this.regex.exec(val);
450			return {
451				width: +exec[1],
452				height: +exec[2]
453			}
454		}
455	},
456	fluid: {
457		regex: /^([0-9%]+)x([0-9%]+)$/,
458		output: function (val) {
459			var exec = this.regex.exec(val);
460			return {
461				width: exec[1],
462				height: exec[2]
463			}
464		}
465	},
466	colors: {
467		regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
468		output: function (val) {
469			var exec = this.regex.exec(val);
470			return {
471				size: settings.themes.gray.size,
472				foreground: "#" + exec[2],
473				background: "#" + exec[1]
474			}
475		}
476	},
477	text: {
478		regex: /text\:(.*)/,
479		output: function (val) {
480			return this.regex.exec(val)[1];
481		}
482	},
483	font: {
484	    regex: /font\:(.*)/,
485	    output: function(val){
486		return this.regex.exec(val)[1];
487	    }
488	},
489	auto: {
490	    regex: /^auto$/
491	}
492}
493
494for (var flag in app.flags) {
495	if(!app.flags.hasOwnProperty(flag)) continue;
496	app.flags[flag].match = function (val) {
497		return val.match(this.regex)
498	}
499}
500
501app.add_theme = function (name, theme) {
502	name != null && theme != null && (settings.themes[name] = theme);
503	return app;
504};
505
506app.add_image = function (src, el) {
507	var node = selector(el);
508	if (node.length) {
509		for (var i = 0, l = node.length; i < l; i++) {
510			var img = document.createElement("img")
511			img.setAttribute("data-src", src);
512			node[i].appendChild(img);
513		}
514	}
515	return app;
516};
517
518app.run = function (o) {
519	var options = extend(settings, o), images = [];
520	    
521	if(options.images instanceof window.NodeList){
522	    imageNodes = options.images;
523	}
524	else if(options.images instanceof window.Node){
525	    imageNodes = [options.images];
526	}
527	else{
528	    imageNodes = selector(options.images);
529	}
530	
531	if(options.elements instanceof window.NodeList){
532	    bgnodes = options.bgnodes;
533	}
534	else if(options.bgnodes instanceof window.Node){
535	    bgnodes = [options.bgnodes];
536	}
537	else{
538	    bgnodes = selector(options.bgnodes);
539	}
540	
541	preempted = true;
542	   
543	for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
544	
545	var holdercss = document.getElementById("holderjs-style");
546	
547	if(!holdercss){
548	    holdercss = document.createElement("style");
549	    holdercss.setAttribute("id", "holderjs-style");
550	    holdercss.type = "text/css";
551	    document.getElementsByTagName("head")[0].appendChild(holdercss);
552	}
553
554	if(holdercss.styleSheet){
555	    holdercss.styleSheet += options.stylesheet;
556	}
557	else{
558	    holdercss.textContent+= options.stylesheet;
559	}
560	
561	var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
562
563	for (var l = bgnodes.length, i = 0; i < l; i++) {
564		var src = window.getComputedStyle(bgnodes[i], null)
565			.getPropertyValue("background-image");
566		var flags = src.match(cssregex);
567		if (flags) {
568			var holder = parse_flags(flags[1].split("/"), options);
569			if (holder) {
570				render("background", bgnodes[i], holder, src);
571			}
572		}
573	}
574
575	for (var l = images.length, i = 0; i < l; i++) {
576		var src = images[i].getAttribute("src") || images[i].getAttribute("data-src");
577		if (src != null && src.indexOf(options.domain) >= 0) {
578			var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
579				.split("/"), options);
580			if (holder) {
581				if (holder.fluid) {
582					fluid(images[i], holder, src);
583				} else {
584					render("image", images[i], holder, src);
585				}
586			}
587		}
588	}
589	return app;
590};
591
592contentLoaded(win, function () {
593	if (window.addEventListener) {
594		window.addEventListener("resize", fluid_update, false);
595		window.addEventListener("orientationchange", fluid_update, false);
596	} else {
597		window.attachEvent("onresize", fluid_update)
598	}
599	preempted || app.run();
600});
601
602if ( typeof define === "function" && define.amd ) {
603	define( "Holder", [], function () { return app; } );
604}
605
606})(Holder, window);
607
608// Generated by CoffeeScript 1.4.0
609/*
610jQuery Waypoints - v2.0.2
611Copyright (c) 2011-2013 Caleb Troughton
612Dual licensed under the MIT license and GPL license.
613https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
614*/
615(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;
vendor: 6,759 bytes, line 615
615w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);
615return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
616

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.