```javascript
var top;

switch(alignment) {
    case 'top':
        top = (loc.y - 5);
        break;
    case 'bottom':
        top = (loc.y + loc.height - 5);
        break;
    default:
        top = loc.y;
}

$('div', {
   'class': 'mark ' + annotation.id,
}).css({
    'top': top,
    'left': loc.x + (0.5 * loc.width) - 5 ),
    'background-image': 'url(' + imgurl + ')'
}).appendTo('.annotator-wrapper');
```
See [jQuery API](http://api.jquery.com/jQuery/#jQuery-html-attributes).