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.6 6------------------------------------------------------------------------- */ 7! function(e) { 8 function t() { 9 var e = location.href; 10 return hashtag = -1 !== e.indexOf("#prettyPhoto") ? decodeURI(e.substring(e.indexOf("#prettyPhoto") + 1, e.length)) : !1, hashtag && (hashtag = hashtag.replace(/<|>/g, "")), hashtag 11 } 12 13 function i() { 14 "undefined" != typeof theRel && (location.hash = theRel + "/" + rel_index + "/") 15 } 16 17 function p() { 18 -1 !== location.href.indexOf("#prettyPhoto") && (location.hash = "prettyPhoto") 19 } 20 21 function o(e, t) { 22 e = e.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); 23 var i = "[\\?&]" + e + "=([^&#]*)", 24 p = new RegExp(i), 25 o = p.exec(t); 26 return null == o ? "" : o[1] 27 } 28 e.prettyPhoto = { 29 version: "3.1.6" 30 }, e.fn.prettyPhoto = function(a) { 31 function s() { 32 e(".pp_loaderIcon").hide(), projectedTop = scroll_pos.scrollTop + (I / 2 - f.containerHeight / 2), projectedTop < 0 && (projectedTop = 0), $ppt.fadeTo(settings.animation_speed, 1), $pp_pic_holder.find(".pp_content").animate({ 33 height: f.contentHeight, 34 width: f.contentWidth 35 }, settings.animation_speed), $pp_pic_holder.animate({ 36 top: projectedTop, 37 left: j / 2 - f.containerWidth / 2 < 0 ? 0 : j / 2 - f.containerWidth / 2, 38 width: f.containerWidth 39 }, settings.animation_speed, function() { 40 $pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(f.height).width(f.width), $pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed), isSet && "image" == h(pp_images[set_position]) ? $pp_pic_holder.find(".pp_hoverContainer").show() : $pp_pic_holder.find(".pp_hoverContainer").hide(), settings.allow_expand && (f.resized ? e("a.pp_expand,a.pp_contract").show() : e("a.pp_expand").hide()), !settings.autoplay_slideshow || P || v || e.prettyPhoto.startSlideshow(), settings.changepicturecallback(), v = !0 41 }), m(), a.ajaxcallback() 42 } 43 44 function n(t) { 45 $pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", "hidden"), $pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed, function() { 46 e(".pp_loaderIcon").show(), t() 47 }) 48 } 49 50 function r(t) { 51 t > 1 ? e(".pp_nav").show() : e(".pp_nav").hide() 52 } 53 54 function l(e, t) { 55 if (resized = !1, d(e, t), imageWidth = e, imageHeight = t, (k > j || b > I) && doresize && settings.allow_resize && !$) { 56 for (resized = !0, fitting = !1; !fitting;) k > j ? (imageWidth = j - 200, imageHeight = t / e * imageWidth) : b > I ? (imageHeight = I - 200, imageWidth = e / t * imageHeight) : fitting = !0, b = imageHeight, k = imageWidth; 57 (k > j || b > I) && l(k, b), d(imageWidth, imageHeight) 58 } 59 return { 60 width: Math.floor(imageWidth), 61 height: Math.floor(imageHeight), 62 containerHeight: Math.floor(b), 63 containerWidth: Math.floor(k) + 2 * settings.horizontal_padding, 64 contentHeight: Math.floor(y), 65 contentWidth: Math.floor(w), 66 resized: resized 67 } 68 } 69 70 function d(t, i) { 71 t = parseFloat(t), i = parseFloat(i), $pp_details = $pp_pic_holder.find(".pp_details"), $pp_details.width(t), detailsHeight = parseFloat($pp_details.css("marginTop")) + parseFloat($pp_details.css("marginBottom")), $pp_details = $pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({ 72 position: "absolute", 73 top: -1e4 74 }), detailsHeight += $pp_details.height(), detailsHeight = detailsHeight <= 34 ? 36 : detailsHeight, $pp_details.remove(), $pp_title = $pp_pic_holder.find(".ppt"), $pp_title.width(t), titleHeight = parseFloat($pp_title.css("marginTop")) + parseFloat($pp_title.css("marginBottom")), $pp_title = $pp_title.clone().appendTo(e("body")).css({ 75 position: "absolute", 76 top: -1e4 77 }), titleHeight += $pp_title.height(), $pp_title.remove(), y = i + detailsHeight, w = t, b = y + titleHeight + $pp_pic_holder.find(".pp_top").height() + $pp_pic_holder.find(".pp_bottom").height(), k = t 78 } 79 80 function h(e) { 81 return e.match(/youtube\.com\/watch/i) || e.match(/youtu\.be/i) ? "youtube" : e.match(/vimeo\.com/i) ? "vimeo" : e.match(/\b.mov\b/i) ? "quicktime" : e.match(/\b.swf\b/i) ? "flash" : e.match(/\biframe=true\b/i) ? "iframe" : e.match(/\bajax=true\b/i) ? "ajax" : e.match(/\bcustom=true\b/i) ? "custom" : "#" == e.substr(0, 1) ? "inline" : "image" 82 } 83 84 function c() { 85 if (doresize && "undefined" != typeof $pp_pic_holder) { 86 if (scroll_pos = _(), contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(), projectedTop = I / 2 + scroll_pos.scrollTop - contentHeight / 2, projectedTop < 0 && (projectedTop = 0), contentHeight > I) return; 87 $pp_pic_holder.css({ 88 top: projectedTop, 89 left: j / 2 + scroll_pos.scrollLeft - contentwidth / 2 90 }) 91 } 92 } 93 94 function _() { 95 return self.pageYOffset ? { 96 scrollTop: self.pageYOffset, 97 scrollLeft: self.pageXOffset 98 } : document.documentElement && document.documentElement.scrollTop ? { 99 scrollTop: document.documentElement.scrollTop, 100 scrollLeft: document.documentElement.scrollLeft 101 } : document.body ? { 102 scrollTop: document.body.scrollTop, 103 scrollLeft: document.body.scrollLeft 104 } : void 0 105 } 106 107 function g() { 108 I = e(window).height(), j = e(window).width(), "undefined" != typeof $pp_overlay && $pp_overlay.height(e(document).height()).width(j) 109 } 110 111 function m() { 112 isSet && settings.overlay_gallery && "image" == h(pp_images[set_position]) ? (itemWidth = 57, navWidth = "facebook" == settings.theme || "pp_default" == settings.theme ? 50 : 30, itemsPerPage = Math.floor((f.containerWidth - 100 - navWidth) / itemWidth), itemsPerPage = itemsPerPage < pp_images.length ? itemsPerPage : pp_images.length, totalPage = Math.
112ceil(pp_images.length / itemsPerPage) - 1, 0 == totalPage ? (navWidth = 0, $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()) : $pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(), galleryWidth = itemsPerPage * itemWidth, fullGalleryWidth = pp_images.length * itemWidth, $pp_gallery.css("margin-left", -(galleryWidth / 2 + navWidth / 2)).find("div:first").width(galleryWidth + 5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"), goToPage = Math.floor(set_position / itemsPerPage) < totalPage ? Math.floor(set_position / itemsPerPage) : totalPage, e.prettyPhoto.changeGalleryPage(goToPage), $pp_gallery_li.filter(":eq(" + set_position + ")").addClass("selected")) : $pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave") 113 } 114 115 function u() { 116 if (settings.social_tools && (facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href))), settings.markup = settings.markup.replace("{pp_social}", ""), e("body").append(settings.markup), $pp_pic_holder = e(".pp_pic_holder"), $ppt = e(".ppt"), $pp_overlay
116= e("div.pp_overlay"), isSet && settings.overlay_gallery) { 117 currentGalleryPage = 0, toInject = ""; 118 for (var t = 0; t < pp_images.length; t++) pp_images[t].match(/\b(jpg|jpeg|png|gif)\b/gi) ? (classname = "", img_src = pp_images[t]) : (classname = "default", img_src = ""), toInject += "<li class='" + classname + "'><a href='#'><img src='" + img_src + "' width='50' alt='' /></a></li>"; 119 toInject = settings.gallery_markup.replace(/{gallery}/g, toInject), $pp_pic_holder.find("#pp_full_res").after(toInject), $pp_gallery = e(".pp_pic_holder .pp_gallery"), $pp_gallery_li = $pp_gallery.find("li"), $pp_gallery.find(".pp_arrow_next").click(function() { 120 return e.prettyPhoto.changeGalleryPage("next"), e.prettyPhoto.stopSlideshow(), !1 121 }), $pp_gallery.find(".pp_arrow_previous").click(function() { 122 return e.prettyPhoto.changeGalleryPage("previous"), e.prettyPhoto.stopSlideshow(), !1 123 }), $pp_pic_holder.find(".pp_content").hover(function() { 124 $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn() 125 }, function() { 126 $pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut() 127 }), itemWidth = 57, $pp_gallery_li.each(function(t) { 128 e(this).find("a").click(function() { 129 return e.prettyPhoto.changePage(t), e.prettyPhoto.stopSlideshow(), !1 130 }) 131 }) 132 } 133 settings.slideshow && ($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'), $pp_pic_holder.find(".pp_nav .pp_play").click(function() { 134 return e.prettyPhoto.startSlideshow(), !1 135 })), $pp_pic_holder.attr("class", "pp_pic_holder " + settings.theme), $pp_overlay.css({ 136 opacity: 0, 137 height: e(document).height(), 138 width: e(window).width() 139 }).bind("click", function() { 140 settings.modal || e.prettyPhoto.close() 141 }), e("a.pp_close").bind("click", function() { 142 return e.prettyPhoto.close(), !1 143 }), settings.allow_expand && e("a.pp_expand").bind("click", function() { 144 return e(this).hasClass("pp_expand") ? (e(this).removeClass("pp_expand").addClass("pp_contract"), doresize = !1) : (e(this).removeClass("pp_contract").addClass("pp_expand"), doresize = !0), n(function() { 145 e.prettyPhoto.open() 146 }), !1 147 }), $pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click", function() { 148 return e.prettyPhoto.changePage("previous"), e.prettyPhoto.stopSlideshow(), !1 149 }), $pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click", function() { 150 return e.prettyPhoto.changePage("next"), e.prettyPhoto.stopSlideshow(), !1 151 }), c() 152 } 153 a = jQuery.extend({ 154 hook: "rel", 155 animation_speed: "fast", 156 ajaxcallback: function() {}, 157 slideshow: 5e3, 158 autoplay_slideshow: !1, 159 opacity: .8, 160 show_title: !0, 161 allow_resize: !0, 162 allow_expand: !0, 163 default_width: 500, 164 default_height: 344, 165 counter_separator_label: "/", 166 theme: "pp_default", 167 horizontal_padding: 20, 168 hideflash: !1, 169 wmode: "opaque", 170 autoplay: !0, 171 modal: !1, 172 deeplinking: !0, 173 overlay_gallery: !0, 174 overlay_gallery_max: 30, 175 keyboard_shortcuts: !0, 176 changepicturecallback: function() {}, 177 callback: function() {}, 178 ie6_fallback: !0, 179 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>', 180 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>', 181 image_markup: '<img id="fullResImage" src="{path}" />', 182 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>', 183 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>', 184 iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', 185 inline_markup: '<div class="pp_inline">{content}</div>', 186 custom_markup: "", 187 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>' 188 }, a); 189 var f, v, y, w, b, k, P, x = this, 190 $ = !1, 191 I = e(window).height(), 192 j = e(window).width(); 193 return doresize = !0, scroll_pos = _(), e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto", function() { 194 c(), g() 195 }
195), a.keyboard_shortcuts && e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto", function(t) { 196 if ("undefined" != typeof $pp_pic_holder && $pp_pic_holder.is(":visible")) switch (t.keyCode) { 197 case 37: 198 e.prettyPhoto.changePage("previous"), t.preventDefault(); 199 break; 200 case 39: 201 e.prettyPhoto.changePage("next"), t.preventDefault(); 202 break; 203 case 27: 204 settings.modal || e.prettyPhoto.close(), t.preventDefault() 205 } 206 }), e.prettyPhoto.initialize = function() { 207 return settings = a, "pp_default" == settings.theme && (settings.horizontal_padding = 16), theRel = e(this).attr(settings.hook), galleryRegExp = /\[(?:.*)\]/, isSet = galleryRegExp.exec(theRel) ? !0 : !1, pp_images = isSet ? jQuery.map(x, function(t) { 208 return -1 != e(t).attr(settings.hook).indexOf(theRel) ? e(t).attr("href") : void 0 209 }) : e.makeArray(e(this).attr("href")), pp_titles = isSet ? jQuery.map(x, function(t) { 210 return -1 != e(t).attr(settings.hook).indexOf(theRel) ? e(t).find("img").attr("alt") ? e(t).find("img").attr("alt") : "" : void 0 211 }) : e.makeArray(e(this).find("img").attr("alt")), pp_descriptions = isSet ? jQuery.map(x, function(t) { 212 return -1 != e(t).attr(settings.hook).indexOf(theRel) ? e(t).attr("title") ? e(t).attr("title") : "" : void 0 213 }) : e.makeArray(e(this).attr("title")), pp_images.length > settings.overlay_gallery_max && (settings.overlay_gallery = !1), set_position = jQuery.inArray(e(this).attr("href"), pp_images), rel_index = isSet ? set_position : e("a[" + settings.hook + "^='" + theRel + "']").index(e(this)), u(this), settings.allow_resize && e(window).bind("scroll.prettyphoto", function() { 214 c() 215 }), e.prettyPhoto.open(), !1 216 }, e.prettyPhoto.open = function(t) { 217 return "undefined" == typeof settings && (settings = a, pp_images = e.makeArray(arguments[0]), pp_titles = e.makeArray(arguments[1] ? arguments[1] : ""), pp_descriptions = e.makeArray(arguments[2] ? arguments[2] : ""), isSet = pp_images.length > 1 ? !0 : !1, set_position = arguments[3] ? arguments[3] : 0, u(t.target)), settings.hideflash && e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "hidden"), r(e(pp_images).size()), e(".pp_loaderIcon").show(), settings.deeplinking && i(), settings.social_tools && (facebook_like_link = settings.social_tools.replace("{location_href}", encodeURIComponent(location.href)), $pp_pic_holder.find(".pp_social").html(facebook_like_link)), $ppt.is(":hidden") && $ppt.css("opacity", 0).show(), $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity), $pp_pic_holder.find(".currentTextHolder").text(set_position + 1 + settings.counter_separator_label + e(pp_images).size()), "undefined" != typeof pp_descriptions[set_position] && "" != pp_descriptions[set_position] ? $pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])) : $pp_pic_holder.find(".pp_description").hide(), movie_width = parseFloat(o("width", pp_images[set_position])) ? o("width", pp_images[set_position]) : settings.default_width.toString(), movie_height = parseFloat(o("height", pp_images[set_position])) ? o("height", pp_images[set_position]) : settings.default_height.toString(), $ = !1, -1 != movie_height.indexOf("%") && (movie_height = parseFloat(e(window).height() * parseFloat(movie_height) / 100 - 150), $ = !0), -1 != movie_width.indexOf("%") && (movie_width = parseFloat(e(window).width() * parseFloat(movie_width) / 100 - 150), $ = !0), $pp_pic_holder.fadeIn(function() { 218 switch ($ppt.html(settings.show_title && "" != pp_titles[set_position] && "undefined" != typeof pp_titles[set_position] ? unescape(pp_titles[set_position]) : " "), imgPreloader = "", skipInjection = !1, h(pp_images[set_position])) { 219 case "image": 220 imgPreloader = new Image, nextImage = new Image, isSet && set_position < e(pp_images).size() - 1 && (nextImage.src = pp_images[set_position + 1]), prevImage = new Image, isSet && pp_images[set_position - 1] && (prevImage.src = pp_images[set_position - 1]), $pp_pic_holder.find("#pp_full_res")[0].innerHTML = settings.image_markup.replace(/{path}/g, pp_images[set_position]), imgPreloader.onload = function() { 221 f = l(imgPreloader.width, imgPreloader.height), s() 222 }, imgPreloader.onerror = function() { 223 alert("Image cannot be loaded. Make sure the path is correct and image exist."), e.prettyPhoto.close() 224 }, imgPreloader.src = pp_images[set_position]; 225 break; 226 case "youtube": 227 f = l(movie_width, movie_height), movie_id = o("v", pp_images[set_position]), "" == movie_id && (movie_id = pp_images[set_position].split("youtu.be/"), movie_id = movie_id[1], movie_id.indexOf("?") > 0 && (movie_id = movie_id.substr(0, movie_id.indexOf("?"))), movie_id.indexOf("&") > 0 && (movie_id = movie_id.substr(0, movie_id.indexOf("&")))), movie = "https://www.youtube.com/embed/" + movie_id, movie += o("rel", pp_images[set_position]) ? "?rel=" + o("rel", pp_images[set_position]) : "?rel=1", settings.autoplay && (movie += "&autoplay=1"), toInject = settings.iframe_markup.replace(/{width}/g, f.width).replace(/{height}/g, f.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie); 228 break; 229 case "vimeo": 230 f = l(movie_width, movie_height), movie_id = pp_images[set_position]; 231 var t = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/, 232 i = movie_id.match(t); 233 movie = "https://player.vimeo.com/video/" + i[3] + "?title=0&byline=0&portrait=0", settings.autoplay && (movie += "&autoplay=1;
233"), vimeo_width = f.width + "/embed/?moog_width=" + f.width, toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, f.height).replace(/{path}/g, movie); 234 break; 235 case "quicktime": 236 f = l(movie_width, movie_height), f.height += 15, f.contentHeight += 15, f.containerHeight += 15, toInject = settings.quicktime_markup.replace(/{width}/g, f.width).replace(/{height}/g, f.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); 237 break; 238 case "flash": 239 f = l(movie_width, movie_height), flash_vars = pp_images[set_position], flash_vars = flash_vars.substring(pp_images[set_position].indexOf("flashvars") + 10, pp_images[set_position].length), filename = pp_images[set_position], filename = filename.substring(0, filename.indexOf("?")), toInject = settings.flash_markup.replace(/{width}/g, f.width).replace(/{height}/g, f.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + "?" + flash_vars); 240 break; 241 case "iframe": 242 f = l(movie_width, movie_height), frame_url = pp_images[set_position], frame_url = frame_url.substr(0, frame_url.indexOf("iframe") - 1), toInject = settings.iframe_markup.replace(/{width}/g, f.width).replace(/{height}/g, f.height).replace(/{path}/g, frame_url); 243 break; 244 case "ajax": 245 doresize = !1, f = l(movie_width, movie_height), doresize = !0, skipInjection = !0, e.get(pp_images[set_position], function(e) { 246 toInject = settings.inline_markup.replace(/{content}/g, e), $pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject, s() 247 }); 248 break; 249 case "custom": 250 f = l(movie_width, movie_height), toInject = settings.custom_markup; 251 break; 252 case "inline": 253 myClone = e(pp_images[set_position]).clone().append('<br clear="all" />').css({ 254 width: settings.default_width 255 }).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(e("body")).show(), doresize = !1, f = l(e(myClone).width(), e(myClone).height()), doresize = !0, e(myClone).remove(), toInject = settings.inline_markup.replace(/{content}/g, e(pp_images[set_position]).html()) 256 } 257 imgPreloader || skipInjection || ($pp_pic_holder.find("#pp_full_res")[0].innerHTML = toInject, s()) 258 }), !1 259 }, e.prettyPhoto.changePage = function(t) { 260 currentGalleryPage = 0, "previous" == t ? (set_position--, set_position < 0 && (set_position = e(pp_images).size() - 1)) : "next" == t ? (set_position++, set_position > e(pp_images).size() - 1 && (set_position = 0)) : set_position = t, rel_index = set_position, doresize || (doresize = !0), settings.allow_expand && e(".pp_contract").removeClass("pp_contract").addClass("pp_expand"), n(function() { 261 e.prettyPhoto.open() 262 }) 263 }, e.prettyPhoto.changeGalleryPage = function(e) { 264 "next" == e ? (currentGalleryPage++, currentGalleryPage > totalPage && (currentGalleryPage = 0)) : "previous" == e ? (currentGalleryPage--, currentGalleryPage < 0 && (currentGalleryPage = totalPage)) : currentGalleryPage = e, slide_speed = "next" == e || "previous" == e ? settings.animation_speed : 0, slide_to = currentGalleryPage * itemsPerPage * itemWidth, $pp_gallery.find("ul").animate({ 265 left: -slide_to 266 }, slide_speed) 267 }, e.prettyPhoto.startSlideshow = function() { 268 "undefined" == typeof P ? ($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function() { 269 return e.prettyPhoto.stopSlideshow(), !1 270 }), P = setInterval(e.prettyPhoto.startSlideshow, settings.slideshow)) : e.prettyPhoto.changePage("next") 271 }, e.prettyPhoto.stopSlideshow = function() { 272 $pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function() { 273 return e.prettyPhoto.startSlideshow(), !1 274 }), clearInterval(P), P = void 0 275 }, e.prettyPhoto.close = function() { 276 $pp_overlay.is(":animated") || (e.prettyPhoto.stopSlideshow(), $pp_pic_holder.stop().find("object,embed").css("visibility", "hidden"), e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed, function() { 277 e(this).remove() 278 }), $pp_overlay.fadeOut(settings.animation_speed, function() { 279 settings.hideflash && e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "visible"), e(this).remove(), e(window).unbind("scroll.prettyphoto"), p(), settings.callback(), doresize = !0, v = !1, delete settings 280 })) 281 }, !pp_alreadyInitialized && t() && (pp_alreadyInitialized = !0, hashIndex = t(), hashRel = hashIndex, hashIndex = hashIndex.substring(hashIndex.indexOf("/") + 1, hashIndex.length - 1), hashRel = hashRel.substring(0, hashRel.indexOf("/")), setTimeout(function() { 282 e("a[" + a.hook + "^='" + hashRel + "']:eq(" + hashIndex + ")").trigger("click") 283 }, 50)), this.unbind("click.prettyphoto").bind("click.prettyphoto", e.prettyPhoto.initialize) 284 } 285}(jQuery); 286var pp_alreadyInitialized = !1;
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.