PageSourceSearch

https://hispanicallyspeakingnews.com/assets/jquery.fancybox-1.3.1.js.download

js hispanicallyspeakingnews.com collected 2026-10-02 06:40:47 UTC 28,306 bytes, 1,107 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10/*
11 * FancyBox - jQuery Plugin
12 * Simple and fancy lightbox alternative
13 *
14 * Examples and documentation at: http://fancybox.net
15 * 
16 * Copyright (c) 2008 - 2010 Janis Skarnelis
17 *
18 * Version: 1.3.1 (05/03/2010)
19 * Requires: jQuery v1.3+
20 *
21 * Dual licensed under the MIT and GPL licenses:
22 *   http://www.opensource.org/licenses/mit-license.php
23 *   http://www.gnu.org/licenses/gpl.html
24 */
25
26(function($) {
27
28	var tmp, loading, overlay, wrap, outer, inner, close, nav_left, nav_right,
29
30		selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
31
32		ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
33
34		loadingTimer, loadingFrame = 1,
35
36		start_pos, final_pos, busy = false, shadow = 20, fx = $.extend($('<div/>')[0], { prop: 0 }), titleh = 0, 
37
38		isIE6 = !$.support.opacity && !window.XMLHttpRequest,
39
40		/*
41		 * Private methods 
42		 */
43
44		fancybox_abort = function() {
45			loading.hide();
46
47			imgPreloader.onerror = imgPreloader.onload = null;
48
49			if (ajaxLoader) {
50				ajaxLoader.abort();
51			}
52
53			tmp.empty();
54		},
55
56		fancybox_error = function() {
57			$.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>', {
58				'scrolling'		: 'no',
59				'padding'		: 20,
60				'transitionIn'	: 'none',
61				'transitionOut'	: 'none'
62			});
63		},
64
65		fancybox_get_viewport = function() {
66			return [ $(window).width(), $(window).height(), $(document).scrollLeft(), $(document).scrollTop() ];
67		},
68
69		fancybox_get_zoom_to = function () {
70			var view	= fancybox_get_viewport(),
71				to		= {},
72
73				margin = currentOpts.margin,
74				resize = currentOpts.autoScale,
75
76				horizontal_space	= (shadow + margin) * 2,
77				vertical_space		= (shadow + margin) * 2,
78				double_padding		= (currentOpts.padding * 2),
79				
80				ratio;
81
82			if (currentOpts.width.toString().indexOf('%') > -1) {
83				to.width = ((view[0] * parseFloat(currentOpts.width)) / 100) - (shadow * 2) ;
84				resize = false;
85
86			} else {
87				to.width = currentOpts.width + double_padding;
88			}
89
90			if (currentOpts.height.toString().indexOf('%') > -1) {
91				to.height = ((view[1] * parseFloat(currentOpts.height)) / 100) - (shadow * 2);
92				resize = false;
93
94			} else {
95				to.height = currentOpts.height + double_padding;
96			}
97
98			if (resize && (to.width > (view[0] - horizontal_space) || to.height > (view[1] - vertical_space))) {
99				if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
100					horizontal_space	+= double_padding;
101					vertical_space		+= double_padding;
102
103					ratio = Math.min(Math.min( view[0] - horizontal_space, currentOpts.width) / currentOpts.width, Math.min( view[1] - vertical_space, currentOpts.height) / currentOpts.height);
104
105					to.width	= Math.round(ratio * (to.width	- double_padding)) + double_padding;
106					to.height	= Math.round(ratio * (to.height	- double_padding)) + double_padding;
107
108				} else {
109					to.width	= Math.min(to.width,	(view[0] - horizontal_space));
110					to.height	= Math.min(to.height,	(view[1] - vertical_space));
111				}
112			}
113
114			to.top	= view[3] + ((view[1] - (to.height	+ (shadow * 2 ))) * 0.5);
115			to.left	= view[2] + ((view[0] - (to.width	+ (shadow * 2 ))) * 0.5);
116
117			if (currentOpts.autoScale === false) {
118				to.top	= Math.max(view[3] + margin, to.top);
119				to.left	= Math.max(view[2] + margin, to.left);
120			}
121
122			return to;
123		},
124
125		fancybox_format_title = function(title) {
126			if (title && title.length) {
127				switch (currentOpts.titlePosition) {
128					case 'inside':
129						return title;
130					case 'over':
131						return '<span id="fancybox-title-over">' + title + '</span>';
132					default:
133						return '<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">' + title + '</span><span id="fancybox-title-right"></span></span>';
134				}
135			}
136
137			return false;
138		},
139
140		fancybox_process_title = function() {
141			var title	= currentOpts.title,
142				width	= final_pos.width - (currentOpts.padding * 2),
143				titlec	= 'fancybox-title-' + currentOpts.titlePosition;
144				
145			$('#fancybox-title').remove();
146
147			titleh = 0;
148
149			if (currentOpts.titleShow === false) {
150				return;
151			}
152
153			title = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(title, currentArray, currentIndex, currentOpts) : fancybox_format_title(title);
154
155			if (!title || title === '') {
156				return;
157			}
158
159			$('<div id="fancybox-title" class="' + titlec + '" />').css({
160				'width'			: width,
161				'paddingLeft'	: currentOpts.padding,
162				'paddingRight'	: currentOpts.padding
163			}).html(title).appendTo('body');
164
165			switch (currentOpts.titlePosition) {
166				case 'inside':
167					titleh = $("#fancybox-title").outerHeight(true) - currentOpts.padding;
168					final_pos.height += titleh;
169				break;
170
171				case 'over':
172					$('#fancybox-title').css('bottom', currentOpts.padding);
173				break;
174
175				default:
176					$('#fancybox-title').css('bottom', $("#fancybox-title").outerHeight(true) * -1);
177				break;
178			}
179
180			$('#fancybox-title').appendTo( outer ).hide();
181		},
182
183		fancybox_set_navigation = function() {
184			$(document).unbind('keydown.fb').bind('keydown.fb', function(e) {
185				if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
186					e.preventDefault();
187					$.fancybox.close();
188
189				} else if (e.keyCode == 37) {
190					e.preventDefault();
191					$.fancybox.prev();
192
193				} else if (e.keyCode == 39) {
194					e.preventDefault();
195					$.fancybox.next();
196				}
197			});
198
199			if ($.fn.mousewheel) {
200				wrap.unbind('mousewheel.fb');
201
202				if (currentArray.length > 1) {
203					wrap.bind('mousewheel.fb', function(e, delta) {
204						e.preventDefault();
205
206						if (busy || delta === 0) {
207							return;
208						}
209
210						if (delta > 0) {
211							$.fancybox.prev();
212						} else {
213							$.fancybox.next();
214						}
215					});
216				}
217			}
218
219			if (!currentOpts.showNavArrows) { return; }
220
221			if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
222				nav_left.show();
223			}
224
225			if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
226				nav_right.show();
227			}
228		},
229
230		fancybox_preload_images = function() {
231			var href, 
232				objNext;
233				
234			if ((currentArray.length -1) > currentIndex) {
235				href = currentArray[ currentIndex + 1 ].href;
236
237				if (typeof href !== 'undefined' && href.match(imgRegExp)) {
238					objNext = new Image();
239					objNext.src = href;
240				}
241			}
242
243			if (currentIndex > 0) {
244				href = currentArray[ currentIndex - 1 ].href;
245
246				if (typeof href !== 'undefined' && href.match(imgRegExp)) {
247					objNext = new Image();
248					objNext.src = href;
249				}
250			}
251		},
252
253		_finish = function () {
254			inner.css('overflow', (currentOpts.scrolling == 'auto' ? (currentOpts.type == 'image' || currentOpts.type == 'iframe' || currentOpts.type == 'swf' ? 'hidden' : 'auto') : (currentOpts.scrolling == 'yes' ? 'auto' : 'visible')));
255
256			if (!$.support.opacity) {
257				inner.get(0).style.removeAttribute('filter');
258				wrap.get(0).style.removeAttribute('filter');
259			}
260
261			$('#fancybox-title').show();
262
263			if (currentOpts.hideOnContentClick)	{
264				inner.one('click', $.fancybox.close);
265			}
266			if (currentOpts.hideOnOverlayClick)	{
267				overlay.one('click', $.fancybox.close);
268			}
269
270			if (currentOpts.showCloseButton) {
271				close.show();
272			}
273
274			fancybox_set_navigation();
275
276			$(window).bind("resize.fb", $.fancybox.center);
277
278			if (currentOpts.centerOnScroll) {
279				$(window).bind("scroll.fb", $.fancybox.center);
280			} else {
281				$(window).unbind("scroll.fb");
282			}
283
284			if ($.isFunction(currentOpts.onComplete)) {
285				currentOpts.onComplete(currentArray, currentIndex, currentOpts);
286			}
287
288			busy = false;
289
290			fancybox_preload_images();
291		},
292
293		fancybox_draw = function(pos) {
294			var width	= Math.round(start_pos.width	+ (final_pos.width	- start_pos.width)	* pos),
295				height	= Math.round(start_pos.height	+ (final_pos.height	- start_pos.height)	* pos),
296
297				top		= Math.round(start_pos.top	+ (final_pos.top	- start_pos.top)	* pos),
298				left	= Math.round(start_pos.left	+ (final_pos.left	- start_pos.left)	* pos);
299
300			wrap.css({
301				'width'		: width		+ 'px',
302				'height'	: height	+ 'px',
303				'top'		: top		+ 'px',
304				'left'		: left		+ 'px'
305			});
306
307			width	= Math.max(width - currentOpts.padding * 2, 0);
308			height	= Math.max(height - (currentOpts.padding * 2 + (titleh * pos)), 0);
309
310			inner.css({
311				'width'		: width		+ 'px',
312				'height'	: height	+ 'px'
313			});
314
315			if (typeof final_pos.opacity !== 'undefined') {
316				wrap.css('opacity', (pos < 0.5 ? 0.5 : pos));
317			}
318		},
319
320		fancybox_get_obj_pos = function(obj) {
321			var pos		= obj.offset();
322
323			pos.top		+= parseFloat( obj.css('paddingTop') )	|| 0;
324			pos.left	+= parseFloat( obj.css('paddingLeft') )	|| 0;
325
326			pos.top		+= parseFloat( obj.css('border-top-width') )	|| 0;
327			pos.left	+= parseFloat( obj.css('border-left-width') )	|| 0;
328
329			pos.width	= obj.width();
330			pos.height	= obj.height();
331
332			return pos;
333		},
334
335		fancybox_get_zoom_from = function() {
336			var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
337				from = {},
338				pos,
339				view;
340
341			if (orig && orig.length) {
342				pos = fancybox_get_obj_pos(orig);
343
344				from = {
345					width	: (pos.width	+ (currentOpts.padding * 2)),
346					height	: (pos.height	+ (currentOpts.padding * 2)),
347					top		: (pos.top		- currentOpts.padding - shadow),
348					left	: (pos.left		- currentOpts.padding - shadow)
349				};
350				
351			} else {
352				view = fancybox_get_viewport();
353
354				from = {
355					width	: 1,
356					height	: 1,
357					top		: view[3] + view[1] * 0.5,
358					left	: view[2] + view[0] * 0.5
359				};
360			}
361
362			return from;
363		},
364
365		fancybox_show = function() {
366			loading.hide();
367
368			if (wrap.is(":visible") && $.isFunction(currentOpts.onCleanup)) {
369				if (currentOpts.onCleanup(currentArray, currentIndex, currentOpts) === false) {
370					$.event.trigger('fancybox-cancel');
371
372					busy = false;
373					return;
374				}
375			}
376
377			currentArray	= selectedArray;
378			currentIndex	= selectedIndex;
379			currentOpts		= selectedOpts;
380
381			inner.get(0).scrollTop	= 0;
382			inner.get(0).scrollLeft	= 0;
383
384			if (currentOpts.overlayShow) {
385				if (isIE6) {
386					$('select:not(#fancybox-tmp select)').filter(function() {
387						return this.style.visibility !== 'hidden';
388					}).css({'visibility':'hidden'}).one('fancybox-cleanup', function() {
389						this.style.visibility = 'inherit';
390					});
391				}
392
393				overlay.css({
394					'background-color'	: currentOpts.overlayColor,
395					'opacity'			: currentOpts.overlayOpacity
396				}).unbind().show();
397			}
398
399			final_pos = fancybox_get_zoom_to();
400
401			fancybox_process_title();
402
403			if (wrap.is(":visible")) {
404				$( close.add( nav_left ).add( nav_right ) ).hide();
405
406				var pos = wrap.position(),
407					equal;
408
409				start_pos = {
410					top		:	pos.top ,
411					left	:	pos.left,
412					width	:	wrap.width(),
413					height	:	wrap.height()
414				};
415
416				equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
417
418				inner.fadeOut(currentOpts.changeFade, function() {
419					var finish_resizing = function() {
420						inner.html( tmp.contents() ).fadeIn(currentOpts.changeFade, _finish);
421					};
422					
423					$.event.trigger('fancybox-change');
424
425					inner.empty().css('overflow', 'hidden');
426
427					if (equal) {
428						inner.css({
429							top			: currentOpts.padding,
430							left		: currentOpts.padding,
431							width		: Math.max(final_pos.width	- (currentOpts.padding * 2), 1),
432							height		: Math.max(final_pos.height	- (currentOpts.padding * 2) - titleh, 1)
433						});
434						
435						finish_resizing();
436
437					} else {
438						inner.css({
439							top			: currentOpts.padding,
440							left		: currentOpts.padding,
441							width		: Math.max(start_pos.width	- (currentOpts.padding * 2), 1),
442							height		: Math.max(start_pos.height	- (currentOpts.padding * 2), 1)
443						});
444						
445						fx.prop = 0;
446
447						$(fx).animate({ prop: 1 }, {
448							 duration	: currentOpts.changeSpeed,
449							 easing		: currentOpts.easingChange,
450							 step		: fancybox_draw,
451							 complete	: finish_resizing
452						});
453					}
454				});
455
456				return;
457			}
458
459			wrap.css('opacity', 1);
460
461			if (currentOpts.transitionIn == 'elastic') {
462				start_pos = fancybox_get_zoom_from();
463
464				inner.css({
465						top			: currentOpts.padding,
466						left		: currentOpts.padding,
467						width		: Math.max(start_pos.width	- (currentOpts.padding * 2), 1),
468						height		: Math.max(start_pos.height	- (currentOpts.padding * 2), 1)
469					})
470					.html( tmp.contents() );
471
472				wrap.css(start_pos).show();
473
474				if (currentOpts.opacity) {
475					final_pos.opacity = 0;
476				}
477
478				fx.prop = 0;
479
480				$(fx).animate({ prop: 1 }, {
481					 duration	: currentOpts.speedIn,
482					 easing		: currentOpts.easingIn,
483					 step		: fancybox_draw,
484					 complete	: _finish
485				});
486
487			} else {
488				inner.css({
489						top			: currentOpts.padding,
490						left		: currentOpts.padding,
491						width		: Math.max(final_pos.width	- (currentOpts.padding * 2), 1),
492						height		: Math.max(final_pos.height	- (currentOpts.padding * 2) - titleh, 1)
493					})
494					.html( tmp.contents() );
495
496				wrap.css( final_pos ).fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
497			}
498		},
499
500		fancybox_process_inline = function() {
501			tmp.width(	selectedOpts.width );
502			tmp.height(	selectedOpts.height );
503
504			if (selectedOpts.width	== 'auto') {
505				selectedOpts.width = tmp.width();
506			}
507			if (selectedOpts.height	== 'auto') {
508				selectedOpts.height	= tmp.height();
509			}
510
511			fancybox_show();
512		},
513		
514		fancybox_process_image = function() {
515			busy = true;
516
517			selectedOpts.width	= imgPreloader.width;
518			selectedOpts.height	= imgPreloader.height;
519
520			$("<img />").attr({
521				'id'	: 'fancybox-img',
522				'src'	: imgPreloader.src,
523				'alt'	: selectedOpts.title
524			}).appendTo( tmp );
525
526			fancybox_show();
527		},
528
529		fancybox_start = function() {
530			fancybox_abort();
531
532			var obj	= selectedArray[ selectedIndex ],
533				href, 
534				type, 
535				title,
536				str,
537				emb,
538				selector,
539				data;
540
541			selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
542			title = obj.title || $(obj).title || selectedOpts.title || '';
543			
544			if (obj.nodeName && !selectedOpts.orig) {
545				selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
546			}
547
548			if (title === '' && selectedOpts.orig) {
549				title = selectedOpts.orig.attr('alt');
550			}
551
552			if (obj.nodeName && (/^(?:javascript|#)/i).test(obj.href)) {
553				href = selectedOpts.href || null;
554			} else {
555				href = selectedOpts.href || obj.href || null;
556			}
557
558			if (selectedOpts.type) {
559				type = selectedOpts.type;
560
561				if (!href) {
562					href = selectedOpts.content;
563				}
564				
565			} else if (selectedOpts.content) {
566				type	= 'html';
567
568			} else if (href) {
569				if (href.match(imgRegExp)) {
570					type = 'image';
571
572				} else if (href.match(swfRegExp)) {
573					type = 'swf';
574
575				} else if ($(obj).hasClass("iframe")) {
576					type = 'iframe';
577
578				} else if (href.match(/#/)) {
579					obj = href.substr(href.indexOf("#"));
580
581					type = $(obj).length > 0 ? 'inline' : 'ajax';
582				} else {
583					type = 'ajax';
584				}
585			} else {
586				type = 'inline';
587			}
588
589			selectedOpts.type	= type;
590			selectedOpts.href	= href;
591			selectedOpts.title	= title;
592
593			if (selectedOpts.autoDimensions && selectedOpts.type !== 'iframe' && selectedOpts.type !== 'swf') {
594				selectedOpts.width		= 'auto';
595				selectedOpts.height		= 'auto';
596			}
597
598			if (selectedOpts.modal) {
599				selectedOpts.overlayShow		= true;
600				selectedOpts.hideOnOverlayClick	= false;
601				selectedOpts.hideOnContentClick	= false;
602				selectedOpts.enableEscapeButton	= false;
603				selectedOpts.showCloseButton	= false;
604			}
605
606			if ($.isFunction(selectedOpts.onStart)) {
607				if (selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts) === false) {
608					busy = false;
609					return;
610				}
611			}
612
613			tmp.css('padding', (shadow + selectedOpts.padding + selectedOpts.margin));
614
615			$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
616				$(this).replaceWith(inner.children());
617			});
618
619			switch (type) {
620				case 'html' :
621					tmp.html( selectedOpts.content );
622					fancybox_process_inline();
623				break;
624
625				case 'inline' :
626					$('<div class="fancybox-inline-tmp" />').hide().insertBefore( $(obj) ).bind('fancybox-cleanup', function() {
627						$(this).replaceWith(inner.children());
628					}).bind('fancybox-cancel', function() {
629						$(this).replaceWith(tmp.children());
630					});
631
632					$(obj).appendTo(tmp);
633
634					fancybox_process_inline();
635				break;
636
637				case 'image':
638					busy = false;
639
640					$.fancybox.showActivity();
641
642					imgPreloader = new Image();
643
644					imgPreloader.onerror = function() {
645						fancybox_error();
646					};
647
648					imgPreloader.onload = function() {
649						imgPreloader.onerror = null;
650						imgPreloader.onload = null;
651						fancybox_process_image();
652					};
653
654					imgPreloader.src = href;
655		
656				break;
657
658				case 'swf':
659					str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
660					emb = '';
661					
662					$.each(selectedOpts.swf, function(name, val) {
663						str += '<param name="' + name + '" value="' + val + '"></param>';
664						emb += ' ' + name + '="' + val + '"';
665					});
666
667					str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
668
669					tmp.html(str);
670
671					fancybox_process_inline();
672				break;
673
674				case 'ajax':
675					selector	= href.split('#', 2);
676					data		= selectedOpts.ajax.data || {};
677
678					if (selector.length > 1) {
679						href = selector[0];
680
681						if (typeof data == "string") {
682							data += '&selector=' + selector[1];
683						} else {
684							data.selector = selector[1];
685						}
686					}
687
688					busy = false;
689					$.fancybox.showActivity();
690
691					ajaxLoader = $.ajax($.extend(selectedOpts.ajax, {
692						url		: href,
693						data	: data,
694						error	: fancybox_error,
695						success : function(data, textStatus, XMLHttpRequest) {
696							if (ajaxLoader.status == 200) {
697								tmp.html( data );
698								fancybox_process_inline();
699							}
700						}
701					}));
702
703				break;
704
705				case 'iframe' :
706					$('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" scrolling="' + selectedOpts.scrolling + '" src="' + selectedOpts.href + '"></iframe>').appendTo(tmp);
707					fancybox_show();
708				break;
709			}
710		},
711
712		fancybox_animate_loading = function() {
713			if (!loading.is(':visible')){
714				clearInterval(loadingTimer);
715				return;
716			}
717
718			$('div', loading).css('top', (loadingFrame * -40) + 'px');
719
720			loadingFrame = (loadingFrame + 1) % 12;
721		},
722
723		fancybox_init = function() {
724			if ($("#fancybox-wrap").length) {
725				return;
726			}
727
728			$('body').append(
729				tmp			= $('<div id="fancybox-tmp"></div>'),
730				loading		= $('<div id="fancybox-loading"><div></div></div>'),
731				overlay		= $('<div id="fancybox-overlay"></div>'),
732				wrap		= $('<div id="fancybox-wrap"></div>')
733			);
734
735			if (!$.support.opacity) {
736				wrap.addClass('fancybox-ie');
737				loading.addClass('fancybox-ie');
738			}
739
740			outer = $('<div id="fancybox-outer"></div>')
741				.append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>')
742				.appendTo( wrap );
743
744			outer.append(
745				inner		= $('<div id="fancybox-inner"></div>'),
746				close		= $('<a id="fancybox-close"></a>'),
747
748				nav_left	= $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
749				nav_right	= $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
750			);
751
752			close.click($.fancybox.close);
753			loading.click($.fancybox.cancel);
754
755			nav_left.click(function(e) {
756				e.preventDefault();
757				$.fancybox.prev();
758			});
759
760			nav_right.click(function(e) {
761				e.preventDefault();
762				$.fancybox.next();
763			});
764
765			if (isIE6) {
766				overlay.get(0).style.setExpression('height',	"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");
767				loading.get(0).style.setExpression('top',		"(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");
768
769				outer.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>');
770			}
771		};
772
773	/*
774	 * Public methods 
775	 */
776
777	$.fn.fancybox = function(options) {
778		$(this)
779			.data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
780			.unbind('click.fb').bind('click.fb', function(e) {
781				e.preventDefault();
782
783				if (busy) {
784					return;
785				}
786
787				busy = true;
788
789				$(this).blur();
790
791				selectedArray	= [];
792				selectedIndex	= 0;
793
794				var rel = $(this).attr('rel') || '';
795
796				if (!rel || rel == '' || rel === 'nofollow') {
797					selectedArray.push(this);
798
799				} else {
800					selectedArray	= $("a[rel=" + rel + "], area[rel=" + rel + "]");
801					selectedIndex	= selectedArray.index( this );
802				}
803
804				fancybox_start();
805
806				return false;
807			});
808
809		return this;
810	};
811
812	$.fancybox = function(obj) {
813		if (busy) {
814			return;
815		}
816
817		busy = true;
818
819		var opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
820
821		selectedArray	= [];
822		selectedIndex	= opts.index || 0;
823
824		if ($.isArray(obj)) {
825			for (var i = 0, j = obj.length; i < j; i++) {
826				if (typeof obj[i] == 'object') {
827					$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
828				} else {
829					obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
830				}
831			}
832
833			selectedArray = jQuery.merge(selectedArray, obj);
834
835		} else {
836			if (typeof obj == 'object') {
837				$(obj).data('fancybox', $.extend({}, opts, obj));
838			} else {
839				obj = $({}).data('fancybox', $.extend({content : obj}, opts));
840			}
841
842			selectedArray.push(obj);
843		}
844
845		if (selectedIndex > selectedArray.length || selectedIndex < 0) {
846			selectedIndex = 0;
847		}
848
849		fancybox_start();
850	};
851
852	$.fancybox.showActivity = function() {
853		clearInterval(loadingTimer);
854
855		loading.show();
856		loadingTimer = setInterval(fancybox_animate_loading, 66);
857	};
858
859	$.fancybox.hideActivity = function() {
860		loading.hide();
861	};
862
863	$.fancybox.next = function() {
864		return $.fancybox.pos( currentIndex + 1);
865	};
866	
867	$.fancybox.prev = function() {
868		return $.fancybox.pos( currentIndex - 1);
869	};
870
871	$.fancybox.pos = function(pos) {
872		if (busy) {
873			return;
874		}
875
876		pos = parseInt(pos, 10);
877
878		if (pos > -1 && currentArray.length > pos) {
879			selectedIndex = pos;
880			fancybox_start();
881		}
882
883		if (currentOpts.cyclic && currentArray.length > 1 && pos < 0) {
884			selectedIndex = currentArray.length - 1;
885			fancybox_start();
886		}
887
888		if (currentOpts.cyclic && currentArray.length > 1 && pos >= currentArray.length) {
889			selectedIndex = 0;
890			fancybox_start();
891		}
892
893		return;
894	};
895
896	$.fancybox.cancel = function() {
897		if (busy) {
898			return;
899		}
900
901		busy = true;
902
903		$.event.trigger('fancybox-cancel');
904
905		fancybox_abort();
906
907		if (selectedOpts && $.isFunction(selectedOpts.onCancel)) {
908			selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
909		}
910
911		busy = false;
912	};
913
914	// Note: within an iframe use - parent.$.fancybox.close();
915	$.fancybox.close = function() {
916		if (busy || wrap.is(':hidden')) {
917			return;
918		}
919
920		busy = true;
921
922		if (currentOpts && $.isFunction(currentOpts.onCleanup)) {
923			if (currentOpts.onCleanup(currentArray, currentIndex, currentOpts) === false) {
924				busy = false;
925				return;
926			}
927		}
928
929		fancybox_abort();
930
931		$(close.add( nav_left ).add( nav_right )).hide();
932
933		$('#fancybox-title').remove();
934
935		wrap.add(inner).add(overlay).unbind();
936
937		$(window).unbind("resize.fb scroll.fb");
938		$(document).unbind('keydown.fb');
939
940		function _cleanup() {
941			overlay.fadeOut('fast');
942
943			wrap.hide();
944
945			$.event.trigger('fancybox-cleanup');
946
947			inner.empty();
948
949			if ($.isFunction(currentOpts.onClosed)) {
950				currentOpts.onClosed(currentArray, currentIndex, currentOpts);
951			}
952
953			currentArray	= selectedOpts	= [];
954			currentIndex	= selectedIndex	= 0;
955			currentOpts		= selectedOpts	= {};
956
957			busy = false;
958		}
959
960		inner.css('overflow', 'hidden');
961
962		if (currentOpts.transitionOut == 'elastic') {
963			start_pos = fancybox_get_zoom_from();
964
965			var pos = wrap.position();
966
967			final_pos = {
968				top		:	pos.top ,
969				left	:	pos.left,
970				width	:	wrap.width(),
971				height	:	wrap.height()
972			};
973
974			if (currentOpts.opacity) {
975				final_pos.opacity = 1;
976			}
977
978			fx.prop = 1;
979
980			$(fx).animate({ prop: 0 }, {
981				 duration	: currentOpts.speedOut,
982				 easing		: currentOpts.easingOut,
983				 step		: fancybox_draw,
984				 complete	: _cleanup
985			});
986
987		} else {
988			wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
989		}
990	};
991
992	$.fancybox.resize = function() {
993		var c, h;
994		
995		if (busy || wrap.is(':hidden')) {
996			return;
997		}
998
999		busy = true;
1000
1001		c = inner.wrapInner("<div style='overflow:auto'></div>").children();
1002		h = c.height();
1003
1004		wrap.css({height:	h + (currentOpts.padding * 2) + titleh});
1005		inner.css({height:	h});
1006
1007		c.replaceWith(c.children());
1008
1009		$.fancybox.center();
1010	};
1011
1012	$.fancybox.center = function() {
1013		busy = true;
1014
1015		var view	= fancybox_get_viewport(),
1016			margin	= currentOpts.margin,
1017			to		= {};
1018
1019		to.top	= view[3] + ((view[1] - ((wrap.height() - titleh) + (shadow * 2 ))) * 0.5);
1020		to.left	= view[2] + ((view[0] - (wrap.width() + (shadow * 2 ))) * 0.5);
1021
1022		to.top	= Math.max(view[3] + margin, to.top);
1023		to.left	= Math.max(view[2] + margin, to.left);
1024
1025		wrap.css(to);
1026
1027		busy = false;
1028	};
1029
1030	$.fn.fancybox.defaults = {
1031		padding				:	10,
1032		margin				:	20,
1033		opacity				:	false,
1034		modal				:	false,
1035		cyclic				:	false,
1036		scrolling			:	'auto',	// 'auto', 'yes' or 'no'
1037
1038		width				:	560,
1039		height				:	340,
1040
1041		autoScale			:	true,
1042		autoDimensions		:	true,
1043		centerOnScroll		:	false,
1044
1045		ajax				:	{},
1046		swf					:	{ wmode: 'transparent' },
1047
1048		hideOnOverlayClick	:	true,
1049		hideOnContentClick	:	false,
1050
1051		overlayShow			:	true,
1052		overlayOpacity		:	0.7,
1053		overlayColor		:	'#000',
1054
1055		titleShow			:	true,
1056		titlePosition		:	'outside',	// 'outside', 'inside' or 'over'
1057		titleFormat			:	null,
1058
1059		transitionIn		:	'fade',	// 'elastic', 'fade' or 'none'
1060		transitionOut		:	'fade',	// 'elastic', 'fade' or 'none'
1061
1062		speedIn				:	300,
1063		speedOut			:	300,
1064
1065		changeSpeed			:	300,
1066		changeFade			:	'fast',
1067
1068		easingIn			:	'swing',
1069		easingOut			:	'swing',
1070
1071		showCloseButton		:	true,
1072		showNavArrows		:	true,
1073		enableEscapeButton	:	true,
1074
1075		onStart				:	null,
1076		onCancel			:	null,
1077		onComplete			:	null,
1078		onCleanup			:	null,
1079		onClosed			:	null
1080	};
1081
1082	$(document).ready(function() {
1083		fancybox_init();
1084	});
1085
1086})(jQuery);
1087}
1088/*
1089     FILE ARCHIVED ON 20:23:03 Feb 18, 2012 AND RETRIEVED FROM THE
1090     INTERNET ARCHIVE ON 11:42:50 Jan 08, 2026.
1091     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
1092
1093     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
1094     SECTION 108(a)(3)).
1095*/
1096/*
1097playback timings (ms):
1098  captures_list: 6.179
1099  exclusion.robots: 0.023
1100  exclusion.robots.policy: 0.011
1101  esindex: 0.011
1102  cdx.remote: 35.443
1103  LoadShardBlock: 138.938 (3)
1104  PetaboxLoader3.datanode: 158.214 (4)
1105  load_resource: 148.019
1106  PetaboxLoader3.resolve: 114.457
1107*/

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.