In order to use the $ symbol in jquery and not have to use jQuery.functionname, we use this
(function($) { })(jQuery);
(In drupal, you actually have to specify this implicitly).
I don't understand this javascript syntax, why is there an initial parentheses? How is the (jQuery) at the end used?