PageSourceSearch

https://www.afmq.com/client_file/themes/default/javascript/jquery.prettyPhoto.js

js afmq.com collected 2026-09-26 09:37:36 UTC 33,660 bytes, 637 lines download raw bytes

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

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.