use jQuery prop('checked') and is(':checked') instead attr('checked')
js checked (2)
gal: save/restore checkbox#popup_desync_form from cookie