adds some javascript code to the header.
This will give javascript errors due to this code uses jQuery's document ready. (function bp_core_confirmation_js) bb should make this function independent of jQuery or enqueues it in the right way.
buddypress.js is dependent of jquery-cookie but will be enqueued with jquery dependency only.
BuddyPress 1.7