PageSourceSearch

https://ccamuseum.org/wp-content/plugins/easy-modal/assets/scripts/easy-modal-site.js?ver=2.2.1

js ccamuseum.org collected 2026-10-03 21:38:42 UTC 23,311 bytes, 812 lines download raw bytes

1(function (jQuery) {
2	"use strict";
3
4	jQuery.fn.emodalTransition = function (properties, duration, callback) {
5		var cssProperties = jQuery.extend({}, properties);
6		var transitionDuration = duration;
7
8		if (typeof transitionDuration === 'function') {
9			callback = transitionDuration;
10			transitionDuration = cssProperties.duration;
11		}
12		if (transitionDuration === undefined || transitionDuration === null) {
13			transitionDuration = cssProperties.duration;
14		}
15		if (transitionDuration === undefined || transitionDuration === null) {
16			transitionDuration = 400;
17		}
18		transitionDuration = parseInt(transitionDuration, 10);
19		delete cssProperties.duration;
20
21		if (cssProperties.scale !== undefined) {
22			cssProperties.transform = 'scale(' + cssProperties.scale + ')';
23			delete cssProperties.scale;
24		}
25
26		return this.each(function () {
27			var element = jQuery(this);
28			element.css('transition', 'all ' + transitionDuration + 'ms ease');
29			window.requestAnimationFrame(function () {
30				element.css(cssProperties);
31			});
32			window.setTimeout(function () {
33				element.css('transition', '');
34				if (typeof callback === 'function') {
35					callback.call(element[0]);
36				}
37			}, transitionDuration);
38		});
39	};
40
41	jQuery.fn.emodal = function (method) {
42		// Method calling logic
43		if (jQuery.fn.emodal.methods[method]) {
44			return jQuery.fn.emodal.methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
45		} else if (typeof method === 'object' || !method) {
46			return jQuery.fn.emodal.methods.init.apply(this, arguments);
47		} else {
48			jQuery.error('Method ' + method + ' does not exist on jQuery.fn.emodal');
49		}
50	};
51	jQuery.fn.emodal.methods = {
52		init: function (options) {
53			return this.each(function () {
54				var $this = jQuery(this);
55				var settings = jQuery.extend(true, {}, jQuery.fn.emodal.defaults, $this.data('emodal'), options);
56
57				if (!$this.parent().is('body'))
58					$this.appendTo('body');
59
60				if (!jQuery('#' + settings.overlay.attr.id).length)
61					jQuery('<div>').attr(settings.overlay.attr).appendTo('body');
62
63				jQuery(window).on('resize', function () {
64					if ($this.hasClass('active'))
65						jQuery.fn.emodal.utilities.throttle(setTimeout(function () {
66							$this.emodal('reposition');
67						}, 25), 500, false);
68				});
69
70				$this
71					.data('emodal', settings)
72					.on('emodalBeforeOpen.hide_modal', function (e) {
73						jQuery(this)
74							.css({ visibility: "visible" })
75							.hide()
76							.addClass(settings.container.active_class);
77
78						if(!settings.meta.display.stackable) {
79							$this.emodal('close_all');
80						}
81					})
82					.on('emodalAfterClose.close_overlay', function (e) {
83						var $overlay = jQuery('#' + settings.overlay.attr.id);
84						if ($overlay.length && $overlay.is(":visible")) {
85							$overlay.fadeOut(settings.close.close_speed);
86						}
87					})
88					.on('emodalAfterClose.reset_videos', function (e) {
89						jQuery('iframe', $this).filter('[src*="youtube"],[src*="vimeo"]').each(function () {
90							var src = jQuery(this).attr('src');
91							jQuery(this).attr('src', '').attr('src', src);
92						});
93					})
94					.on('emodalBeforeOpen.setup_close', function () {
95						$this.emodal('setup_close');
96					})
97					.on('emodalBeforeOpen.retheme', function () {
98						$this.emodal('retheme');
99					})
100					.on('emodalBeforeOpen.reposition', function () {
101						$this.emodal('reposition');
102					})
103					.trigger('emodalInit');
104				return this;
105			});
106		},
107		setup_close: function () {
108			var $this = jQuery(this),
109				settings = $this.data('emodal'),
110				$overlay = jQuery('#' + settings.overlay.attr.id),
111				$close = jQuery('.' + settings.close.attr.class, $this);
112
113			$close
114				.off('click.emodal')
115				.on("click.emodal", function (e) {
116					e.preventDefault();
117					e.stopPropagation();
118					$this.emodal('close');
119
120				});
121			if (settings.meta.close.esc_press) {
122				jQuery(window)
123				.off('keyup.emodal')
124				.on('keyup.emodal', function (e) {
125					if (e.keyCode === 27) {
126						$this.emodal('close');
127					}
128				});
129			}
130
131			if (settings.meta.close.overlay_click) {
132				$overlay
133				.off('click.emodal')
134				.on('click.emodal', function (e) {
135					e.preventDefault();
136					e.stopPropagation();
137					$this.emodal('close');
138				});
139			}
140
141			$this
142				.on('emodalAfterClose', function () {
143					jQuery(window).off('keyup.emodal');
144					$overlay.off('click.emodal');
145					$close.off('click.emodal');
146				})
147				.trigger('emodalSetupClose');
148		},
149		open: function (callback) {
150			var $this = jQuery(this);
151			var settings = $this.data('emodal');
152
153		   $this
154				.trigger('emodalBeforeOpen')
155				.emodal('animate', settings.meta.display.animation.type, function() {
156					$this.trigger('emodalAfterOpen');
157					if(callback !== undefined) callback();
158				});
159			return this;
160		},
161		close: function () {
162			return this.each(function () {
163				var $this = jQuery(this),
164					settings = $this.data('emodal');
165				$this
166					.trigger('emodalBeforeClose')
167					.removeClass('active')
168					.fadeOut(settings.close.close_speed, function () {
169						$this.trigger('emodalAfterClose');
170					});
171				return this;
172			});
173		},
174		close_all: function () {
175			var settings = jQuery(this).data('emodal');
176			jQuery('.' + settings.container.attr.class).removeClass('active').hide(0);
177			return this;
178		},
179		reposition: function (callback) {
180			var $this = jQuery(this);
181			$this.trigger('emodalBeforeReposition');
182			var settings = $this.data('emodal');
183			var location = settings.meta.display.location;
184			var position = settings.meta.display.position;
185
186			var reposition = {
187				my: "",
188				at: ""
189			};
190
191			if (location.indexOf('left') >= 0) reposition = {
192				my: reposition.my + " left" + (position.left !== 0 ? "+" + position.left : ""),
193				at: reposition.at + " left"
194			};
195			if (location.indexOf('right') >= 0) reposition = {
196				my: reposition.my + " right" + (position.right !== 0 ? "-" + position.right : ""),
197				at: reposition.at + " right"
198			};
199
200			if (location.indexOf('center') >= 0) {
201				if (location === 'center') reposition = {
202					my: "center",
203					at: "center"
204				};
205				else reposition = {
206					my: reposition.my + " center",
207					at: reposition.at + " center"
208				};
209			}
210
211			if (location.indexOf('top') >= 0) reposition = {
212				my: reposition.my + " top" + (position.top !== 0 ? "+" + position.top : ""),
213				at: reposition.at + " top"
214			};
215			if (location.indexOf('bottom') >= 0) reposition = {
216				my: reposition.my + " bottom" + (position.bottom !== 0 ? "-" + position.bottom : ""),
217				at: reposition.at + " bottom"
218			};
219
220
221			reposition.my = reposition.my.trim();
222			reposition.at = reposition.at.trim();
223			reposition.of = window;
224			reposition.collision = 'fit';
225			reposition.using = typeof callback === "function" ? callback : jQuery.fn.emodal.callbacks.reposition_using;
226			var opacity = false;
227			if ($this.is(':hidden')) {
228				opacity = $this.css("opacity");
229				$this.css({
230					opacity: 0
231				}).show();
232			}
233
234			if (position.fixed) {
235				$this.addClass('fixed');
236			} else {
237				$this.removeClass('fixed');
238			}
239
240			if (settings.meta.display.size === 'custom') {
241				$this.css({
242					width: settings.meta.display.custom_width + settings.meta.display.custom_width_unit,
243					height: settings.meta.display.custom_height_auto ? 'auto' : settings.meta.display.custom_height + settings.meta.display.custom_height_unit
244				});
245			}
246
247			$this
248				.addClass('custom-position')
249				.position(reposition)
250				.trigger('emodalAfterReposition');
251
252			if (opacity) {
253				$this.css({
254					opacity: opacity
255				}).hide();
256			}
257			return this;
258		},
259		retheme: function (theme) {
260			var $this = jQuery(this);
261			$this.trigger('emodalBeforeRetheme');
262			var settings = $this.data('emodal'),
263				$overlay = jQuery('#' + settings.overlay.attr.id),
264				$container = $this,
265				$title = jQuery('> .' + settings.title.attr.class, $container),
266				$content = jQuery('> .' + settings.content.attr.class, $container),
267				$close = jQuery('> .' + settings.close.attr.class, $container);
268
269			if (theme === undefined) {
270				theme = jQuery.fn.emodal.themes[settings.theme_id];
271				if (theme === undefined) {
272					theme = jQuery.fn.emodal.themes[1];
273				}
274			}
275
276			$overlay.removeAttr('style').css({
277				backgroundColor: jQuery.fn.emodal.utilities.convert_hex(theme.overlay.background.color, theme.overlay.background.opacity)
278			});
279			var container_inset = theme.container.boxshadow.inset === 'yes' ? 'inset ' : '';
280			$container.css({
281				padding: theme.container.padding + 'px',
282				backgroundColor: jQuery.fn.emodal.utilities.convert_hex(theme.container.background.color, theme.container.background.opacity),
283				borderStyle: theme.container.border.style,
284				borderColor: theme.container.border.color,
285				borderWidth: theme.container.border.width + 'px',
286				borderRadius: theme.container.border.radius + 'px',
287				boxShadow: container_inset + theme.container.boxshadow.horizontal + 'px ' + theme.container.boxshadow.vertical + 'px ' + theme.container.boxshadow.blur + 'px ' + theme.container.boxshadow.spread + 'px ' + jQuery.fn.emodal.utilities.convert_hex(theme.container.boxshadow.color, theme.container.boxshadow.opacity)
288			});
289			$title.css({
290				color: theme.title.font.color,
291				fontSize: theme.title.font.size + 'px',
292				fontFamily: theme.title.font.family,
293				textAlign: theme.title.text.align,
294				textShadow: theme.title.textshadow.horizontal + 'px ' + theme.title.textshadow.vertical + 'px ' + theme.title.textshadow.blur + 'px ' + jQuery.fn.emodal.utilities.convert_hex(theme.title.textshadow.color, theme.title.textshadow.opacity)
295			});
296			$content.css({
297				color: theme.content.font.color,
298				//fontSize: theme.content.font.size+'px',
299				fontFamily: theme.content.font.family
300			});
301			jQuery('p, label', $content).css({
302				color: theme.content.font.color,
303				//fontSize: theme.content.font.size+'px',
304				fontFamily: theme.content.font.family
305			});
306			var close_inset = theme.close.boxshadow.inset === 'yes' ? 'inset ' : '';
307			$close.text(theme.close.text).css({
308				padding: theme.close.padding + 'px',
309				backgroundColor: jQuery.fn.emodal.utilities.convert_hex(theme.close.background.color, theme.close.background.opacity),
310				color: theme.close.font.color,
311				fontSize: theme.close.font.size + 'px',
312				fontFamily: theme.close.font.family,
313				borderStyle: theme.close.border.style,
314				borderColor: theme.close.border.color,
315				borderWidth: theme.close.border.width + 'px',
316				borderRadius: theme.close.border.radius + 'px',
317				boxShadow: close_inset + theme.close.boxshadow.horizontal + 'px ' + theme.close.boxshadow.vertical + 'px ' + theme.close.boxshadow.blur + 'px ' + theme.close.boxshadow.spread + 'px ' + jQuery.fn.emodal.utilities.convert_hex(theme.close.boxshadow.color, theme.close.boxshadow.opacity),
318				textShadow: theme.close.textshadow.horizontal + 'px ' + theme.close.textshadow.vertical + 'px ' + theme.close.textshadow.blur + 'px ' + jQuery.fn.emodal.utilities.convert_hex(theme.close.textshadow.color, theme.close.textshadow.opacity)
319			});
320			switch (theme.close.location) {
321			case "topleft":
322				$close.css({
323					top: theme.close.position.top + 'px',
324					left: theme.close.position.left + 'px'
325				});
326				break;
327			case "topright":
328				$close.css({
329					top: theme.close.position.top + 'px',
330					right: theme.close.position.right + 'px'
331				});
332				break;
333			case "bottomleft":
334				$close.css({
335					bottom: theme.close.position.bottom + 'px',
336					left: theme.close.position.left + 'px'
337				});
338				break;
339			case "bottomright":
340				$close.css({
341					bottom: theme.close.position.bottom + 'px',
342					right: theme.close.position.right + 'px'
343				});
344				break;
345			}
346			$this.trigger('emodalAfterRetheme', [theme]);
347			return this;
348		},
349		animate_overlay: function (style, duration, callback) {
350			// Method calling logic
351			var $this = jQuery(this);
352			var settings = $this.data('emodal');
353			if(settings.meta.display.overlay_disabled)
354			{
355				callback();
356			}
357			else
358			{
359			   if (jQuery.fn.emodal.overlay_animations[style])
360					return jQuery.fn.emodal.overlay_animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
361				else
362					jQuery.error('Animation style ' + jQuery.fn.emodal.overlay_animations + ' does not exist.');
363			}
364			return this;
365		},
366		animate: function (style, callback) {
367			// Method calling logic
368			if (jQuery.fn.emodal.animations[style])
369				return jQuery.fn.emodal.animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
370			else
371				jQuery.error('Animation style ' + jQuery.fn.emodal.animations + ' does not exist.');
372			return this;
373		}
374	};
375
376	jQuery.fn.emodal.callbacks = {
377		reposition_using: function (position) {
378			jQuery(this).css(position);
379		}
380	};
381
382	jQuery.fn.emodal.utilities = {
383		convert_hex: function (hex, opacity) {
384			hex = hex.replace('#', '');
385				var r = parseInt(hex.substring(0, 2), 16);
386				var g = parseInt(hex.substring(2, 4), 16);
387				var b = parseInt(hex.substring(4, 6), 16);
388				var result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
389			return result;
390		},
391	    debounce: function (callback, threshold) {
392	        var timeout;
393	        return function() {
394	            var context = this, params = arguments;
395	            window.clearTimeout(timeout);
396	            timeout = window.setTimeout(function() {
397	                callback.apply(context, params);
398	            }, threshold);
399	        };
400	    },
401	    throttle: function (callback, threshold) {
402	        var suppress = false;
403	        var clear = function() {
404	            suppress = false;
405	        };
406	        return function() {
407	            if (!suppress) {
408	                callback.apply(this, arguments);
409	                window.setTimeout(clear, threshold);
410	                suppress = true;
411	            };
412	        }
413	    }
414	};
415	// Deprecated fix. utilies was renamed because of typo.
416	jQuery.fn.emodal.utilies = jQuery.fn.emodal.utilities;
417
418	jQuery.fn.emodal.defaults = {
419
420		meta: {
421			display: {
422				stackable: 0,
423				overlay_disabled: 0,
424				size: 'medium',
425				custom_width: '',
426				custom_width_unit: '%',
427				custom_height: '',
428				custom_height_unit: 'em',
429				custom_height_auto: 1,
430				location: 'center top',
431				position: {
432					top: 100,
433					left: 0,
434					bottom: 0,
435					right: 0,
436					fixed: 0
437				},
438				animation: {
439					type: 'fade',
440					speed: 350,
441					origin: 'center top'
442				}
443			},
444			close: {
445				overlay_click: 0,
446				esc_press: 1
447			}
448		},
449
450
451		container: {
452			active_class: 'active',
453			attr: {
454				class: "emodal"
455			}
456		},
457		title: {
458			attr: {
459				class: "emodal-title"
460			}
461		},
462		content: {
463			attr: {
464				class: "emodal-content"
465			}
466		},
467		close: {
468			close_speed: 0,
469			attr: {
470				class: "emodal-close"
471			}
472		},
473		overlay: {
474			attr: {
475				id: "emodal-overlay",
476				class: "emodal-overlay"
477			}
478		}
479	};
480
481	jQuery.fn.emodal.themes = window.emodal_themes || {};
482
483	jQuery.fn.emodal.overlay_animations = {
484		none: function (duration, callback) {
485			var $this = jQuery(this);
486			var settings = $this.data('emodal');
487			jQuery('#' + settings.overlay.attr.id).show(duration, callback);
488		},
489		fade: function (duration, callback) {
490			var $this = jQuery(this);
491			var settings = $this.data('emodal');
492			jQuery('#' + settings.overlay.attr.id).fadeIn(duration, callback);
493	   },
494		slide: function (duration, callback) {
495			var $this = jQuery(this);
496			var settings = $this.data('emodal');
497			jQuery('#' + settings.overlay.attr.id).slideDown(duration, callback);
498	   }
499	};
500
501	jQuery.fn.emodal.animations = {
502		none: function (callback) {
503			var $this = jQuery(this);
504			var settings = $this.data('emodal');
505			$this.emodal('animate_overlay', 'none', 0, function(){
506				 $this.show();
507				 if(callback !== undefined) callback();
508			});
509			return this;
510		},
511		slide: function (callback) {
512			var $this = jQuery(this).show(0).css({
513				opacity: 0
514			});
515			var settings = $this.data('emodal');
516			var speed = settings.meta.display.animation.speed;
517			var origin = settings.meta.display.animation.origin;
518			var start = {
519				my: "",
520				at: ""
521			};
522			switch (origin) {
523			case 'top':
524				start = {
525					my: "left+" + $this.offset().left + " bottom",
526					at: "left top"
527				};
528				break;
529			case 'bottom':
530				start = {
531					my: "left+" + $this.offset().left + " top",
532					at: "left bottom"
533				};
534				break;
535			case 'left':
536				start = {
537					my: "right top+" + $this.offset().top,
538					at: "left top"
539				};
540				break;
541			case 'right':
542				start = {
543					my: "left top+" + $this.offset().top,
544					at: "right top"
545				};
546				break;
547			default:
548				if (origin.indexOf('left') >= 0) start = {
549					my: start.my + " right",
550					at: start.at + " left"
551				};
552				if (origin.indexOf('right') >= 0) start = {
553					my: start.my + " left",
554					at: start.at + " right"
555				};
556				if (origin.indexOf('center') >= 0) start = {
557					my: start.my + " center",
558					at: start.at + " center"
559				};
560				if (origin.indexOf('top') >= 0) start = {
561					my: start.my + " bottom",
562					at: start.at + " top"
563				};
564				if (origin.indexOf('bottom') >= 0) start = {
565					my: start.my + " top",
566					at: start.at + " bottom"
567				};
568				start.my = start.my.trim();
569				start.at = start.at.trim();
570				break;
571			}
572			start.of = window;
573			start.collision = 'none';
574			jQuery('html').css('overflow-x', 'hidden');
575			$this.position(start).css({
576				opacity: 1
577			});
578
579			$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
580				$this.emodal('reposition', function (position) {
581					position.opacity = 1;
582					$this.emodalTransition(position, speed * 0.75, function () {
583						jQuery('html').css('overflow-x', 'inherit');
584						if(callback !== undefined) callback();
585					});
586				});
587			});
588			return this;
589		},
590		fade: function (callback) {
591			var $this = jQuery(this);
592			var settings = $this.data('emodal');
593			var speed = settings.meta.display.animation.speed / 2;
594			$this.emodal('animate_overlay', 'fade', speed, function () {
595				$this.fadeIn(speed, function(){
596					if(callback !== undefined) callback();
597				});
598			});
599			return this;
600		},
601		fadeAndSlide: function (callback) {
602			var $this = jQuery(this).show(0).css({
603				opacity: 0
604			});
605			var settings = $this.data('emodal');
606			var speed = settings.meta.display.animation.speed;
607			var origin = settings.meta.display.animation.origin;
608			var start = {
609				my: "",
610				at: ""
611			};
612			switch (origin) {
613			case 'top':
614				start = {
615					my: "left+" + $this.offset().left + " bottom",
616					at: "left top"
617				};
618				break;
619
620			case 'bottom':
621				start = {
622					my: "left+" + $this.offset().left + " top",
623					at: "left bottom"
624				};
625				break;
626
627			case 'left':
628				start = {
629					my: "right top+" + $this.offset().top,
630					at: "left top"
631				};
632				break;
633
634			case 'right':
635				start = {
636					my: "left top+" + $this.offset().top,
637					at: "right top"
638				};
639				break;
640
641			default:
642				if (origin.indexOf('left') >= 0) start = {
643					my: start.my + " right",
644					at: start.at + " left"
645				};
646				if (origin.indexOf('right') >= 0) start = {
647					my: start.my + " left",
648					at: start.at + " right"
649				};
650				if (origin.indexOf('center') >= 0) start = {
651					my: start.my + " center",
652					at: start.at + " center"
653				};
654				if (origin.indexOf('top') >= 0) start = {
655					my: start.my + " bottom",
656					at: start.at + " top"
657				};
658				if (origin.indexOf('bottom') >= 0) start = {
659					my: start.my + " top",
660					at: start.at + " bottom"
661				};
662				start.my = start.my.trim();
663				start.at = start.at.trim();
664				break;
665			}
666			start.of = window;
667			start.collision = 'none';
668			jQuery('html').css('overflow-x', 'hidden');
669			$this.position(start);
670			$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
671				$this.emodal('reposition', function (position) {
672					position.opacity = 1;
673					$this.emodalTransition(position, speed * 0.75, function () {
674						jQuery('html').css('overflow-x', 'inherit');
675						if(callback !== undefined) callback();
676					});
677				});
678			});
679			return this;
680		},
681		grow: function (callback) {
682			var $this = jQuery(this);
683			var settings = $this.data('emodal');
684			var speed = settings.meta.display.animation.speed;
685			var origin = settings.meta.display.animation.origin;
686
687			// Set css for animation start.
688			$this.css({
689				transformOrigin: origin,
690				opacity: 0
691			}).show();
692
693			// Begin Animation with overlay fade in then grow animation.
694			$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
695				// Reposition with callback. position returns default positioning.
696				$this.emodal('reposition', function (position) {
697					position.scale = 1;
698					position.duration = speed * 0.75;
699					$this
700						.css({
701							transform: 'scale(0)',
702							opacity: 1
703						})
704						.emodalTransition(position);
705					if(callback !== undefined) callback();
706				});
707			});
708			return this;
709		},
710		growAndSlide: function (callback) {
711			var $this = jQuery(this).css({
712				opacity: 0
713			}).show();
714			var settings = $this.data('emodal');
715			var speed = settings.meta.display.animation.speed;
716			var origin = settings.meta.display.animation.origin;
717			var start = {
718				my: "",
719				at: ""
720			};
721			switch (origin) {
722			case 'top':
723				start = {
724					my: "left+" + $this.offset().left + " bottom",
725					at: "left top"
726				};
727				break;
728			case 'bottom':
729				start = {
730					my: "left+" + $this.offset().left + " top",
731					at: "left bottom"
732				};
733				break;
734			case 'left':
735				start = {
736					my: "right top+" + $this.offset().top,
737					at: "left top"
738				};
739				break;
740			case 'right':
741				start = {
742					my: "left top+" + $this.offset().top,
743					at: "right top"
744				};
745				break;
746			default:
747				if (origin.indexOf('left') >= 0) start = {
748					my: start.my + " right",
749					at: start.at + " left"
750				};
751				if (origin.indexOf('right') >= 0) start = {
752					my: start.my + " left",
753					at: start.at + " right"
754				};
755				if (origin.indexOf('center') >= 0) start = {
756					my: start.my + " center",
757					at: start.at + " center"
758				};
759				if (origin.indexOf('top') >= 0) start = {
760					my: start.my + " bottom",
761					at: start.at + " top"
762				};
763				if (origin.indexOf('bottom') >= 0) start = {
764					my: start.my + " top",
765					at: start.at + " bottom"
766				};
767				start.my = start.my.trim();
768				start.at = start.at.trim();
769				break;
770			}
771			start.of = window;
772			start.collision = 'none';
773			jQuery('html').css('overflow-x', 'hidden');
774			$this.position(start)
775				.css({
776					opacity: origin == 'center center' ? 0 : 1,
777					transformOrigin: origin
778				});
779			$this.emodal('animate_overlay', 'fade', speed * 0.25, function () {
780				$this.emodal('reposition', function (position) {
781					position.scale = 1;
782					position.opacity = 1;
783					position.duration = speed * 0.75;
784					$this.css({
785							transform: 'scale(0)'
786						})
787						.emodalTransition(position, function () {
788							jQuery('html').css('overflow-x', 'inherit');
789						});
790					if(callback !== undefined) callback();
791				});
792			});
793			return this;
794		}
795	};
796
797	jQuery('.emodal').css({ visibility: "visible" }).hide();
798
799	jQuery(document).ready(function () {
800		jQuery('.emodal')
801			.emodal()
802			.each(function () {
803				var $this = jQuery(this);
804				jQuery(document).on('click', '.' + $this.attr('id'), function (e) {
805					e.preventDefault();
806					e.stopPropagation();
807					$this.emodal('open');
808				});
809				jQuery('.' + $this.attr('id')).css('cursor', 'pointer');
810			});
811	});
812}(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.