This error is causing because Jquery and Prototype is getting conflict.You need to solve this conflict.
1) Create one js file called noConflict.js with the following content.
var jQuery = $.noConflict();
and include this file after your jquery.js
2) And you can use this jquery wih the following code
// your code
P.S. for more information on solving jquery conflict refer http://magento-online-tutorials.blogspot.in/2015/10/how-to-solve-jquery-and-prototype.html