var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); jQuery(document).ready(function($){var overlay,comments,gallery,container,nextButton,previousButton,info,transitionBegin,caption,resizeTimeout,photo_info,close_hint,commentInterval,lastSelectedSlide,screenPadding=110,originalOverflow=$('body').css('overflow'),originalHOverflow=$('html').css('overflow'),proportion=85,last_known_location_hash='',imageMeta,titleAndDescription,commentForm,leftColWrapper,scrollPos;if(window.innerWidth<=760){screenPadding=Math.round((window.innerWidth/760)*110);if(screenPadding<40&&(('ontouchstart'in window)||window.DocumentTouch&&document instanceof DocumentTouch)){screenPadding=0;}} if('undefined'===typeof Date.now){Date.now=function now(){return new Date().getTime();};} var keyListener=function(e){switch(e.which){case 38:e.preventDefault();container.scrollTop(container.scrollTop()-100);break;case 40:e.preventDefault();container.scrollTop(container.scrollTop()+100);break;case 39:e.preventDefault();gallery.jp_carousel('next');break;case 37:case 8:e.preventDefault();gallery.jp_carousel('previous');break;case 27:e.preventDefault();container.jp_carousel('close');break;default:break;}};var resizeListener=function(){clearTimeout(resizeTimeout);resizeTimeout=setTimeout(function(){gallery.jp_carousel('slides').jp_carousel('fitSlide',true);gallery.jp_carousel('updateSlidePositions',true);gallery.jp_carousel('fitMeta',true);},200);};var prepareGallery=function(){if(!overlay){overlay=$('
').addClass('jp-carousel-overlay').css({'position':'absolute','top':0,'right':0,'bottom':0,'left':0});var buttons=''+jetpackCarouselStrings.comment+'';if(1===Number(jetpackCarouselStrings.is_logged_in)){} buttons=$('');caption=$('

');photo_info=$('').append(caption);imageMeta=$('
').addClass('jp-carousel-image-meta').css({'float':'right','margin-top':'20px','width':'250px'});imageMeta.append(buttons).append('').append('').append('');titleAndDescription=$('
').addClass('jp-carousel-titleanddesc').css({'width':'100%','margin-top':imageMeta.css('margin-top')});var commentFormMarkup='';commentForm=$(commentFormMarkup).css({'width':'100%','margin-top':'20px','color':'#999'});comments=$('
').addClass('jp-carousel-comments').css({'width':'100%','bottom':'10px','margin-top':'20px'});var commentsLoading=$('').css({'width':'100%','bottom':'10px','margin-top':'20px'});var leftWidth=($(window).width()-(screenPadding*2))-(imageMeta.width()+40);leftWidth+='px';leftColWrapper=$('
').addClass('jp-carousel-left-column-wrapper').css({'width':Math.floor(leftWidth)}).append(titleAndDescription).append(commentForm).append(comments).append(commentsLoading);var fadeaway=$('
').addClass('jp-carousel-fadeaway');info=$('
').addClass('jp-carousel-info').css({'top':Math.floor(($(window).height()/100)*proportion),'left':screenPadding,'right':screenPadding}).append(photo_info).append(imageMeta);if(window.innerWidth<=760){photo_info.remove().insertAfter(titleAndDescription);info.prepend(leftColWrapper);} else{info.append(leftColWrapper);} var targetBottomPos=($(window).height()-parseInt(info.css('top'),10))+'px';nextButton=$('
').addClass('jp-carousel-next-button').css({'right':'15px'}).hide();previousButton=$('
').addClass('jp-carousel-previous-button').css({'left':0}).hide();nextButton.add(previousButton).css({'position':'fixed','top':'40px','bottom':targetBottomPos,'width':screenPadding});gallery=$('
').addClass('jp-carousel').css({'position':'absolute','top':0,'bottom':targetBottomPos,'left':0,'right':0});close_hint=$('').css({position:'fixed'});container=$('
').addClass('jp-carousel-wrap').addClass('jp-carousel-transitions');if('white'===jetpackCarouselStrings.background_color){container.addClass('jp-carousel-light');} container.attr('itemscope','');container.attr('itemtype','https://web.archive.org/web/20181206113159/https://schema.org/ImageGallery');container.css({'position':'fixed','top':0,'right':0,'bottom':0,'left':0,'z-index':2147483647,'overflow-x':'hidden','overflow-y':'auto','direction':'ltr'}).hide().append(overlay).append(gallery).append(fadeaway).append(info).append(nextButton).append(previousButton).append(close_hint).appendTo($('body')).click(function(e){var target=$(e.target),wrap=target.parents('div.jp-carousel-wrap'),data=wrap.data('carousel-extra'),slide=wrap.find('div.selected'),attachment_id=slide.data('attachment-id');data=data||[];if(target.is(gallery)||target.parents().add(target).is(close_hint)){container.jp_carousel('close');}else if(target.hasClass('jp-carousel-commentlink')){e.preventDefault();e.stopPropagation();$(window).unbind('keydown',keyListener);container.animate({scrollTop:parseInt(info.position()['top'],10)},'fast');$('#jp-carousel-comment-form-submit-and-info-wrapper').slideDown('fast');$('#jp-carousel-comment-form-comment-field').focus();}else if(target.hasClass('jp-carousel-comment-login')){var url=jetpackCarouselStrings.login_url+'%23jp-carousel-'+attachment_id;window.location.href=url;}else if(target.parents('#jp-carousel-comment-form-container').length){var textarea=$('#jp-carousel-comment-form-comment-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});var emailField=$('#jp-carousel-comment-form-email-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});var authorField=$('#jp-carousel-comment-form-author-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});var urlField=$('#jp-carousel-comment-form-url-field').blur(function(){$(window).bind('keydown',keyListener);}).focus(function(){$(window).unbind('keydown',keyListener);});if(textarea&&textarea.attr('id')===target.attr('id')){$(window).unbind('keydown',keyListener);$('#jp-carousel-comment-form-submit-and-info-wrapper').slideDown('fast');}else if(target.is('input[type="submit"]')){e.preventDefault();e.stopPropagation();$('#jp-carousel-comment-form-spinner').spin('small','white');var ajaxData={action:'post_attachment_comment',nonce:jetpackCarouselStrings.nonce,blog_id:data['blog_id'],id:attachment_id,comment:textarea.val()};if(!ajaxData['comment'].length){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-comment-field','error':jetpackCarouselStrings.no_comment_text});return;} if(1!==Number(jetpackCarouselStrings.is_logged_in)){ajaxData['email']=emailField.val();ajaxData['author']=authorField.val();ajaxData['url']=urlField.val();if(1===Number(jetpackCarouselStrings.require_name_email)){if(!ajaxData['email'].length||!ajaxData['email'].match('@')){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-email-field','error':jetpackCarouselStrings.no_comment_email});return;}else if(!ajaxData['author'].length){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-author-field','error':jetpackCarouselStrings.no_comment_author});return;}}} $.ajax({type:'POST',url:jetpackCarouselStrings.ajaxurl,data:ajaxData,dataType:'json',success:function(response){if('approved'===response.comment_status){$('#jp-carousel-comment-post-results').slideUp('fast').html(''+jetpackCarouselStrings.comment_approved+'').slideDown('fast');}else if('unapproved'===response.comment_status){$('#jp-carousel-comment-post-results').slideUp('fast').html(''+jetpackCarouselStrings.comment_unapproved+'').slideDown('fast');}else{$('#jp-carousel-comment-post-results').slideUp('fast').html(''+jetpackCarouselStrings.comment_post_error+'').slideDown('fast');} gallery.jp_carousel('clearCommentTextAreaValue');gallery.jp_carousel('getComments',{attachment_id:attachment_id,offset:0,clear:true});$('#jp-carousel-comment-form-button-submit').val(jetpackCarouselStrings.post_comment);$('#jp-carousel-comment-form-spinner').spin(false);},error:function(){gallery.jp_carousel('postCommentError',{'field':'jp-carousel-comment-form-comment-field','error':jetpackCarouselStrings.comment_post_error});return;}});}}else if(!target.parents('.jp-carousel-info').length){container.jp_carousel('next');}}).bind('jp_carousel.afterOpen',function(){$(window).bind('keydown',keyListener);$(window).bind('resize',resizeListener);gallery.opened=true;resizeListener();}).bind('jp_carousel.beforeClose',function(){var scroll=$(window).scrollTop();$(window).unbind('keydown',keyListener);$(window).unbind('resize',resizeListener);$(window).scrollTop(scroll);$('.jp-carousel-previous-button').hide();$('.jp-carousel-next-button').hide();}).bind('jp_carousel.afterClose',function(){if(window.location.hash&&history.back){history.back();} last_known_location_hash='';gallery.opened=false;}).on('transitionend.jp-carousel ','.jp-carousel-slide',function(e){if('transform'===e.originalEvent.propertyName){var transitionMultiplier=((Date.now()-transitionBegin)/1000)/e.originalEvent.elapsedTime;container.off('transitionend.jp-carousel');if(transitionMultiplier>=2){$('.jp-carousel-transitions').removeClass('jp-carousel-transitions');}}});$('.jp-carousel-wrap').touchwipe({wipeLeft:function(e){e.preventDefault();gallery.jp_carousel('next');},wipeRight:function(e){e.preventDefault();gallery.jp_carousel('previous');},preventDefaultEvents:false});nextButton.add(previousButton).click(function(e){e.preventDefault();e.stopPropagation();if(nextButton.is(this)){gallery.jp_carousel('next');}else{gallery.jp_carousel('previous');}});}};var processSingleImageGallery=function(){$('a img[data-attachment-id]').each(function(){var container=$(this).parent();if(container.parent('.gallery-icon').length){return;} if('undefined'===typeof($(container).attr('href'))){return;} var valid=false;if($(container).attr('href').split('?')[0]===$(this).attr('data-orig-file').split('?')[0]&&1===Number(jetpackCarouselStrings.single_image_gallery_media_file)){valid=true;} if($(container).attr('href')===$(this).attr('data-permalink')){valid=true;} if(!valid){return;} $(container).addClass('single-image-gallery');$(container).data('carousel-extra',{blog_id:Number(jetpackCarouselStrings.blog_id)});});};var methods={testForData:function(gallery){gallery=$(gallery);return!(!gallery.length||!gallery.data('carousel-extra'));},testIfOpened:function(){return!!('undefined'!==typeof(gallery)&&'undefined'!==typeof(gallery.opened)&&gallery.opened);},openOrSelectSlide:function(index){if(!$(this).jp_carousel('testIfOpened')){$(this).jp_carousel('open',{start_index:index});}else{gallery.jp_carousel('selectSlideAtIndex',index);}},open:function(options){var settings={'items_selector':'.gallery-item [data-attachment-id], .tiled-gallery-item [data-attachment-id], img[data-attachment-id]','start_index':0},data=$(this).data('carousel-extra');if(!data){return;} prepareGallery(data);if(gallery.jp_carousel('testIfOpened')){return;} originalOverflow=$('body').css('overflow');$('body').css('overflow','hidden');originalHOverflow=$('html').css('overflow');$('html').css('overflow','hidden');scrollPos=$(window).scrollTop();container.data('carousel-extra',data);return this.each(function(){var $this=$(this);if(options){$.extend(settings,options);} if(-1===settings.start_index){settings.start_index=0;} container.trigger('jp_carousel.beforeOpen').fadeIn('fast',function(){container.trigger('jp_carousel.afterOpen');gallery.jp_carousel('initSlides',$this.find(settings.items_selector),settings.start_index).jp_carousel('selectSlideAtIndex',settings.start_index);});gallery.html('');});},selectSlideAtIndex:function(index){var slides=this.jp_carousel('slides'),selected=slides.eq(index);if(0===selected.length){selected=slides.eq(0);} gallery.jp_carousel('selectSlide',selected,false);return this;},close:function(){$('body').css('overflow',originalOverflow);$('html').css('overflow',originalHOverflow);this.jp_carousel('clearCommentTextAreaValue');return container.trigger('jp_carousel.beforeClose').fadeOut('fast',function(){container.trigger('jp_carousel.afterClose');$(window).scrollTop(scrollPos);});},next:function(){this.jp_carousel('previousOrNext','nextSlide');},previous:function(){this.jp_carousel('previousOrNext','prevSlide');},previousOrNext:function(slideSelectionMethodName){if(!this.jp_carousel('hasMultipleImages')){return false;} var slide=gallery.jp_carousel(slideSelectionMethodName);if(slide){container.animate({scrollTop:0},'fast');this.jp_carousel('clearCommentTextAreaValue');this.jp_carousel('selectSlide',slide);}},selectedSlide:function(){return this.find('.selected');},setSlidePosition:function(x){transitionBegin=Date.now();return this.css({'-webkit-transform':'translate3d('+x+'px,0,0)','-moz-transform':'translate3d('+x+'px,0,0)','-ms-transform':'translate('+x+'px,0)','-o-transform':'translate('+x+'px,0)','transform':'translate3d('+x+'px,0,0)'});},updateSlidePositions:function(animate){var current=this.jp_carousel('selectedSlide'),galleryWidth=gallery.width(),currentWidth=current.width(),previous=gallery.jp_carousel('prevSlide'),next=gallery.jp_carousel('nextSlide'),previousPrevious=previous.prev(),nextNext=next.next(),left=Math.floor((galleryWidth-currentWidth)*0.5);current.jp_carousel('setSlidePosition',left).show();gallery.jp_carousel('fitInfo',animate);var direction=lastSelectedSlide.is(current.prevAll())?1:-1;if(1===direction){if(!nextNext.is(previous)){nextNext.jp_carousel('setSlidePosition',galleryWidth+next.width()).show();} if(!previousPrevious.is(next)){previousPrevious.jp_carousel('setSlidePosition',-previousPrevious.width()-currentWidth).show();}}else{if(!nextNext.is(previous)){nextNext.jp_carousel('setSlidePosition',galleryWidth+currentWidth).show();}} previous.jp_carousel('setSlidePosition',Math.floor(-previous.width()+(screenPadding*0.75))).show();next.jp_carousel('setSlidePosition',Math.ceil(galleryWidth-(screenPadding*0.75))).show();},selectSlide:function(slide,animate){lastSelectedSlide=this.find('.selected').removeClass('selected');var slides=gallery.jp_carousel('slides').css({'position':'fixed'}),current=$(slide).addClass('selected').css({'position':'relative'}),attachmentId=current.data('attachment-id'),previous=gallery.jp_carousel('prevSlide'),next=gallery.jp_carousel('nextSlide'),previousPrevious=previous.prev(),nextNext=next.next(),animated,captionHtml;gallery.jp_carousel('loadFullImage',current);caption.hide();if(next.length===0&&slides.length<=2){$('.jp-carousel-next-button').hide();}else{$('.jp-carousel-next-button').show();} if(previous.length===0&&slides.length<=2){$('.jp-carousel-previous-button').hide();}else{$('.jp-carousel-previous-button').show();} animated=current.add(previous).add(previousPrevious).add(next).add(nextNext).jp_carousel('loadSlide');slides.not(animated).hide();gallery.jp_carousel('updateSlidePositions',animate);container.trigger('jp_carousel.selectSlide',[current]);gallery.jp_carousel('getTitleDesc',{title:current.data('title'),desc:current.data('desc')});var imageMeta=current.data('image-meta');gallery.jp_carousel('updateExif',imageMeta);gallery.jp_carousel('updateFullSizeLink',current);gallery.jp_carousel('updateMap',imageMeta);gallery.jp_carousel('testCommentsOpened',current.data('comments-opened'));gallery.jp_carousel('getComments',{'attachment_id':attachmentId,'offset':0,'clear':true});$('#jp-carousel-comment-post-results').slideUp();if(current.data('caption')){captionHtml=$('
').text(current.data('caption')).html();if(captionHtml===$('
').text(current.data('title')).html()){$('.jp-carousel-titleanddesc-title').fadeOut('fast').empty();} if(captionHtml===$('
').text(current.data('desc')).html()){$('.jp-carousel-titleanddesc-desc').fadeOut('fast').empty();} caption.html(current.data('caption')).fadeIn('slow');}else{caption.fadeOut('fast').empty();} if(jetpackCarouselStrings.stats){new Image().src=document.location.protocol+'//web.archive.org/web/20181206113159/http://pixel.wp.com/g.gif?'+ jetpackCarouselStrings.stats+'&post='+encodeURIComponent(attachmentId)+'&rand='+Math.random();} $(next).add(previous).each(function(){gallery.jp_carousel('loadFullImage',$(this));});window.location.hash=last_known_location_hash='#jp-carousel-'+attachmentId;},slides:function(){return this.find('.jp-carousel-slide');},slideDimensions:function(){return{width:$(window).width()-(screenPadding*2),height:Math.floor($(window).height()/100*proportion-60)};},loadSlide:function(){return this.each(function(){var slide=$(this);slide.find('img').one('load',function(){slide.jp_carousel('fitSlide',false);});});},bestFit:function(){var max=gallery.jp_carousel('slideDimensions'),orig=this.jp_carousel('originalDimensions'),orig_ratio=orig.width/orig.height,w_ratio=1,h_ratio=1,width,height;if(orig.width>max.width){w_ratio=max.width/orig.width;} if(orig.height>max.height){h_ratio=max.height/orig.height;} if(w_ratio')[0].src=$(items[start_index]).data('gallery-src');} var useInPageThumbnails=items.first().closest('.tiled-gallery.type-rectangular').length>0;items.each(function(i){var src_item=$(this),attachment_id=src_item.data('attachment-id')||0,comments_opened=src_item.data('comments-opened')||0,image_meta=src_item.data('image-meta')||{},orig_size=src_item.data('orig-size')||'',thumb_size={width:src_item[0].naturalWidth,height:src_item[0].naturalHeight},title=src_item.data('image-title')||'',description=src_item.data('image-description')||'',caption=src_item.parents('.gallery-item').find('.gallery-caption').html()||'',src=src_item.data('gallery-src')||'',medium_file=src_item.data('medium-file')||'',large_file=src_item.data('large-file')||'',orig_file=src_item.data('orig-file')||'';var tiledCaption=src_item.parents('div.tiled-gallery-item').find('div.tiled-gallery-caption').html();if(tiledCaption){caption=tiledCaption;} if(attachment_id&&orig_size.length){title=gallery.jp_carousel('texturize',title);description=gallery.jp_carousel('texturize',description);caption=gallery.jp_carousel('texturize',caption);var image=$('').attr('src','data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7').css('width','100%').css('height','100%');var slide=$('').hide().css({'left':i1){args.max_width=args.max_width*window.devicePixelRatio;args.max_height=args.max_height*window.devicePixelRatio;} if(large_width>=args.max_width||large_height>=args.max_height){return args.large_file;} if(medium_width>=args.max_width||medium_height>=args.max_height){return args.medium_file;} if(isPhotonUrl){var largeFileIndex=args.large_file.lastIndexOf('?');var origPhotonUrl=args.large_file;if(-1!==largeFileIndex){origPhotonUrl=args.large_file.substring(0,largeFileIndex);if(args.orig_width>args.max_width||args.orig_height>args.max_height){origPhotonUrl+='?fit='+args.orig_max_width+'%2C'+args.orig_max_height;}} return origPhotonUrl;} return args.orig_file;},getImageSizeParts:function(file,orig_width,isPhotonUrl){var size=isPhotonUrl?file.replace(/.*=([\d]+%2C[\d]+).*$/,'$1'):file.replace(/.*-([\d]+x[\d]+)\..+$/,'$1');var size_parts=(size!==file)?(isPhotonUrl?size.split('%2C'):size.split('x')):[orig_width,0];if('9999'===size_parts[0]){size_parts[0]='0';} if('9999'===size_parts[1]){size_parts[1]='0';} return size_parts;},originalDimensions:function(){var splitted=$(this).data('orig-size').split(',');return{width:parseInt(splitted[0],10),height:parseInt(splitted[1],10)};},format:function(args){if('object'!==typeof args){args={};} if(!args.text||'undefined'===typeof args.text){return;} if(!args.replacements||'undefined'===typeof args.replacements){return args.text;} return args.text.replace(/{(\d+)}/g,function(match,number){return typeof args.replacements[number]!=='undefined'?args.replacements[number]:match;});},shutterSpeed:function(speed){var denominator;if(speed>=1){return Math.round(speed*10)/10+'s';} denominator=Math.round(1/speed);return'1/'+denominator+'s';},parseTitleDesc:function(value){if(!value.match(' ')&&value.match('_')){return'';} $(['CIMG','DSC_','DSCF','DSCN','DUW','GEDC','IMG','JD','MGP','PICT','Imagen','Foto','DSC','Scan','SANY','SAM','Screen Shot [0-9]+']).each(function(key,val){var regex=new RegExp('^'+val);if(regex.test(value)){value='';return;}});return value;},getTitleDesc:function(data){var title='',desc='',markup='',target;target=$('div.jp-carousel-titleanddesc','div.jp-carousel-wrap');target.hide();title=gallery.jp_carousel('parseTitleDesc',data.title)||'';desc=gallery.jp_carousel('parseTitleDesc',data.desc)||'';if(title.length||desc.length){if($('
').html(title).text()===$('
').html(desc).text()){title='';} markup=(title.length)?'':'';markup+=(desc.length)?'':'';target.html(markup).fadeIn('slow');} $('div#jp-carousel-comment-form-container').css('margin-top','20px');$('div#jp-carousel-comments-loading').css('margin-top','20px');},updateExif:function(meta){if(!meta||1!==Number(jetpackCarouselStrings.display_exif)){return false;} var $ul=$('');$.each(meta,function(key,val){if(0===parseFloat(val)||!val.length||-1===$.inArray(key,$.makeArray(jetpackCarouselStrings.meta_data))){return;} switch(key){case'focal_length':val=val+'mm';break;case'shutter_speed':val=gallery.jp_carousel('shutterSpeed',val);break;case'aperture':val='f/'+val;break;} $ul.append('
  • '+jetpackCarouselStrings[key]+'
    '+val+'
  • ');});$('div.jp-carousel-image-meta ul.jp-carousel-image-exif').replaceWith($ul);},updateFullSizeLink:function(current){if(!current||!current.data){return false;} var original,origSize=current.data('orig-size').split(','),imageLinkParser=document.createElement('a');imageLinkParser.href=current.data('src').replace(/\?.+$/,'');if(imageLinkParser.hostname.match(/^i[\d]{1}.wp.com$/i)!==null){original=imageLinkParser.href;}else{original=current.data('orig-file').replace(/\?.+$/,'');} var permalink=$(''+gallery.jp_carousel('format',{'text':jetpackCarouselStrings.download_original,'replacements':origSize})+'').addClass('jp-carousel-image-download').attr('href',original).attr('target','_blank');$('div.jp-carousel-image-meta a.jp-carousel-image-download').replaceWith(permalink);},updateMap:function(meta){if(!meta.latitude||!meta.longitude||1!==Number(jetpackCarouselStrings.display_geo)){return;} var latitude=meta.latitude,longitude=meta.longitude,$metabox=$('div.jp-carousel-image-meta','div.jp-carousel-wrap'),$mapbox=$('
    '),style='&scale=2&style=feature:all|element:all|invert_lightness:true|hue:0x0077FF|saturation:-50|lightness:-5|gamma:0.91';$mapbox.addClass('jp-carousel-image-map').html('\ \
    \ \ ').prependTo($metabox);},testCommentsOpened:function(opened){if(1===parseInt(opened,10)){$('.jp-carousel-buttons').fadeIn('fast');commentForm.fadeIn('fast');}else{$('.jp-carousel-buttons').fadeOut('fast');commentForm.fadeOut('fast');}},getComments:function(args){clearInterval(commentInterval);if('object'!==typeof args){return;} if('undefined'===typeof args.attachment_id||!args.attachment_id){return;} if(!args.offset||'undefined'===typeof args.offset||args.offset<1){args.offset=0;} var comments=$('.jp-carousel-comments'),commentsLoading=$('#jp-carousel-comments-loading').show();if(args.clear){comments.hide().empty();} $.ajax({type:'GET',url:jetpackCarouselStrings.ajaxurl,dataType:'json',data:{action:'get_attachment_comments',nonce:jetpackCarouselStrings.nonce,id:args.attachment_id,offset:args.offset},success:function(data){if(args.clear){comments.fadeOut('fast').empty();} $(data).each(function(){var comment=$('
    ').addClass('jp-carousel-comment').attr('id','jp-carousel-comment-'+this['id']).html('
    '+ this['gravatar_markup']+'
    '+'
    '+ this['author_markup']+'
    '+'
    '+ this['date_gmt']+'
    '+'
    '+ this['content']+'
    ');comments.append(comment);clearInterval(commentInterval);commentInterval=setInterval(function(){if(($('.jp-carousel-overlay').height()-150)<$('.jp-carousel-wrap').scrollTop()+$(window).height()){gallery.jp_carousel('getComments',{attachment_id:args.attachment_id,offset:args.offset+10,clear:false});clearInterval(commentInterval);}},300);});var current=$('.jp-carousel div.selected');if(current&¤t.data&¤t.data('attachment-id')!=args.attachment_id){comments.fadeOut('fast');comments.empty();return;} $('.jp-carousel-overlay').height($(window).height()+titleAndDescription.height()+commentForm.height()+((comments.height()>0)?comments.height():imageMeta.height())+200);comments.show();commentsLoading.hide();},error:function(xhr,status,error){console.log('Comment get fail...',xhr,status,error);comments.fadeIn('fast');commentsLoading.fadeOut('fast');}});},postCommentError:function(args){if('object'!==typeof args){args={};} if(!args.field||'undefined'===typeof args.field||!args.error||'undefined'===typeof args.error){return;} $('#jp-carousel-comment-post-results').slideUp('fast').html('').slideDown('fast');$('#jp-carousel-comment-form-spinner').spin(false);},setCommentIframeSrc:function(attachment_id){var iframe=$('#jp-carousel-comment-iframe');if(iframe&&iframe.length){iframe.attr('src',iframe.attr('src').replace(/(postid=)\d+/,'$1'+attachment_id));iframe.attr('src',iframe.attr('src').replace(/(%23.+)?$/,'%23jp-carousel-'+attachment_id));}},clearCommentTextAreaValue:function(){var commentTextArea=$('#jp-carousel-comment-form-comment-field');if(commentTextArea){commentTextArea.val('');}},nextSlide:function(){var slides=this.jp_carousel('slides');var selected=this.jp_carousel('selectedSlide');if(selected.length===0||(slides.length>2&&selected.is(slides.last()))){return slides.first();} return selected.next();},prevSlide:function(){var slides=this.jp_carousel('slides');var selected=this.jp_carousel('selectedSlide');if(selected.length===0||(slides.length>2&&selected.is(slides.first()))){return slides.last();} return selected.prev();},loadFullImage:function(slide){var image=slide.find('img:first');if(!image.data('loaded')){image.on('load.jetpack',function(){image.off('load.jetpack');$(this).closest('.jp-carousel-slide').css('background-image','');});if(!slide.data('preview-image')||(slide.data('thumb-size')&&slide.width()>slide.data('thumb-size').width)){image.attr('src',image.closest('.jp-carousel-slide').data('src')).attr('itemprop','image');}else{image.attr('src',slide.data('preview-image')).attr('itemprop','image');} image.data('loaded',1);}},hasMultipleImages:function(){return gallery.jp_carousel('slides').length>1;}};$.fn.jp_carousel=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.open.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.jp_carousel');}};$(document.body).on('click.jp-carousel','div.gallery,div.tiled-gallery, a.single-image-gallery',function(e){if(!$(this).jp_carousel('testForData',e.currentTarget)){return;} if($(e.target).parent().hasClass('gallery-caption')){return;} e.preventDefault();e.stopPropagation();$(this).jp_carousel('open',{start_index:$(this).find('.gallery-item, .tiled-gallery-item').index($(e.target).parents('.gallery-item, .tiled-gallery-item'))});});if(1===Number(jetpackCarouselStrings.single_image_gallery)){processSingleImageGallery();$(document.body).on('post-load',function(){processSingleImageGallery();});} $(window).on('hashchange.jp-carousel',function(){var hashRegExp=/jp-carousel-(\d+)/,matches,attachmentId,galleries,selectedThumbnail;if(!window.location.hash||!hashRegExp.test(window.location.hash)){if(gallery&&gallery.opened){container.jp_carousel('close');} return;} if((window.location.hash===last_known_location_hash)&&gallery.opened){return;} if(window.location.hash&&gallery&&!gallery.opened&&history.back){history.back();return;} last_known_location_hash=window.location.hash;matches=window.location.hash.match(hashRegExp);attachmentId=parseInt(matches[1],10);galleries=$('div.gallery, div.tiled-gallery, a.single-image-gallery');galleries.each(function(_,galleryEl){$(galleryEl).find('img').each(function(imageIndex,imageEl){if($(imageEl).data('attachment-id')===parseInt(attachmentId,10)){selectedThumbnail={index:imageIndex,gallery:galleryEl};return false;}});if(selectedThumbnail){$(selectedThumbnail.gallery).jp_carousel('openOrSelectSlide',selectedThumbnail.index);return false;}});});if(window.location.hash){$(window).trigger('hashchange');}});(function($){$.fn.touchwipe=function(settings){var config={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:true};if(settings){$.extend(config,settings);} this.each(function(){var startX;var startY;var isMoving=false;function cancelTouch(){this.removeEventListener('touchmove',onTouchMove);startX=null;isMoving=false;} function onTouchMove(e){if(config.preventDefaultEvents){e.preventDefault();} if(isMoving){var x=e.touches[0].pageX;var y=e.touches[0].pageY;var dx=startX-x;var dy=startY-y;if(Math.abs(dx)>=config.min_move_x){cancelTouch();if(dx>0){config.wipeLeft(e);}else{config.wipeRight(e);}} else if(Math.abs(dy)>=config.min_move_y){cancelTouch();if(dy>0){config.wipeDown(e);}else{config.wipeUp(e);}}}} function onTouchStart(e) {if(e.touches.length===1){startX=e.touches[0].pageX;startY=e.touches[0].pageY;isMoving=true;this.addEventListener('touchmove',onTouchMove,false);}} if('ontouchstart'in document.documentElement){this.addEventListener('touchstart',onTouchStart,false);}});return this;};})(jQuery); } /* FILE ARCHIVED ON 11:31:59 Dec 06, 2018 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 19:17:13 Jun 08, 2022. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 157.892 exclusion.robots: 0.206 exclusion.robots.policy: 0.199 RedisCDXSource: 0.596 esindex: 0.009 LoadShardBlock: 142.028 (3) PetaboxLoader3.datanode: 183.691 (4) CDXLines.iter: 13.21 (3) load_resource: 162.435 PetaboxLoader3.resolve: 90.655 */