If you're using Shadowbox and the likes, some of your elements' rel attributes might come with fancy values the W3C validator won't like. Put these values in data-rel instead, and use the following :

jQuery('[data-rel]').each(function() {
    var that = jQuery(this);
    that.attr('rel', function(i, val) { return ((typeof val === 'undefined') ? '' : val+' ')+that.data('rel'); }).removeAttr('data-rel');
});