This Javascript removes or adds the class `selected` to a label on a html form input. If I have more than one group of inputs how do I trigger this Javascript on only the clicked element?

```
window.addEvent('domready', function() {
  $$('input').set({
    events: {
      change: function(el) {
        $$('label').removeClass('selected');
        this.getParent('label').addClass('selected');
      }
    }
  });
});

```

HTML

```
<input name="state" type="radio" />
<label class="nostate selected">x
<input name="state" type="radio" checked />
</label>
<input name="state" type="radio" />
<br>
<input name="state1" type="radio" />
<label class="nostate selected">x
<input name="state1" type="radio" checked />
</label>
<input name="state1" type="radio" />

```

CSS

```
<style>
.nostate{
    color:grey;
}

label.nostate.selected {
    background-color:white;
    color: white;
}
</style>

```