[ad_1]
‘;
}
var sContent = ”+
‘‘+
‘‘+
‘ ‘+
‘‘+
‘
”+
‘
‘‘+
‘
‘+sPosTitle+’
‘+
‘
sImage+
‘
‘
‘+__tnt.truncateStr(oAsset.title.replace(/(]+)>)/ig,””),iTextTrun,’…’)+’
‘+
‘
‘+__tnt.truncateStr(oAsset.summary.replace(/(]+)>)/ig,””),iTextTrun,’…’)+’
‘+
‘
‘+
‘
‘
”+
‘
‘;
‘
‘;
return sContent;
}
$.get(‘https://www.caledonianrecord.com/tncms/search/mlt/?origin=5ce3a4d8-d189-5259-b6f9-3f8f9518a823&app=editorial&preview=1&type=article%2Ccollection%2Cvideo%2Cyoutube’).then(function(oResponse, sStatus, oXHR){
if( typeof oResponse.assets === ‘object’ && oResponse.assets.length > 0 ){
var oPrev,oNext = null;
// try to match in index
$(oResponse.assets).each(function(i,oAsset){
if( oAsset.id === ‘5ce3a4d8-d189-5259-b6f9-3f8f9518a823’ ){
oNext = oResponse.assets[(i+1)];
oPrev = oResponse.assets[(i-1)];
return false;
}
});
// no index match
if( !oNext && !oPrev ){
oPrev = oResponse.assets[0];
oNext = oResponse.assets[1];
// end of list, prev no next
} else if( !oNext && oPrev ){
oNext = oResponse.assets[0];
// start of list, next no prev
} else if( oNext && !oPrev ){
oPrev = oResponse.assets[(oResponse.assets.length-1)];
}
// append links
if( oPrev ){
$(‘#paging-prev-5ce3a4d8-d189-5259-b6f9-3f8f9518a823’).append(asset_prevNextContent(oPrev, ‘prev’)).show();
setTimeout(function(){
$(‘#paging-prev-5ce3a4d8-d189-5259-b6f9-3f8f9518a823’).removeClass(‘offset’);
}, 200);
}
if( oNext ){
$(‘#paging-next-5ce3a4d8-d189-5259-b6f9-3f8f9518a823’).append(asset_prevNextContent(oNext)).show();
setTimeout(function(){
$(‘#paging-next-5ce3a4d8-d189-5259-b6f9-3f8f9518a823’).removeClass(‘offset’);
}, 200);
// fix conflicting content
$(‘.share-container.headline-right’).addClass(‘hidden-sm’);
}
// bind tracking event handlers
$(‘#asset-paging-5ce3a4d8-d189-5259-b6f9-3f8f9518a823 a’).on(‘click’, function(e){
var sAction = ($(this).data(‘direction’) === ‘right’) ? ‘next’ : ‘previous’;
__tnt.trackEvent({‘category’:’tnt-prev-next’,’action’:sAction, ‘label’:’image’, ‘value’:’1′});
return true;
});
}
}, function(err){
__tnt.log(‘Article-to-article navigation: ‘ + err.statusText);
});$(window).on(“load resize”, function(){
var sCondTrigger = ‘trigger-condensed’;
if( window.innerWidth > 991 && window.innerWidth
[ad_2]
Source link
Welcome to the discussion.
Keep it Clean. Please avoid obscene, vulgar, lewd,
racist or sexually-oriented language.
PLEASE TURN OFF YOUR CAPS LOCK.
Don’t Threaten. Threats of harming another
person will not be tolerated.
Be Truthful. Don’t knowingly lie about anyone
or anything.
Be Nice. No racism, sexism or any sort of -ism
that is degrading to another person.
Be Proactive. Use the ‘Report’ link on
each comment to let us know of abusive posts.
Share with Us. We’d love to hear eyewitness
accounts, the history behind an article.