Is there a reason why you don't use jquery syntax here? I find this kind of hard to interpret.