Update terminal.js

Just some friendly tips:

You can add more than one action into a $(document).ready or $(function() block.  $(function() and $(document).ready(function() are the same thing.  You don't really need to use both of them.  $(function() is just a shortcut.

Also using var in front of defining will make it a local variable (i.e. one use per request).  Without the var in front, it's used in the global scope and can be accessed at anytime.  It's just wasting space in the DOM.