jQuery fadeToggle/fadeout function
You can use the not function to get all the details elements except one:

function show(sel) {
  var el = $(sel);
  el.fadeToggle(600);
  $('.details').not(el).fadeOut("slow");
}

$('.details').hide();

$('#item-a').click(function () {
  show('#detail-1');
});

$('#item-b').click(function () {
  show('#detail-2');
});

$('#item-c').click(function () {
  show('#detail-3');
});

$('.btn-close').click(function () {
  $(this).parent().parent().fadeOut("slow");
});