You're probably aware of this but just in case and just to express my preference, I think a pretty common idiomatic way of formatting this JavaScript code (when I dive into JS libraries I almost always see this style used quite a bit), which, IMHO, increases readability and DRYNess, would be something like

```javascript
$(MESSAGES_DIV)
    .empty()
    .html(_.template($('#fd-template-message-alert').text(), {
            messageType: formdesigner.util.MESSAGES[errorObj.level],
            messages: messages
     }))
    .find('.alert').removeClass('hide').addClass('in');
```

it's kind of ugly in this case, so whatever, just wanted to throw that out there