your making things a bit complicated ... the js code is already available for you...
use the vbcollapse code that comes with vb
if you are doing this for your autolinker ... I suggest that you rewrite the code or at least add a section where you can add a tooltip message ...
when you do this add a unique id to each instance that the script finds and converts text to url ... your preg_match / preg_replace should take care of this
I tried installing the beta but I just got to many errors installing ... so I just gave up
On a side note, I think your installer is a bit complicated ... the less choices people have the less problems will occur -- just a thought
If you really want to pay someone $50 I can gaurantee that I can get this accomplished for you.