In the development version of MediaWiki (eg. what we're working on in SVN) $ and $j are exactly the same, if they're then not something is wrong in your script.

However the version currently live on Wikimedia (before 1.17) didn't have $, so it's very likely it didn't work there, however without testing on the SVN version you should't be making modifications based on what is live on Wikimedia (one day this won't be an issue, but right now it is)

Can you test again (if not already) on a clean install of svn-trunk-phase3 (ie. a simple local LAMP/XAMP webserver)