// Apply character counter to TextCounterWidgets. Uses the
// simplyCountable JQuery extension.

function activateCounters() {	
	$('.TextCounterWidget textarea').not(".ajaxed").each(function() {		
		$(this).addClass('ajaxed');
		$(this).simplyCountable({
			counter: $(this).nextAll('.counter')
		});
	});
}

ajaxifyFunctions.push(activateCounters);

$(activateCounters);

