first, you have errors. your closing > is on the wrong side of the function's closing quotes.

secondly, i know firsthand from recent experience that if nothing else, ie gets pissy if you alter the dom manually like that and then try to do things. it guess it might work, i'm just gunshy after a lot of troubleshooting lately.

however, i also learned that you just leave the function in an untouched part of the page and that you CAN drop new calls to the function in.