You have to make changes in index.php and main.js.
In index.php you insert the new classes "recrent" and "strongest" for the hyperlink tags:
...
<div class="row">
<div class="span12 time_since invisible">
<center><span class="hours"></span> hours <span class="minutes"></span> minutes <span class="seconds"></span> seconds since last earth quake
</div></center>
<div class="span6 recent_quake invisible">
<h3>Live - Latest Quake<br>
Magnitude: <span class="magnitude"></span> <br>Depth: <span class="depth"></span> <br> Time: <span class="origintime"></span> NZDT 24hr <br>PublicID: <a class="recent" href="" target="_blank"><span class="publicid"></span></a>
</h3>
</div>
<div class="span6 strongest_quake">
<h3>Strongest Quake Last 24 Hours<br>
Magnitude: <span class="magnitude"></span> <br>Depth: <span class="depth"></span> <br> Time: <span class="origintime"></span> NZDT 24hr <br>PublicID: <a class="strongest" href="" target="_blank"><span class="publicid"></span></a>
</h3>
</div>
</div>
....
In the file main.js you have to add one line in the function "checkResponse()" and one line in the function "populateStrongest(thisQuake)". The added lines are marked with "// new line":
function checkResponse() {
$.ajax({
url: url,
crossDomain: true,
dataType: 'json'
}).done(function(data){
thisQuake = data.features[0];
if ( recentQuake != thisQuake.id ) {
recentQuake = thisQuake.id;
time = getTime(thisQuake.properties.origintime);
console.log('TotalSeconds', totalSeconds);
$('.xcoord', '.recent_quake').html(thisQuake.geometry.coordinates[0]);
$('.ycoord', '.recent_quake').html(thisQuake.geometry.coordinates[1]);
$('.depth', '.recent_quake').html(thisQuake.properties.depth.toFixed(0) + ' km');
$('.publicid', '.recent_quake').html(thisQuake.properties.publicid);
$('.origintime', '.recent_quake').html(time);
$('.magnitude', '.recent_quake').html(thisQuake.properties.magnitude.toFixed(1));
// new line
$('.recent', '.recent_quake').attr("href","https://www.geonet.org.nz/earthquake/"+thisQuake.properties.publicid);
$('.recent_quake').removeClass('invisible');
$('.latest').removeClass('latest');
qMap.drawOverlay({
lat: thisQuake.geometry.coordinates[1],
lng: thisQuake.geometry.coordinates[0],
content: '<div data-publicid="'+thisQuake.properties.publicid+'" class="overlay latest">' + thisQuake.properties.magnitude.toFixed(1) + 'M ' + time + '</div>'
});
console.log('populated again', strongestQuake);
if ( strongestQuake.properties.magnitude < thisQuake.properties.magnitude ) {
strongestQuake = thisQuake;
populateStrongest(strongestQuake);
}
}
totalSeconds = getSeconds(thisQuake.properties.origintime);
$('div').find('[data-publicid="' + thisQuake.properties.publicid + '"]').twinkle({
"effectOptions": {
"color": "rgba(0,150, 0, 0.5)",
"radius": 80
}
});
$('div').removeClass('strongest');
$('div[data-publicid="' + strongestQuake.properties.publicid + '"]').addClass('strongest');
$('.strongest').twinkle({
"effectOptions": {
"radius": 100
}
});
});
}
function populateStrongest(thisQuake) {
time = getTime(thisQuake.properties.origintime);
$('.xcoord', '.strongest_quake').html(thisQuake.geometry.coordinates[0]);
$('.ycoord', '.strongest_quake').html(thisQuake.geometry.coordinates[1]);
$('.depth', '.strongest_quake').html(thisQuake.properties.depth.toFixed(0) + ' km');
$('.publicid', '.strongest_quake').html(thisQuake.properties.publicid);
$('.origintime', '.strongest_quake').html(time);
$('.magnitude', '.strongest_quake').html(thisQuake.properties.magnitude.toFixed(1));
// new line
$('.strongest', '.strongest_quake').attr("href","https://www.geonet.org.nz/earthquake/"+thisQuake.properties.publicid);
$('.strongest').removeClass('strongest');
}