If you click on "Login" when you are on ****.com (diigg) the Login form fades in at the top. The Code:

Login Form (hidden, fades in when Login is clicked)
Code:
<div id="login-form" style="display:none;">
 <form action="/login" id="side-login" method="post">
  <label for="side-username">Username:</label>
  <input type="text" name="side-username" id="side-username" size="15" tabindex="1" />
  <label for="side-password">Password:</label>

  <input type="password" name="side-password" id="side-password" size="15" tabindex="2" />
  <label for="side-persistent">Remember Me?</label><input type="checkbox" name="side-persistent" id="side-persistent" tabindex="3"/>
  <input type="submit" value="Sign In" class="log2" tabindex="4" />
  <input type="hidden" name="processlogin" value="1" />
 </form>
</div>
Login Click Event
Code:
<a href="/login" onclick="return(toggleLogin())">Login</a>
JS for toggleLogin() and the other stuff:
Code:
function unpopp(){poppDiv=$('poppDiv');if(poppDiv){poppDiv.parentNode.removeChild(poppDiv);poppDiv=false;}}
function popp(id,text){if($('lbContent')){valid.deactivate();}
function toggleDisclosureWidget(id){var div=document.getElementById(id);if(div.className=='slide-show'){div.className='slide-hide';}else{div.className='slide-show';}
return(false);}
function tdw(id){return(toggleDisclosureWidget(id));}
function toggleLogin(){unpopp();toggleDisclosureWidget('login-form');return(false);}
However, when I try exactly that code on some HTML page with

Code:
<script src="pathtojscode.js" type="text/javascript"></script>
in the header I just get this error:

Error: $ is not defined
Source File: pathtojscode.js
(Refering to this: unpopp(){poppDiv=$('poppDiv'))

What am I doing wrong or what do I miss? Thanks!