jQuery(document).ready(function(){wordCountResize("body-text",50),wordCountResize("title-wrapper",10),wordCountResize("body-text",50),wordCountResize("title-wrapper",10)});
//# sourceMappingURL=block-min.js.map
;
jQuery(document).ready(function(){jQuery(".accordion-item-title").on("click",function(){jQuery(this).parent(".accordion-item").toggleClass("open"),jQuery(this).siblings(".accordion-item-content").slideToggle(500)})});
//# sourceMappingURL=block-min.js.map
;
/* Wrap all iframe in special wrapper so they can be made responsive
-------------------------------------------------------------- */
jQuery('.block-long-form-content-v1 iframe').wrap('
');
/* Nav logic
-------------------------------------------------------------- */
// Loop through each block with the class "long-form-content-v1"
jQuery(".block-long-form-content-v1").each(function() {
// Create a new unordered list to hold the anchor links
var anchorList = jQuery("");
// Loop through each H2 heading within the current block
jQuery(this).find("h2").each(function() {
// If the H2 does not have a class of "nav-title", create an anchor link for it
if (!jQuery(this).hasClass("nav-title")) {
// Create a unique ID for the H2 element
var id = jQuery(this).text().trim().toLowerCase().replace(/[^a-z0-9]+/g, "-");
jQuery(this).attr("id", id);
// Create a new list item with an anchor link to the H2 element
var listItem = jQuery("");
var anchor = jQuery("").attr("href", "#" + id).text(jQuery(this).text());
listItem.append(anchor);
// Add the new list item to the unordered list
anchorList.append(listItem);
}
});
// Add the unordered list to the block's anchor-links container
jQuery(this).find(".anchor-links").append(anchorList);
});
/* Smooth scroll
-------------------------------------------------------------- */
jQuery(".block-long-form-content-v1 .smooth-scroll").click(function (event) {
jQuery("html,body").animate(
{ scrollTop: jQuery(this.hash).offset().top - 20 },
1500
);
});
;