$(document).ready(function(){

	/* Converting the #box div into a bounceBox: */
	$('#bbbox').bounceBox();
	$('#bbbox').bounceBoxToggle({autohide:10000});		// Will autohide in 10 seconds

	/* Listening for the click event and toggling the box: */
	$('a.bbbutton').click(function(e){

		/*
			UPDATE:
			You can now pass an object with an autohide property
			to both bounceBoxToggle() and bounceBoxShow(). The box will
			hide automatically after the period you've specified.
			
			If you don't want autohide, just skip the parameter.
		*/

		$('#bbbox').bounceBoxToggle({});
		e.preventDefault();
	});
	
	/* When the box is clicked, hide it: */
	$('#bbbox').click(function(){
		$('#bbbox').bounceBoxHide();
	});
});

