2 if (typeof(curriculum_hide_form) != "undefined") {
3 $('.curriculum-form form').hide();
4 $('.curriculum-form h2 a span').show();
6 $('.curriculum-form h2 a').click(function() {
7 $('.curriculum-form form').toggle('fast');
8 $('span', this).toggle();
12 $('.curriculum-section-toggler').show();
14 $('.curriculum-section').each(function() {
18 $('.curriculum-section-toggler', this).click(function() {
19 $('ul', category).toggle('fast');
22 /* set up section checkboxes */
23 $('.s', category).change(function() {
24 if ($(this).attr('checked')) {
25 $('ul input', category).attr('checked', 'checked');
28 $('ul input', category).removeAttr('checked');
32 /* unset section checkbox on unselect single competence */
33 $('ul input', category).change(function() {
34 if (!$(this).attr('checked')) {
35 $('.s', category).removeAttr('checked', 'checked');
39 /* hide unused section details on start */
40 if ($('.s', category).attr('checked') || !$('ul input[checked]', category).length)
41 $('ul', category).hide();