$(document).ready(function(){
	
	$('#newsEvents_box #newsEvents_buttons a').click(function() {
		section = $(this).attr('rel');
		isActive = $(this).hasClass('active');
		if (!isActive) {
			if (section == 'news') {
				oldSection = 'events';
				newSection = 'news';
			} else if (section == 'events') {
				oldSection = 'news';
				newSection = 'events';
			} else {
				return false; // no section
			}
			// Slide up old, make new active, slide down new
			$('#newsEvents_box #newsEvents_' + oldSection).fadeOut('fast', function () {
				$('#newsEvents_' + oldSection + '_button').removeClass('active');
				$('#newsEvents_' + newSection + '_button').addClass('active');
				$('#newsEvents_box #newsEvents_' + newSection).fadeIn('slow');
			});
		}
		return false;
	});
	
	
});


function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
} 