jQuery tristate (indeterminate) checkbox with pseudo selectors and optional value modification and .val() overwrite.