var labelMap = {
    'id_q': '<h2>Search:</h2>',
    'id_models_0': 'You could also narrow your search. Select a category.'
}

$(function() {
    for (var i in labelMap) {
        if (labelMap.hasOwnProperty(i)) {
            if ($('label[for=' + i + ']').length > 0) {
                $('label[for=' + i + ']').eq(0).addClass(i).html(labelMap[i]);
            }
        }
    }

});
