Function errors are a common thing in almost all content management systems and there is a few ways you can approach this.
Wrap your code using:
<script>
jQuery(function($) {
YOUR CODE GOES HERE
});
</script>
You can also use jQuery's API using noConflict();
<script>
$.noConflict();
jQuery( document ).ready(function( $ ) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>
Another example of using noConflict without using document ready:
<script>
jQuery.noConflict();
(function( $ ) {
$(function() {
// YOUR CODE HERE
});
});
</script>
You could even choose to create your very alias to avoid conflicts like so:
var jExample = jQuery.noConflict();
// Do something with jQuery
jExample( "div p" ).hide();
Yet another longer solution is to rename all referances of $ to jQuery:
$( "div p" ).hide();
to jQuery( "div p" ).hide();