// bind the events
jQuery(document).ready(function($) {

	// click event for all tabbuttons
	$('.sectionbutton a').bind('click', function(e) {
		// prevent the default action
		e.preventDefault();
		
		// hide all the articleblocks
		$('.article_small').hide();
		
		// remove the active class of all the tabbuttons
		$('.sectionbutton').removeClass('active');
		
		// add the active class to the clicked tabbutton
		$(this).parent().addClass('active');
		
		// get the id of the clicked tabbutton
		var itemToShow = $(this).attr('id');
		
		// show the articleblock that corresponds with the clicked tabbutton
		$('div#section_' + itemToShow).show();
	});
	
});
