I haven't tested it, but you should be able to do something like this:
| Code: |
<ul>
<li><a id="loginRun" class="mainlevel" href="#">Login</a></li
</ul>
|
The ID "loginRun" runs the script and class "mainlevel" is the styling for the menu.
The only thing I am thinking this might not work is running the same command twice. But not sure.
Maybe make a new script and make the above ID "loginRun2". Just copy this, paste it anywhere in the body and try it:
| Code: |
<SCRIPT type=text/javascript>
var loginWindoweffect = new Fx.Opacity('loginWindow').hide();
$('loginRun2').addEvent('click', loginWindoweffect.toggle.bind(loginWindoweffect));
</SCRIPT>
|