My current project involves integrating legacy Prototype code with jQuery. Normally the solution would be to just change all the $(object) references to jQuery(object). However, one of the constraints was I couldn't modify any of the jQuery code, and Prototype does NOT give you any way to rename the $ variable.

I discovered this hack while trying to find a way around this:

<script type="text/javascript" src="jquery-1.2.3.min.js"></script>
<script type="text/javascript" src="prototype.js"></script> 
<script type="text/javascript" src="jquery-1.2.3.min.js"></script>

The first two lines were there by default (it was being generated by the Master Page, which I could not modify). Apparently, if you register the external jQuery library the second time around, jQuery co-opts the $ variable for itself. This allowed me to use the $ symbol for jQuery.