jQuery(document).ready(function($){fts_external_link_meta_content();jQuery(".fts-youtube-scrollable, .youtube-comments-wrap-premium, .youtube-comments-thumbs").hover(function(){jQuery("body").css("overflow","hidden")},function(){jQuery("body").css("overflow","auto")});jQuery(document).on("keydown",function(e){if(e.keyCode===27){jQuery(".fts-youtube-scrollable").removeClass("fts-scrollable-function");jQuery(".youtube-comments-thumbs").hide();jQuery(".fts-youtube-scrollable, .fts-fb-autoscroll-loader").show();jQuery(".fts-youtube-thumbs-gallery-master .youtube-comments-thumbs").html("");slickremixImageResizing()}});if(navigator.userAgent.indexOf("Firefox")>0){}else{jQuery(".fts-instagram-popup-half video, .fts-simple-fb-wrapper video, .fts-slicker-facebook-posts video, .fts-fluid-videoWrapper-html5 video").click(function(){jQuery(this).trigger(this.paused?this.paused?"play":"play":"pause")})}if(jQuery.fn.masonry){jQuery(".fts-slicker-instagram").masonry({itemSelector:".fts-masonry-option"})}});if(!jQuery.trim(jQuery(".fts-jal-fb-group-display").html()).length){jQuery(".fts-jal-fb-group-display").append('')}function ftsShare(){jQuery(".fts-share-wrap").each(function(){let $self=jQuery(this);$self.find(".ft-gallery-link-popup").unbind().bind("click",function(){$self.find(".ft-gallery-share-wrap").toggle()})})}jQuery(document).ready(ftsShare);jQuery(window).on("resize",slickremixImageResizing);function slickremixImageResizing(){jQuery(".fts-instagram-inline-block-centered").each(function(){const ftsBlockCenteredAttr=jQuery(this).attr("id");let uniqueID=jQuery("#"+ftsBlockCenteredAttr);let ftsContainerWidth=uniqueID.width();let ftsImageSize=jQuery("#"+ftsBlockCenteredAttr+" .slicker-instagram-placeholder");let ftsInstagramColumns;if(ftsContainerWidth<="376"&&uniqueID.attr("data-ftsi-columns-mobile")!==undefined){ftsInstagramColumns=uniqueID.attr("data-ftsi-columns-mobile")}else if(ftsContainerWidth<="736"&&uniqueID.attr("data-ftsi-columns-tablet")!==undefined){ftsInstagramColumns=uniqueID.attr("data-ftsi-columns-tablet")}else{ftsInstagramColumns=uniqueID.attr("data-ftsi-columns")}let ftsInstagramHeight=uniqueID.attr("data-ftsi-height")&&uniqueID.attr("data-ftsi-height")!==""?uniqueID.attr("data-ftsi-height"):0;let ftsInstagramMargin=uniqueID.attr("data-ftsi-margin");let ftsInstagramMarginfinal=parseFloat(ftsInstagramMargin)*2;let og_size;if(ftsInstagramColumns==="1"||ftsInstagramColumns==="2"||ftsInstagramColumns==="3"||ftsInstagramColumns==="4"||ftsInstagramColumns==="5"||ftsInstagramColumns==="6"||ftsInstagramColumns==="7"||ftsInstagramColumns==="8"){if(ftsInstagramColumns==="8"){og_size="calc(12.5% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="7"){og_size="calc(14.28571428571429% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="6"){og_size="calc(16.66666666666667% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="5"){og_size="calc(20% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="4"){og_size="calc(25% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="3"){og_size="calc(33.33333333333333% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="2"){og_size="calc(50% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="1"){og_size="calc(100% - "+ftsInstagramMarginfinal+"px)"}ftsImageSize.css({width:og_size});const ftsImageHeight=ftsImageSize.width()+parseFloat(ftsInstagramHeight);ftsImageSize.css({width:og_size,height:ftsImageHeight,margin:ftsInstagramMargin})}else{const ftsImageWidth=uniqueID.attr("data-ftsi-width")?uniqueID.attr("data-ftsi-width"):"325px";ftsImageSize.css({width:ftsImageWidth,height:ftsImageWidth,margin:ftsInstagramMargin})}if(ftsImageSize.width()<180){uniqueID.find(".slicker-date, .fts-insta-likes-comments-grab-popup, .fts-instagram-video-image-wrapper, .fts-carousel-image-wrapper").hide();uniqueID.find(".slicker-instagram-placeholder").addClass("fts-smallerthan-180")}else{uniqueID.find(".slicker-date, .fts-insta-likes-comments-grab-popup, .fts-instagram-video-image-wrapper, .fts-carousel-image-wrapper").show();uniqueID.find(".slicker-instagram-placeholder").removeClass("fts-smallerthan-180")}})}jQuery(document).ready(slickremixImageResizingFacebook,slickremixImageResizingFacebook2,slickremixImageResizingFacebook3);jQuery(window).on("resize",slickremixImageResizingFacebook,slickremixImageResizingFacebook2,slickremixImageResizingFacebook3);function slickremixImageResizingFacebook(){jQuery(".fts-facebook-inline-block-centered").each(function(){const ftsBlockCenteredAttr=jQuery(this).attr("id");let uniqueID=jQuery("#"+ftsBlockCenteredAttr);let ftsImageSize=jQuery("#"+ftsBlockCenteredAttr+" .slicker-facebook-placeholder");let ftsInstagramColumns=uniqueID.attr("data-ftsi-columns");let ftsInstagramMargin=uniqueID.attr("data-ftsi-margin");let ftsInstagramMarginfinal=parseFloat(ftsInstagramMargin)*1;let ftsContainerWidth=uniqueID.width();let ftsForceColumns="yes";if(ftsInstagramColumns==="2"||ftsInstagramColumns==="3"){let og_size;if(ftsInstagramColumns==="3"){og_size="calc(33.0777777% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="2"){og_size="calc(49.777777% - "+ftsInstagramMarginfinal+"px)"}ftsImageSize.css({width:og_size});const ftsImageHeight=ftsImageSize.width();ftsImageSize.css({width:og_size,height:ftsImageHeight,margin:ftsInstagramMargin})}else{let ftsImageWidth=uniqueID.attr("data-ftsi-width")?uniqueID.attr("data-ftsi-width"):"325px";ftsImageSize.css({width:ftsImageWidth,height:ftsImageWidth,margin:ftsInstagramMargin})}if(ftsImageSize.width()<180){jQuery(".fts-facebook-inline-block-centered .slicker-date, .fts-facebook-inline-block-centered .fts-insta-likes-comments-grab-popup").hide();jQuery(".slicker-facebook-placeholder").addClass("fts-smallerthan-180")}else{jQuery(".fts-facebook-inline-block-centered .slicker-date, .fts-facebook-inline-block-centered .fts-insta-likes-comments-grab-popup").show();jQuery(".slicker-facebook-placeholder, .slicker-youtube-placeholder").removeClass("fts-smallerthan-180")}})}function slickremixImageResizingFacebook2(){let e=jQuery(".fts-more-photos-2-or-3-photos a"),t="calc(49.88888888% - 1px)";e.css({width:t});const s=e.width();e.css({width:t,height:s,margin:"1px"})}function slickremixImageResizingFacebook3(){let e=jQuery(".fts-more-photos-4-photos a"),t="calc(33.192222222% - 1px)";e.css({width:t});const s=e.width();e.css({width:t,height:s,margin:"1px"})}jQuery(document).ready(slickremixImageResizingYouTube);jQuery(window).on("resize",slickremixImageResizingYouTube);function slickremixImageResizingYouTube(){let ftsBlockCenteredAttr=jQuery(".fts-youtube-inline-block-centered");let ftsYoutubeImageSize=jQuery(".slicker-youtube-placeholder");let ftsYoutubeThumbsContainer=jQuery(".fts-youtube-popup-gallery");let ftsYoutubeLarge=jQuery(".fts-yt-large");let ftsYoutubeThumbsWrap=jQuery(".fts-youtube-scrollable.fts-youtube-thumbs-wrap, .fts-youtube-scrollable.fts-youtube-thumbs-wrap-left, .youtube-comments-wrap-premium, .youtube-comments-wrap.fts-youtube-thumbs-wrap-right, .youtube-comments-wrap.fts-youtube-thumbs-wrap-left");let ftsContainerWidth=ftsBlockCenteredAttr.width();let ftsInstagramColumns;if(ftsContainerWidth<="376"&&ftsBlockCenteredAttr.attr("data-ftsi-columns-mobile")!==undefined){ftsInstagramColumns=ftsBlockCenteredAttr.attr("data-ftsi-columns-mobile")}else if(ftsContainerWidth<="736"&&ftsBlockCenteredAttr.attr("data-ftsi-columns-tablet")!==undefined){ftsInstagramColumns=ftsBlockCenteredAttr.attr("data-ftsi-columns-tablet")}else{ftsInstagramColumns=ftsBlockCenteredAttr.attr("data-ftsi-columns")}let ftsInstagramMargin=ftsBlockCenteredAttr.attr("data-ftsi-margin");let ftsInstagramMarginfinal=parseFloat(ftsInstagramMargin)*2;let og_size;if(ftsInstagramColumns==="1"||ftsInstagramColumns==="2"||ftsInstagramColumns==="3"||ftsInstagramColumns==="4"||ftsInstagramColumns==="5"||ftsInstagramColumns==="6"){if(ftsInstagramColumns==="6"){og_size="calc(16.66666666666667% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="5"){og_size="calc(20% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="4"){og_size="calc(25% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="3"){og_size="calc(33.33333333333333% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="2"){og_size="calc(50% - "+ftsInstagramMarginfinal+"px)"}else if(ftsInstagramColumns==="1"){og_size="calc(100% - "+ftsInstagramMarginfinal+"px)"}let ftsYoutubeLargeHeight=ftsYoutubeLarge.height();let ftsYoutubeLargeHeightFinal="calc(100% - "+ftsYoutubeLargeHeight+"px)";ftsYoutubeThumbsWrap.css({height:ftsYoutubeLargeHeight+"px"});ftsYoutubeImageSize.css({width:og_size});ftsYoutubeThumbsContainer.css({padding:ftsInstagramMargin});const ftsImageHeightYoutube=ftsYoutubeImageSize.width()-"150";ftsYoutubeImageSize.css({width:og_size,height:ftsImageHeightYoutube,margin:ftsInstagramMargin})}if(ftsYoutubeImageSize.width()<180){jQuery(".slicker-youtube-placeholder").addClass("fts-youtube-smallerthan-180");jQuery(".fts-yt-large, .fts-youtube-scrollable").css("width","100% !important")}else{jQuery(".slicker-youtube-placeholder").removeClass("fts-youtube-smallerthan-180")}const ftsYoutubeContainer=jQuery(".fts-master-youtube-wrap");if(ftsYoutubeContainer.width()<550){jQuery(".fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap").addClass("fts-youtube-smallerthan-550-stack")}else{jQuery(".fts-yt-large, .fts-youtube-scrollable, .youtube-comments-wrap").removeClass("fts-youtube-smallerthan-550-stack")}}function fts_external_link_meta_content(){jQuery(".fts-tweeter-wrap").each(function(){let fts_url_wrap=jQuery(this).find(".fts-twitter-external-url-wrap");if(fts_url_wrap.length>0){const fts_security=fts_url_wrap.attr("data-twitter-security");const fts_time=fts_url_wrap.attr("data-twitter-time");let fts_url=fts_url_wrap.attr("data-twitter-url");let fts_image_exists=fts_url_wrap.attr("data-image-exists-check");let fts_no_video_image=fts_url_wrap.attr("data-no-video-image-check");const fts_popup=fts_url_wrap.attr("data-twitter-popup");console.log("url: "+fts_url+" Image exists: "+fts_image_exists+" No video image exists: "+fts_no_video_image);jQuery.ajax({data:{action:"fts_twitter_share_url_check",fts_security:fts_security,fts_time:fts_time,fts_url:fts_url,fts_image_exists:fts_image_exists,fts_no_video_image:fts_no_video_image,fts_popup:fts_popup},type:"POST",url:fts_twitter_ajax.ajax_url,success:function(data){fts_twitter=data;fts_url_wrap.removeAttr("class data-twitter-security data-twitter-time");console.log("FTS Twitter external link success");if("missing_info"===data){jQuery(fts_url_wrap).attr("data-error","Do not return any content, image, title or description missing").hide()}else{jQuery(fts_url_wrap).html(data)}ftsRetweetHeight();if(jQuery(".fts-slicker-twitter-posts")[0]){jQuery(".fts-slicker-twitter-posts").masonry("reloadItems");setTimeout(function(){jQuery(".fts-slicker-twitter-posts").masonry("layout")},500)}},error:function(data,status,error){console.log(data);console.log("AJAX errors: "+error)}})}});return true}function ftsRetweetHeight(){if(jQuery("div").hasClass("fts-tweeter-wrap")){let twitter_wrap=jQuery(".fts-tweeter-wrap");if("475"