
function fadeInAddGroupForm() {
	$('#addGroupForm').fadeIn("slow");
	return false;	
}

function addNewGroup() {
	$('#addGroupForm').fadeOut("slow");
	$('#groupForm').submit();
	return false;
}

function fadeOutNotices() {
	setTimeout( function() { $('#topNotice').fadeOut("slow"); }, 5000 );
}


jQuery.fn.shake = function( intShakes, intDistance, intDuration ) {
	
	this.each(function() {
		var jqNode = $(this);
		jqNode.css( {position: 'relative'} );
		for( var x = 1; x <= intShakes; x++ ) {
			jqNode.animate({ left: ( intDistance * -1 ) },(( (intDuration / intShakes) / 4 )))
			.animate( { left: intDistance }, (( intDuration / intShakes ) / 2 ))
			.animate( { left: 0 }, ((( intDuration / intShakes ) / 4 )));
		}
	});
	
	return this;
}
