/**
 * 
 * The closables on the cymru site a such that bespoke functionality is required.
 * 
 * This code uses the custom triggers provided by the standard closable scripts
 * (see ...) to add this custom behaviour
 * 
 */
$(document).ready(function(){
	
	$(".closable").bind("closable-close closable-open closable-toggle", function(event)
		{
		if($(this).hasClass("disabled"))
			{
			event.stopImmediatePropagation();
			}
		});
	
	$(".closable").bind("closable-close", function(event)
		{
		var bar = $(this).find(".bar");
		if(bar.hasClass("roundTop"))
			{
			bar.removeClass("roundTop");
			bar.addClass("round");
			}
		});
	
	$(".closable").bind("closable-open", function(event)
		{
		var bar = $(this).find(".bar");
		if(bar.hasClass("round"))
			{
			bar.removeClass("round");
			bar.addClass("roundTop");
			}
		});
});
