added jquery functionality for attachments