why not skip the javascript completely?
EDIT: sorry that's completely unhelpful seeing as this is a javascript question. Here's a solution with some modifications to the HTML:
$('.link').click(function(e) {
e.preventDefault();
var $con = $('#main-content'),
tar = $(this).data('show');
$con.find('.contents').fadeOut();
$con.find(tar).fadeIn();
});