PageSourceSearch

https://theimportanceofbeing.be/wp-content/themes/aidreform/scripts/frontend/jquery.prettyphoto.js?ver=4.1.42

js theimportanceofbeing.be collected 2026-10-08 09:18:08 UTC 36,371 bytes, 667 lines download raw bytes

1/* ------------------------------------------------------------------------
2	Class: prettyPhoto
3	Use: Lightbox clone for jQuery
4	Author: Stephane Caron (http://www.no-margin-for-errors.com)
5	Version: 3.1.5
6------------------------------------------------------------------------- */
7(function (e) {
8    function t() {
9        var e = location.href;
10        hashtag = e.indexOf("#prettyPhoto") !== -1 ? decodeURI(e.substring(e.indexOf("#prettyPhoto") + 1, e.length)) : false;
11        return hashtag
12    }
13    function n() {
14        if (typeof theRel == "undefined") return;
15        location.hash = theRel + "/" + rel_index + "/"
16    }
17    function r() {
18        if (location.href.indexOf("#prettyPhoto") !== -1) location.hash = "prettyPhoto"
19    }
20    function i(e, t) {
21        e = e.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
22        var n = "[\\?&]" + e + "=([^&#]*)";
23        var r = new RegExp(n);
24        var i = r.exec(t);
25        return i == null ? "" : i[1]
26    }
27    e.prettyPhoto = {
28        version: "3.1.5"
29    };
30    e.fn.prettyPhoto = function (s) {
31        function g() {
32            e(".pp_loaderIcon").hide();
33            projectedTop = scroll_pos["scrollTop"] + (d / 2 - a["containerHeight"] / 2);
34            if (projectedTop < 0) projectedTop = 0;
35            $ppt.fadeTo(settings.animation_speed, 1);
36            $pp_pic_holder.find(".pp_content").animate({
37                height: a["contentHeight"],
38                width: a["contentWidth"]
39            }, settings.animation_speed);
40            $pp_pic_holder.animate({
41                top: projectedTop,
42                left: v / 2 - a["containerWidth"] / 2 < 0 ? 0 : v / 2 - a["containerWidth"] / 2,
43                width: a["containerWidth"]
44            }, settings.animation_speed, function () {
45                $pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(a["height"]).width(a["width"]);
46                $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);
47                if (isSet && S(pp_images[set_position]) == "image") {
48                    $pp_pic_holder.find(".pp_hoverContainer").show()
49                } else {
50                    $pp_pic_holder.find(".pp_hoverContainer").hide()
51                }
52                if (settings.allow_expand) {
53                    if (a["resized"]) {
54                        e("a.pp_expand,a.pp_contract").show()
55                    } else {
56                        e("a.pp_expand").hide()
57                    }
58                }
59                if (settings.autoplay_slideshow && !m && !f) e.prettyPhoto.startSlideshow();
60                settings.changepicturecallback();
61                f = true
62            });
63            C();
64            s.ajaxcallback()
65        }
66        function y(t) {
67            $pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden");
68            $pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function () {
69                e(".pp_loaderIcon").show();
70                t()
71            })
72        }
73        function b(t) {
74            t > 1 ? e(".pp_nav").show() : e(".pp_nav").hide()
75        }
76        function w(e, t) {
77            resized = false;
78            E(e, t);
79            imageWidth = e, imageHeight = t;
80            if ((p > v || h > d) && doresize && settings.allow_resize && !u) {
81                resized = true, fitting = false;
82                while (!fitting) {
83                    if (p > v) {
84                        imageWidth = v - 200;
85                        imageHeight = t / e * imageWidth
86                    } else if (h > d) {
87                        imageHeight = d - 200;
88                        imageWidth = e / t * imageHeight
89                    } else {
90                        fitting = true
91                    }
92                    h = imageHeight, p = imageWidth
93                }
94                if (p > v || h > d) {
95                    w(p, h)
96                }
97                E(imageWidth, imageHeight)
98            }
99            return {
100                width: Math.floor(imageWidth),
101                height: Math.floor(imageHeight),
102                containerHeight: Math.floor(h),
103                containerWidth: Math.floor(p) + settings.horizontal_padding * 2,
104                contentHeight: Math.floor(l),
105                contentWidth: Math.floor(c),
106                resized: resized
107            }
108        }
109        function E(t, n) {
110            t = parseFloat(t);
111            n = parseFloat(n);
112            $pp_details = $pp_pic_holder.find(".pp_details");
113            $pp_details.width(t);
114            detailsHeight = parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom"));
115            $pp_details = $pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({
116                position: "absolute",
117                top: -1e4
118            });
119            detailsHeight += $pp_details.height();
120            detailsHeight = detailsHeight <= 34 ? 36 : detailsHeight;
121            $pp_details.remove();
122            $pp_title = $pp_pic_holder.find(".ppt");
123            $pp_title.width(t);
124            titleHeight = parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom"));
125            $pp_title = $pp_title.clone().appendTo(e("body")).css({
126                position: "absolute",
127                top: -1e4
128            });
129            titleHeight += $pp_title.height();
130            $pp_title.remove();
131            l = n + detailsHeight;
132            c = t;
133            h = l + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height();
134            p = t
135        }
136        function S(e) {
137            if (e.match(/youtube\.com\/watch/i) || e.match(/youtu\.be/i)) {
138                return "youtube"
139            } else if (e.match(/vimeo\.com/i)) {
140                return "vimeo"
141            } else if (e.match(/\b.mov\b/i)) {
142                return "quicktime"
143             } else if (e.match(/\b.mp3\b/i)) {
144                return "audio"
145            }else if (e.match(/\b.flv\b/i) || e.match(/\b.mp4\b/i) || e.match(/\b.wmv\b/i) || e.match(/\b.mpeg\b/i) || e.match(/\b.avi\b/i)) {
146                return "video"
147            } else if (e.match(/\b.swf\b/i)) {
148                return "flash"
149            } else if (e.match(/\biframe=true\b/i)) {
150                return "iframe"
151            } else if (e.match(/\bajax=true\b/i)) {
152                return "ajax"
153            } else if (e.match(/\bcustom=true\b/i)) {
154                return "custom"
155            } else if (e.substr(0, 1) == "#") {
156                return "inline"
157            } else {
158                return "image"
159            }
160        }
161        function x() {
162            if (doresize && typeof $pp_pic_holder != "undefined") {
163                scroll_pos = T();
164                contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width();
165                projectedTop = d / 2 + scroll_pos["scrollTop"] - contentHeight / 2;
166                if (projectedTop < 0) projectedTop = 0;
167                if (contentHeight > d) return;
168                $pp_pic_holder.css({
169                    top: projectedTop,
170                    left: v / 2 + scroll_pos["scrollLeft"] - contentwidth / 2
171                })
172            }
173        }
174        function T() {
175            if (self.pageYOffset) {
176                return {
177                    scrollTop: self.pageYOffset,
178                    scrollLeft: self.pageXOffset
179                }
180            } else if (document.documentElement && document.documentElement.scrollTop) {
181                return {
182                    scrollTop: document.documentElement.scrollTop,
183                    scrollLeft: document.documentElement.scrollLeft
184                }
185            } else if (document.body) {
186                return {
187                    scrollTop: document.body.scrollTop,
188                    scrollLeft: document.body.scrollLeft
189                }
190            }
191        }
192        function N() {
193            d = e(window).height(), v = e(window).width();
194            if (typeof $pp_overlay != "undefined") $pp_overlay.height(e(document).height()).width(v)
195        }
196        function C() {
197            if (isSet && settings.overlay_gallery && S(pp_images[set_position]) == "image") {
198                itemWidth = 52 + 5;
199                navWidth = settings.theme == "facebook" || settings.theme == "pp_default" ? 50 : 30;
200                itemsPerPage = Math.floor((a["containerWidth"] - 100 - navWidth) / itemWidth);
201                itemsPerPage = itemsPerPage < pp_images.length ? itemsPerPage : pp_images.length;
202                totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1;
203                if (totalPage == 0) {
204                    navWidth = 0;
205                    $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()
206                } else {
207                    $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show()
208                }
209                galleryWidth = itemsPerPage * itemWidth;
210                fullGalleryWidth = pp_images.length * itemWidth;
211                $pp_gallery.css("margin-left", -(galleryWidth / 2 + navWidth / 2)).find("div:first").width(galleryWidth + 5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected");
212                goToPage = Math.floor(set_position / itemsPerPage) < totalPage ? Math.floor(set_position / itemsPerPage) : totalPage;
213                e.prettyPhoto.changeGalleryPage(goToPage);
214                $pp_gallery_li.filter(":eq(" + set_position + ")").addClass("selected")
215            } else {
216                $pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")
217            }
218        }
219        function k(t) {
220            if (settings.social_tools) facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href));
221            settings.markup = settings.markup.replace("{pp_social}", "");
222            e("body").append(settings.markup);
223            $pp_pic_holder = e(".pp_pic_holder"), $ppt = e(".ppt"), $pp_overlay 
223= e("div.pp_overlay");
224            if (isSet && settings.overlay_gallery) {
225                currentGalleryPage = 0;
226                toInject = "";
227                for (var n = 0; n < pp_images.length; n++) {
228                    if (!pp_images[n].match(/\b(jpg|jpeg|png|gif)\b/gi)) {
229                        classname = "default";
230                        img_src = ""
231                    } else {
232                        classname = "";
233                        img_src = pp_images[n]
234                    }
235                    toInject += "<li class='" + classname + "'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>"
236                }
237                toInject = settings.gallery_markup.replace(/{gallery}/g, toInject);
238                $pp_pic_holder.find("#pp_full_res").after(toInject);
239                $pp_gallery = e(".pp_pic_holder .pp_gallery"), $pp_gallery_li = $pp_gallery.find("li");
240                $pp_gallery.find(".pp_arrow_next").click(function () {
241                    e.prettyPhoto.changeGalleryPage("next");
242                    e.prettyPhoto.stopSlideshow();
243                    return false
244                });
245                $pp_gallery.find(".pp_arrow_previous").click(function () {
246                    e.prettyPhoto.changeGalleryPage("previous");
247                    e.prettyPhoto.stopSlideshow();
248                    return false
249                });
250                $pp_pic_holder.find(".pp_content").hover(function () {
251                    $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()
252                }, function () {
253                    $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()
254                });
255                itemWidth = 52 + 5;
256                $pp_gallery_li.each(function (t) {
257                    e(this).find("a").click(function () {
258                        e.prettyPhoto.changePage(t);
259                        e.prettyPhoto.stopSlideshow();
260                        return false
261                    })
262                })
263            }
264            if (settings.slideshow) {
265                $pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>');
266                $pp_pic_holder.find(".pp_nav .pp_play").click(function () {
267                    e.prettyPhoto.startSlideshow();
268                    return false
269                })
270            }
271            $pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme);
272            $pp_overlay.css({
273                opacity: 0,
274                height: e(document).height(),
275                width: e(window).width()
276            }).bind("click", function () {
277                if (!settings.modal) e.prettyPhoto.close()
278            });
279            e("a.pp_close").bind("click", function () {
280                e.prettyPhoto.close();
281                return false
282            });
283            if (settings.allow_expand) {
284                e("a.pp_expand").bind("click", function (t) {
285                    if (e(this).hasClass("pp_expand")) {
286                        e(this).removeClass("pp_expand").addClass("pp_contract");
287                        doresize = false
288                    } else {
289                        e(this).removeClass("pp_contract").addClass("pp_expand");
290                        doresize = true
291                    }
292                    y(function () {
293                        e.prettyPhoto.open()
294                    });
295                    return false
296                })
297            }
298            $pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function () {
299                e.prettyPhoto.changePage("previous");
300                e.prettyPhoto.stopSlideshow();
301                return false
302            });
303            $pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function () {
304                e.prettyPhoto.changePage("next");
305                e.prettyPhoto.stopSlideshow();
306                return false
307            });
308            x()
309        }
310        s = jQuery.extend({
311            hook: "rel",
312            animation_speed: "fast",
313            ajaxcallback: function () {},
314            slideshow: 5e3,
315            autoplay_slideshow: false,
316            opacity: .8,
317            show_title: true,
318            allow_resize: true,
319            allow_expand: true,
320            default_width: 500,
321            default_height: 344,
322            counter_separator_label: "/",
323            theme: "pp_default",
324            horizontal_padding: 20,
325            hideflash: false,
326            wmode: "opaque",
327            autoplay: true,
328            modal: false,
329            deeplinking: true,
330            overlay_gallery: true,
331            overlay_gallery_max: 30,
332            keyboard_shortcuts: true,
333            changepicturecallback: function () {},
334            callback: function () {},
335            ie6_fallback: true,
336            markup: '<div class="pp_pic_holder"> 						<div class="ppt"> </div> 						<div class="pp_top"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 						<div class="pp_content_container"> 							<div class="pp_left"> 							<div class="pp_right"> 								<div class="pp_content"> 									<div class="pp_loaderIcon"></div> 									<div class="pp_fade"> 										<a href="#" class="pp_expand" title="Expand the image">Expand</a> 										<div class="pp_hoverContainer"> 											<a class="pp_next" href="#">next</a> 											<a class="pp_previous" href="#">previous</a> 										</div> 										<div id="pp_full_res"></div> 										<div class="pp_details"> 											<div class="pp_nav"> 												<a href="#" class="pp_arrow_previous">Previous</a> 												<p class="currentTextHolder">0/0</p> 												<a href="#" class="pp_arrow_next">Next</a> 											</div> 											<p class="pp_description"></p> 											<div class="pp_social">{pp_social}</div> 											<a class="pp_close" href="#">Close</a> 										</div> 									</div> 								</div> 							</div> 							</div> 						</div> 						<div class="pp_bottom"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 					</div> 					<div class="pp_overlay"></div>',
337            gallery_markup: '<div class="pp_gallery"> 								<a href="#" class="pp_arrow_previous">Previous</a> 								<div> 									<ul> 										{gallery} 									</ul> 								</div> 								<a href="#" class="pp_arrow_next">Next</a> 							</div>',
338            image_markup: '<img id="fullResImage" src="{path}" />',
339            flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',
340            quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',
341			audio_markup: '<audio height="{height}" width="{width}" src="{path}" type="audio/mp3" controls="controls"></audio>',
342			video_markup: '<video height="{height}" width="{width}" src="{path}"></video>',
343            iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',
344            inline_markup: '<div class="pp_inline">{content}</div>',
345            custom_markup: "",
346            social_tools: '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'
347        }, s);
348        var o = this,
349            u = false,
350            a, f, l, c, h, p, d = e(window).height(),
351            v = e(window).width(),
352            m;
353        doresize = true, scroll_pos = T();
354        e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto", function () {
355            x();
356            N()
357        });
358        if (s.keyboard_shortcuts) {
359            e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto", function (t) {
360                if (typeof $pp_pic_holder != "undefined") {
361                    if ($pp_pic_holder.is(":visible")) {
362                        switch (t.keyCode) {
363                        case 37:
364                            e.prettyPhoto.changePage("previous");
365                            t.preventDefault();
366                            break;
367                        case 39:
368                            e.prettyPhoto.changePage("next");
369                            t.preventDefault();
370                            break;
371                        case 27:
372                            if (!settings.modal) e.prettyPhoto.close();
373                            t.preventDefault();
374                            break
375                        }
376                    }
377                }
378            })
379        }
380        e.prettyPhoto.initialize = function () {
381            settings = s;
382            if (settings.theme == "pp_default") settings.horizontal_padding = 16;
383            theRel = e(this).attr(settings.hook);
384            galleryRegExp = /\[(?:.*)\]/;
385            isSet = galleryRegExp.exec(theRel) ? true : false;
386            pp_images = isSet ? jQuery.map(o, function (t, n) {
387                if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).attr("href")
388            }) : e.makeArray(e(this).attr("href"));
389            pp_titles = isSet ? jQuery.map(o, function (t, n) {
390                if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).find("img").attr("data-alt") ? e(t).find("img").attr("data-alt") : ""
391            }) : e.makeArray(e(this).find("img").attr("data-alt"));
392            pp_descriptions = isSet ? jQuery.map(o, function (t, n) {
393                if (e(t).attr(settings.hook).indexOf(theRel) != -1) return e(t).attr("data-title") ? e(t).attr("data-title") : ""
394            }) : e.makeArray(e(this).attr("data-title"));
395            if (pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false;
396            set_position = jQuery.inArray(e(this).attr("href"), pp_images);
397            rel_index = isSet ? set_position : e("a[" + settings.hook + "^='" + theRel + "']").index(e(this));
398            k(this);
399            if (settings.allow_resize) e(window).bind("scroll.prettyphoto", function () {
400                x()
401            });
402            e.prettyPhoto.open();
403            return false
404        };
405        e.prettyPhoto.open = function (t) {
406            if (typeof settings == "undefined") {
407                settings = s;
408                pp_images = e.makeArray(arguments[0]);
409                pp_titles = arguments[1] ? e.makeArray(arguments[1]) : e.makeArray("");
410                pp_descriptions = arguments[2] ? e.makeArray(arguments[2]) : e.makeArray("");
411                isSet = pp_images.length > 1 ? true : false;
412                set_position = arguments[3] ? arguments[3] : 0;
413                k(t.target)
414            }
415            if (settings.hideflash) e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "hidden");
416            b(e(pp_images).size());
417            e(".pp_loaderIcon").show();
418            if (settings.deeplinking) n();
419            if (settings.social_tools) {
420                facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href));
421                $pp_pic_holder.find(".pp_social").html(facebook_like_link)
422            }
423            if ($ppt.is(":hidden")) $ppt.css("opacity", 0).show();
424            $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity);
425            $pp_pic_holder.find(".currentTextHolder").text(set_position + 1 + settings.counter_separator_label + e(pp_images).size());
426            if (typeof pp_descriptions[set_position] != "undefined" && pp_descriptions[set_position] != "") {
427                $pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]))
428            } else {
429                $pp_pic_holder.find(".pp_description").hide()
430            }
431            movie_width = parseFloat(i("width", pp_images[set_position])) ? i("width", pp_images[set_position]) : settings.default_width.toString();
432            movie_height = parseFloat(i("height", pp_images[set_position])) ? i("height", pp_images[set_position]) : settings.default_height.toString();
433            u = false;
434            if (movie_height.indexOf("%") != -1) {
435                movie_height = parseFloat(e(window).height() * parseFloat(movie_height) / 100 - 150);
436                u = true
437            }
438            if (movie_width.indexOf("%") != -1) {
439                movie_width = parseFloat(e(window).width() * parseFloat(movie_width) / 100 - 150);
440                u = true
441            }
442            $pp_pic_holder.fadeIn(function () {
443                settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined" ? $ppt.html(unescape(pp_titles[set_position])) : $ppt.html(" ");
444                imgPreloader = "";
445                skipInjection = false;
446                switch (S(pp_images[set_position])) {
447                case "image":
448                    imgPreloader = new Image;
449                    nextImage = new Image;
450                    if (isSet && set_position < e(pp_images).size() - 1) nextImage.src = pp_images[set_position + 1];
451                    prevImage = new Image;
452                    if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];
453                    $pp_pic_holder.find("#pp_full_res")[0].innerHTML = settings.image_markup.replace(/{path}/g, pp_images[set_position]);
454
455                    imgPreloader.onload = function () {
456                        a = w(imgPreloader.width, imgPreloader.height);
457                        g()
458                    };
459                    imgPreloader.onerror = function () {
460                        alert("Image cannot be loaded. Make sure the path is correct and image exist.");
461                        e.prettyPhoto.close()
462                    };
463                    imgPreloader.src = pp_images[set_position];
464                    break;
465                case "youtube":
466                    a = w(movie_width, movie_height);
467                    movie_id = i("v", pp_images[set_position]);
468                    if (movie_id == "") {
469                        movie_id = pp_images[set_position].split("youtu.be/");
470                        movie_id = movie_id[1];
471                        if (movie_id.indexOf("?") > 0) movie_id = movie_id.substr(0, movie_id.indexOf("?"));
472                        if (movie_id.indexOf("&") > 0) movie_id = movie_id.substr(0, movie_id.indexOf("&"))
473                    }
474                    movie = "http://www.youtube.com/embed/" + movie_id;
475                    i("rel", pp_images[set_position]) ? movie += "?rel=" + i("rel", pp_images[set_position]) : movie += "?rel=1";
476                    if (settings.autoplay) movie += "&autoplay=1";
477                    toInject = settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie);
478                    break;
479                case "vimeo":
480                    a = w(movie_width, movie_height);
481                    movie_id = pp_images[set_position];
482                    var t = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
483                    var n = movie_id.match(t);
484                    movie = "http://player.vimeo.com/video/" + n[3] + "?title=0&byline=0&portrait=0";
485                    if (settings.autoplay) movie += "&autoplay=1;";
486                    vimeo_width = a["width"] + "/embed/?moog_width=" 
486+ a["width"];
487                    toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, a["height"]).replace(/{path}/g, movie);
488                    break;
489                case "quicktime":
490                    a = w(movie_width, movie_height);
491                    a["height"] += 15;
492                    a["contentHeight"] += 15;
493                    a["containerHeight"] += 15;
494                    toInject = settings.quicktime_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay);
495                    break;
496				case "audio":
497                    a = w(movie_width, movie_height);
498                    a["height"] += 0;
499                    a["contentHeight"] += 15;
500                    a["containerHeight"] += 15;
501                    toInject = settings.audio_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{path}/g, pp_images[set_position]);
502                    break;
503				case "video":
504                    a = w(movie_width, movie_height);
505                    a["height"] += 15;
506                    a["contentHeight"] += 15;
507                    a["containerHeight"] += 15;
508                    toInject = settings.video_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{path}/g, pp_images[set_position]);
509                    break;	
510                case "flash":
511                    a = w(movie_width, movie_height);
512                    flash_vars = pp_images[set_position];
513                    flash_vars = flash_vars.substring(pp_images[set_position].indexOf("flashvars") + 10, pp_images[set_position].length);
514                    filename = pp_images[set_position];
515                    filename = filename.substring(0, filename.indexOf("?"));
516                    toInject = settings.flash_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + "?" + flash_vars);
517                    break;
518                case "iframe":
519                    a = w(movie_width, movie_height);
520                    frame_url = pp_images[set_position];
521                    frame_url = frame_url.substr(0, frame_url.indexOf("iframe") - 1);
522                    toInject = settings.iframe_markup.replace(/{width}/g, a["width"]).replace(/{height}/g, a["height"]).replace(/{path}/g, frame_url);
523                    break;
524                case "ajax":
525                    doresize = false;
526                    a = w(movie_width, movie_height);
527                    doresize = true;
528                    skipInjection = true;
529                    e.get(pp_images[set_position], function (e) {
530                        toInject = settings.inline_markup.replace(/{content}/g, e);
531                        $pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject;
532                        g()
533                    });
534                    break;
535                case "custom":
536                    a = w(movie_width, movie_height);
537                    toInject = settings.custom_markup;
538                    break;
539                case "inline":
540                    myClone = e(pp_images[set_position]).clone().append('<br clear="all" />').css({
541                        width: settings.default_width
542                    }).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show();
543                    doresize = false;
544                    a = w(e(myClone).width(), e(myClone).height());
545                    doresize = true;
546                    e(myClone).remove();
547                    toInject = settings.inline_markup.replace(/{content}/g, e(pp_images[set_position]).html());
548                    break
549                }
550                if (!imgPreloader && !skipInjection) {
551                    $pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject;
552                    g()
553                }
554            });
555            return false
556        };
557        e.prettyPhoto.changePage = function (t) {
558            currentGalleryPage = 0;
559            if (t == "previous") {
560                set_position--;
561                if (set_position < 0) set_position = e(pp_images).size() - 1
562            } else if (t == "next") {
563                set_position++;
564                if (set_position > e(pp_images).size() - 1) set_position = 0
565            } else {
566                set_position = t
567            }
568            rel_index = set_position;
569            if (!doresize) doresize = true;
570            if (settings.allow_expand) {
571                e(".pp_contract").removeClass("pp_contract").addClass("pp_expand")
572            }
573            y(function () {
574                e.prettyPhoto.open()
575            })
576        };
577        e.prettyPhoto.changeGalleryPage = function (e) {
578            if (e == "next") {
579                currentGalleryPage++;
580                if (currentGalleryPage > totalPage) currentGalleryPage = 0
581            } else if (e == "previous") {
582                currentGalleryPage--;
583                if (currentGalleryPage < 0) currentGalleryPage = totalPage
584            } else {
585                currentGalleryPage = e
586            }
587            slide_speed = e == "next" || e == "previous" ? settings.animation_speed : 0;
588            slide_to = currentGalleryPage * itemsPerPage * itemWidth;
589            $pp_gallery.find("ul").animate({
590                left: -slide_to
591            }, slide_speed)
592        };
593        e.prettyPhoto.startSlideshow = function () {
594            if (typeof m == "undefined") {
595                $pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function () {
596                    e.prettyPhoto.stopSlideshow();
597                    return false
598                });
599                m = setInterval(e.prettyPhoto.startSlideshow, settings.slideshow)
600            } else {
601                e.prettyPhoto.changePage("next")
602            }
603        };
604        e.prettyPhoto.stopSlideshow = function () {
605            $pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function () {
606                e.prettyPhoto.startSlideshow();
607                return false
608            });
609            clearInterval(m);
610            m = undefined
611        };
612        e.prettyPhoto.close = function () {
613            if ($pp_overlay.is(":animated")) return;
614            e.prettyPhoto.stopSlideshow();
615            $pp_pic_holder.stop().find("object,embed").css("visibility", "hidden");
616            e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed, function () {
617                e(this).remove()
618            });
619            $pp_overlay.fadeOut(settings.animation_speed, function () {
620                if (settings.hideflash) e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "visible");
621                e(this).remove();
622                e(window).unbind("scroll.prettyphoto");
623                r();
624                settings.callback();
625                doresize = true;
626                f = false;
627                delete settings
628            })
629        };
630        if (!pp_alreadyInitialized && t()) {
631            pp_alreadyInitialized = true;
632            hashIndex = t();
633            hashRel = hashIndex;
634            hashIndex = hashIndex.substring(hashIndex.indexOf("/") + 1, hashIndex.length - 1);
635            hashRel = hashRel.substring(0, hashRel.indexOf("/"));
636            setTimeout(function () {
637                e("a[" + s.hook + "^='" + hashRel + "']:eq(" + hashIndex + ")").trigger("click")
638            }, 50)
639        }
640        return this.unbind("click.prettyphoto").bind("click.prettyphoto", e.prettyPhoto.initialize)
641    };
642})(jQuery);
643var pp_alreadyInitialized = false
644
645jQuery(document).ready(function(){
646	$= jQuery;
647	$("area[rel^='prettyPhoto']").prettyPhoto();
648	
649	$(".lightbox:first a[data-rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'pp_default',slideshow:3000, autoplay_slideshow:false});
650	$(".lightbox:gt(0) a[data-rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
651	
652	$(".lightbox-single a[data-rel^='prettyPhoto']").prettyPhoto({theme:'pp_default', autoplay_slideshow: false});
653
654	$("#custom_content a[data-rel^='prettyPhoto']:first").prettyPhoto({
655		custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
656		changepicturecallback: function(){ initialize(); }
657	});
658
659	$("#custom_content a[data-rel^='prettyPhoto']:last").prettyPhoto({
660		custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
661		changepicturecallback: function(){ _bsap.exec(); }
662	});
663	
664	$('a[data-rel]').each(function() {
665		$(this).attr('rel', $(this).data('rel'));
666	});
667});

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.