If your extension uses Mootools you can use the following code to include the framework in Joomla's output.
Mootools Core and Mootools More:
The most important difference between Mootools 1.3 and older versions is, that the $() function is deprecated. Instead document.id() should be used.
You can find more information, examples and Mootools plug-ins on the Mootools Homepage.