/*  
*	REQUIRES: /min/g=phoenix.js.utilities
*
*	LAST MODIFIED: 2009-07-22
*/

$(document).ready(function(){

/*
*	View all notices
*
* 	DESCRIPTION: When a user clicks on the view all swap class names
*/

$(".widget-cs-notices .view-all a").click(function(){

	// Expand
	
	if($(this).hasClass('more'))
	{		
		
		// Show more notices
		$(".widget-cs-notices .more-notices").show("slow");
		$(".widget-cs-notices .more-notices").removeClass("ui-helper-hidden");

		// Change view all words to close
		$(this).html('Close <span class="alt-text">&raquo;</span>');
		
		// Change the anchor's classname
		$(this).addClass("close");
		$(this).removeClass("more");
	
	}

	// Collapse
	
	else
	{
		// Hide more notices
		$(".widget-cs-notices .more-notices").hide("slow");
		$(".widget-cs-notices .more-notices").addClass("ui-helper-hidden");
		
		// Change close to view all
		$(this).html('View all <span class="alt-text">&raquo;</span>');
		
		// Change the anchor's classname
		$(this).addClass("more");
		$(this).removeClass("close");	
	
	}
	
	// Trap Click
	return false;
	
});


});