I've updated your fiddle below. I supply each filter button with a "data-filter" attribute, then apply this as a class to your gallery using the following script:
;(function(){
var $portfoliogallerySection = $('#portfolio-gallerySection'),
$filterbuttons = $('#portfolio-topSection a');
$filterbuttons.on('click', function(){
var $this = $(this);
$filterbuttons.removeClass('active');
$this.addClass('active');
$portfoliogallerySection.attr('class', $this.data('filter'));
});
}());
Then use css to hide / show appropriately categorised items in the gallery, i'll leave the transitions to you.