If you are already using jQuery, use its functions, like hasClass
The .hasClass() method will return true if the class is assigned to an element, even if other classes also are.
Source: http://api.jquery.com/hasClass/
Resulting in something like:
for (var i = 0; i < ls.length; i++) {
var l = ls[i];
console.log(l);
if ($(l).hasClass('disabled')) {
alert('hello');
} else {
if ($(l).hasClass('label_radio')) continue;
l.className = 'label_radio r_off';
};
};