PageSourceSearch

https://www.daysjapan.net/wp-content/plugins/wp-lightbox-2/wp-lightbox-2.min_ver-1.3.4.1.js

js daysjapan.net collected 2026-10-02 06:50:07 UTC 26,996 bytes, 552 lines download raw bytes

1/**
2 * Plugin Name: WP Lightbox 2
3 * Plugin URI: http://yepinol.com/lightbox-2-plugin-wordpress/
4 * Description: This plugin used to add the lightbox (overlay) effect to the current page images on your WordPress blog.
5 * Version:       2.28.9.2.1
6 * Author:        Pankaj Jha
7 * Author URI:    http://onlinewebapplication.com/
8 * License:       GNU General Public License, v2 (or newer)
9 * License URI:  http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10 */
11/*  Copyright 2011 Pankaj Jha (onlinewebapplication.com)
12
13    This program is free software; you can redistribute it and/or modify
14    it under the terms of the GNU General Public License as published by
15    the Free Software Foundation using version 2 of the License.
16
17    This program is distributed in the hope that it will be useful,
18    but WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20    GNU General Public License for more details.
21
22    You should have received a copy of the GNU General Public License
23    along with this program; if not, write to the Free Software
24    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25*/
26/**
27 * jQuery Lightbox
28 * Version 0.5 - 11/29/2007
29 * @author Warren Krewenki
30 *
31 * This package is distributed under the BSD license.
32 * For full license information, see LICENSE.TXT
33 *
34 * Based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
35 * Originally written to make use of the Prototype framework, and Script.acalo.us, now altered to use jQuery.
36 **/
37 /** toyNN: [email protected]: fixed IE7-8 incompatabilities in 1.3.* branch **/ 
38(function($){
39    $.fn.lightbox = function(options) {
40        var opts = $.extend({}, $.fn.lightbox.defaults, options);
41		function onClick() {
42            initialize();
43            start(this);
44            return false;
45        }	
46		if(parseFloat($().jquery) >= 1.7){
47			return $(this).on("click", onClick);
48        }else{
49			return $(this).live("click", onClick); //deprecated since 1.7
50		}		
51		
52		function initialize() {
53            $(window).bind('orientationchange', resizeListener);
54            $(window).bind('resize', resizeListener);
55            // if (opts.followScroll) { $(window).bind('scroll', orientListener); }
56            $('#overlay').remove();
57            $('#lightbox').remove();
58            opts.isIE8 = isIE8(); // //http://www.grayston.net/2011/internet-explorer-v8-and-opacity-issues/
59            opts.inprogress = false;
60            // if jsonData, build the imageArray from data provided in JSON format
61            if (opts.jsonData && opts.jsonData.length > 0) {
62                var parser = opts.jsonDataParser ? opts.jsonDataParser : $.fn.lightbox.parseJsonData;
63                opts.imageArray = [];
64                opts.imageArray = parser(opts.jsonData);
65            }
66            var outerImage = '<div id="outerImageContainer"><div id="imageContainer"><iframe id="lightboxIframe" /><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="' + opts.strings.prevLinkTitle + '" id="prevLink"></a><a href="javascript://" id="nextLink" title="' + opts.strings.nextLinkTitle + '"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><div id="jqlb_loading"></div></a></div></div></div>';
67            var imageData = '<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">';
68            if (opts.displayHelp) {
69                imageData += '<span id="helpDisplay">' + opts.strings.help + '</span>';
70            }
71			if(JQLBSettings['jqlb_show_close_button']=='1'){
72            	imageData += '<a href="javascript://" id="bottomNavClose" title="' + opts.strings.closeTitle + '">
72<img src="'+JQLBSettings['jqlb_image_for_close_lightbox']+'" id="jqlb_closelabel"/></a>';
73			}
74			imageData +='</div></div></div>';
75            var string;
76            if (opts.navbarOnTop) {
77                string = '<div id="overlay"></div><div id="lightbox">' + imageData + outerImage + '</div>';
78                $("body").append(string);
79                $("#imageDataContainer").addClass('ontop');
80            } else {
81                string = '<div id="overlay"></div><div id="lightbox">' + outerImage + imageData + '</div>';
82                $("body").append(string);
83            }
84			var gago=1;
85            $("#overlay").click(function () { end(); }).hide();	
86			if(JQLBSettings['jqlb_overlay_close']=='1')		
87            $("#lightbox").click(function () { if(gago){end();} gago=1 }).hide().children('#imageDataContainer').click(function(e) { gago=0; console.log(e)  });;
88            $("#loadingLink").click(function () { end(); return false; });
89            $("#bottomNavClose").click(function () { end(); return false; });
90            $('#outerImageContainer').width(opts.widthCurrent).height(opts.heightCurrent);
91            $('#imageDataContainer').width(opts.widthCurrent);
92            if (!opts.imageClickClose) {
93                $("#lightboxImage").click(function () { return false; });
94                $("#hoverNav").click(function () { return false; });
95            }
96        };
97        //allow image to reposition & scale if orientation change or resize occurs.
98		/*2.21 - Image Map, Shrink large images to fit smaller screens*/
99		/*2.23 - Updated jQuery calls for faster load*/
100		/*2.25 - Fixed PHP 5 bug*/
101		/*2.27 - Compatible with wordpress 3.5.1.*/
102		/*2.28.6.1 - Fixed navigation issue (minor release)*/
103		/*2.28.8 - Compatible with wordpress 3.8.*/
104		/*2.28.8.1 - Fixed navigation issue.*/
105		/*2.28.8.2 - Compatible with wordpress 3.8.1*/
106		/*2.28.8.3 - Fixed full screen image close issue*/
107	        /*2.28.8.4 - Compatible with wordpress 3.9*/
108                /*2.28.8.5 - Fixed Responsiveness Issue */
109                /*2.28.8.6 - Compatible with wordpress 3.9.1*/
110		/*2.28.8.7 - Fixed Image Galary and other HTML issue minor fix*/
111		/*2.28.8.8 - Compatible with wordpress 3.9.2*/
112		/*2.28.8.9 - Compatible with wordpress 4.0*/
113		/*2.28.9.0 - Optimize: content grouping support and exclusion performance*/
114		/*2.28.9.1 - Compatible with wordpress 4.0.1*/
115		/*2.28.9.2 - Compatible with wordpress 4.1*/
116		/*2.28.9.2.1 - Fixed: Broken shortcodes with WordPress 4.1*/
117        function resizeListener(e) {
118            if (opts.resizeTimeout) {
119                clearTimeout(opts.resizeTimeout);
120                opts.resizeTimeout = false;
121            }
122            opts.resizeTimeout = setTimeout(function () { doScale(false); }, 50); //a delay to avoid duplicate event calls.		
123        }
124        function getPageSize(){           
125            var pgDocHeight = $(document).height();
126            if (opts.isIE8 && pgDocHeight > 4096) {
127                pgDocHeight = 4096;
128            }
129			var viewportHeight = $(window).height() - opts.adminBarHeight;			
130			//$(document).width() returns width of HTML document 
131            return new Array($(document).width(), pgDocHeight, $(window).width(), viewportHeight, $(document).height());
132        };
133        //code for IE8 check provided by http://kangax.github.com/cft/
134        function isIE8() {
135            var isBuggy = false;
136            if (document.createElement) {
137                var el = document.createElement("div");
138                if (el && el.querySelectorAll) {
139                    el.innerHTML = "<object><param name=\"\"></object>";
140                    isBuggy = el.querySelectorAll("param").length != 1;
141                }
142                el = null;
143            }
144            return isBuggy;
145        };
146        function getPageScroll() {
147            var xScroll = 0; var yScroll = 0;
148            if (self.pageYOffset) {
149                yScroll = self.pageYOffset;
150                xScroll = self.pageXOffset;
151            } else if (document.documentElement && document.documentElement.scrollTop) {  // Explorer 6 Strict
152                yScroll = document.documentElement.scrollTop;
153                xScroll = document.documentElement.scrollLeft;
154            } else if (document.body) {// all other Explorers
155                yScroll = document.body.scrollTop;
156                xScroll = document.body.scrollLeft;
157            }
158			if(opts.adminBarHeight && parseInt($('#wpadminbar').css('top'), 10) === 0){
159				yScroll += opts.adminBarHeight;
160			}	
161            return new Array(xScroll, yScroll);
162        };
163// JQuery Call
164		function start(imageLink) {
165            $("select, embed, object").hide();
166            var arrayPageSize = getPageSize();
167            var arrayPagePos = getPageScroll();
168            var newTop = 0;
169            $("#overlay").hide().css({width: arrayPageSize[0] + 'px', height: arrayPageSize[1] + 'px', opacity: opts.overlayOpacity}).fadeIn(400);
170            if (opts.isIE8 && arrayPageSize[1] == 4096) {
171                if (arrayPagePos[1] >= 1000) {
172                    newTop = arrayPagePos[1] - 1000;
173                    if ((arrayPageSize[4] - (arrayPagePos[1] + 3096)) < 0) {
174                        newTop -= (arrayPagePos[1] + 3096) - arrayPageSize[4];
175                    }
176                    $("#overlay").css({ top: newTop + 'px' });
177                }
178            }
179            imageNum = 0;
180            // if data is not provided by jsonData parameter
181            if (!opts.jsonData) {
182                opts.imageArray = [];
183                // if image is NOT part of a set..				
184                if (!imageLink.rel || (imageLink.rel == '')) {
185                    // add single image to Lightbox.imageArray
186                    var s = '';
187                    if (imageLink.title) {
188                        s = imageLink.title;
189                    } else if ($(this).children(':first-child').attr('title')) {
190                        s = $(this).children(':first-child').attr('title');
191                    }
192                    opts.imageArray.push(new Array(imageLink.href, opts.displayTitle ? s : ''));
193                } else {
194                    // if image is part of a set..
195                    $("a").each(function () {
196                        if (this.href && (this.rel == imageLink.rel)) {
197                            var title = '';
198                            var caption = '';
199                            var captionText = '';
200                            var jqThis = $(this);
201                            if (this.title) {
202                                title = this.title;
203                            } else if (jqThis.children('img:first-child').attr('title')) {
204                                title = jqThis.children('img:first-child').attr('title'); //grab the title from the image if the link lacks one
205                            }
206                            if (jqThis.parent().next('.gallery-caption').html()) {
207                                var jq = jqThis.parent().next('.gallery-caption');
208                                caption = jq.html();
209                                captionText = jq.text();
210                            } else if (jqThis.next('.wp-caption-text').html()) {
211                                caption = jqThis.next('.wp-caption-text').html();
212                                captionText = jqThis.next('.wp-caption-text').text();
213                            }
214                            title = $.trim(title);
215                            captionText = $.trim(captionText);
216                            if (title.toLowerCase() == captionText.toLowerCase()) {
217                                title = caption; //to keep linked captions
218                                caption = ''; //but not duplicate the text								
219                            }
220							var s = '';
221							if (title != '') {
222								s = '<span id="titleText">' + title + '</span>';
223							} 
224							if (caption != '') {
225								if (title != ''){
226									s += '<br />';
227								} 
228								s += '<span id="captionText">' + caption +'</span>';
229							}
230                            opts.imageArray.push(new Array(this.href, opts.displayTitle ? s : ''));
231                        }
232                    });
233                }
234            }
235            if (opts.imageArray.length > 1) {
236                for (i = 0; i < opts.imageArray.length; i++) {
237                    for (j = opts.imageArray.length - 1; j > i; j--) {
238                        if (opts.imageArray[i][0] == opts.imageArray[j][0]) {
239                            opts.imageArray.splice(j, 1);
240                        }
241                    }
242                }
243                while (opts.imageArray[imageNum][0] != imageLink.href) { imageNum++; }
244            }
245            // calculate top and left offset for the lightbox
246			if(JQLBSettings['jqlb_popup_size_fix']=='1')
247			setLightBoxPos(10, arrayPagePos[0]).show();
248			else
249            	setLightBoxPos(arrayPagePos[1], arrayPagePos[0]).show();
250            changeImage(imageNum);
251        };
252		
253		function setLightBoxPos(newTop, newLeft) {        
254            if (opts.resizeSpeed > 0) {			
255                $('#lightbox').animate({ top: newTop }, 250, 'linear');
256                return $('#lightbox').animate({ left: newLeft }, 250, 'linear');
257            }
258            return $('#lightbox').css({ top: newTop + 'px', left: newLeft + 'px' });
259        }
260		
261        function changeImage(imageNum) {
262            if (opts.inprogress == false) {
263                opts.inprogress = true;
264                opts.activeImage = imageNum;
265                // hide elements during transition
266                $('#loading').show();
267                $('#lightboxImage').hide();
268                $('#hoverNav').hide();
269                $('#prevLink').hide();
270                $('#nextLink').hide();
271                doChangeImage();
272            }
273        };
274
275        function doChangeImage() {
276            opts.imgPreloader = new Image();
277            opts.imgPreloader.onload = function () {
278                $('#lightboxImage').attr('src', opts.imageArray[opts.activeImage][0]);
279                doScale();  // once image is preloaded, resize image container
280                preloadNeighborImages();
281            };
282            opts.imgPreloader.src = opts.imageArray[opts.activeImage][0];
283        };
284
285        function doScale() {
286            if (!opts.imgPreloader) {
287                return;
288            }
289            var newWidth = opts.imgPreloader.width;
290            var newHeight = opts.imgPreloader.height;
291			var seted_widt_max=parseInt(JQLBSettings['jqlb_maximum_width']);
292			var seted_height_max=parseInt(JQLBSettings['jqlb_maximum_height']);
293            var arrayPageSize = getPageSize();  
294			var noScrollWidth = (arrayPageSize[2] < arrayPageSize[0]) ? arrayPageSize[0] : arrayPageSize[2]; //if viewport is smaller than page, use page width.
295			$("#overlay").css({ width: noScrollWidth + 'px', height: arrayPageSize[1] + 'px' });  
296            var maxHeight = (arrayPageSize[3]) - ($("#imageDataContainer").height() + (2 * opts.borderSize));
297            var maxWidth = (arrayPageSize[2]) - (2*opts.borderSize);	
298			if (opts.fitToScreen){
299				var displayWidth = maxWidth-opts.marginSize;	
300				if(seted_widt_max<maxWidth && seted_widt_max>0)
301					displayWidth = seted_widt_max-opts.marginSize;
302				var displayHeight = maxHeight-opts.marginSize;	
303				if(seted_height_max<maxHeight && seted_height_max>0)
304					displayHeight = seted_height_max-opts.marginSize;	
305                var ratio = 1;
306                if (newHeight > displayHeight) {
307                    ratio = displayHeight / newHeight; //ex. 600/1024 = 0.58					
308                }
309                newWidth = newWidth * ratio;
310                newHeight = newHeight * ratio;
311                ratio = 1;
312                if (newWidth > displayWidth) {
313                    ratio = displayWidth / newWidth; //ex. 800/1280 == 0.62					
314                }
315                newWidth = Math.round(newWidth * ratio);
316                newHeight = Math.round(newHeight * ratio);
317            }        
318			var arrayPageScroll = getPageScroll();
319			var centerY = arrayPageScroll[1] + (maxHeight * 0.5);
320			if(JQLBSettings['jqlb_popup_size_fix']=='1')
321				var newTop =(maxHeight-newHeight) * 0.5;
322			else
323				var newTop = centerY - newHeight * 0.5;
324			var newLeft = arrayPageScroll[0];
325			$('#lightboxImage').width(newWidth).height(newHeight);
326			resizeImageContainer(newWidth, newHeight, newTop, newLeft);           
327        }
328/*2.28.4 -  Compatible with wordpress 3.6.*/
329        function resizeImageContainer(imgWidth, imgHeight, lightboxTop, lightboxLeft) {
330            opts.widthCurrent = $("#outerImageContainer").outerWidth();
331			if(parseInt(JQLBSettings['jqlb_maximum_width']) && parseInt(JQLBSettings['jqlb_maximum_width'])>0){
332				if(parseInt(JQLBSettings['jqlb_maximum_width'])<opts.widthCurrent){
333					opts.widthCurrent=parseInt(JQLBSettings['jqlb_maximum_width']);
334				}
335			}
336			
337            opts.heightCurrent = $("#outerImageContainer").outerHeight();
338			if(parseInt(JQLBSettings['jqlb_maximum_height']) && parseInt(JQLBSettings['jqlb_maximum_height'])>0){
339				if(parseInt(JQLBSettings['jqlb_maximum_height'])<opts.heightCurrent){
340					opts.heightCurrent=parseInt(JQLBSettings['jqlb_maximum_height']);
341				}
342			}
343            var widthNew = Math.max(350, imgWidth + (opts.borderSize * 2));
344            var heightNew = (imgHeight + (opts.borderSize * 2));
345            // scalars based on change from old to new
346            opts.xScale = (widthNew / opts.widthCurrent) * 100;
347            opts.yScale = (heightNew / opts.heightCurrent) * 100;           
348            setLightBoxPos(lightboxTop, lightboxLeft);                   
349            updateDetails(); //toyNN: moved updateDetails() here, seems to work fine.    
350			$('#imageDataContainer').animate({ width: widthNew }, opts.resizeSpeed, 'linear');
351			$('#outerImageContainer').animate({ width: widthNew }, opts.resizeSpeed, 'linear', function () {
352				$('#outerImageContainer').animate({ height: heightNew }, opts.resizeSpeed, 'linear', function () {
353					showImage();
354				});
355			});
356			updateNav();
357            $('#prevLink').height(imgHeight);
358            $('#nextLink').height(imgHeight);
359        };
360
361        function showImage() {
362            //assumes updateDetails have been called earlier!
363            $("#imageData").show();
364            $('#caption').show();
365            //$('#imageDataContainer').slideDown(400);
366            //$("#imageDetails").hide().fadeIn(400);		
367            $('#loading').hide();
368            if (opts.resizeSpeed > 0) {
369                $('#lightboxImage').fadeIn("fast");
370            } else {
371                $('#lightboxImage').show();
372            }
373            opts.inprogress = false;
374        };
375		
376		function preloadNeighborImages() {
377            if (opts.loopImages && opts.imageArray.length > 1) {
378                preloadNextImage = new Image();
379                preloadNextImage.src = opts.imageArray[(opts.activeImage == (opts.imageArray.length - 1)) ? 0 : opts.activeImage + 1][0]
380                preloadPrevImage = new Image();
381                preloadPrevImage.src = opts.imageArray[(opts.activeImage == 0) ? (opts.imageArray.length - 1) : opts.activeImage - 1][0]
382            } else {
383                if ((opts.imageArray.length - 1) > opts.activeImage) {
384                    preloadNextImage = new Image();
385                    preloadNextImage.src = opts.imageArray[opts.activeImage + 1][0];
386                }
387                if (opts.activeImage > 0) {
388                    preloadPrevImage = new Image();
389                    preloadPrevImage.src = opts.imageArray[opts.activeImage - 1][0];
390                }
391            }
392        };
393
394
395        function updateDetails() {
396            $('#numberDisplay').html('');
397            $('#caption').html('').hide();
398            if (opts.imageArray[opts.activeImage][1]) {
399                $('#caption').html(opts.imageArray[opts.activeImage][1]).show();
400            }
401            var nav_html = '';
402            var prev = '';
403            var pos = (opts.imageArray.length > 1) ? opts.strings.image + (opts.activeImage + 1) + opts.strings.of + opts.imageArray.length : '';
404            var link = (opts.displayDownloadLink) ? '<a href="' + opts.imageArray[opts.activeImage][0] + '" id="downloadLink" download="'+opts.imageArray[opts.activeImage][0].replace(/^.*\/|\.[^.]*$/g, '')+'.'+opts.imageArray[opts.activeImage][0].split('.').pop()+'" target="'+opts.linkTarget+'">' + opts.strings.download + '</a>' : '';
405            var next = '';
406            if (opts.imageArray.length > 1 && !opts.disableNavbarLinks) {	 // display previous / next text links   			           
407                if ((opts.activeImage) > 0 || opts.loopImages) {
408                    prev = '<a title="' + opts.strings.prevLinkTitle + '" href="#" id="prevLinkText">' + opts.strings.prevLinkText + "</a>";
409                }
410                if (((opts.activeImage + 1) < opts.imageArray.length) || opts.loopImages) {
411                    next += '<a title="' + opts.strings.nextLinkTitle + '" href="#" id="nextLinkText">' + opts.strings.nextLinkText + "</a>";
412                }
413            }
414            nav_html = prev + nav_html + pos + link + next;
415            if (nav_html != '' && JQLBSettings['jqlb_show_text_for_image']=='1') {
416                $('#numberDisplay').html(nav_html).show();
417            }
418        };
419
420        function updateNav() {
421            if (opts.imageArray.length > 1) {
422                $('#hoverNav').show();
423                // if loopImages is true, always show next and prev image buttons 
424                if (opts.loopImages) {
425                    $('#prevLink,#prevLinkText').show().click(function () {
426                        changeImage((opts.activeImage == 0) ? (opts.imageArray.length - 1) : opts.activeImage - 1); return false;
427                    });
428                    $('#nextLink,#nextLinkText').show().click(function () {
429                        changeImage((opts.activeImage == (opts.imageArray.length - 1)) ? 0 : opts.activeImage + 1); return false;
430                    });
431                } else {
432                    // if not first image in set, display prev image button
433                    if (opts.activeImage != 0) {
434                        $('#prevLink,#prevLinkText').show().click(function () {
435                            changeImage(opts.activeImage - 1); return false;
436                        });
437                    }
438                    // if not last image in set, display next image button
439                    if (opts.activeImage != (opts.imageArray.length - 1)) {
440                        $('#nextLink,#nextLinkText').show().click(function () {
441                            changeImage(opts.activeImage + 1); return false;
442                        });
443                    }
444                }
445				if(JQLBSettings ['jqlb_keyboard_navigation']=='1'){
446                	enableKeyboardNav();
447				}
448            }
449        };
450
451        function end() {
452            disableKeyboardNav();
453            $('#lightbox').hide();
454            $('#overlay').fadeOut();
455            $('select, object, embed').show();
456        };
457
458        function keyboardAction(e) {
459            var o = e.data.opts;
460            var keycode = e.keyCode;
461            var escapeKey = 27;
462            var key = String.fromCharCode(keycode).toLowerCase();
463            if ((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)) { // close lightbox
464                end();
465            } else if ((key == 'p') || (keycode == 37)) { // display previous image
466                if (o.loopImages) {
467                    disableKeyboardNav();
468                    changeImage((o.activeImage == 0) ? (o.imageArray.length - 1) : o.activeImage - 1);
469                }
470                else if (o.activeImage != 0) {
471                    disableKeyboardNav();
472                    changeImage(o.activeImage - 1);
473                }
474            } else if ((key == 'n') || (keycode == 39)) { // display next image
475                if (opts.loopImages) {
476                    disableKeyboardNav();
477                    changeImage((o.activeImage == (o.imageArray.length - 1)) ? 0 : o.activeImage + 1);
478                }
479                else if (o.activeImage != (o.imageArray.length - 1)) {
480                    disableKeyboardNav();
481                    changeImage(o.activeImage + 1);
482                }
483            }          
484            return false;
485        };
486        function enableKeyboardNav() {			
487			$(document).bind('keydown', {opts: opts}, keyboardAction);
488        };
489        function disableKeyboardNav() {
490            $(document).unbind('keydown');
491        };
492    };
493    $.fn.lightbox.parseJsonData = function(data) {
494        var imageArray = [];
495        $.each(data, function () {
496            imageArray.push(new Array(this.url, this.title));
497        });
498        return imageArray;
499    };
500    $.fn.lightbox.defaults = {
501		adminBarHeight:28,
502        overlayOpacity: (JQLBSettings['jqlb_overlay_opacity']/100),
503        borderSize: (JQLBSettings['jqlb_border_width']),
504        imageArray: new Array,
505        activeImage: null,
506        inprogress: false, //this is an internal state variable. don't touch.
507        widthCurrent: 250,
508        heightCurrent: 250,
509        xScale: 1,
510        yScale: 1,
511        displayTitle: true,
512        disableNavbarLinks: true,
513        loopImages: true,
514        imageClickClose: true,
515        jsonData: null,
516        jsonDataParser: null,
517        followScroll: false,
518        isIE8: false  //toyNN:internal value only
519    };
520	$(document).ready(function($){
521		var haveConf = (typeof JQLBSettings == 'object');
522		if(haveConf && JQLBSettings.resizeSpeed) {
523			JQLBSettings.resizeSpeed = parseInt(JQLBSettings.resizeSpeed);
524		}
525		if(haveConf && JQLBSettings.marginSize){
526			JQLBSettings.marginSize = parseInt(JQLBSettings.marginSize);
527		}
528		var default_strings = {
529			help: ' Browse images with your keyboard: Arrows or P(revious)/N(ext) and X/C/ESC for close.',
530			prevLinkTitle: JQLBSettings ['jqlb_previous_image_title'],
531			nextLinkTitle:  JQLBSettings ['jqlb_next_image_title'],
532			prevLinkText:  '&laquo; Previous',
533			nextLinkText:  'Next &raquo;',
534			closeTitle: JQLBSettings ['jqlb_close_image_title'],
535			image: 'Image ',
536			of: ' of ',
537			download: 'Download'
538		};
539		$('a[rel^="lightbox"]').lightbox({
540			adminBarHeight: $('#wpadminbar').height() || 0,
541			linkTarget: (haveConf && JQLBSettings.linkTarget.length) ? JQLBSettings.linkTarget : '_self',
542			displayHelp: (haveConf && JQLBSettings.help.length) ? true : false,
543			marginSize: (haveConf && JQLBSettings.marginSize) ? JQLBSettings.marginSize : 0,
544			fitToScreen: (haveConf && JQLBSettings.fitToScreen == '1') ? true : false,
545			resizeSpeed: (haveConf && JQLBSettings.resizeSpeed >= 0) ? JQLBSettings.resizeSpeed : 400,
546			displayDownloadLink: (haveConf && JQLBSettings.displayDownloadLink == '0') ? false : true,
547			navbarOnTop: (haveConf && JQLBSettings.navbarOnTop == '0') ? false : true,
548			//followScroll: (haveConf && JQLBSettings.followScroll == '0') ? false : true,
549			strings: (haveConf && typeof JQLBSettings.help == 'string') ? JQLBSettings : default_strings
550		});	
551	});	
552})(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.