You cannot select the pseudo element with jQuery. Instead you can add a class to your CSS:
legend.selected:after {
content: url('/html/img/arrow-fieldset-down.png');
}
then add this class when you want to change the content, for example when you click the legend:
$('legend').click(function() {
$(this).addClass('selected');
})