1/* 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.6 7 Customization: by Firsh for Justified Image Grid v3.9.7 8------------------------------------------------------------------------- */ 9function loadJIGprettyPhoto(a){function O(){var a=!1;var g=location.hash;g=g.replace("%5B","[");g=g.replace("%5D","]");g=g.replace(/([^|])(poster=|videoplayer)/mg,"$1|$2");g=g.match(/^#!?([\w\-[\]]+?\/(?:(\d+)(?=\/))?(https?:\/\/[^&]*)?([A-Z]{2}\/[_\w]*)?)/im);null!==g&&(a=g[1]);return a}function T(a){if("undefined"!=typeof theRel){var c=!1;if(1==settings.smart_deeplinking&&a){a=a.filter("[href='"+pp_images[set_position]+"']");c=a.attr("class");-1===c.indexOf("jig-contentID")&&(c=a.closest(".jig-imageContainer").attr("class")); 10a=/(?:jig-contentID)-(\w{2})-([^\s]*)/im.exec(c);null!=a&&(a=a[1]+"/"+a[2]);if(a){location.hash="!"+theRel+"/"+a;return}c=!0}location.hash=1==settings.advanced_deeplinking||1==c?"!"+theRel+"/"+pp_images[set_position]:theRel+"/"+rel_index+"/"}}function u(a,g){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c=(new RegExp("[\\?&]"+a+"=([^&#]*)")).exec(g);return null==c?"":c[1]}function P(){var c=a(".jig_pp_pinterest"),g=a(".pp_details .pp_social").height(),k=a(".pp_bottom_right").position().top; 11if(0!==c.length){var h=c.get(0).scrollWidth;c=c.find("> span");0!==h&&"undefined"!==typeof c.attr("data-pin-log")?(a(".jig_pp_pinterest").addClass("jig_pp_measured_pinterest").width(h),k<a(".pp_bottom_right").position().top?a(".pp_content").height(a(".pp_content").height()+a(".pp_bottom_right").position().top-k):g<a(".pp_details .pp_social").height()&&a(".pp_content").height(a(".pp_content").height()+a(".pp_details .pp_social").height()-g),"undefined"!==typeof x&&(v=0,clearTimeout(x))):30>v&&(x=setTimeout(function(){v++; 12P()},500))}}a.prettyPhoto={version:"3.1.6"};a.prettyPhoto.JIG=!0;a.fn.prettyPhoto=function(c){function g(a,d){a=k(a);d=(((d||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");return a.replace(/\x3c!--[\s\S]*?--\x3e|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(a,b){return-1<d.indexOf("<"+b.toLowerCase()+">")?a:""})}function k(a,d){if(void 0===a)return"";var b=0,c=!1;"undefined"===typeof d&&(d=2);a=a.toString().replace(/</g,"<").replace(/>/g,">"); 13var e={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};0===d&&(c=!0);if("number"!==typeof d){d=[].concat(d);for(var f=0,g=d.length;f<g;f+=1)0===e[d[f]]?c=!0:e[d[f]]&&(b|=e[d[f]]);d=b}d&e.ENT_HTML_QUOTE_SINGLE&&(a=a.replace(/�*39;/g,"'"));c||(a=a.replace(/"/g,'"'));return a=a.replace(/&/g,"&")}function h(){a(".pp_loaderIcon").hide();projectedTop=scroll_pos.scrollTop+(y/2-e.containerHeight/2);0>projectedTop&&(projectedTop=0);$ppt.fadeTo(settings.animation_speed, 141,"JIGswing");$pp_pic_holder.find(".pp_content").animate({height:e.imageHeight,width:e.imageWidth},settings.animation_speed,"JIGeaseInOutQuad");$pp_pic_holder.animate({top:projectedTop,left:0>w/2-e.containerWidth/2?0:w/2-e.containerWidth/2,width:e.containerWidth},settings.animation_speed,"JIGeaseInOutQuad",function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(e.height).width(e.width);$pp_pic_holder.find(".pp_fade").fadeIn({duration:settings.animation_speed,easing:"JIGswing",complete:function(){if(settings.social_tools){if(-1!== 15H){var b=a(".jig_pp_facebook"),d=a('<iframe src="'+b.data("src")+'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe>');b.empty().append(d)}-1!==I&&(b=a(".jig_pp_twitter"),d=a('<iframe src="'+b.data("src")+'" width="61" height="20" title="Twitter Tweet Button" style="border: 0; overflow: hidden;" scrolling="no"></iframe>'),b.empty().append(d));-1!==J&&(b=jQuery(".jig_pp_pinterest"),d=jQuery('<a href="'+b.data("href")+ 16'" class="pin-it-button" data-pin-do="buttonPin" data-pin-config="beside" data-pin-save="true"></a>'),b.empty().append(d),window.jigBuildPinterestButton(b[0]),P());-1!==K&&(b=a(".jig_pp_google"),d=a('<g:plusone size="medium" annotation="none" href="'+b.data("href")+'"></g:plusone>'),b.empty().append(d),document.getElementById("jigGooglePlus")?gapi.plusone.go():(b=document.createElement("script"),b.type="text/javascript",b.async=!0,b.src="https://apis.google.com/js/plusone.js",b.id="jigGooglePlus", 17d=document.getElementsByTagName("script")[0],d.parentNode.insertBefore(b,d)))}}});isSet&&"image"==v(pp_images[set_position])&&1<pp_images.length?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide();settings.allow_expand&&(e.resized?a("a.pp_expand,a.pp_contract").show():a("a.pp_expand").hide());!settings.autoplay_slideshow||z||L||a.prettyPhoto.startSlideshow();settings.changepicturecallback();L=!0});isSet&&settings.overlay_gallery&&"image"==v(pp_images[set_position])? 18(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((e.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(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth, 19$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,a.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$p
19p_pic_holder.find(".pp_content").off("mouseenter mouseleave");c.ajaxcallback()}function l(b){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility", 20"hidden");$pp_pic_holder.find(".pp_fade").fadeOut({duration:settings.animation_speed,easing:"JIGswing",complete:function(){a(".pp_loaderIcon").show();b()}})}function M(b){1<b?a(".pp_nav").removeClass("pp_nav_hidden"):a(".pp_nav").addClass("pp_nav_hidden")}function m(a,d){x(a,d);g=!1;var b=w-50,c=y-40,e=a,f=d;if((A>b||B>c)&&doresize&&settings.allow_resize&&!D)for(var g=!0,h=!0,l=!1;h;)A>b&&(e=Math.min(b,e)-20,f=d/a*e,200>e&&(e=200,f=d/a*e,l=!0)),B>c&&(f=Math.min(c,f)-20,e=a/d*f,200>f&&(f=200,e=a/d* 21f,l=!0)),x(e,f),h=0==l&&(A>b||B>c)?!0:!1;E();return{width:Math.floor(e),height:Math.floor(f),containerHeight:Math.floor(B),containerWidth:Math.floor(A)+2*settings.horizontal_padding,imageHeight:Math.floor(N),imageWidth:Math.floor(Q),resized:g}}function x(b,d){b=parseFloat(b);d=parseFloat(d);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(b);var c=0,e="facebook"!==settings.theme?settings.theme:"pp_facebook";e=a('<div class="prettyPhotoTemporaryMeasure"><div class="pp_content_container"></div></div>').addClass(e).css({position:"absolute", 22top:-1E4}).appendTo("body");$pp_details=$pp_details.clone().width(b).appendTo(e.find(".pp_content_container"));if("inside"==settings.title_position){a(".pp_details.pp_includes_title").removeClass("pp_alt_x_position pp_alt_br_position pp_socials_own_line");
22a(".pp_details .pp_nav, .pp_details .pp_description, .pp_details .pp_bottom_right").removeAttr("style");var f=$pp_details.find(".pp_description:visible");0!==f.length&&0===f.position().left?(a(".pp_details .pp_description").css("margin-right",0).prev().css("margin-right", 2348),$pp_details.find(".pp_social").outerWidth(!0)<$pp_details.width()-$pp_details.find(".pp_nav").outerWidth(!0)?a(".pp_details.pp_includes_title").addClass("pp_alt_br_position"):a(".pp_details.pp_includes_title").addClass("pp_alt_x_position")):$pp_details.find(".pp_bottom_right").position().top&&(0===f.length||30<$pp_details.find(".pp_social").height()?a(".pp_details.pp_includes_title").addClass("pp_alt_x_position"):a(".pp_details .pp_description").css("margin-right",0),a(".pp_details .pp_bottom_right").css("float", 24"none"),1==$pp_details.find(".pp_social").length&&a(".pp_details.pp_includes_title").addClass("pp_socials_own_line"))}c+=e.outerHeight(!0);c=34>=c?36:c;e.remove();titleHeight=0;"inside"!==settings.title_position&&($pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(b),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(a("body")).css({position:"absolute",top:-1E4}),titleHeight+=$pp_title.height(),$pp_title.remove());N= 25d+c;Q=b;B=N+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();A=b}function v(a){return a.match(/\b\|videoplayer\b/i)?"videoplayer":a.match(/youtube\.com\/watch/i)||a.match(/youtu\.be/i)?"youtube":a.match(/vimeo\.com/i)?"vimeo":a.match(/\b.mov\b/i)?"quicktime":a.match(/\b.swf\b/i)?"flash":a.match(/\biframe=true\b/i)?"
25iframe":a.match(/\bajax=true\b/i)?"ajax":a.match(/\bcustom=true\b/i)?"custom":"#"==a.substr(0,1)?"inline":"image"}function E(){if(doresize&& 26"undefined"!=typeof $pp_pic_holder){scroll_pos=R();var a=$pp_pic_holder.height(),c=$pp_pic_holder.width();projectedTop=y/2+scroll_pos.scrollTop-a/2;0>projectedTop&&(projectedTop=0);a>y||$pp_pic_holder.css({top:projectedTop,left:w/2+scroll_pos.scrollLeft-c/2})}}function R(){if(self.pageYOffset)return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};if(document.documentElement&&document.documentElement.scrollTop)return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}; 27if(document.body)return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}function S(b){settings.markup=settings.markup.replace("{pp_social}","");a("body").append(settings.markup);$pp_pic_holder=a(".pp_pic_holder");$ppt=a(".ppt");$pp_overlay=a("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(b=0;b<pp_images.length;b++){if(pp_images[b].match(/\b(jpg|jpeg|png|webp|bmp|gif)\b/gi))if(classname="","undefined"!==typeof q){if(img_src=q.find('a.jig-link[href="'+ 28pp_images[b]+'"]:not(.jig-hiddenLink) img').eq(0).attr("src"),"undefined"==typeof img_src||"data:"===img_src.substr(0,5))img_src=pp_images[b]}else img_src=pp_images[b];else classname=' class="default"',img_src="";toInject+="<li"+classname+'><a href="#"><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" style="background-image: url('+img_src+');" alt="'+encodeURIComponent(g(pp_titles[b].replace(/<a(?:.+?)href=['"](.+?)['"](?:.+?>)(.+?)(?:<\/a>)/mg,"$2: $1")))+ 29'" /></a></li>'}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=a(".pp_pic_holder .pp_gallery");$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){a.prettyPhoto.changeGalleryPage("next");a.prettyPhoto.stopSlideshow();return!1});$pp_gallery.find(".pp_arrow_previous").click(function(){a.prettyPhoto.changeGalleryPage("previous");a.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn({duration:400, 30easing:"JIGswing"})},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut({duration:400,easing:"JIGswing"})});itemWidth=57;$pp_gallery_li.each(function(b){a(this).find("a").click(function(){a.prettyPhoto.changePage(b);a.prettyPhoto.stopSlideshow();return!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(){a.prettyPhoto.startSlideshow();return!1}));$pp_pic_holder.attr("class", 31"pp_pic_holder "+("facebook"!==settings.theme?settings.theme:"pp_facebook"));$pp_overlay.css({opacity:0,height:a(document).height(),width:a(window).width()}).on("click",function(){settings.modal||a.prettyPhoto.close()});a("a.pp_close").on("click",function(){a.prettyPhoto.close();return!1});if(settings.allow_expand)a("a.pp_expand").on("click",function(b){a(this).hasClass("pp_expand")?(a(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(a(this).removeClass("pp_contract").addClass("pp_expand"), 32doresize=!0);l(function(){a.prettyPhoto.open()});return!1});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").on("click",function(){a.prettyPhoto.changePage("previous");a.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").on("click",function(){a.prettyPhoto.changePage("next");a.prettyPhoto.stopSlideshow();return!1});E()}jigReCallPrettyPhotoAfterPossibleResize="undefined"===typeof c||"undefined"!==typeof c&&"undefined"===typeof c.jig_call?!0: 33void 0;c=jQuery.extend({jig_call:!1,jig_socials:"ftpg",title_position:"inside",videoplayer:!1,hook:"rel",advanced_deeplinking:!1,smart_deeplinking:!0,animation_speed:"fast",ajaxcallback:function(){},slideshow:5E3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!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:!0,overlay_gallery:!0,overlay_gallery_max:300, 34keyboard_shortcuts:!0,analytics:!1,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,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> <a href="#" class="pp_arrow_next">Next</a> <p class="currentTextHolder">0/0</p> </div> <p class="pp_description"></p> <div class="pp_bottom_right"> <a class="pp_close" href="#">Close</a> <div class="pp_social">{pp_social}</div> </div> </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>', 35gallery_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>',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>', 36quicktime_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" allowfullscreen></iframe>', 37inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:!0,jig_facebook:'<div class="jig_pp_social_btn jig_pp_facebook" data-src="//www.facebook.com/plugins/like.php?href={f_location_href}&width=135&layout=button_count&action=like&show_faces=false&share=true&height=21"></div>',jig_twitter:'<div class="jig_pp_social_btn jig_pp_twitter" data-src="//platform.twitter.com/widgets/tweet_button.html?url={location_href}&text={twitter_text}"></div>',jig_pinterest:'<div class="jig_pp_social_btn jig_pp_pinterest" data-href="//www.pinterest.com/pin/create/button/?url={location_href}&media={location_img}&description={d}"></div>', 38jig_google:'<div class="jig_pp_social_btn jig_pp_google" data-href="{unencoded_location_href}"></div>'},c);!1===c.jig_call&&!0===c.smart_deeplinking&&!0===c.deeplinking&&(c.smart_deeplinking=!1,
38c.advanced_deeplinking=!0);if(c.social_tools){var f=c.jig_socials;f=f.toLowerCase();f=f.split("");var H=a.inArray("f",f),I=a.inArray("t",f),J=a.inArray("p",f),K=a.inArray("g",f);-1!==H&&(f[H]=c.jig_facebook);-1!==I&&(f[I]=c.jig_twitter);-1!==J&&(f[J]=c.jig_pinterest,"undefined"===typeof window.jigBuildPinterestButton&& 39(window.jigBuildPinterestButton=function(a){setTimeout(function(){window.jigBuildPinterestButton(a)},500)}),!0===c.jig_call&&"undefined"==typeof window.jigPinterestTrickRan&&(window.jigPinterestTrick(),a(window).off("load",window.jigPinterestTrick).on("load",window.jigPinterestTrick)));-1!==K&&(f[K]=c.jig_google);c.social_tools=f.join("")}var p=this,D=!1,e,L,N,Q,B,A,y=a(window).height(),w=a(window).width(),z,q;1==c.jig_call&&(q=p.first().closest(".justified-image-grid"));doresize=!0;scroll_pos=R(); 40"undefined"!==typeof p.selector&&-1==p.selector.indexOf("#jig")&&(p=p.filter(":not(.justified-image-grid a)"));c.matchedObjects=p;a(window).off("resize.prettyphoto").on("resize.prettyphoto",function(){y=a(window).height();w=a(window).width();"undefined"!=typeof $pp_overlay&&$pp_overlay.height(a(document).height()).width(w);E()});if(c.keyboard_shortcuts)a(document).off("keydown.prettyphoto").on("keydown.prettyphoto",function(b){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(b.keyCode){case 37:a.prettyPhoto.changePage("previous"); 41b.preventDefault();break;case 39:a.prettyPhoto.changePage("next");b.preventDefault();break;case 27:settings.modal||a.prettyPhoto.close(),b.preventDefault()}});a.prettyPhoto.initialize=function(){settings=c;"pp_default"==settings.theme&&(settings.horizontal_padding=16);theRel=a(this).attr(settings.hook).split(" ").shift();(isSet=/\[(?:.*)\]/.exec(theRel)?!0:!1)?(pp_images=jQuery.map(p,function(b,c){if(a(b).attr(settings.hook)&&-1!=a(b).attr(settings.hook).indexOf(theRel))return a(b).attr("href")}), 42pp_titles=jQuery.map(p,function(b,c){if(a(b).attr(settings.hook)&&-1!=a(b).attr(settings.hook).indexOf(theRel))return a(b).find("img").attr("alt")?a(b).find("img").attr("alt"):""}),pp_descriptions=jQuery.map(p,function(b,c){if(a(b).attr(settings.hook)&&-1!=a(b).attr(settings.hook).indexOf(theRel))return a(b).attr("title")?a(b).attr("title"):""})):(pp_images=a.makeArray(a(this).attr("href")),pp_titles=a.makeArray(a(this).find("img").attr("alt")),pp_descriptions=a.makeArray(a(this).attr("title"))); 43pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1);set_position=jQuery.inArray(a(this).attr("href"),pp_images);rel_index=isSet?set_position:a("a["+settings.hook+"^='"+theRel+"']").index(a(this));S(this);if(settings.allow_resize)a(window).on("scroll.prettyphoto",function(){y=a(window).height();w=a(window).width();E()});a.prettyPhoto.open();return!1};a.prettyPhoto.open=function(b,d,f,l){"undefined"==typeof settings&&(settings=c,pp_images=a.makeArray(b),pp_titles=d?a.makeArray(d): 44a.makeArray(""),pp_descriptions=f?a.makeArray(f):a.makeArray(""),isSet=1<pp_images.length?!0:!1,set_position=l?l:0,S(b.target));settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");M(a(pp_images).length);a(".pp_loaderIcon").show();settings.deeplinking&&T(settings.matchedObjects);1==settings.analytics&&"undefined"!==typeof _gaq&&_gaq.push(["_trackEvent","Photos","View",pp_images[set_position]]);d="";1==settings.advanced_deeplinking||1==settings.smart_deeplinking? 45(d=decodeURI(document.location.href),b=d.split("#!"),d=b[0]+"#!"+b[1]):d=location.href;settings.social_tools?(b=settings.social_tools.replace(/{location_href}/g,encodeURIComponent(location.href)),b=b.replace(/{unencoded_location_href}/g,location.href),-1!==d.indexOf("?")&&(d.indexOf("?"),d.indexOf("#!")),b=b.replace(/{f_location_href}/g,encodeURIComponent(d)),d=/(?:poster=)(.*)(?:\|videoplayer)/m.exec(pp_images[set_position]),b=null===d?b.replace(/{location_img}/g,encodeURIComponent(pp_images[set_position])): 46b.replace(/{location_img}/g,encodeURIComponent(d[1])),d="",-1!==b.indexOf("{twitter_text}")&&("undefined"!==typeof pp_titles[set_position]?(d=pp_titles[set_position],b=b.replace(/{twitter_text}/g,encodeURIComponent(g(d.replace(/<a(?:.+?)href=['"](.+?)['"](?:.+?>)(.+?)(?:<\/a>)/mg,"$2: $1"))))):b=b.replace(/{twitter_text}/g,encodeURIComponent(document.title))),"undefined"!==typeof pp_descriptions[set_position]&&(d+=""!==d?" "+pp_descriptions[set_position]:pp_descriptions[set_position]),b=b.replace(/{d}/g, 47encodeURIComponent(g(d.replace(/<a(?:.+?)href=['"](.+?)['"](?:.+?>)(.+?)(?:<\/a>)/mg,"$2: $1")))),$pp_pic_holder.find(".pp_social").html(b)):$pp_pic_holder.find(".pp_social").remove();$ppt.is(":hidden")&&$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity,"JIGswing");$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+a(pp_images).length);"inside"==settings.title_position&&(pp_descriptions[set_position]=(settings.show_title&& 48""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?'<div class="ppt_inside">'+pp_titles[set_position]+"</div>":"")+("undefined"!=typeof pp_descriptions[set_position]?pp_descriptions[set_position]:""),pp_titles[set_position]=void 0,$pp_pic_holder.find(".pp_details").addClass("pp_includes_title"));"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").html(pp_descriptions[set_position]):$pp_pic_holder.find(".pp_description").empty(); 49var k=parseFloat(u("width",pp_images[set_position]))?u("width",pp_images[set_position]):settings.default_width.toString(),n=parseFloat(u("height",pp_images[set_position]))?u("height",pp_images[set_position]):settings.default_height.toString();D=!1;-1!=n.indexOf("%")&&(n=parseFloat(a(window).height()*parseFloat(n)/100-150),D=!0);-1!=k.indexOf("%")&&(k=parseFloat(a(window).width()*parseFloat(k)/100-150),D=!0);$pp_pic_holder.fadeIn({duration:400,easing:"JIGswing",complete:function(){settings.show_title&& 50""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?$ppt.html(pp_titles[set_position]):$ppt.remove();var b="",c=!1;switch(v(pp_images[set_position])){case "image":b=new Image;var d=new Image;
50isSet&&set_position<a(pp_images).length-1&&(d.src=pp_images[set_position+1]);d=new Image;isSet&&pp_images[set_position-1]&&(d.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]);b.onload=function(){e= 51m(b.width,b.height);h()};b.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");a.prettyPhoto.close()};b.src=pp_images[set_position];break;case "youtube":e=m(k,n);movie_id=u("v",pp_images[set_position]);""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],0<movie_id.indexOf("?")&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),0<movie_id.indexOf("&")&&(movie_id=movie_id.substr(0,movie_id.indexOf("&"))));movie="//www.youtube.com/embed/"+ 52movie_id;u("rel",pp_images[set_position])?movie+="?rel="+u("rel",pp_images[set_position]):movie+="?rel=0";settings.autoplay&&(movie+="&autoplay=1");toInject=settings.iframe_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case "vimeo":e=m(k,n);movie_id=pp_images[set_position];d=movie_id.match(/https?:\/\/(?:www\.)?vimeo\.com\/(?:(\d+)|channels\/\w+?\/(\d+))/m);movie="//player.vimeo.com/video/"+(d[1]|d[2])+"?title=0&byline=0&portrait=0"; 53settings.autoplay&&(movie+="&autoplay=1;");vimeo_width=e.width+"/embed/?moog_width="+e.width;toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,e.height).replace(/{path}/g,movie);break;case "quicktime":e=m(k,n);e.height+=15;e.imageHeight+=15;e.containerHeight+=15;toInject=settings.quicktime_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay); 54break;case "flash":e=m(k,n);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,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case "iframe":e=m(k,n);frame_url=pp_images[set_position];frame_url= 55frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{path}/g,frame_url);break;case "videoplayer":e=m(k,n);frame_url=pp_images[set_position];!1!==settings.videoplayer&&(frame_url=settings.videoplayer+encodeURIComponent(frame_url));toInject=settings.iframe_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{path}/g,frame_url);break;case "ajax":doresize=!1;e=m(k,n);c=doresize=!0;a.get(pp_images[set_position], 56function(a){toInject=settings.inline_markup.replace(/{content}/g,a);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;h()});break;case "custom":e=m(k,n);toInject=settings.custom_markup;break;case "inline":myClone=a(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(a("body")).show(),doresize=!1,e=m(a(myClone).width(),a(myClone).height()),doresize=!0,a(myClone).remove(), 57toInject=settings.inline_markup.replace(/{content}/g,a(pp_images[set_position]).html())}b||c||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,h())}});return!1};a.prettyPhoto.changePage=function(b){currentGalleryPage=0;"previous"==b?(set_position--,0>set_position&&(set_position=a(pp_images).length-1)):"next"==b?(set_position++,set_position>a(pp_images).length-1&&(set_position=0)):set_position=b;rel_index=set_position;doresize||(doresize=!0);settings.allow_expand&&a(".pp_contract").removeClass("pp_contract").addClass("pp_expand"); 58l(function(){a.prettyPhoto.open()})};a.prettyPhoto.changeGalleryPage=function(a){"next"==a?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==a?(currentGalleryPage--,0>currentGalleryPage&&(currentGalleryPage=totalPage)):currentGalleryPage=a;slide_speed="next"==a||"previous"==a?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed,"JIGeaseInOutQuad")};a.prettyPhoto.startSlideshow= 59function(){"undefined"==typeof z?($pp_pic_holder.find(".pp_play").off("
59click").removeClass("pp_play").addClass("pp_pause").click(function(){a.prettyPhoto.stopSlideshow();return!1}),z=setInterval(a.prettyPhoto.startSlideshow,settings.slideshow)):a.prettyPhoto.changePage("next")};a.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").off("click").removeClass("pp_pause").addClass("pp_play").click(function(){a.prettyPhoto.startSlideshow();return!1});clearInterval(z);z=void 0};a.prettyPhoto.close= 60function(){$pp_overlay.is(":animated")||(a.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut({duration:settings.animation_speed,easing:"JIGswing",complete:function(){a(this).remove()}}),$pp_overlay.fadeOut({duration:settings.animation_speed,easing:"JIGswing",complete:function(){settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");a(this).remove();a(window).off("scroll.prettyphoto"); 61if("undefined"!=typeof theRel){var b=location.hash,c=theRel.replace("[",")\\[");c=c.replace("]","\\]");-1===c.indexOf(")")&&(c+=")");null!==b.match(new RegExp("^#(!?"+c+"/(\\d+?/)?(https?://.*)?([A-Z]{2}/[_w]*)?"))&&(location.hash="!")}settings.callback();doresize=!0;L=!1;settings=void 0}}))};if(!pp_alreadyInitialized&&O()&&1==c.jig_call){var r=!1;f=O();var C=f.substring(0,f.indexOf("/"));f=f.substring(f.indexOf("/")+1,f.length);if(/^([A-Z]{2}\/[_\w]*)$/im.test(f)){f=f.replace("/","-");var t=q.find(".jig-contentID-"+ 62f).find("a["+c.hook+"^='"+C+"']").first();0===t.length&&(t=q.find("a["+c.hook+"^='"+C+"'].jig-contentID-"+f).first());0!==t.length?(pp_alreadyInitialized=!0,a(window).one("jigPrettyPhotoActivation",function(){jigOtherPrettyPhotoIsPresent=void 0;t.trigger("click")}),r=!1):r=!0}else r=!0;if(1==r){var F=/(^\d+)?\/?(https?:\/\/.+$)/;t=f.match(F);if(null!==t){f=t[1];F=t[2];var G=q.find("a["+c.hook+"^='"+C+"']").eq(f);G.attr("href")!==F&&(G=q.find("a["+c.hook+"^='"+C+"'][href^='"+F+"']"));0!==G.length? 63(pp_alreadyInitialized=!0,a(window).one("jigPrettyPhotoActivation",function(){jigOtherPrettyPhotoIsPresent=void 0;G.trigger("click")}),r=!1):r=!0;r=!1}}1==r&&0!==q.find("a["+c.hook+"^='"+C+"']").eq(f).trigger("click").length&&(pp_alreadyInitialized=!0)}return p.off("click.prettyphoto").on("click.prettyphoto",a.prettyPhoto.initialize)};var x,v=0;window.jigPinterestTrick=function(){var c=a('.jig_pp_social_btn.jig_pp_pinterest span[class$="_button_pin"]');1<c.length&&c.not(":last").remove();if("undefined"=== 64typeof window.jigPinterestTrickRan||1!==window.jigPinterestTrickRan){window.jigPinterestTrickRan="pending";c=!1;for(var g=Object.keys(window),k=g.length,h,l=0;l<k;l+=1)try{if(-1===g[l].indexOf("webkit")&&(h=g[l],"function"===typeof window[h]&&"function (a){d.f.build(a)}"==window[h])){c=window[h];break}}catch(M){}if(0==c){for(l=0;l<k;l+=1)try{if(-1===g[l].indexOf("webkit")&&(h=g[l],0===h.indexOf("PIN_")))if(12<h.length){if("function"===typeof window[h].f.build){c=window[h].f.build;break}}else c="almost"}catch(M){}!1=== 65c?(window.jigPinterestTrickRan=1,h=document.createElement("script"),h.type="text/javascript",h.async=!0,h.src="//assets.pinterest.com/js/pinit.js",h.setAttribute("data-pin-build","jigBuildPinterestButton"),a("body").append(h)):"function"===typeof c&&(window.jigPinterestTrickRan=1,window.jigBuildPinterestButton=c)}else window.jigPinterestTrickRan=1,window.jigBuildPinterestButton=c}};Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,g=!{toString:null}.propertyIsEnumerable("toString"), 66k="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),h=k.length;return function(c){if("object"!==typeof c&&("function"!==typeof c||null===c))throw new TypeError("Object.keys called on non-object");var l=[],m;for(m in c)a.call(c,m)&&l.push(m);if(g)for(m=0;m<h;m++)a.call(c,k[m])&&l.push(k[m]);return l}}())}(function(){"undefined"!==typeof jQuery.prettyPhoto&&(jigOtherPrettyPhotoIsPresent=!0);loadJIGprettyPhoto(jQuery);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.