$(document).ready(function(){

	/* Converting the #box div into a bounceBox: */
	$('#box').bounceBox();

	/* Listening for the click event and toggling the box: */
	$('a.button').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.
		*/

		$('#box').bounceBoxToggle({autohide:10000});		// Will autohide in 2 seconds
		e.preventDefault();
	});
	
	/* When the box is clicked, hide it: */
	$('#box').click(function(){
		$('#box').bounceBoxHide();
	});
});

