How to create a confirm popup when delete item with field collection? I have configured a field collection field (unlimited items) for a content type and I want create a confirm popup when user delete an item. 
For this, i found that i can directly go and modify 2 functions in the field_collection.pages.inc file. They are:

1. field_collection_item_delete_confirm

2. field_collection_item_delete_confirm_submit

I'm a newbie in drupal so I don't know how to use these function from the field_collection.pages.inc file, I tried to hook these function in template.tpl file but it's didn't work. Can someone help me ? Sorry about my English.
Here is what i did, to handle the deletion of a field collection item for a node:


Created a hook of type hook_node_view() in my custom module and
overridden the delete link for the field collection items, so that
they point to a custom path, that is declared in my custom modules
hook_menu().
Now the custom path is mapped to a template file (passing the field
collection item id).
The logic inside the tpl file processes the deletion of field
collection item (passed by id) using entity_delete_multiple() and
sets a custom message to be displayed back to the node view page.


more details