Hmm function to do all you've asked? Can't say I've seen one.
However, you could use a combination of things depending on what you want to achieve.
You say you want the links to open as apps, but do you mean you want a new popup window to appear? cause if you do then you can just create a popup window and add onDblClick="open_popup_function_name()" to your image tag.
Alternatively you could use the showhide layer functions (that are available) to show and hide a new layer, and again add the onDblClick attribute.
Don't have enough time to go into in more detail, but that's the jist of it.
Hope this helps
"An expert is a person who has made all the mistakes that can be made in a very narrow field."