!function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r").addClass("jp-carousel-overlay").css({position:"fixed",top:0,right:0,bottom:0,left:0});var d=''+jetpackCarouselStrings.comment+"";Number(jetpackCarouselStrings.is_logged_in),d=e('"),c=e('

'),p=e('').append(c),(f=e("
").addClass("jp-carousel-image-meta").css({float:"right","margin-top":"20px",width:"250px"})).append(d).append("").append("").append(""),g=e("
").addClass("jp-carousel-titleanddesc").css({width:"100%","margin-top":f.css("margin-top")});var m='").css({width:"100%","margin-top":"20px",color:"#999"}),a=e("
").addClass("jp-carousel-comments").css({width:"100%",bottom:"10px","margin-top":"20px"});var h=e('").css({width:"100%",bottom:"10px","margin-top":"20px"}),w=e(window).width()-2*_-(f.width()+40);w+="px",v=e("
").addClass("jp-carousel-left-column-wrapper").css({width:Math.floor(w)}).append(g).append(j).append(a).append(h);var x=e("
").addClass("jp-carousel-fadeaway");n=e("
").addClass("jp-carousel-info").css({top:Math.floor(e(window).height()/100*85),left:_,right:_}).append(p).append(f),window.innerWidth<=760?(p.remove().insertAfter(g),n.prepend(v)):n.append(v);var b=e(window).height()-parseInt(n.css("top"),10)+"px";s=e("
").addClass("jp-carousel-next-button").css({right:"15px"}).hide(),r=e("
").addClass("jp-carousel-previous-button").css({left:0}).hide(),s.add(r).css({position:"fixed",top:"40px",bottom:b,width:_}),i=e("
").addClass("jp-carousel").css({position:"absolute",top:0,bottom:b,left:0,right:0}),u=e('').css({position:"fixed"}),o=e("
").addClass("jp-carousel-wrap").addClass("jp-carousel-transitions"),"white"===jetpackCarouselStrings.background_color&&o.addClass("jp-carousel-light"),o.attr("itemscope",""),o.attr("itemtype","https://schema.org/ImageGallery"),o.css({position:"fixed",top:0,right:0,bottom:0,left:0,"z-index":2147483647,"overflow-x":"hidden","overflow-y":"auto",direction:"ltr"}).hide().append(t).append(i).append(x).append(n).append(s).append(r).append(u).appendTo(e("body")).click(function(t){var a=e(t.target),s=a.parents("div.jp-carousel-wrap"),r=s.data("carousel-extra"),l=s.find("div.selected").data("attachment-id");if(r=r||[],a.is(i)||a.parents().add(a).is(u))o.jp_carousel("close");else if(a.hasClass("jp-carousel-commentlink"))t.preventDefault(),t.stopPropagation(),e(window).unbind("keydown",k),o.animate({scrollTop:parseInt(n.position().top,10)},"fast"),e("#jp-carousel-comment-form-submit-and-info-wrapper").slideDown("fast"),e("#jp-carousel-comment-form-comment-field").focus();else if(a.hasClass("jp-carousel-comment-login")){var c=jetpackCarouselStrings.login_url+"%23jp-carousel-"+l;window.location.href=c}else if(a.parents("#jp-carousel-comment-form-container").length){var d=e("#jp-carousel-comment-form-comment-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)}),p=e("#jp-carousel-comment-form-email-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)}),m=e("#jp-carousel-comment-form-author-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)}),h=e("#jp-carousel-comment-form-url-field").blur(function(){e(window).bind("keydown",k)}).focus(function(){e(window).unbind("keydown",k)});if(d&&d.attr("id")===a.attr("id"))e(window).unbind("keydown",k),e("#jp-carousel-comment-form-submit-and-info-wrapper").slideDown("fast");else if(a.is('input[type="submit"]')){t.preventDefault(),t.stopPropagation(),e("#jp-carousel-comment-form-spinner").spin("small","white");var f={action:"post_attachment_comment",nonce:jetpackCarouselStrings.nonce,blog_id:r.blog_id,id:l,comment:d.val()};if(!f.comment.length)return void i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-comment-field",error:jetpackCarouselStrings.no_comment_text});if(1!==Number(jetpackCarouselStrings.is_logged_in)&&(f.email=p.val(),f.author=m.val(),f.url=h.val(),1===Number(jetpackCarouselStrings.require_name_email))){if(!f.email.length||!f.email.match("@"))return void i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-email-field",error:jetpackCarouselStrings.no_comment_email});if(!f.author.length)return void i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-author-field",error:jetpackCarouselStrings.no_comment_author})}e.ajax({type:"POST",url:jetpackCarouselStrings.ajaxurl,data:f,dataType:"json",success:function(t){"approved"===t.comment_status?e("#jp-carousel-comment-post-results").slideUp("fast").html(''+jetpackCarouselStrings.comment_approved+"").slideDown("fast"):"unapproved"===t.comment_status?e("#jp-carousel-comment-post-results").slideUp("fast").html(''+jetpackCarouselStrings.comment_unapproved+"").slideDown("fast"):e("#jp-carousel-comment-post-results").slideUp("fast").html(''+jetpackCarouselStrings.comment_post_error+"").slideDown("fast"),i.jp_carousel("clearCommentTextAreaValue"),i.jp_carousel("getComments",{attachment_id:l,offset:0,clear:!0}),e("#jp-carousel-comment-form-button-submit").val(jetpackCarouselStrings.post_comment),e("#jp-carousel-comment-form-spinner").spin(!1)},error:function(){i.jp_carousel("postCommentError",{field:"jp-carousel-comment-form-comment-field",error:jetpackCarouselStrings.comment_post_error})}})}}else a.parents(".jp-carousel-info").length||o.jp_carousel("next")}).bind("jp_carousel.afterOpen",function(){e(window).bind("keydown",k),e(window).bind("resize",S),i.opened=!0,S()}).bind("jp_carousel.beforeClose",function(){var t=e(window).scrollTop();e(window).unbind("keydown",k),e(window).unbind("resize",S),e(window).scrollTop(t),e(".jp-carousel-previous-button").hide(),e(".jp-carousel-next-button").hide(),e("html").css("height","")}).bind("jp_carousel.afterClose",function(){window.location.hash&&history.back&&history.back(),y="",i.opened=!1}).on("transitionend.jp-carousel ",".jp-carousel-slide",function(t){if("transform"===t.originalEvent.propertyName){var a=(Date.now()-l)/1e3/t.originalEvent.elapsedTime;o.off("transitionend.jp-carousel"),a>=2&&e(".jp-carousel-transitions").removeClass("jp-carousel-transitions")}}),e(".jp-carousel-wrap").touchwipe({wipeLeft:function(e){e.preventDefault(),i.jp_carousel("next")},wipeRight:function(e){e.preventDefault(),i.jp_carousel("previous")},preventDefaultEvents:!1}),s.add(r).click(function(e){e.preventDefault(),e.stopPropagation(),s.is(this)?i.jp_carousel("next"):i.jp_carousel("previous")})}}(),!i.jp_carousel("testIfOpened")))return x=e("body").css("overflow"),e("body").css("overflow","hidden"),b=e("html").css("overflow"),e("html").css("overflow","hidden"),w=e(window).scrollTop(),o.data("carousel-extra",h),this.each(function(){var t=e(this);d&&e.extend(m,d),-1===m.start_index&&(m.start_index=0),o.trigger("jp_carousel.beforeOpen").fadeIn("fast",function(){o.trigger("jp_carousel.afterOpen"),i.jp_carousel("initSlides",t.find(m.items_selector),m.start_index).jp_carousel("selectSlideAtIndex",m.start_index)}),i.html("")})},selectSlideAtIndex:function(e){var t=this.jp_carousel("slides"),a=t.eq(e);return 0===a.length&&(a=t.eq(0)),i.jp_carousel("selectSlide",a,!1),this},close:function(){return e("body").css("overflow",x),e("html").css("overflow",b),this.jp_carousel("clearCommentTextAreaValue"),o.trigger("jp_carousel.beforeClose").fadeOut("fast",function(){o.trigger("jp_carousel.afterClose"),e(window).scrollTop(w)})},next:function(){this.jp_carousel("previousOrNext","nextSlide")},previous:function(){this.jp_carousel("previousOrNext","prevSlide")},previousOrNext:function(e){if(!this.jp_carousel("hasMultipleImages"))return!1;var t=i.jp_carousel(e);t&&(o.animate({scrollTop:0},"fast"),this.jp_carousel("clearCommentTextAreaValue"),this.jp_carousel("selectSlide",t))},selectedSlide:function(){return this.find(".selected")},setSlidePosition:function(e){return l=Date.now(),this.css({"-webkit-transform":"translate3d("+e+"px,0,0)","-moz-transform":"translate3d("+e+"px,0,0)","-ms-transform":"translate("+e+"px,0)","-o-transform":"translate("+e+"px,0)",transform:"translate3d("+e+"px,0,0)"})},updateSlidePositions:function(e){var t=this.jp_carousel("selectedSlide"),a=i.width(),o=t.width(),s=i.jp_carousel("prevSlide"),r=i.jp_carousel("nextSlide"),n=s.prev(),l=r.next(),c=Math.floor(.5*(a-o));t.jp_carousel("setSlidePosition",c).show(),i.jp_carousel("fitInfo",e),1===(h.is(t.prevAll())?1:-1)?(l.is(s)||l.jp_carousel("setSlidePosition",a+r.width()).show(),n.is(r)||n.jp_carousel("setSlidePosition",-n.width()-o).show()):l.is(s)||l.jp_carousel("setSlidePosition",a+o).show(),s.jp_carousel("setSlidePosition",Math.floor(-s.width()+.75*_)).show(),r.jp_carousel("setSlidePosition",Math.ceil(a-.75*_)).show()},selectSlide:function(t,a){h=this.find(".selected").removeClass("selected");var s,r,n=i.jp_carousel("slides").css({position:"fixed"}),l=e(t).addClass("selected").css({position:"relative"}),d=l.data("attachment-id"),p=i.jp_carousel("prevSlide"),u=i.jp_carousel("nextSlide"),m=p.prev(),f=u.next();i.jp_carousel("loadFullImage",l),c.hide(),0===u.length&&n.length<=2?e(".jp-carousel-next-button").hide():e(".jp-carousel-next-button").show(),0===p.length&&n.length<=2?e(".jp-carousel-previous-button").hide():e(".jp-carousel-previous-button").show(),s=l.add(p).add(m).add(u).add(f).jp_carousel("loadSlide"),n.not(s).hide(),i.jp_carousel("updateSlidePositions",a),o.trigger("jp_carousel.selectSlide",[l]),i.jp_carousel("getTitleDesc",{title:l.data("title"),desc:l.data("desc")});var g=l.data("image-meta");i.jp_carousel("updateExif",g),i.jp_carousel("updateFullSizeLink",l),i.jp_carousel("updateMap",g),i.jp_carousel("testCommentsOpened",l.data("comments-opened")),i.jp_carousel("getComments",{attachment_id:d,offset:0,clear:!0}),e("#jp-carousel-comment-post-results").slideUp(),l.data("caption")?((r=e("
").text(l.data("caption")).html())===e("
").text(l.data("title")).html()&&e(".jp-carousel-titleanddesc-title").fadeOut("fast").empty(),r===e("
").text(l.data("desc")).html()&&e(".jp-carousel-titleanddesc-desc").fadeOut("fast").empty(),c.html(l.data("caption")).fadeIn("slow")):c.fadeOut("fast").empty(),jetpackCarouselStrings.stats&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+jetpackCarouselStrings.stats+"&post="+encodeURIComponent(d)+"&rand="+Math.random()),e(u).add(p).each(function(){i.jp_carousel("loadFullImage",e(this))}),window.location.hash=y="#jp-carousel-"+d},slides:function(){return this.find(".jp-carousel-slide")},slideDimensions:function(){return{width:e(window).width()-2*_,height:Math.floor(e(window).height()/100*85-60)}},loadSlide:function(){return this.each(function(){var t=e(this);t.find("img").one("load",function(){t.jp_carousel("fitSlide",!1)})})},bestFit:function(){var e,t,a=i.jp_carousel("slideDimensions"),o=this.jp_carousel("originalDimensions"),s=o.width/o.height,r=1,n=1;return o.width>a.width&&(r=a.width/o.width),o.height>a.height&&(n=a.height/o.height),r")[0].src=e(t[a]).data("gallery-src"));var o=t.first().closest(".tiled-gallery.type-rectangular").length>0;return t.each(function(t){var s=e(this),r=s.data("attachment-id")||0,n=s.data("comments-opened")||0,l=s.data("image-meta")||{},c=s.data("orig-size")||"",d={width:s[0].naturalWidth,height:s[0].naturalHeight},p=s.data("image-title")||"",u=s.data("image-description")||"",m=s.parents(".gallery-item").find(".gallery-caption").html()||"",h=s.data("gallery-src")||"",f=s.data("medium-file")||"",g=s.data("large-file")||"",j=s.data("orig-file")||"",v=s.parents("div.tiled-gallery-item").find("div.tiled-gallery-caption").html();if(v&&(m=v),r&&c.length){p=i.jp_carousel("texturize",p),u=i.jp_carousel("texturize",u),m=i.jp_carousel("texturize",m);var w=e("").attr("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7").css("width","100%").css("height","100%"),_=e('').hide().css({left:t1&&(e.max_width=e.max_width*window.devicePixelRatio,e.max_height=e.max_height*window.devicePixelRatio),r>=e.max_width||n>=e.max_height)return e.large_file;if(l>=e.max_width||c>=e.max_height)return e.medium_file;if(a){var d=e.large_file.lastIndexOf("?"),p=e.large_file;return-1!==d&&(p=e.large_file.substring(0,d),(e.orig_width>e.max_width||e.orig_height>e.max_height)&&(p+="?fit="+e.orig_max_width+"%2C"+e.orig_max_height)),p}return e.orig_file},getImageSizeParts:function(e,t,a){var i=a?e.replace(/.*=([\d]+%2C[\d]+).*$/,"$1"):e.replace(/.*-([\d]+x[\d]+)\..+$/,"$1"),o=i!==e?a?i.split("%2C"):i.split("x"):[t,0];return"9999"===o[0]&&(o[0]="0"),"9999"===o[1]&&(o[1]="0"),o},originalDimensions:function(){var t=e(this).data("orig-size").split(",");return{width:parseInt(t[0],10),height:parseInt(t[1],10)}},format:function(e){if("object"!=typeof e&&(e={}),e.text&&void 0!==e.text)return e.replacements&&void 0!==e.replacements?e.text.replace(/{(\d+)}/g,function(t,a){return void 0!==e.replacements[a]?e.replacements[a]:t}):e.text},shutterSpeed:function(e){return e>=1?Math.round(10*e)/10+"s":"1/"+Math.round(1/e)+"s"},parseTitleDesc:function(e){return!e.match(" ")&&e.match("_")?"":e},getTitleDesc:function(t){var a,o,s="",r="";(o=e("div.jp-carousel-titleanddesc","div.jp-carousel-wrap")).hide(),s=i.jp_carousel("parseTitleDesc",t.title)||"",a=i.jp_carousel("parseTitleDesc",t.desc)||"",(s.length||a.length)&&(e("
").html(s).text()===e("
").html(a).text()&&(s=""),r=s.length?'":"",r+=a.length?'":"",o.html(r).fadeIn("slow")),e("div#jp-carousel-comment-form-container").css("margin-top","20px"),e("div#jp-carousel-comments-loading").css("margin-top","20px")},updateExif:function(t){if(!t||1!==Number(jetpackCarouselStrings.display_exif))return!1;var a=e("");e.each(t,function(t,o){if(0!==parseFloat(o)&&o.length&&-1!==e.inArray(t,e.makeArray(jetpackCarouselStrings.meta_data))){switch(t){case"focal_length":o+="mm";break;case"shutter_speed":o=i.jp_carousel("shutterSpeed",o);break;case"aperture":o="f/"+o}a.append("
  • "+jetpackCarouselStrings[t]+"
    "+o+"
  • ")}}),e("div.jp-carousel-image-meta ul.jp-carousel-image-exif").replaceWith(a)},updateFullSizeLink:function(t){if(!t||!t.data)return!1;var a,o=t.data("orig-size").split(","),s=document.createElement("a");s.href=t.data("src").replace(/\?.+$/,""),a=null!==s.hostname.match(/^i[\d]{1}.wp.com$/i)?s.href:t.data("orig-file").replace(/\?.+$/,"");var r=e(""+i.jp_carousel("format",{text:jetpackCarouselStrings.download_original,replacements:o})+"").addClass("jp-carousel-image-download").attr("href",a).attr("target","_blank");e("div.jp-carousel-image-meta a.jp-carousel-image-download").replaceWith(r)},updateMap:function(t){if(t.latitude&&t.longitude&&1===Number(jetpackCarouselStrings.display_geo)){var a=t.latitude,i=t.longitude,o=e("div.jp-carousel-image-meta","div.jp-carousel-wrap"),s="&scale=2&style=feature:all|element:all|invert_lightness:true|hue:0x0077FF|saturation:-50|lightness:-5|gamma:0.91";e("
    ").addClass("jp-carousel-image-map").html('\t\t\t\t\t\t\t\t\t\t\t\t\t
    \t\t\t\t\t\t\t\t\t\t\t\t\t').prependTo(o)}},testCommentsOpened:function(t){1===parseInt(t,10)?(e(".jp-carousel-buttons").fadeIn("fast"),j.fadeIn("fast")):(e(".jp-carousel-buttons").fadeOut("fast"),j.fadeOut("fast"))},getComments:function(t){if(clearInterval(m),"object"==typeof t&&void 0!==t.attachment_id&&t.attachment_id){(!t.offset||void 0===t.offset||t.offset<1)&&(t.offset=0);var a=e(".jp-carousel-comments"),o=e("#jp-carousel-comments-loading").show();t.clear&&a.hide().empty(),e.ajax({type:"GET",url:jetpackCarouselStrings.ajaxurl,dataType:"json",data:{action:"get_attachment_comments",nonce:jetpackCarouselStrings.nonce,id:t.attachment_id,offset:t.offset},success:function(s){t.clear&&a.fadeOut("fast").empty(),e(s).each(function(){var o=e("
    ").addClass("jp-carousel-comment").attr("id","jp-carousel-comment-"+this.id).html('
    '+this.gravatar_markup+'
    '+this.author_markup+'
    '+this.date_gmt+'
    '+this.content+"
    ");a.append(o),clearInterval(m),m=setInterval(function(){e(".jp-carousel-overlay").height()-1500?a.height():f.height())+200),a.show(),o.hide()},error:function(e,t,i){console.log("Comment get fail...",e,t,i),a.fadeIn("fast"),o.fadeOut("fast")}})}},postCommentError:function(t){"object"!=typeof t&&(t={}),t.field&&void 0!==t.field&&t.error&&void 0!==t.error&&(e("#jp-carousel-comment-post-results").slideUp("fast").html('").slideDown("fast"),e("#jp-carousel-comment-form-spinner").spin(!1))},setCommentIframeSrc:function(t){var a=e("#jp-carousel-comment-iframe");a&&a.length&&(a.attr("src",a.attr("src").replace(/(postid=)\d+/,"$1"+t)),a.attr("src",a.attr("src").replace(/(%23.+)?$/,"%23jp-carousel-"+t)))},clearCommentTextAreaValue:function(){var t=e("#jp-carousel-comment-form-comment-field");t&&t.val("")},nextSlide:function(){var e=this.jp_carousel("slides"),t=this.jp_carousel("selectedSlide");return 0===t.length||e.length>2&&t.is(e.last())?e.first():t.next()},prevSlide:function(){var e=this.jp_carousel("slides"),t=this.jp_carousel("selectedSlide");return 0===t.length||e.length>2&&t.is(e.first())?e.last():t.prev()},loadFullImage:function(t){var a=t.find("img:first");a.data("loaded")||(a.on("load.jetpack",function(){a.off("load.jetpack"),e(this).closest(".jp-carousel-slide").css("background-image","")}),!t.data("preview-image")||t.data("thumb-size")&&t.width()>t.data("thumb-size").width?a.attr("src",a.closest(".jp-carousel-slide").data("src")).attr("itemprop","image"):a.attr("src",t.data("preview-image")).attr("itemprop","image"),a.data("loaded",1))},hasMultipleImages:function(){return i.jp_carousel("slides").length>1}};e.fn.jp_carousel=function(t){return I[t]?I[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.jp_carousel"):I.open.apply(this,arguments)},e(document.body).on("click.jp-carousel","div.gallery, div.tiled-gallery, ul.wp-block-gallery, ul.blocks-gallery-grid, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery",function(t){e(this).jp_carousel("testForData",t.currentTarget)&&(e(t.target).parent().hasClass("gallery-caption")||e(t.target).parent().is("figcaption")||(e("html").css("height","auto"),t.preventDefault(),t.stopPropagation(),e(this).jp_carousel("open",{start_index:e(this).find(".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item").index(e(t.target).parents(".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item"))})))}),1===Number(jetpackCarouselStrings.single_image_gallery)&&(C(),e(document.body).on("post-load",function(){C()})),e(window).on("hashchange.jp-carousel",function(){var t,a,s,r=/jp-carousel-(\d+)/;window.location.hash&&r.test(window.location.hash)?window.location.hash===y&&i.opened||(window.location.hash&&i&&!i.opened&&history.back?history.back():(y=window.location.hash,t=window.location.hash.match(r),a=parseInt(t[1],10),e("div.gallery, div.tiled-gallery, a.single-image-gallery, ul.wp-block-gallery, div.wp-block-jetpack-tiled-gallery").each(function(t,i){if(e(i).find("img").each(function(t,o){if(e(o).data("attachment-id")===parseInt(a,10))return s={index:t,gallery:i},!1}),s)return e(s.gallery).jp_carousel("openOrSelectSlide",s.index),!1}))):i&&i.opened&&o.jp_carousel("close")}),window.location.hash&&e(window).trigger("hashchange")}),function(e){e.fn.touchwipe=function(t){var a={min_move_x:20,min_move_y:20,wipeLeft:function(){},wipeRight:function(){},wipeUp:function(){},wipeDown:function(){},preventDefaultEvents:!0};return t&&e.extend(a,t),this.each(function(){var e,t,i=!1;function o(){this.removeEventListener("touchmove",s),e=null,i=!1}function s(s){if(a.preventDefaultEvents&&s.preventDefault(),i){var r=s.touches[0].pageX,n=s.touches[0].pageY,l=e-r,c=t-n;Math.abs(l)>=a.min_move_x?(o(),l>0?a.wipeLeft(s):a.wipeRight(s)):Math.abs(c)>=a.min_move_y&&(o(),c>0?a.wipeDown(s):a.wipeUp(s))}}"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",function(a){1===a.touches.length&&(e=a.touches[0].pageX,t=a.touches[0].pageY,i=!0,this.addEventListener("touchmove",s,!1))},!1)}),this}}(jQuery); var sharing_js_options;if(sharing_js_options&&sharing_js_options.counts)var WPCOMSharing={done_urls:[],get_counts:function(){var t,e,i,n,a;if("undefined"!=typeof WPCOM_sharing_counts)for(t in WPCOM_sharing_counts)if(i=WPCOM_sharing_counts[t],void 0===WPCOMSharing.done_urls[i]){for(n in e={pinterest:[window.location.protocol+"//api.pinterest.com/v1/urls/count.json?callback=WPCOMSharing.update_pinterest_count&url="+encodeURIComponent(t)],facebook:[window.location.protocol+"//graph.facebook.com/?callback=WPCOMSharing.update_facebook_count&ids="+encodeURIComponent(t)]})if(jQuery("a[data-shared=sharing-"+n+"-"+i+"]").length){for(;a=e[n].pop();)jQuery.getScript(a);sharing_js_options.is_stats_active&&WPCOMSharing.bump_sharing_count_stat(n)}WPCOMSharing.done_urls[i]=!0}},get_permalink:function(t){return t="https:"===window.location.protocol?t.replace(/^http:\/\//i,"https://"):t.replace(/^https:\/\//i,"http://")},update_facebook_count:function(t){var e,i;if(t)for(e in t)t.hasOwnProperty(e)&&t[e].share&&t[e].share.share_count&&(i=WPCOMSharing.get_permalink(e))in WPCOM_sharing_counts&&WPCOMSharing.inject_share_count("sharing-facebook-"+WPCOM_sharing_counts[i],t[e].share.share_count)},update_pinterest_count:function(t){void 0!==t.count&&1*t.count>0&&WPCOMSharing.inject_share_count("sharing-pinterest-"+WPCOM_sharing_counts[t.url],t.count)},inject_share_count:function(t,e){var i=jQuery("a[data-shared="+t+"] > span");i.find(".share-count").remove(),i.append('")},format_count:function(t){return t<1e3?t:t>=1e3&&t<1e4?String(t).substring(0,1)+"K+":"10K+"},bump_sharing_count_stat:function(t){(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv&x_sharing-count-request="+t+"&r="+Math.random()}};!function(t){var e,i;function n(){var e;void 0!==WPCOMSharing&&WPCOMSharing.get_counts(),(e=t(".sharedaddy a.sharing-anchor")).click(function(){return!1}),t(".sharedaddy a").each(function(){t(this).attr("href")&&-1!==t(this).attr("href").indexOf("share=")&&t(this).attr("href",t(this).attr("href")+"&nb=1")}),e.on("click",function(){var e=t(this),n=e.parents("div:first").find(".inner");n.is(":animated")||!0!==n.data("justSlid")&&(i.slideUp(200),n.css({left:e.position().left+"px",top:e.position().top+e.height()+3+"px"}).slideToggle(200))}),void 0===document.ontouchstart?e.hover(function(){var e,n=t(this),a=n.parents("div:first").find(".inner");a.is(":animated")||(e=setTimeout(function(){var t,e,r,o,s;i.slideUp(200),a.data("justSlid",!0),a.css({left:n.position().left+"px",top:n.position().top+n.height()+3+"px"}).slideDown(200,function(){n.data("hasoriginal",!0).data("hasitem",!1),setTimeout(function(){a.data("justSlid",!1)},300),a.mouseleave(t).mouseenter(e),n.mouseleave(r).mouseenter(o)}),t=function(){if(n.data("hasitem",!1),!1===n.data("hasoriginal")){var t=setTimeout(s,800);n.data("timer2",t)}},e=function(){n.data("hasitem",!0),clearTimeout(n.data("timer2"))},r=function(){if(n.data("hasoriginal",!1),!1===n.data("hasitem")){var t=setTimeout(s,800);n.data("timer2",t)}},o=function(){n.data("hasoriginal",!0),clearTimeout(n.data("timer2"))},s=function(){return a.data("justSlid",!0),a.slideUp(200,function(){setTimeout(function(){a.data("justSlid",!1)},300)}),n.unbind("mouseleave",r).unbind("mouseenter",o),a.unbind("mouseleave",t).unbind("mouseenter",t),!1}},200),n.data("timer",e))},function(){e.each(function(){clearTimeout(t(this).data("timer"))}),e.data("timer",!1)}):t(document.body).addClass("jp-sharing-input-touch"),t(document).click(function(){e.each(function(){clearTimeout(t(this).data("timer"))}),e.data("timer",!1),t(".sharedaddy .inner").slideUp()}),t(".sharedaddy ul").each(function(){if("yep"!==t(this).data("has-click-events")){t(this).data("has-click-events","yep");t(this).find("a.share-print").click(function(){var e=t(this).attr("href"),i=function(){if(-1===e.indexOf("#print")){var i=(new Date).getTime();n=i,a=e,t("body:first").append('")}else print();var n,a};return t(this).parents(".sharing-hidden").length>0?t(this).parents(".inner").slideUp(0,function(){i()}):i(),!1}),t(this).find("a.share-press-this").click(function(){var e="";return window.getSelection?e=window.getSelection():document.getSelection?e=document.getSelection():document.selection&&(e=document.selection.createRange().text),e&&t(this).attr("href",t(this).attr("href")+"&sel="+encodeURI(e)),window.open(t(this).attr("href"),"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570")||(document.location.href=t(this).attr("href")),!1}),t("a.share-email",this).on("click",function(){var e=t(this).attr("href"),n=window.location.protocol+"//"+window.location.hostname+"/";return 0!==e.indexOf(n)||(i.is(":visible")?i.slideUp(200):(t(".sharedaddy .inner").slideUp(),t("#sharing_email .response").remove(),t("#sharing_email form").show(),t("#sharing_email form input[type=submit]").removeAttr("disabled"),t("#sharing_email form a.sharing_cancel").show(),"object"==typeof grecaptcha&&"function"==typeof grecaptcha.reset&&window.___grecaptcha_cfg.count&&grecaptcha.reset(),i.css({left:t(this).offset().left+"px",top:t(this).offset().top+t(this).height()+"px"}).slideDown(200),t("#sharing_email a.sharing_cancel").unbind("click").click(function(){return t("#sharing_email .errors").hide(),i.slideUp(200),t("#sharing_background").fadeOut(),!1}),t("#sharing_email input[type=submit]").unbind("click").click(function(){var n=t(this).parents("form"),a=n.find("input[name=source_email]"),r=n.find("input[name=target_email]");return t(this).prop("disabled",!0),n.find("a.sharing_cancel").hide(),n.find("img.loading").show(),t("#sharing_email .errors").hide(),t("#sharing_email .error").removeClass("error"),a.share_is_email()||a.addClass("error"),r.share_is_email()||r.addClass("error"),0===t("#sharing_email .error").length?(t.ajax({url:e,type:"POST",data:n.serialize(),success:function(e){n.find("img.loading").hide(),"1"===e||"2"===e||"3"===e?(t("#sharing_email .errors-"+e).show(),n.find("input[type=submit]").removeAttr("disabled"),n.find("a.sharing_cancel").show(),"object"==typeof grecaptcha&&"function"==typeof grecaptcha.reset&&grecaptcha.reset()):(t("#sharing_email form").hide(),i.append(e),t("#sharing_email a.sharing_cancel").click(function(){return i.slideUp(200),t("#sharing_background").fadeOut(),!1}))}}),!1):(n.find("img.loading").hide(),n.find("input[type=submit]").removeAttr("disabled"),n.find("a.sharing_cancel").show(),t("#sharing_email .errors-1").show(),!1)})),!1)})}}),t("li.share-email, li.share-custom a.sharing-anchor").addClass("share-service-visible")}t.fn.extend({share_is_email:function(){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(this.val())}}),e=t(document.body).on("post-load",n),t(document).ready(function(){i=t("#sharing_email"),e.append(i),n()})}(jQuery);