Maple Avenue truck crash, explosion in Glenville | Photo Galleries

';

oEngagementContainer_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.append(sHTML_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5);
}
});
}

// Build engagement set
$.each(oResponse.assets, function(index) {
if (index == 1 && sOriginID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == null) {
sOriginID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = oResponse.assets[0].id;
}
// Display assets once origin is found
// Find origin then begin displaying assets
if (bFoundOrigin_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == true) {
if (this.id == sOriginID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5) {
// Found orgin a second time. Stop gathering assets and kill next_url
bStop_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = true;
sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = null;
oEngagementMore_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.remove();
} else if (bStop_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == false && this.id != '7e8f9c9a-a06b-11ee-bb7b-b388861a61f5') {
// Display asset
var sHTML_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = '';
if (this.content.includes('engagement-asset') && iDisplayCount_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 < iMaxDisplay_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5) { iDisplayCount_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 ++; sHTML_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 += '

' + this.content + '

';
}
}
} else {
if (this.id == sOriginID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5) {
// Origin found. Begin displaying assets
bFoundOrigin_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = 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_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == true) {
// Stored first id
sFirstID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = this.id;
bFirstRun_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = false;
} else if (this.id == sFirstID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5) {
// We've started again. Force origin
sOriginID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = sFirstID_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5;
bFoundOrigin_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = true;
} // end Fail-safe
}
}

// Append engagement assets to container
oEngagementContainer_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.append(sHTML_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5);

// Stop traversing asset array
if (iDisplayCount_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 >= iMaxDisplay_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5) {
bStop_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = true;
return false;
}
});

// Include block_id on newly added list items
oEngagementContainer_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.find('.engagement-item.original').each(function() {
var sHref_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = scrubURL($(this).find("a.centered-content-link").attr("href"));

if(sHref_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5!="javascript:void(0)"){

// Add content discovery tracking

sHref_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 += '#tncms-source=endcard-gallery';

// Add to image and headlines links
$(this).removeClass('original').find("a.centered-content-link").attr("href", sHref_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5);
}
});

// Check next URL
if (sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 && bStop_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == false) {
// if origin hasn't been found yet and we hit next_url. Trigger the set to pull in again.
if (bFoundOrigin_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == false) {
// No origin yet. Call the populate function
__tnt.engagement.assets["7e8f9c9a-a06b-11ee-bb7b-b388861a61f5"].populate(sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5);
} else {
// Append sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 to engagement set
oEngagementContainer_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.append('');

if (iDisplayCount_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 < iMaxDisplay_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5) { // Get next url and request more assets __tnt.engagement.assets["7e8f9c9a-a06b-11ee-bb7b-b388861a61f5"].populate(oEngagementMore_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.data('next-url')); } } } // Add total count to container if (bStop_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 == true) { // Add total count to container oEngagementContainer_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.attr("data-engagement-total", iDisplayCount_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5); // Remove engagement loading spinner oEngagementSpinner_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5.remove(); return false; } } else { // Empty asset set returned. Go back in for a real set if(__tnt.engagement.assets["7e8f9c9a-a06b-11ee-bb7b-b388861a61f5"].attempts<2){ if(sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5==null||sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5==""){ sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5 = "/photo_galleries/news/maple-avenue-truck-crash-explosion-in-glenville/collection_7e8f9c9a-a06b-11ee-bb7b-b388861a61f5.html"; } __tnt.engagement.assets["7e8f9c9a-a06b-11ee-bb7b-b388861a61f5"].populate(sNextUrl_7e8f9c9a_a06b_11ee_bb7b_b388861a61f5); __tnt.engagement.assets["7e8f9c9a-a06b-11ee-bb7b-b388861a61f5"].attempts++; } } }); } } // Rewrite URL for preview // TODO move to one location function scrubURL(sURL) { if (typeof sURL != 'undefined'){ return sURL; } } Credits

Copyright © 2024 FastTowing247.com. All Rights Reserved.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram