detailsHTML option doubling as a callback function

Needed this functionality for a project I was working on, figured it might come in handy elsewhere too. This will allow a callable function to be used as the detailsHTML option. The function callback will send arguments allowing you to craft the HTML for each selected object.