var nc = nc || {};

nc.confirmRollback = function(thename) {
    if ( typeof thename == 'string' ) {
	return confirm('Are you sure you want to make version ' + thename + ' the current version?');
    }
    else {
	return confirm('Are you sure you want to roll back revisions?');
    }
}

$(function() {
  $('a.rollback_link').click(function() {
	  var thename = $(this).attr('rollback_id');
	  return nc.confirmRollback(thename);
  });
});



