Use a flag to know when the element is open or closed, and set the animation and easing based on that :
$(document).ready(function() {
$('#test').on('click', function() {
var open = $(this).data('open'),
easing = open ? 'easeOutBounce' : 'easeInBounce';
$('#preheader')[open ? 'slideUp' : 'slideDown']('slow', easing);
$(this).data('open', !open);
});
});