1/* ------------------------------------------------------------------------ 2Class: prettyPhoto 3Use: Lightbox clone for jQuery 4Author: Stephane Caron (http://www.no-margin-for-errors.com) 5Version: 3.1.2 6------------------------------------------------------------------------- */ 7!function(){var t=function(t){function e(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==i?"":i[1]}function i(t,e){var i="",o="",p=e+(arguments.length>2?"="+arguments[2]:"");if(i=1!=(t=t.split("#")).length&&t[1],1==(t=t[0].split("?")).length||""==t[1])o=t[0]+"?"+p;else{o=t[0]+"?";var a=t[1].split("&"),s=!1,n=!1;for(var l in a)"string"==typeof a[l]&&((s=a[l].split("="))[0]==e?(n=!0,o+=p+"&"):1==s.length?o+=s[0]+"&":o+=s[0]+"="+s[1]+"&");n?o=o.substring(0,o.length-1):o+=p}return o+(!1===i?"":"#"+i)}t.prettyPhoto={version:"3.1.2"},t.fn.prettyPhoto=function(o){o=t.extend({},{animation_speed:"fast",slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!1,overlay_gallery:!0,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,gallery_thumb_dimensions:{width:50,height:33},download_handler_url:"false",download_image_text:"Download image",allow_image_printing:!1,print_image_text:"Print image",show_social_sharing:!1,facebook_locale:"en_US",item_emailing_text:"Email the link",item_emailing_subject:"Look what I've found...",enable_item_emailing:!1,item_title_position:"top",gallery_ontop_item:!0,gallery_autohide:!0,markup:'<div class="pp_pic_holder">{pp_title_top}\t\t\t\t\t\t<div class="pp_top"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_content_container"> \t\t\t\t\t\t\t<div class="pp_left"> \t\t\t\t\t\t\t<div class="pp_right"> \t\t\t\t\t\t\t\t<div class="pp_content"> \t\t\t\t\t\t\t\t\t<div class="pp_loaderIcon"></div> \t\t\t\t\t\t\t\t\t<div class="pp_fade"> \t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_expand" title="Expand the image">Expand</a> \t\t\t\t\t\t\t\t\t\t<div class="pp_hoverContainer"> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_next" href="#">next</a> \t\t\t\t\t\t\t\t\t\t\t<a class="pp_previous" href="#">previous</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t\t<div id="pp_full_res"></div> \t\t\t\t\t\t\t\t\t\t<div class="pp_details"> \t\t\t\t\t\t\t\t\t\t\t<div class="pp_nav"> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t\t\t\t\t<p class="currentTextHolder">0/0</p> \t\t\t\t\t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t\t\t\t\t</div>{pp_title_bottom}\t\t\t\t\t\t\t\t\t\t\t<p class="pp_description"></p> \t\t\t\t\t\t\t\t\t\t\t{pp_tools_and_sharing} \t\t\t\t\t\t\t\t\t\t\t<a class="pp_close" href="#">Close</a> \t\t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="pp_bottom"> \t\t\t\t\t\t\t<div class="pp_left"></div> \t\t\t\t\t\t\t<div class="pp_middle"></div> \t\t\t\t\t\t\t<div class="pp_right"></div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_previous">Previous</a> \t\t\t\t\t\t\t\t<div> \t\t\t\t\t\t\t\t\t<ul> \t\t\t\t\t\t\t\t\t\t{gallery} \t\t\t\t\t\t\t\t\t</ul> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<a href="#" class="pp_arrow_next">Next</a> \t\t\t\t\t\t\t</div>',image_markup:'<img id="fullResImage" src="{path}" />',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>',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>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",tools_and_sharing:'<div class="pp_tools_and_sharing">\t\t\t\t\t\t\t\t<a id="pp_image_download_link" class="icon_link pp_image_down_link" href="#" title="{download_image_text}"></a>\t\t\t\t\t\t\t\t<a id="pp_print_image_link" class="icon_link pp_image_print_link" href="#" title="{print_image_text}"></a>\t\t\t\t\t\t\t\t<a id="pp_email_link" class="icon_link pp_send_email_link" href="#" title="{item_emailing_text}"></a>\t\t\t\t\t\t\t\t<div class="pp_social_tools"></div>\t\t\t\t\t\t\t</div>',social_tools:'\t\t\t\t\t\t\t\t\t<a href="//twitter.com/share" class="twitter-share-button" data-url="{location_href}" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"><\/script>\t\t\t\t\t\t\t\t\t<iframe src="//www.facebook.com/plugins/like.php?locale={facebook_locale}&href={location_href_encoded}&layout=button_count&show_faces=true&action=like&font&colorscheme=light&height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px; width: 100px;" allowTransparency="true"></iframe>\t\t\t\t\t\t\t\t\t<g:plusone size="medium" href="{location_href}" annotation="bubble"></g:plusone><script type="text/javascript">gapi.plusone.go();<\/script>\t\t\t\t\t\t\t\t\t<a href="//pinterest.com/pin/create/button/?url={location_href_encoded}&media={image_location}&description={item_title_encoded}" class="pin-it-button" count-layout="horizontal" target="_blank"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>'},o);var p,a,s,n,l,r,d,_,h,c,g,m=this,u=!1,f=t(window).height(),v=t(window).width(),w="",y="";function b(){t(".pp_loaderIcon").hide();var e=t("#pp_image_download_link"),i=x(pp_images[set_position]);"false"!==settings.download_handler_url&&w&&"image"==i?e.attr("href",w):e.hide(),settings.allow_image_printing&&"image"==i||$pp_pic_holder.find(".pp_image_print_link").hide(),settings.enable_item_emailing||$pp_pic_holder.find(".pp_send_email_link").hide(),projectedTop=scroll_pos.scrollTop+(f/2-p.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:p.contentHeight,width:p.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left
7:v/2-p.containerWidth/2,width:p.containerWidth},settings.animation_speed,function(){if($pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(p.height).width(p.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==x(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),p.resized?t("a.pp_expand,a.pp_contract").show():t("a.pp_expand").hide(),!settings.autoplay_slideshow||d||a||t.prettyPhoto.startSlideshow(),settings.deeplinking&&function(){if("undefined"==typeof theRel)return;location.hash="!"+theRel+"/"+edgpid+"/"}(),settings.show_social_sharing){var e=$pp_pic_holder.find("div.pp_social_tools"),i=settings.social_tools;i=i.replace("{facebook_locale}",settings.facebook_locale).replace(/{location_href_encoded}/g,(o=y,encodeURIComponent(o).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+"))).replace(/{location_href}/g,y).replace(/{image_location}/g,encodeURIComponent(window.location.protocol+"//"+window.location.host+pp_images[set_position])).replace(/{item_title_encoded}/g,encodeURIComponent(pp_titles[set_position])),e.html(i)}var o;settings.changepicturecallback(),a=!0,isSet&&settings.overlay_gallery&&$pp_gallery_li.find("img").each(function(){var e=t(this),i=e.parent();e.height()<settings.gallery_thumb_dimensions.height?i.height(e.height()).css({marginTop:Math.ceil((settings.gallery_thumb_dimensions.height-e.height())/2)}):(i.css({marginTop:0}),e.css({marginTop:-Math.ceil((e.height()-settings.gallery_thumb_dimensions.height)/2)}))})}),isSet&&settings.overlay_gallery&&"image"==x(pp_images[set_position])&&settings.ie6_fallback&&(!t.browser.msie||6!=parseInt(t.browser.version))?($pp_gallery.show(),itemWidth=settings.gallery_thumb_dimensions.width+7,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((p.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(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().attr("style","margin-top: "+(settings.gallery_thumb_dimensions.height/2-7)+"px !important"),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css({marginLeft:-(galleryWidth/2+navWidth/2),marginTop:settings.gallery_ontop_item?-(settings.gallery_thumb_dimensions.height+20):10}).css("display","block").find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).height(settings.gallery_thumb_dimensions.height+2).find("li").removeClass("selected").find("a").height(settings.gallery_thumb_dimensions.height),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,t.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):($pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave"),"object"==typeof $pp_gallery&&$pp_gallery.hide())}function k(e){$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(){t(".pp_loaderIcon").show(),e()})}function P(t,e){var i=!1,o=t,p=e;return $(t,e),(r>v||l>f)&&doresize&&settings.allow_resize&&!u&&(i=!0,imageRation=t/e,imageRation>(v-200)/(f-200)?(o=v-200,p=(v-200)/imageRation):(o=(f-200)*imageRation,p=f-200),l=p,r=o,$(o,p)),{width:Math.floor(o),height:Math.floor(p),containerHeight:Math.floor(l),containerWidth:Math.floor(r)+2*settings.horizontal_padding,contentHeight:Math.floor(s),contentWidth:Math.floor(n),resized:i}}function $(e,i){e=parseFloat(e),i=parseFloat(i),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(e),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),e<395?$pp_details.find(".pp_tools_and_sharing").height(49):$pp_details.find(".pp_tools_and_sharing").height("auto"),$pp_details=$pp_details.clone().addClass(settings.theme).width(e).appendTo(t("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height()+3,detailsHeight=detailsHeight<=34?36:detailsHeight,t.browser.msie&&7==t.browser.version&&(detailsHeight+=8),$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),"top"==settings.item_title_position&&$pp_title.width(e),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(t("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),s=i+detailsHeight,n=e,l=s+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),r=e}function x(t){return t.match(/youtube\.com\/watch/i)||t.match(/youtu\.be/i)?"youtube":t.match(/vimeo\.com/i)?"vimeo":t.match(/wistia\./i)?"wistia":t.match(/\biframe=true\b/i)?"
7iframe":t.match(/\b.mov\b/i)?"quicktime":t.match(/\b.swf\b/i)?"flash":t.match(/\bajax=true\b/i)?"ajax":t.match(/\bcustom=true\b/i)?"custom":"#"==t.substr(0,1)?"inline":"image"}function I(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=j(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=f/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>f)return;$pp_pic_holder.css({top:projectedTop,left:v/2+scroll_pos.scrollLeft-contentwidth/2})}}function j(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function T(e){if(settings.tools_and_sharing=settings.tools_and_sharing.replace("{download_image_text}",settings.download_image_text).replace("{print_image_text}",settings.print_image_text).replace("{item_emailing_text}",settings.item_emailing_text),settings.markup=settings.markup.replace("{pp_tools_and_sharing}",settings.tools_and_sharing?settings.tools_and_sharing:"").replace("{pp_title_top}","top"==settings.item_title_position?'<div class="ppt"> </div>':"").replace("{pp_title_bottom}","bottom"==settings.item_title_position?'<div class="ppt"> </div>':""),t("body").append(settings.markup),$pp_pic_holder=t(".pp_pic_holder"),$ppt=t(".ppt"),$pp_overlay=t("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="",$allItemsInGallery=t('a[rel="'+theRel+'"]');for(var i=0;i<pp_images.length;i++)pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[i]):(classname="default",img_src=$allItemsInGallery.eq(i).find("> img").attr("src")),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='"+settings.gallery_thumb_dimensions.width+"' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=t(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return t.prettyPhoto.changeGalleryPage("next"),t.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return t.prettyPhoto.changeGalleryPage("previous"),t.prettyPhoto.stopSlideshow(),!1}),settings.gallery_autohide&&$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").stop().fadeTo(400,1)},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").stop().fadeTo(400,0)}),$pp_gallery_li.each(function(e){t(this).find("a").click(function(){return t.prettyPhoto.changePage(e),t.prettyPhoto.stopSlideshow(),!1})})}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(){return t.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:t(document).height(),width:t(window).width()}).bind("click",function(){settings.modal||t.prettyPhoto.close()}),t("a.pp_close").bind("click",function(){return t.prettyPhoto.close(),!1}),t("a.pp_expand").bind("click",function(e){return t(this).hasClass("pp_expand")?(t(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(t(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),k(function(){t.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return t.prettyPhoto.changePage("previous"),t.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return t.prettyPhoto.changePage("next"),t.prettyPhoto.stopSlideshow(),!1}),I()}return doresize=!0,scroll_pos=j(),t(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){I(),f=t(window).height(),v=t(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(t(document).height()).width(v)}
7),o.keyboard_shortcuts&&t(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(e){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(e.keyCode){case 37:t.prettyPhoto.changePage("previous"),e.preventDefault();break;case 39:t.prettyPhoto.changePage("next"),e.preventDefault();break;case 27:settings.modal||t.prettyPhoto.close(),e.preventDefault()}}),t.prettyPhoto.initialize=function(){settings=o,"pp_default"==settings.theme&&(settings.horizontal_padding=16),settings.ie6_fallback&&t.browser.msie&&6==parseInt(t.browser.version)&&(settings.theme="light_square");var e=t(this);return theRel=e.attr("rel"),galleryRegExp=/_(?:.*)/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?t.map(m,function(e,i){if(-1!=t(e).attr("rel").indexOf(theRel))return t(e).attr("href")}):t.makeArray(e.attr("href")),pp_titles=isSet?t.map(m,function(e,i){if(-1!=t(e).attr("rel").indexOf(theRel))return t(e).find("img").attr("alt")?t(e).find("img").attr("alt"):""}):t.makeArray(e.find("img").attr("alt")),pp_descriptions=isSet?t.map(m,function(e,i){if(-1!=t(e).attr("rel").indexOf(theRel))return t(e).attr("pptitle")?t(e).attr("pptitle"):""}):t.makeArray(e.attr("pptitle")),set_position=t.inArray(e.attr("href"),pp_images),rel_index=isSet?set_position:t("a[rel^='"+theRel+"']").index(e),T(this),settings.allow_resize&&t(window).bind("scroll.prettyphoto",function(){I()}),$pp_pic_holder.delegate("#pp_print_image_link","click",function(){return printWindow=window.open("","mywindow","location=1,status=1,scrollbars=1,width=600,height=600"),printWindow.document.write('
7<div><img alt="" src="'+$pp_pic_holder.find("#fullResImage").attr("src")+'"/></div>'),printWindow.document.close(),printWindow.print(),!1}),$pp_pic_holder.delegate("#pp_email_link","click",function(){return window.location.href="mailto:?subject="+escape(settings.item_emailing_subject)+"&body="+encodeURIComponent(y),!1}),t.prettyPhoto.open(),!1},t.prettyPhoto.open=function(a){"undefined"==typeof settings&&(settings=o,t.browser.msie&&6==t.browser.version&&(settings.theme="light_square"),pp_images=t.makeArray(arguments[0]),pp_titles=arguments[1]?t.makeArray(arguments[1]):t.makeArray(""),pp_descriptions=arguments[2]?t.makeArray(arguments[2]):t.makeArray(""),isSet=pp_images.length>1,set_position=0,T(a.target));var s=t('a[rel="'+theRel+'"][href="'+pp_images[set_position]+'"]');w=s.attr("downhref")?s.attr("downhref"):"";var n=(y=s.attr("lbnestedurl")?s.attr("lbnestedurl"):location.href).substring(0,y.indexOf("#"));return url_rel=theRel.replace("_fullscreen",""),n&&(y=n),_=s.attr("edgpid"),h=s.attr("edgmid"),y=i(y,"edgpid",_)+"#!"+url_rel+"/id"+_+"/",void 0!=h&&(y=i(y,"edgmid",h)),t.browser.msie&&6==t.browser.version&&t("select").css("visibility","hidden"),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),t(pp_images).size()>1?t(".pp_nav").show():t(".pp_nav").hide(),t(".pp_loaderIcon").show(),$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+t(pp_images).size()),""!=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(e("width",pp_images[set_position]))?e("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(e("height",pp_images[set_position]))?e("height",pp_images[set_position]):settings.default_height.toString(),u=!1,-1!=movie_height.indexOf("%")&&(movie_height=parseFloat(t(window).height()*parseFloat(movie_height)/100-150),u=!0),-1!=movie_width.indexOf("%")&&(movie_width=parseFloat(t(window).width()*parseFloat(movie_width)/100-150),u=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&void 0!==pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" "),imgPreloader="",skipInjection=!1,x(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<t(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(){p=P(imgPreloader.width,imgPreloader.height),b()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),t.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":p=P(movie_width,movie_height),movie_id=e("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="//www.youtube.com/embed/"+movie_id,e("rel",pp_images[set_position])?movie+="?rel="+e("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":p=P(movie_width,movie_height),movie_id=pp_images[set_position];var i=movie_id.match(/http:\/\/(www\.)?vimeo.com\/(\d+)/);movie="//player.vimeo.com/video/"+i[2]+"?title=0&byline=0&portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=p.width+"/embed/?moog_width="+p.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,p.height).replace(/{path}/g,movie);break;case"wistia":p=P(movie_width,movie_height),frame_url=pp_images[set_position],toInject=settings.iframe_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{path}/g,frame_url);break;case"quicktime":(p=P(movie_width,movie_height)).height+=15,p.contentHeight+=15,p.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}
7/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":p=P(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,p.width).replace(/{height}/g,p.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":p=P(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,p.width).replace(/{height}/g,p.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,p=P(movie_width,movie_height),doresize=!0,skipInjection=!0,t.get(pp_images[set_position],function(t){toInject=settings.inline_markup.replace(/{content}/g,t),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,b()});break;case"custom":p=P(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=t(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(t("body")).show(),doresize=!1,p=P(t(myClone).width(),t(myClone).height()),doresize=!0,t(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,t(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,b())}),!1},t.prettyPhoto.changePage=function(e){currentGalleryPage=0,"previous"==e?(set_position--,set_position<0&&(set_position=t(pp_images).size()-1)):"next"==e?(set_position++,set_position>t(pp_images).size()-1&&(set_position=0)):set_position=e,rel_index=set_position,doresize||(doresize=!0),t(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),k(function(){t.prettyPhoto.open()})},t.prettyPhoto.changeGalleryPage=function(t){"next"==t?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==t?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=t,slide_speed="next"==t||"previous"==t?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},t.prettyPhoto.startSlideshow=function(){void 0===d?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return t.prettyPhoto.stopSlideshow(),!1}),d=setInterval(t.prettyPhoto.startSlideshow,settings.slideshow)):t.prettyPhoto.changePage("next")},t.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return t.prettyPhoto.startSlideshow(),!1}),clearInterval(d),d=void 0},t.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(t.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),t("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){t(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){t.browser.msie&&6==t.browser.version&&t("select").css("visibility","visible"),settings.hideflash&&t("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),t(this).remove(),t(window).unbind("scroll.prettyphoto"),-1!=location.href.indexOf("#!")&&(location.hash=""),settings.callback(),doresize=!0,a=!1}))},-1==location.search.indexOf("_escaped_fragment_=")?(url=location.href,hashtag=-1!=url.indexOf("#!")&&decodeURI(url.substring(url.indexOf("#!")+2,url.length)),c=hashtag):(c=location.search.substring(location.search.indexOf("_escaped_fragment_=")+19),c=decodeURIComponent(c.substring(0,c.indexOf("&")))),!pp_alreadyInitialized&&c&&(pp_alreadyInitialized=!0,g=c,c=c.substring(c.indexOf("/")+1,c.length-1),function e(i,o,p){if(i>=100)return;var a=-1!=p.indexOf("id");setTimeout(function(){var s;0!==(s=a?t("a[rel='"+o+"'][edgpid='"+p.substring(p.indexOf("id")+2,p.length)+"']"):t("a[rel='"+o+"']").eq(p)).length?s.trigger("click"):e(i+1,o,p)},100)}(0,g=g.substring(0,g.indexOf("/")),c)),this.unbind("click.prettyphoto").bind("click.prettyphoto",t.prettyPhoto.initialize)}};"undefined"!=typeof jQuery&&t(jQuery),"undefined"!=typeof eds1_10&&t(eds1_10)}();var 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.