$(function() {
  $('#nhtsainfo').corner();
  $('#uprbannerads').corner('bottom');
});

function recallcheck(year,make,model) {
  var recallDiv = document.getElementById('recalls');
  var pageanchor = document.location.href.match(/#R(\w+)$/);
  if (pageanchor) {
    var ranchors = recallDiv.getElementsByTagName('a');
    var found = false;
    for (var i = 0; i < ranchors.length; i++) {
      if (ranchors[i].name == ('R'+pageanchor[1])) {
        found = true;
        break;
      }
    }
    if (!found) {
      recallDiv.innerHTML = '<p class="note">The NHTSA recall you clicked on, recall #'+pageanchor[1]+', was not found as a valid recall for the '+year+' '+make+' '+model+'. Although the '+year+' '+make+' '+model+' was included in the <b>investigation</b>, '+year+' vehicles may not have been specifically included in the <b>recall</b>. <a href="http://www-odi.nhtsa.dot.gov/cars/problems/recalls/results.cfm?SearchType=QuickSearch&rcl_ID='+pageanchor[1]+'&summary=true">Click here for more information about recall #'+pageanchor[1]+'</a>.</p>' + recallDiv.innerHTML;
    }
  }
}
