//CSS
a[href=$pdf] {
background: url(icons/pdf.gif) no-repeat 0 50%;
padding-left: 18px;
}
//odermit jQuery Hilfsmotor
$(function () {
$("a[href$='pdf']").addClass('pdf');
});
Q: http://www.webmasterpro.de/coding/article/javascript-frontends-mit-jquery-nuetzliche-codeschnipsel.html