$(document).ready(function() {
	//Hide adding form.
	$('#addingitemform').hide();
   
	//Show flash message if any.
	$('#flashMessage').hide();
	$('#flashMessage').fadeIn(600);
	$('#flashMessage').show("normal");	//show for how long?

	// LIST EFFECTS		
		// On the click of the checkbox, fade out and hide the li it's in.
		$("input.checkbox").click(function () {
			$(this.parent).fadeOut(600, function () { //li it's in.
				$(this).hide();
			});
			$(this).fadeIn(600, function () { //li it's in
				$(this).show();
			});
		});
		
		//Adding an item form.
		$(".addanitem").click(function () {
			$('#addingitemform').fadeIn(600, function () {
				$('#addingitemform').show();
				$("input:text:first").focus();
			});
			$("input:text:first").focus();
			document.getElementById('itemaddforminput').focus();
	  	});
		
		$(".sharingbox").click(function (){
			//Select the entire box on click.
		});
		
});