$(document).ready(function() {
	
	$('.sfMenu').superfish({
		delay: 600,
		speed: 'fast'
	});
	
	$('.showHideToggle').click(function() {
		$(this).siblings('.showHideContent:first').toggle();
		
		$(this).children('.showHideLabel').each(function() {
			if ($(this).hasClass('closed')) {
				$(this).removeClass('closed');
				$(this).addClass('open');
			} else {
				$(this).removeClass('open');
				$(this).addClass('closed');
			}
		});
	});
	
	$('#showHideExpandAll').click(function() {
		$('.showHideContent').each(function() {
			if ($(this).is(':hidden')) {
				$(this).show();
				
				var toggle = $(this).siblings('.showHideToggle:first');
				var label = toggle.children('.showHideLabel:first');
				label.removeClass('closed');
				label.addClass('open');
			}
		});
	});
	
	$('#showHideCollapseAll').click(function() {
		$('.showHideContent').each(function() {
			if ($(this).is(':visible')) {
				$(this).hide();
				
				var toggle = $(this).siblings('.showHideToggle:first');
				var label = toggle.children('.showHideLabel:first');
				label.removeClass('open');
				label.addClass('closed');
			}
		});
	});
	
});
