<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript">
$(function(){
$("span input").bind("click", function(){
$(this).parent().find("label").toggleClass("box");
}).filter("input:checked").parent().find("label").addClass("box");
});
</script>
<style type="text/css">
.box{
background: red;
}
</style>
</head>
<body>
<span><input id="checkbox1" type="checkbox" name="checkbox1" value="yes" /><label for="checkbox1">Иванов</label></span><br />
<span><input id="checkbox2" type="checkbox" name="checkbox2" value="yes" checked="checked" /><label for="checkbox2">Петров</label></span><br />
<span><input id="checkbox3" type="checkbox" name="checkbox3" value="yes" /><label for="checkbox3">Сидоров</label></span><br />
</body>
</html>