Earth Day at Essex County Environmental Center | The Progress gallery | newjerseyhills.com – New Jersey Hills

‘; oEngagementContainer_11733b57_3ea8_5a38_8682_c06496bbc3cd.append(sHTML_11733b57_3ea8_5a38_8682_c06496bbc3cd); } }); } // Build engagement set $.each(oResponse.assets, function(index) { if (index == 1 && sOriginID_11733b57_3ea8_5a38_8682_c06496bbc3cd == null) { sOriginID_11733b57_3ea8_5a38_8682_c06496bbc3cd = oResponse.assets[0].id; } // Display assets once origin is found // Find origin then begin displaying assets if (bFoundOrigin_11733b57_3ea8_5a38_8682_c06496bbc3cd == true) { if (this.id == sOriginID_11733b57_3ea8_5a38_8682_c06496bbc3cd) { // Found orgin a second time. Stop gathering assets and kill next_url bStop_11733b57_3ea8_5a38_8682_c06496bbc3cd = true; sNextUrl_11733b57_3ea8_5a38_8682_c06496bbc3cd = null; oEngagementMore_11733b57_3ea8_5a38_8682_c06496bbc3cd.remove(); } else if (bStop_11733b57_3ea8_5a38_8682_c06496bbc3cd == false && this.id != ‘11733b57-3ea8-5a38-8682-c06496bbc3cd’) { // Display asset var sHTML_11733b57_3ea8_5a38_8682_c06496bbc3cd = ”; if (this.content.includes(‘engagement-asset’) && iDisplayCount_11733b57_3ea8_5a38_8682_c06496bbc3cd ‘ + this.content + ‘

‘; } } } else { if (this.id == sOriginID_11733b57_3ea8_5a38_8682_c06496bbc3cd) { // Origin found. Begin displaying assets bFoundOrigin_11733b57_3ea8_5a38_8682_c06496bbc3cd = true; } else { // Origin found is false. Skip asset // Fail-safe in case origin is not present in set. This can be removed when origin is fixed. if (bFirstRun_11733b57_3ea8_5a38_8682_c06496bbc3cd == true) { // Stored first id sFirstID_11733b57_3ea8_5a38_8682_c06496bbc3cd = this.id; bFirstRun_11733b57_3ea8_5a38_8682_c06496bbc3cd = false; } else if (this.id == sFirstID_11733b57_3ea8_5a38_8682_c06496bbc3cd) { // We’ve started again. Force origin sOriginID_11733b57_3ea8_5a38_8682_c06496bbc3cd = sFirstID_11733b57_3ea8_5a38_8682_c06496bbc3cd; bFoundOrigin_11733b57_3ea8_5a38_8682_c06496bbc3cd = true; } // end Fail-safe } } // Append engagement assets to container oEngagementContainer_11733b57_3ea8_5a38_8682_c06496bbc3cd.append(sHTML_11733b57_3ea8_5a38_8682_c06496bbc3cd); // Stop traversing asset array if (iDisplayCount_11733b57_3ea8_5a38_8682_c06496bbc3cd >= iMaxDisplay_11733b57_3ea8_5a38_8682_c06496bbc3cd) { bStop_11733b57_3ea8_5a38_8682_c06496bbc3cd = true; return false; } }); // Include block_id on newly added list items oEngagementContainer_11733b57_3ea8_5a38_8682_c06496bbc3cd.find(‘.engagement-item.original’).each(function() { var sHref_11733b57_3ea8_5a38_8682_c06496bbc3cd = scrubURL($(this).find(“a.centered-content-link”).attr(“href”)); if(sHref_11733b57_3ea8_5a38_8682_c06496bbc3cd!=”javascript:void(0)”){ // Add content discovery tracking sHref_11733b57_3ea8_5a38_8682_c06496bbc3cd += ‘#tncms-source=endcard-gallery’; // Add to image and headlines links $(this).removeClass(‘original’).find(“a.centered-content-link”).attr(“href”, sHref_11733b57_3ea8_5a38_8682_c06496bbc3cd); } }); // Check next URL if (sNextUrl_11733b57_3ea8_5a38_8682_c06496bbc3cd && bStop_11733b57_3ea8_5a38_8682_c06496bbc3cd == false) { // if origin hasn’t been found yet and we hit next_url. Trigger the set to pull in again. if (bFoundOrigin_11733b57_3ea8_5a38_8682_c06496bbc3cd == false) { // No origin yet. Call the populate function __tnt.engagement.assets[“11733b57-3ea8-5a38-8682-c06496bbc3cd”].populate(sNextUrl_11733b57_3ea8_5a38_8682_c06496bbc3cd); } else { // Append sNextUrl_11733b57_3ea8_5a38_8682_c06496bbc3cd to engagement set oEngagementContainer_11733b57_3ea8_5a38_8682_c06496bbc3cd.append(”); if (iDisplayCount_11733b57_3ea8_5a38_8682_c06496bbc3cd