Define function based on link
<p>I want to open an function for every existing kind of links on my pages.</p>

<p>example:</p>

<p>when I click on a .pdf link it opens and pdf-function.
if a click on a .mp3 link it opens a player, etc</p>

<p>But I want a way to do it without editing the links.</p>
