PageSourceSearch

https://www.qoctor.com.au/wp-content/themes/Avada-Child-Theme/assets/js/validations.js?v=2026.08.04.1

js qoctor.com.au collected 2026-09-28 08:59:07 UTC 169,182 bytes, 5,252 lines download raw bytes

1(function($) {
2    var profile_link = $('#link').val();
3    var profile = '<a target="_blank"  href="' + profile_link + '">edit your profile</a>';
4    var errorMsg = 'I am sorry we are unable to help you, please see your doctor.';
5    var msgPreDOB = 'If you have entered your date of birth incorrectly, please "' + profile + '" - it is a legal requirement to enter your data correctly. If you are under 18 or over 64, we are unable to prescribe the medication on this occasion - please see your regular doctor';
6    var msgPre = 'I am sorry we are unable to prescribe the medication on this occasion, please see your regular doctor';
7    var errorMsg2 = 'Your answer indicates that you may need to see a doctor for a physical examination. Please see your doctor as soon as possible.';
8    var errorEl = $('<br><span id="error_1_7_4" style="color:red; width: 100%; margin-bottom: 15px;" class="na-msg fs-error-group1">' + errorMsg + '</span>');
9    var errorE2 = $('<br><span id="choice_2_1_2" style="color:red" class="na-msg fs-error-group1">' + errorMsg + '</span>');
10    var errorE3 = $('<br><span id="choice_2_1_2" style="color:red; margin-bottom: 15px;" class="na-msg fs-error-group1">' + errorMsg2 + '</span>');
11    var errorSkpe = $('<br><span id="choice_2_1_2" style="color:red" class="na-msg fs-error-group1">Skype id not matched</span>');
12    var errorPre = $('<br><span id="error_1_7_4" style="color:red" class="na-msg fs-error-group1">' + msgPre + '</span>');
13    var errorPreDOB = $('<br><span id="error_1_7_4" style="color:red" class="na-msg fs-error-group1">' + msgPreDOB + '</span>');
14    var msgpostDOB = 'If you have entered your date of birth incorrectly, please "' + profile + '" - it is a legal requirement to enter your data correctly. If you are under 18 or over 50, we are unable to prescribe the medication on this occasion - please see your regular doctor';
15    var errorpostDOB = $('<br><span id="error_1_7_4" style="color:red" class="na-msg fs-error-group1">' + msgpostDOB + '</span>');
16    var errorE4 = $("<br><span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'>It doesn't seem like this service is appropriate for you. You need to see a doctor in person to discuss your problem. Return to <a href='" + SITE_URL + "'>home page</a>.</span>");
17    
18    var errorMsgNew = 'You will need a more detailed consultation. You can book a GP telehealth appointment <a href="/online-doctor-appointment/">here</a>, if you wish.';
19    //var errorE1New = $('<br><span id="error_1_7_4" style="color:red; width: 100%; margin-bottom: 15px;" class="na-msg fs-error-group1">' + errorMsgNew + '</span>');
20    var errorE1New = '<br><span style="color:red; width: 100%; margin-bottom: 15px;" class="comprehensive_consult na-msg">For this issue, you will need a more detailed consultation - we have adjusted your cart to a Standard certificate plus- $34.99</span>';
21    //  Validation message for referrals
22    var errorE5 = $("<br><span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'>So far it appears you do not meet the criteria for obstructive sleep apnoea- you should speak to your local doctor for further advice, or return to our <a href='" + SITE_URL + "'>home page</a></span>");
23    var errorEmergency = $('<br><span id="error_1_7_4" style="color:red; width: 100%; margin-bottom: 15px;" class="na-msg fs-error-group1">it sounds like you may have a serious health issue. A telehealth GP appointment is NOT suitable in a medical emergency. Please seek immediate medical attention and/or call an ambulance by dialling 000</span>');
24
25
26    // I confirm that I wish to see a gynaecologist with a view to insertion of a Mirena IUD for the purpose of contraception/birth control
27    $('#choice_1_7_4').click(function() {
28
29        if ($('input#choice_1_7_4').is(':checked')) {
30
31            $(".gchoice_1_7_4").append(errorEl);
32            $('#gform_submit_button_1').attr('disabled', 'disabled');
33            //$(this).parents('.wpcf7-radio').find('.na-msg').remove();
34        } else {
35            //alert('ok')
36            $('#error_1_7_4').remove();
37            $('#gform_submit_button_1').removeAttr('disabled');
38            //$(this).parents('.wpcf7-radio').append(errorEl);
39        }
40    });
41
42    //form Medical start
43    $('#input_2_10').keyup(function() {
44        var input = document.getElementById('input_2_9');
45
46        if (input.value != document.getElementById('input_2_10').value) {
47            $('#gform_next_button_2_53').attr('disabled', 'disabled');
48            $("#field_2_10").append(errorSkpe);
49        } else {
50            $('#gform_next_button_2_53').removeAttr('disabled');
51            $("#field_2_10").find('.na-msg').remove();
52        }
53    });
54
55
56    $('#choice_2_22_0').click(function() {
57        if ($('#choice_2_22_0').is(':checked')) {
58           // $('#gform_next_button_2_53').attr('disabled', 'disabled');
59            $(".gchoice_2_22_1").after(errorE1New);
60
61        }
62
63    });
64    $('#choice_2_22_1').click(function() {
65        if ($('#choice_2_22_1').is(':checked')) {
66            $('#gform_next_button_2_53').removeAttr('disabled');
67            $("#input_2_22").find('.na-msg').remove();
68        }
69    });
70
71
72    $('#choice_2_23_0').click(function() {
73        if ($('#choice_2_23_0').is(':checked')) {
74            $('#gform_next_button_2_53').attr('disabled', 'disabled');
75            $(".gchoice_2_23_1").after(errorEl);
76
77        }
78
79    });
80    $('#choice_2_23_1').click(function() {
81        if ($('#choice_2_23_1').is(':checked')) {
82            $('#gform_next_button_2_53').removeAttr('disabled');
83            $("#input_2_23").find('.na-msg').remove();
84        }
85
86    });
87
88    $('#choice_2_24_0').click(function() {
89        if ($('#choice_2_24_0').is(':checked')) {
90            $('#gform_next_button_2_53').attr('disabled', 'disabled');
91            $(".gchoice_2_24_1").after(errorEl);
92
93        }
94
95    });
96    $('#choice_2_24_1').click(function() {
97        if ($('#choice_2_24_1').is(':checked')) {
98            $('#gform_next_button_2_53').removeAttr('disabled');
99            $("#input_2_24").find('.na-msg').remove();
100        }
101
102    });
103
104    $('#choice_2_25_0').click(function() {
105        if ($('#choice_2_25_0').is(':checked')) {
106            $('#gform_next_button_2_53').attr('disabled', 'disabled');
107            $(".gchoice_2_25_1").after(errorEl);
108        }
109
110    });
111    $('#choice_2_25_1').click(function() {
112        if ($('#choice_2_25_1').is(':checked')) {
113            $('#gform_next_button_2_53').removeAttr('disabled');
114            $("#input_2_25").find('.na-msg').remove();
115        }
116
117    });
118
119    $('#choice_2_5_5').click(function() {
120        if ($('#choice_2_5_5').is(':checked')) {
121            $('#gform_next_button_2_53').attr('disabled', 'disabled');
122            $("#field_2_5 .na-msg").remove();
123            $("#field_2_5 br").remove();
124            $(".gchoice_2_5_5").append('<br><span style="color:red; width: 100%; margin-bottom: 15px;" class="comprehensive_consult na-msg">For this issue - you will need a GP consultation - click <a href="' + SITE_URL + '/online-doctor-appointment"/>here</a> to book .</span>');
125        }
126    });
127    $('#choice_2_5_6').click(function() {
128        if ($('#choice_2_5_6').is(':checked')) {
129            $('#gform_next_button_2_53').attr('disabled', 'disabled');
130            $("#field_2_5 .na-msg").remove();
131            $("#field_2_5 br").remove();
132            $(".gchoice_2_5_6").append('<br><span style="color:red; width: 100%; margin-bottom: 15px;" class="comprehensive_consult na-msg">For this issue - you will need a GP consultation - click <a href="' + SITE_URL + '/online-doctor-appointment"/>here</a> to book .</span>');
133
134        }
135
136    });
137
138    $('#choice_2_5_0').click(function() {
139
140        if ($('#choice_2_5_0').is(':checked')) {
141            $('#gform_next_button_2_53').removeAttr('disabled');
142            $("#field_2_5").find('.na-msg').remove();
143
144        }
145    });
146    $('#choice_2_5_1').click(function() {
147
148        if ($('#choice_2_5_1').is(':checked')) {
149            $('#gform_next_button_2_53').removeAttr('disabled');
150            $("#field_2_5").find('.na-msg').remove();
151
152        }
153    });
154    $('#choice_2_5_2').click(function() {
155
156        if ($('#choice_2_5_2').is(':checked')) {
157            $('#gform_next_button_2_53').removeAttr('disabled');
158            $("#field_2_5").find('.na-msg').remove();
159
160        }
161    });
162    $('#choice_2_5_3').click(function() {
163
164        if ($('#choice_2_5_3').is(':checked')) {
165            $('#gform_next_button_2_53').removeAttr('disabled');
166            $("#field_2_5").find('.na-msg').remove();
167
168        }
169    });
170
171
172    $('#choice_2_5_4').click(function() {
173
174        if ($('#choice_2_5_4').is(':checked')) {
175            $('#gform_next_button_2_53').removeAttr('disabled');
176            $("#field_2_5").find('.na-msg').remove();
177
178        }
179    });
180    $('#choice_2_5_7').click(function() {
181        if ($('#choice_2_5_7').is(':checked')) {
182            $('#gform_next_button_2_53').removeAttr('disabled');
183            $("#field_2_5").find('.na-msg').remove();
184
185        }
186    });
187
188    $('#choice_2_18_1').click(function() {
189        if ($('#choice_2_18_1').is(':checked')) {
190            $('#gform_next_button_2_53').attr('disabled', 'disabled');
191            $(".gchoice_2_18_1").after(errorEl);
192        }
193    });
194    $('#choice_2_18_0').click(function() {
195
196        if ($('#choice_2_18_0').is(':checked')) {
197            $('#gform_next_button_2_53').removeAttr('disabled');
198            $("#input_2_18").find('.na-msg').remove();
199        }
200    });
201
202
203    $('#choice_2_19_1').click(function() {
204        if ($('#choice_2_19_1').is(':checked')) {
205            $('#gform_next_button_2_53').attr('disabled', 'disabled');
206            $("#field_2_19 .na-msg").remove();
207            $("#field_2_19 br").remove();
208            $("#input_2_19").append('<br><span style="color:red; width: 100%; margin-bottom: 15px;" class="comprehensive_consult na-msg">For this issue - you will need a GP consultation - click <a href="' + SITE_URL + '/online-doctor-appointment"/>here</a> to book .</span>');
209
210        }
211
212    });
213    $('#choice_2_19_0').click(function() {
214
215        if ($('#choice_2_19_0').is(':checked')) {
216            $('#gform_next_button_2_53').removeAttr('disabled');
217            $("#input_2_19").find('.na-msg').remove();
218            $('#choice_2_58_3').prop('checked', false);
219        }
220    });
221
222    $('#choice_2_20_1').click(function() {
223        if ($('#choice_2_20_1').is(':checked')) {
224            $('#gform_next_button_2_53').attr('disabled', 'disabled');
225            $(".gchoice_2_20_1").after(errorEmergency);
226        }
227
228    });
229    $('#choice_2_20_0').click(function() {
230
231        if ($('#choice_2_20_0').is(':checked')) {
232            $('#gform_next_button_2_53').removeAttr('disabled');
233            $("#input_2_20").find('.na-msg').remove();
234        }
235    });
236
237
238
239    $('#choice_2_35_0').click(function() {
240        if ($('#choice_2_35_0').is(':checked')) {
241            //$('#gform_next_button_2_53').attr('disabled', 'disabled');
242            $(".gchoice_2_35_1").after(errorE1New);
243
244        }
245
246    });
247    $('#choice_2_35_1').click(function() {
248        if ($('#choice_2_35_1').is(':checked')) {
249            $('#gform_next_button_2_53').removeAttr('disabled');
250            $("#input_2_35").find('.na-msg').remove();
251
252        }
253
254    });
255    $('#choice_2_36_0').click(function() {
256        if ($('#choice_2_36_0').is(':checked')) {
257           // $('#gform_next_button_2_53').attr('disabled', 'disabled');
258            $(".gchoice_2_36_1").after(errorE1New);
259        }
260
261    });
262    $('#choice_2_36_1').click(function() {
263        if ($('#choice_2_36_1').is(':checked')) {
264            $('#gform_next_button_2_53').removeAttr('disabled');
265            $("#input_2_36").find('.na-msg').remove();
266        }
267
268    });
269
270
271    $('#choice_2_38_1').click(function() {
272        if ($('#choice_2_38_1').is(':checked')) {
273            //$('#gform_next_button_2_53').attr('disabled', 'disabled');
274            $(".gchoice_2_38_1").after(errorE1New);
275        }
276
277    });
278    $('#choice_2_38_0').click(function() {
279        if ($('#choice_2_38_0').is(':checked')) {
280            $('#gform_next_button_2_53').removeAttr('disabled');
281            $("#input_2_38").find('.na-msg').remove();
282        }
283
284    });
285    $('#choice_2_39_0').click(function() {
286        if ($('#choice_2_39_0').is(':checked')) {
287            $('#gform_next_button_2_53').attr('disabled', 'disabled');
288            $(".gchoice_2_39_1").after(errorE3);
289        }
290
291    });
292    $('#choice_2_39_1').click(function() {
293        if ($('#choice_2_39_1').is(':checked')) {
294            $('#gform_next_button_2_53').removeAttr('disabled');
295            $("#input_2_39").find('.na-msg').remove();
296        }
297
298    });
299    $('#choice_2_40_0').click(function() {
300        if ($('#choice_2_40_0').is(':checked')) {
301            $('#gform_next_button_2_53').attr('disabled', 'disabled');
302            $(".gchoice_2_40_1").after(errorE3);
303        }
304
305    });
306    $('#choice_2_40_1').click(function() {
307        if ($('#choice_2_40_1').is(':checked')) {
308            $('#gform_next_button_2_53').removeAttr('disabled');
309            $("#input_2_40").find('.na-msg').remove();
310        }
311
312    });
313    $('#choice_2_41_0').click(function() {
314        if ($('#choice_2_41_0').is(':checked')) {
315            $('#gform_next_button_2_53').attr('disabled', 'disabled');
316            $(".gchoice_2_41_1").after(errorE3);
317
318        }
319
320    });
321    $('#choice_2_41_1').click(function() {
322        if ($('#choice_2_41_1').is(':checked')) {
323            $('#gform_next_button_2_53').removeAttr('disabled');
324            $("#input_2_41").find('.na-msg').remove();
325        }
326
327    });
328    $('#choice_2_42_0').click(function() {
329        if ($('#choice_2_42_0').is(':checked')) {
330            $('#gform_next_button_2_53').attr('disabled', 'disabled');
331            $(".gchoice_2_42_1").after(errorEl);
332        }
333
334    });
335    $('#choice_2_42_1').click(function() {
336        if ($('#choice_2_42_1').is(':checked')) {
337            $('#gform_next_button_2_53').removeAttr('disabled');
338            $("#input_2_42").find('.na-msg').remove();
339        }
340    });
341
342    $('#choice_2_43_0').click(function() {
343        if ($('#choice_2_43_0').is(':checked')) {
344            //$('#gform_next_button_2_53').attr('disabled', 'disabled');
345            $(".gchoice_2_43_1").after(errorE1New);
346        }
347
348    });
349    $('#choice_2_43_1').click(function() {
350        if ($('#choice_2_43_1').is(':checked')) {
351            $('#gform_next_button_2_53').removeAttr('disabled');
352            $("#input_2_43").find('.na-msg').remove();
353
354        }
355
356    });
357
358    $('#choice_2_44_0').click(function() {
359        if ($('#choice_2_44_0').is(':checked')) {
360            $('#gform_next_button_2_53').attr('disabled', 'disabled');
361            $(".gchoice_2_44_1").after(errorE3);
362        }
363
364    });
365    $('#choice_2_44_1').click(function() {
366        if ($('#choice_2_44_1').is(':checked')) {
367            $('#gform_next_button_2_53').removeAttr('disabled');
368            $("#input_2_44").find('.na-msg').remove();
369        }
370
371    });
372    $('#choice_2_45_0').click(function() {
373        if ($('#choice_2_45_0').is(':checked')) {
374            $('#gform_next_button_2_53').attr('disabled', 'disabled');
375            $(".gchoice_2_45_1").after(errorEl);
376
377        }
378
379    });
380    $('#choice_2_45_1').click(function() {
381        if ($('#choice_2_45_1').is(':checked')) {
382            $('#gform_next_button_2_53').removeAttr('disabled');
383            $("#input_2_45").find('.na-msg').remove();
384
385        }
386
387    });
388    $('#choice_2_46_0').click(function() {
389        if ($('#choice_2_46_0').is(':checked')) {
390            $('#gform_next_button_2_53').attr('disabled', 'disabled');
391            $(".gchoice_2_46_1").after(errorEl);
392
393        }
394
395    });
396    $('#choice_2_46_1').click(function() {
397        if ($('#choice_2_46_1').is(':checked')) {
398            $('#gform_next_button_2_53').removeAttr('disabled');
399            $("#input_2_46").find('.na-msg').remove();
400
401        }
402
403    });
404    $('#choice_2_47_0').click(function() {
405        if ($('#choice_2_47_0').is(':checked')) {
406            $('#gform_next_button_2_53').attr('disabled', 'disabled');
407            $(".gchoice_2_47_1").after(errorEmergency);
408        }
409
410    });
411    $('#choice_2_47_1').click(function() {
412        if ($('#choice_2_47_1').is(':checked')) {
413            $('#gform_next_button_2_53').removeAttr('disabled');
414            $("#input_2_47").find('.na-msg').remove();
415        }
416
417    });
418    $('#choice_2_56_0').click(function() {
419        if ($('#choice_2_56_0').is(':checked')) {
420            if ($('#input_2_56 #choice_2_1_2').length == 0) {
421                $(".gchoice_2_56_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'>Qoctor is unable to offer GP appointments relating to legal issues, court appearances, workcover or insurance claims. We recommend you speak to your usual GP, in person, about your concerns. Please email <a href='mailto:[email protected]'>[email protected]</a> if you have further queries <a href='" + SITE_URL + "'>Return to home page</a>. </span>");
422            }
423        }
424    });
425    $('#choice_2_56_1').click(function() {
426        if ($('#choice_2_56_1').is(':checked')) {
427            $(".gchoice_2_56_0").find('.na-msg').remove();
428            $('#choice_2_1_2').remove();
429        }
430    });
431    $('#choice_2_57_0').click(function() {
432        if ($('#choice_2_57_0').is(':checked')) {
433            $("#input_2_57").find('.na-msg').remove();
434            if ($('#input_2_57 #choice_2_1_2').length == 0) {
435                $(".gchoice_2_57_1").after("<br><span style='color:red; margin-bottom: 15px;' class='comprehensive_consult na-msg'>For this issue, you'll need a more detailed consultation - we've adjusted your cart to a Standard certificate plus- $34.99</span>");
436            }
437        }
438    });
439    $('#choice_2_57_1').click(function() {
440        if ($('#choice_2_57_1').is(':checked')) {
441            $("#input_2_57").find('.na-msg').remove();
442            $('#choice_2_1_2').remove();
443        }
444    });    
445
446    function enforceComprehensiveConsultChoice() {
447        var hasComprehensive = $('.comprehensive_consult').length > 0;
448        var $choice0 = $('#choice_2_58_0');
449        var $choice1 = $('#choice_2_58_1');
450        var $choice2 = $('#choice_2_58_2');
451        var $choice3 = $('#choice_2_58_3');
452        var disabledTip = 'Please select comprehensive option to proceed';
453
454        if (hasComprehensive) {
455            $choice0.prop('checked', false).prop('disabled', true);
456            $choice1.prop('checked', false).prop('disabled', true);
457            $choice2.prop('checked', false).prop('disabled', true);
458            $choice3.prop('disabled', false).prop('checked', true).data('auto-selected', true);
459
460            if ($choice3.is(':visible')) {
461               $('#field_2_7').show();
462               $('#field_2_8').show();
463               $('#field_2_62').show();
464            }
465
466            $choice0.attr('title', disabledTip);
467            $choice1.attr('title', disabledTip);
468            $choice2.attr('title', disabledTip);
469        } else {
470            $choice0.prop('disabled', false);
471            $choice1.prop('disabled', false);
472            $choice2.prop('disabled', false);
473           // $('#choice_2_58_3').prop('checked', false);
474
475            
476            
477            $choice0.removeAttr('title');
478            $choice1.removeAttr('title');
479            $choice2.removeAttr('title');
480        }
481    }
482
483    $(document).on('click', 'input', function() {
484        enforceComprehensiveConsultChoice();
485    });
486    enforceComprehensiveConsultChoice();
487
488    function formatDateDDMMYYYY(dateObj) {
489        var dd = String(dateObj.getDate()).padStart(2, '0');
490        var mm = String(dateObj.getMonth() + 1).padStart(2, '0');
491        var yyyy = dateObj.getFullYear();
492        return dd + '.' + mm + '.' + yyyy;
493    }
494
495    function setMedicalCertDates(fromDate, toDate) {
496        $('#input_2_7').val(formatDateDDMMYYYY(fromDate));
497        $('#input_2_8').val(formatDateDDMMYYYY(toDate));
498    }
499
500    function dateOffset(days) {
501        var d = new Date();
502        d.setHours(0, 0, 0, 0);
503        d.setDate(d.getDate() + days);
504        return d;
505    }
506
507
508    $('#choice_2_58_0').click(function() {
509        if ($('#choice_2_58_0').is(':checked')) {
510  
511            $("#field_2_7").hide();
512            $("#field_2_8").hide();
513        }
514    });
515
516
517    $('#choice_2_58_1').click(function() {
518        if ($('#choice_2_58_1').is(':checked')) {
519            $("#field_2_7").hide();
520            $("#field_2_8").hide();
521        }
522    });
523
524
525
526    $('#choice_2_58_2').click(function() {
527       
528        if ($('#choice_2_58_2').is(':checked')) {
529            $("#input_2_7").val("");
530            $("#input_2_8").val("");
531            $("#field_2_7").show();
532            $("#field_2_8").show();
533        }
534    });
535
536
537    $('#choice_2_58_3').click(function() {
538        if ($('#choice_2_58_3').is(':checked')) {
539            $("#input_2_7").val("");
540            $("#input_2_8").val("");
541            $("#field_2_7").show();
542            $("#field_2_8").show();
543        }
544    });
545
546    $('#input_2_7, #input_2_8, #input_3_5, #input_3_6').prop('readonly', true);
547    
548    $('#choice_2_59_0').click(function() {
549        if ( $('#choice_2_59_0').is(':checked') && !$('#choice_2_58_3').is(':checked')) {
550            var t = dateOffset(0);
551            setMedicalCertDates(t, t);
552            $("#field_2_7").hide();
553            $("#field_2_8").hide();
554        }
555    });    
556
557    $('#choice_2_60_0').click(function() {
558        if ($('#choice_2_60_0').is(':checked')  && !$('#choice_2_58_3').is(':checked') ) {
559            var y = dateOffset(-1);
560            setMedicalCertDates(y, y);
561            $("#field_2_7").hide();
562            $("#field_2_8").hide();
563        }
564    });
565
566    $('#choice_2_60_1').click(function() {
567        if ($('#choice_2_60_1').is(':checked')) {
568            var tm = dateOffset(1);
569            setMedicalCertDates(tm, tm);
570            $("#field_2_7").hide();
571            $("#field_2_8").hide();
572        }
573    });
574    
575    $('#choice_2_60_2').click(function() {
576        if ($('#choice_2_60_2').is(':checked')) {
577            setMedicalCertDates(dateOffset(-1), dateOffset(0));
578            $("#field_2_7").hide();
579            $("#field_2_8").hide();
580        }
581    });
582    $('#choice_2_60_3').click(function() {
583        if ($('#choice_2_60_3').is(':checked')) {
584            setMedicalCertDates(dateOffset(0), dateOffset(1));
585            $("#field_2_7").hide();
586            $("#field_2_8").hide();
587        }
588    });    
589
590
591
592    $(function() {   // shorthand for document.ready
593
594        function checkRadioSelection() {
595            if (
596                $("#choice_2_58_2").is(":checked") ||
597                $("#choice_2_58_3").is(":checked")
598            ) {
599                $("#field_2_7, #field_2_8").show();
600            } 
601        }
602
603        function insertTags() {
604            const target = document.querySelector(".gchoice_2_58_2");
605            if (!target) return;
606        
607            // Insert Best Value (if not already there)
608            if (!target.querySelector(".tag-best-value")) {
609                const bestValue = document.createElement("span");
610                bestValue.className = "tag-best-value";
611                bestValue.textContent = "Best Value";
612                target.prepend(bestValue);
613            }
614        
615            // Insert Most Purchased (after Best Value)
616            if (!target.querySelector(".tag-most-purchased")) {
617                const mostPurchased = document.createElement("span");
618                mostPurchased.className = "tag-most-purchased";
619                mostPurchased.textContent = "Most Purchased";
620        
621                const bestValueTag = target.querySelector(".tag-best-value");
622                bestValueTag.insertAdjacentElement("afterend", mostPurchased);
623            }
624        }
625        
626        insertTags();
627        checkRadioSelection();
628
629    });
630
631
632    
633    //form Medical End
634
635    
636    //form Cares start
637
638    $('#input_3_8').keyup(function() {
639        var input = document.getElementById('input_3_7');
640
641        if (input.value != document.getElementById('input_3_8').value) {
642            $('#gform_next_button_3_46').attr('disabled', 'disabled');
643            $("#field_3_8").append(errorSkpe);
644        } else {
645            $('#gform_next_button_3_46').removeAttr('disabled');
646            $("#field_3_8").find('.na-msg').remove();
647        }
648    });
649
650
651    $('#choice_3_1_1').click(function() {
652
653        if ($('#choice_3_1_1').is(':checked')) {
654            $('#gform_next_button_3_46').attr('disabled', 'disabled');
655            $(".gchoice_3_1_1").after(errorEl);
656        }
657    });
658    $('#choice_3_1_0').click(function() {
659
660        if ($('#choice_3_1_0').is(':checked')) {
661            $('#gform_next_button_3_46').removeAttr('disabled');
662            $("#input_3_1").find('.na-msg').remove();
663
664        }
665    });
666
667    $('#choice_3_2_1').click(function() {
668
669        if ($('#choice_3_2_1').is(':checked')) {
670            $('#gform_next_button_3_46').attr('disabled', 'disabled');
671            $(".gchoice_3_2_1").after(errorEl);
672        }
673    });
674    $('#choice_3_2_0').click(function() {
675        if ($('#choice_3_2_0').is(':checked')) {
676            $('#gform_next_button_3_46').removeAttr('disabled');
677            $("#input_3_2").find('.na-msg').remove();
678
679        }
680    });
681    $('#choice_3_49_0').click(function() {
682        if ($('#choice_3_49_0').is(':checked')) {
683            if ($('#input_3_49 #choice_2_1_2').length == 0) {
684                $(".gchoice_3_49_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'>Qoctor is unable to offer GP appointments relating to legal issues, court appearances, workcover or insurance claims. We recommend you speak to your usual GP, in person, about your concerns. Please email <a href='mailto:[email protected]'>[email protected]</a> if you have further queries <a href='" + SITE_URL + "'>Return to home page</a>. </span>");
685            }
686        }
687    });
688    $('#choice_3_49_1').click(function() {
689        if ($('#choice_3_49_1').is(':checked')) {
690            $(".gchoice_3_49_0").find('.na-msg').remove();
691            $('#choice_2_1_2').remove();
692        }
693    });
694    //form Cares End	
695
696    //form Cares ster	
697    // start female Mirena 
698    // start female Mirena // Contraception – Mirena Coil – New Referral Letter - Form id 5
699    $('#choice_5_30_1').click(function () {
700        if ($('#choice_5_30_1').is(':checked')) {
701            $('#gform_submit_button_5').attr('disabled', 'disabled');
702            $(".gchoice_5_30_1").after(errorE4);
703        }
704    });
705    $('#choice_5_30_0').click(function () {
706        if ($('#choice_5_30_0').is(':checked')) {
707            $('#gform_submit_button_5').removeAttr('disabled');
708            $("#choice_2_1_2").remove();
709        }
710    });
711
712    $('#choice_5_31_1').click(function () {
713        if ($('#choice_5_31_1').is(':checked')) {
714            $('#gform_submit_button_5').attr('disabled', 'disabled');
715            $(".gchoice_5_31_1").after(errorE4);
716        }
717    });
718    $('#choice_5_31_0').click(function () {
719        if ($('#choice_5_31_0').is(':checked')) {
720            $('#gform_submit_button_5').removeAttr('disabled');
721            $("#choice_2_1_2").remove();
722        }
723    });
724
725    $('#choice_5_1_1').click(function () {
726        if ($('#choice_5_1_1').is(':checked')) {
727            $('#gform_submit_button_5').attr('disabled', 'disabled');
728            if (jQuery('#input_5_1 #choice_2_1_2').length == 0) {
729                $(".gchoice_5_1_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'><br>It doesn’t seem like this service is appropriate for you. To discuss your needs, you can book a GP telehealth appointment <a href='" + SITE_URL +"/online-doctor-appointment/'>here</a>, if you wish.</span>");
730            }
731        }
732    });
733    $('#choice_5_1_0').click(function () {
734        if ($('#choice_5_1_0').is(':checked')) {
735            $('#gform_submit_button_5').removeAttr('disabled');
736            $("#choice_2_1_2").remove();
737        }
738    });
739
740    $('#choice_5_2_1').click(function () {
741        if ($('#choice_5_2_1').is(':checked')) {
742            $('#gform_submit_button_5').attr('disabled', 'disabled');
743            if (jQuery('#input_5_2 #choice_2_1_2').length == 0) {
744                $(".gchoice_5_2_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'>You will need a more detailed consultation. You can book a GP telehealth appointment <a href='" + SITE_URL + "/online-doctor-appointment/'>here</a>, if you wish.</span>");
745            }
746        }
747    });
748    $('#choice_5_2_0').click(function () {
749        if ($('#choice_5_2_0').is(':checked')) {
750            $('#gform_submit_button_5').removeAttr('disabled');
751            $("#choice_2_1_2").remove();
752        }
753    });
754
755    $('#choice_5_4_1').click(function () {
756        if ($('#choice_5_4_1').is(':checked')) {
757            $('#gform_submit_button_5').attr('disabled', 'disabled');
758            if (jQuery('#input_5_4 #choice_2_1_2').length == 0) {
759                $(".gchoice_5_4_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'><br>It doesn’t seem like this service is appropriate for you. To discuss your needs, you can book a GP telehealth appointment <a href='" + SITE_URL +"/online-doctor-appointment/'>here</a>, if you wish.</span>");
760            }
761        }
762    });
763    $('#choice_5_4_0').click(function () {
764        if ($('#choice_5_4_0').is(':checked')) {
765            $('#gform_submit_button_5').removeAttr('disabled');
766            $("#choice_2_1_2").remove();
767        }
768    });
769
770    $('#choice_5_7_1').click(function () {
771        if ($('#choice_5_7_1').is(':checked')) {
772            $('#gform_submit_button_5').attr('disabled', 'disabled');
773            $(".gchoice_5_7_1").after(errorE4);
774        }
775    });
776    $('#choice_5_7_0').click(function () {
777        if ($('#choice_5_7_0').is(':checked')) {
778            $('#gform_submit_button_5').removeAttr('disabled');
779            $("#choice_2_1_2").remove();
780        }
781    });
782
783    $('#choice_5_8_1').click(function () {
784        if ($('#choice_5_8_1').is(':checked')) {
785            $('#gform_submit_button_5').attr('disabled', 'disabled');
786            if (jQuery('#input_5_8 #choice_2_1_2').length == 0) {
787                $(".gchoice_5_8_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'><br>It doesn’t seem like this service is appropriate for you. To discuss your needs, you can book a GP telehealth appointment <a href='" + SITE_URL +"/online-doctor-appointment/'>here</a>, if you wish.</span>");
788            }
789        }
790    });
791    $('#choice_5_8_0').click(function () {
792        if ($('#choice_5_8_0').is(':checked')) {
793            $('#gform_submit_button_5').removeAttr('disabled');
794            $("#choice_2_1_2").remove();
795        }
796    });
797    //odd start
798    $('#choice_5_3_0').click(function () {
799        if ($('#choice_5_3_0').is(':checked')) {
800            $('#gform_submit_button_5').attr('disabled', 'disabled');
801            if (jQuery('#input_5_3 #choice_2_1_2').length == 0) {
802                $(".gchoice_5_3_1").after("<span id='choice_2_1_2' style='color:red; margin-bottom: 15px;' class='na-msg fs-error-group1'>You will need a more detailed consultation. You can book a GP telehealth appointment <a href='" + SITE_URL + "/online-doctor-appointment/'>here</a>, if you wish.</span>");
803            }
804        }
805    });
806    $('#choice_5_3_1').click(function () {
807        if ($('#choice_5_3_1').is(':checked')) {
808            $('#gform_submit_button_5').removeAttr('disabled');
809            $("#choice_2_1_2").remove();
810        }
811    });
812    //odd end // Contraception – Mirena Coil – New Referral Letter - Form id 5
813
814    // End female Mirena 
815
816    // End female Mirena 
817
818    // start Circumcision New Referrel Letter
819    $('#choice_7_36_1').click(function() {
820
821        if ($('#choice_7_36_1').is(':checked')) {
822            $('#gform_submit_button_7').attr('disabled', 'disabled');
823            $(".gchoice_7_36_1").append(errorEl);
824
825        }
826
827    });
828    $('#choice_7_36_0').click(function() {
829
830        if ($('#choice_7_36_0').is(':checked')) {
831            $('#gform_submit_button_7').removeAttr('disabled');
832            $(".gchoice_7_36_1").find('.na-msg').remove();
833
834        }
835    });
836    $('#choice_7_26_1').click(function() {
837
838        if ($('#choice_7_26_1').is(':checked')) {
839            $('#gform_submit_button_7').attr('disabled', 'disabled');
840            $(".gchoice_7_26_1").append(errorEl);
841
842        }
843
844    });
845    $('#choice_7_26_0').click(function() {
846
847        if ($('#choice_7_26_0').is(':checked')) {
848            $('#gform_submit_button_7').removeAttr('disabled');
849            $(".gchoice_7_26_1").find('.na-msg').remove();
850
851        }
852    });
853    $('#choice_7_13_1').click(function() {
854
855        if ($('#choice_7_13_1').is(':checked')) {
856            $('#gform_submit_button_7').attr('disabled', 'disabled');
857            $(".gchoice_7_13_1").append(errorEl);
858
859        }
860
861    });
862    $('#choice_7_13_0').click(function() {
863
864        if ($('#choice_7_13_0').is(':checked')) {
865            $('#gform_submit_button_7').removeAttr('disabled');
866            $(".gchoice_7_13_1").find('.na-msg').remove();
867
868        }
869    });
870    $('#choice_7_12_1').click(function() {
871
872        if ($('#choice_7_12_1').is(':checked')) {
873            $('#gform_submit_button_7').attr('disabled', 'disabled');
874            $(".gchoice_7_12_1").append(errorEl);
875
876        }
877
878    });
879    $('#choice_7_12_0').click(function() {
880
881        if ($('#choice_7_12_0').is(':checked')) {
882            $('#gform_submit_button_7').removeAttr('disabled');
883            $(".gchoice_7_12_1").find('.na-msg').remove();
884
885        }
886    });
887    $('#choice_7_7_1').click(function() {
888
889        if ($('#choice_7_7_1').is(':checked')) {
890            $('#gform_submit_button_7').attr('disabled', 'disabled');
891            $(".gchoice_7_7_1").append(errorEl);
892
893        }
894
895    });
896    $('#choice_7_7_0').click(function() {
897
898        if ($('#choice_7_7_0').is(':checked')) {
899            $('#gform_submit_button_7').removeAttr('disabled');
900            $(".gchoice_7_7_1").find('.na-msg').remove();
901
902        }
903    });
904    $('#choice_7_8_1').click(function() {
905
906        if ($('#choice_7_8_1').is(':checked')) {
907            $('#gform_submit_button_7').attr('disabled', 'disabled');
908            $(".gchoice_7_8_1").append(errorEl);
909
910        }
911
912    });
913    $('#choice_7_8_0').click(function() {
914
915        if ($('#choice_7_8_0').is(':checked')) {
916            $('#gform_submit_button_7').removeAttr('disabled');
917            $(".gchoice_7_8_1").find('.na-msg').remove();
918
919        }
920    });
921    // End Circumcision New Referrel Letter
922
923    $('#choice_11_28_0').click(function() {
924
925        komtar();
926
927    });
928    $('#choice_11_28_1').click(function() {
929
930        komtar();
931
932    });
933
934    $('#choice_11_1_0').click(function() {
935
936        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
937            komtar();
938        }
939
940    });
941    $('#choice_11_1_1').click(function() {
942
943        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
944            komtar();
945        }
946
947    });
948
949    $('#choice_11_22_0').click(function() {
950
951        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
952            komtar();
953        }
954
955    });
956    $('#choice_11_22_1').click(function() {
957
958        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
959            komtar();
960        }
961
962    });
963
964    $('#choice_11_23_0').click(function() {
965
966        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
967            komtar();
968        }
969
970    });
971    $('#choice_11_23_1').click(function() {
972
973        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
974            komtar();
975        }
976
977    });
978
979    $('#choice_11_24_0').click(function() {
980
981        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
982            komtar();
983        }
984
985    });
986    $('#choice_11_24_1').click(function() {
987
988        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
989            komtar();
990        }
991
992    });
993
994
995    $('#choice_11_25_0').click(function() {
996
997        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
998            komtar();
999        }
1000
1001    });
1002    $('#choice_11_25_1').click(function() {
1003
1004        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
1005            komtar();
1006        }
1007
1008    });
1009
1010    $('#choice_11_26_0').click(function() {
1011
1012        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
1013            komtar();
1014        }
1015
1016    });
1017    $('#choice_11_26_1').click(function() {
1018
1019        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
1020            komtar();
1021        }
1022
1023    });
1024    $('#choice_11_27_0').click(function() {
1025
1026        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
1027            komtar();
1028        }
1029
1030    });
1031    $('#choice_11_27_1').click(function() {
1032
1033        if ($('#choice_11_28_0').is(':checked') || $('#choice_11_28_1').is(':checked')) {
1034            komtar();
1035        }
1036
1037    });
1038
1039    function komtar() {
1040        sum = 0;
1041        if ($('#choice_11_1_0').is(':checked')) {
1042            sum = sum + 1;
1043        }
1044        if ($('#choice_11_22_0').is(':checked')) {
1045            sum = sum + 1;
1046        }
1047        if ($('#choice_11_23_0').is(':checked')) {
1048            sum = sum + 1;
1049        }
1050        if ($('#choice_11_24_0').is(':checked')) {
1051            sum = sum + 1;
1052        }
1053        if ($('#choice_11_25_0').is(':checked')) {
1054            sum = sum + 1;
1055        }
1056        if ($('#choice_11_26_0').is(':checked')) {
1057            sum = sum + 1;
1058        }
1059        if ($('#choice_11_27_0').is(':checked')) {
1060            sum = sum + 1;
1061        }
1062        if ($('#choice_11_28_0').is(':checked')) {
1063            sum = sum + 1;
1064        }
1065        if (sum < 3) {
1066            $('#gform_submit_button_11').attr('disabled', 'disabled');
1067            $(".gchoice_11_28_1").after(errorE5);
1068
1069            $("#field_11_53, #field_11_61, #field_11_62, #field_11_63, #field_11_65, #field_11_64, #field_11_66, #field_11_67, #field_11_68, #field_11_29, #field_11_5, #field_11_15, #field_11_16, #field_11_17, #field_11_14, #field_11_6, #field_11_18, #field_11_19, #field_11_20, #field_11_13, #field_11_36, #field_11_40, #field_11_41, #field_11_38, #field_11_31, #field_11_32, #field_11_33").attr('style', 'display: none !important');
1070
1071        } else {
1072            $('#gform_submit_button_11').removeAttr('disabled');
1073            $('#choice_2_1_2').remove();
1074
1075            $("#field_11_53, #field_11_61, #field_11_62, #field_11_63, #field_11_65, #field_11_64, #field_11_66, #field_11_67, #field_11_68, #field_11_29, #field_11_5, #field_11_15, #field_11_16, #field_11_17, #field_11_14, #field_11_6, #field_11_18, #field_11_19, #field_11_20, #field_11_13, #field_11_36, #field_11_40, #field_11_41, #field_11_38, #field_11_31, #field_11_32, #field_11_33").attr('style', 'display: block !important');
1076
1077        }
1078    }
1079    //    function scroll_ease(){
1080    //        console.log('scrolled');
1081    //        $("html, body").animate({ scrollTop: '+=150px' }, 1000);
1082    //    }
1083    //    function scroll_ease(){
1084    //        var jump = jQuery('div.gform_body').nextAll('div').offset();
1085    //        $('html, body').animate({scrollTop:jump.top - 200}, 500);
1086    //    }    
1087    function scroll_ease(e) {
1088        // Repeat Consult introduction: mobile users should remain at their
1089        // natural scroll position. Auto-scrolling this form can place its
1090        // opening copy underneath Avada's sticky header.
1091        if ($('body').hasClass('page-id-94358') && $('#gform_wrapper_96').length &&
1092            window.matchMedia('(max-width: 600px)').matches) {
1093            return;
1094        }
1095
1096        var urlParams = new URLSearchParams(window.location.search);
1097        var isKiosk = urlParams.get('kiosk');
1098        var id = e.attr('id');
1099        var nextId = jQuery('#' + id).closest('.gfield').nextAll("li:visible").first().attr('id');
1100        var display = jQuery('#' + nextId).css("display");
1101        if (typeof display != 'undefined') {
1102
1103            var top = jQuery('#' + id).closest('.gfield').nextAll("li:visible").first().offset().top;
1104        }
1105        var windHeight = window.innerHeight;
1106        var windMid = Math.round(windHeight / 2); //&& typeof display != 'undefined'
1107        if (typeof top != 'undefined') {
1108            if (isKiosk == "yes") {
1109                top = top + 400;
1110            }
1111
1112            $('html, body').animate({ scrollTop: top - windMid }, 500);
1113        }
1114    }
1115    /******** new algo sleep ******/
1116
1117    $('#choice_81_2_1').click(function() {
1118
1119        if ($('#choice_81_2_1').is(':checked')) {
1120            $('#gform_submit_button_81').attr('disabled', 'disabled');
1121            $(".gchoice_81_2_1").append(errorEl);
1122
1123        }
1124
1125    });
1126    $('#choice_81_2_0').click(function() {
1127
1128        if ($('#choice_81_2_0').is(':checked')) {
1129            $('#gform_submit_button_81').removeAttr('disabled');
1130            $(".gchoice_81_2_1").find('.na-msg').remove();
1131
1132
1133        }
1134    });
1135    $('#choice_81_3_1').click(function() {
1136
1137        if ($('#choice_81_3_1').is(':checked')) {
1138            $('#gform_submit_button_81').attr('disabled', 'disabled');
1139            $(".gchoice_81_3_1").append(errorEl);
1140
1141        }
1142
1143    });
1144    $('#choice_81_3_0').click(function() {
1145
1146        if ($('#choice_81_3_0').is(':checked')) {
1147            $('#gform_submit_button_81').removeAttr('disabled');
1148            $(".gchoice_81_3_1").find('.na-msg').remove();
1149
1150
1151        }
1152    });
1153    $('#choice_81_4_0').click(function() {
1154
1155        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1156            sleep_logic();
1157        }
1158
1159    });
1160    $('#choice_81_4_1').click(function() {
1161
1162        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1163            sleep_logic();
1164        }
1165
1166    });
1167    $('#choice_81_5_0').click(function() {
1168
1169        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1170            sleep_logic();
1171        }
1172
1173    });
1174    $('#choice_81_5_1').click(function() {
1175
1176        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1177            sleep_logic();
1178        }
1179
1180    });
1181    $('#choice_81_6_0').click(function() {
1182
1183        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1184            sleep_logic();
1185        }
1186
1187    });
1188    $('#choice_81_6_1').click(function() {
1189
1190        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1191            sleep_logic();
1192        }
1193
1194    });
1195    $('#choice_81_7_0').click(function() {
1196
1197        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1198            sleep_logic();
1199        }
1200
1201    });
1202    $('#choice_81_7_1').click(function() {
1203
1204        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1205            sleep_logic();
1206        }
1207
1208    });
1209    $('#choice_81_8_0').click(function() {
1210
1211        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1212            sleep_logic();
1213        }
1214
1215    });
1216    $('#choice_81_8_1').click(function() {
1217
1218        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1219            sleep_logic();
1220        }
1221
1222    });
1223    $('#choice_81_9_0').click(function() {
1224
1225        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1226            sleep_logic();
1227        }
1228
1229    });
1230    $('#choice_81_9_1').click(function() {
1231
1232        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1233            sleep_logic();
1234        }
1235
1236    });
1237    $('#choice_81_10_0').click(function() {
1238
1239        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1240            sleep_logic();
1241        }
1242
1243    });
1244    $('#choice_81_10_1').click(function() {
1245
1246        if ($('#choice_81_11_0').is(':checked') || $('#choice_81_11_1').is(':checked')) {
1247            sleep_logic();
1248        }
1249
1250    });
1251    $('#choice_81_11_0').click(function() {
1252
1253        sleep_logic();
1254
1255    });
1256    $('#choice_81_11_1').click(function() {
1257
1258        sleep_logic();
1259
1260    });
1261
1262    $('#choice_81_12_1').click(function() {
1263
1264        if ($('#choice_81_12_1').is(':checked')) {
1265            $('#gform_submit_button_81').attr('disabled', 'disabled');
1266            $(".gchoice_81_12_1").append(errorEl);
1267
1268        }
1269
1270    });
1271    $('#choice_81_12_0').click(function() {
1272
1273        if ($('#choice_81_12_0').is(':checked')) {
1274            $('#gform_submit_button_81').removeAttr('disabled');
1275            $(".gchoice_81_12_1").find('.na-msg').remove();
1276
1277
1278        }
1279    });
1280    $('#choice_81_14_1').click(function() {
1281
1282        if ($('#choice_81_14_1').is(':checked')) {
1283            $('#gform_submit_button_81').attr('disabled', 'disabled');
1284            $(".gchoice_81_14_1").append(errorEl);
1285
1286        }
1287
1288    });
1289    $('#choice_81_14_0').click(function() {
1290
1291        if ($('#choice_81_14_0').is(':checked')) {
1292            $('#gform_submit_button_81').removeAttr('disabled');
1293            $(".gchoice_81_14_1").find('.na-msg').remove();
1294
1295        }
1296    });
1297    $('#choice_81_19_1').click(function() {
1298
1299        if ($('#choice_81_19_1').is(':checked')) {
1300            $('#gform_submit_button_81').attr('disabled', 'disabled');
1301            $(".gchoice_81_19_1").append(errorEl);
1302
1303        }
1304
1305    });
1306    $('#choice_81_19_0').click(function() {
1307
1308        if ($('#choice_81_19_0').is(':checked')) {
1309            $('#gform_submit_button_81').removeAttr('disabled');
1310            $(".gchoice_81_19_1").find('.na-msg').remove();
1311
1312        }
1313    });
1314    $('#choice_81_31_1').click(function() {
1315
1316        if ($('#choice_81_31_1').is(':checked')) {
1317            $('#gform_submit_button_81').attr('disabled', 'disabled');
1318            $(".gchoice_81_31_1").append(errorEl);
1319
1320        }
1321
1322    });
1323    $('#choice_81_31_0').click(function() {
1324
1325        if ($('#choice_81_31_0').is(':checked')) {
1326            $('#gform_submit_button_81').removeAttr('disabled');
1327            $(".gchoice_81_31_1").find('.na-msg').remove();
1328
1329        }
1330    });
1331    $('#choice_81_16_1').click(function() {
1332
1333
1334
1335    });
1336    $('#choice_81_16_0').click(function() {
1337
1338
1339    });
1340    /******** end new algo sleep****/
1341
1342
1343    function sleep_logic() {
1344        sum = 0;
1345        if ($('#choice_81_4_0').is(':checked')) {
1346            sum = sum + 1;
1347        }
1348        if ($('#choice_81_5_0').is(':checked')) {
1349            sum = sum + 1;
1350        }
1351        if ($('#choice_81_6_0').is(':checked')) {
1352            sum = sum + 1;
1353        }
1354        if ($('#choice_81_7_0').is(':checked')) {
1355            sum = sum + 1;
1356        }
1357        if ($('#choice_81_8_0').is(':checked')) {
1358            sum = sum + 1;
1359        }
1360        if ($('#choice_81_9_0').is(':checked')) {
1361            sum = sum + 1;
1362        }
1363        if ($('#choice_81_10_0').is(':checked')) {
1364            sum = sum + 1;
1365        }
1366        if ($('#choice_81_11_0').is(':checked')) {
1367            sum = sum + 1;
1368        }
1369        console.log('Sum is : ' + sum)
1370        if (sum < 3) {
1371
1372            $('#gform_next_button_81_32').attr('disabled', 'disabled');
1373            $(".gchoice_81_11_1").find('.na-msg').remove();
1374            $(".gchoice_81_11_1").find('br').remove();
1375            $(".gchoice_81_11_1").append('<br><span id="error_1_7_4" style="color:red" class="na-msg fs-error-group1">It’s not clear that you are suffering from sleep apnoea so we cannot proceed. You should see a GP in person if you wish to discuss your problem</span>');
1376        } else {
1377            $('#gform_next_button_81_32').removeAttr('disabled');
1378            $(".gchoice_81_11_1").find('.na-msg').remove();
1379        }
1380    }
1381
1382
1383
1384
1385    // End 
1386    //premature
1387    $('#choice_16_1_0').click(function() {
1388
1389        if ($('#choice_16_1_0').is(':checked')) {
1390            $('#gform_submit_button_16').removeAttr('disabled');
1391            $("#input_16_1").find('.na-msg').remove();
1392        }
1393
1394    });
1395
1396    $('#choice_16_1_1').click(function() {
1397
1398        if ($('#choice_16_1_1').is(':checked')) {
1399            $('#gform_submit_button_16').attr('disabled', 'disabled');
1400            $("#input_16_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">I am sorry we are unable to prescribe the medication on this occasion, please see your regular doctor</span>');
1401
1402        }
1403
1404    });
1405
1406    $('#choice_16_2_0').click(function() {
1407
1408        if ($('#choice_16_2_0').is(':checked')) {
1409            $('#gform_submit_button_16').removeAttr('disabled');
1410            $("#input_16_2").find('.na-msg').remove();
1411        }
1412
1413    });
1414
1415    $('#choice_16_2_1').click(function() {
1416
1417        if ($('#choice_16_2_1').is(':checked')) {
1418            $('#gform_submit_button_16').attr('disabled', 'disabled');
1419            $("#input_16_2").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/premature-ejaculation-patient-information-leaflet/">premature ejaculation medical information sheet</a> before proceeding</span>');
1420
1421        }
1422
1423    });
1424
1425
1426
1427    $('#choice_16_3_1').click(function() {
1428
1429        if ($('#choice_16_3_1').is(':checked')) {
1430            $('#gform_submit_button_16').attr('disabled', 'disabled');
1431            $("#input_16_3").find('.na-msg').remove();
1432            $("#input_16_3").append(errorPreDOB);
1433
1434        }
1435
1436    });
1437
1438
1439
1440
1441
1442
1443
1444    $('#choice_16_4_0').click(function() {
1445
1446        if ($('#choice_16_4_0').is(':checked')) {
1447            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1448            $('#gform_submit_button_16').removeAttr('disabled');
1449            $("#input_16_4").find('.na-msg').remove();
1450        }
1451
1452    });
1453
1454    $('#choice_16_4_1').click(function() {
1455
1456        if ($('#choice_16_4_1').is(':checked')) {
1457            $('#gform_submit_button_16').attr('disabled', 'disabled');
1458            $("#input_16_4").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">Please click on the following link <a target="_blank"  href="' + SITE_URL + '/pil/premature-ejaculation-patient-information-leaflet/">Premature Ejaculation</a></span>');
1459
1460        }
1461
1462    });
1463    $('#choice_16_5_0').click(function() {
1464
1465        if ($('#choice_16_5_0').is(':checked')) {
1466            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1467            $('#gform_submit_button_16').removeAttr('disabled');
1468            $("#input_16_5").find('.na-msg').remove();
1469        }
1470
1471    });
1472
1473    $('#choice_16_5_1').click(function() {
1474
1475        if ($('#choice_16_5_1').is(':checked')) {
1476            $('#gform_submit_button_16').attr('disabled', 'disabled');
1477            $("#input_16_5").append(errorPre);
1478
1479        }
1480
1481    });
1482    $('#choice_16_6_0').click(function() {
1483
1484        if ($('#choice_16_6_0').is(':checked')) {
1485            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1486            $('#gform_submit_button_16').removeAttr('disabled');
1487            $("#input_16_6").find('.na-msg').remove();
1488        }
1489
1490    });
1491
1492    $('#choice_16_6_1').click(function() {
1493
1494        if ($('#choice_16_6_1').is(':checked')) {
1495            $('#gform_submit_button_16').attr('disabled', 'disabled');
1496            $("#input_16_6").append(errorPre);
1497
1498        }
1499
1500    });
1501    $('#choice_16_7_0').click(function() {
1502
1503        if ($('#choice_16_7_0').is(':checked')) {
1504            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1505            $('#gform_submit_button_16').removeAttr('disabled');
1506            $("#input_16_7").find('.na-msg').remove();
1507        }
1508
1509    });
1510
1511    $('#choice_16_7_1').click(function() {
1512
1513        if ($('#choice_16_7_1').is(':checked')) {
1514            $('#gform_submit_button_16').attr('disabled', 'disabled');
1515            $("#input_16_7").append(errorPre);
1516
1517        }
1518
1519    });
1520    $('#choice_16_8_0').click(function() {
1521
1522        if ($('#choice_16_8_0').is(':checked')) {
1523            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1524            $('#gform_submit_button_16').removeAttr('disabled');
1525            $("#input_16_8").find('.na-msg').remove();
1526        }
1527
1528    });
1529
1530    $('#choice_16_8_1').click(function() {
1531
1532        if ($('#choice_16_8_1').is(':checked')) {
1533            $('#gform_submit_button_16').attr('disabled', 'disabled');
1534            $("#input_16_8").append(errorPre);
1535
1536        }
1537
1538    });
1539    $('#choice_16_9_0').click(function() {
1540
1541        if ($('#choice_16_9_0').is(':checked')) {
1542            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1543            $('#gform_submit_button_16').removeAttr('disabled');
1544            $("#input_16_9").find('.na-msg').remove();
1545        }
1546
1547    });
1548
1549    $('#choice_16_9_1').click(function() {
1550
1551        if ($('#choice_16_9_1').is(':checked')) {
1552            $('#gform_submit_button_16').attr('disabled', 'disabled');
1553            $("#input_16_9").append(errorPre);
1554
1555        }
1556
1557    });
1558    $('#choice_16_10_0').click(function() {
1559
1560        if ($('#choice_16_10_0').is(':checked')) {
1561            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1562            $('#gform_submit_button_16').removeAttr('disabled');
1563            $("#input_16_10").find('.na-msg').remove();
1564        }
1565
1566    });
1567
1568    $('#choice_16_10_1').click(function() {
1569
1570        if ($('#choice_16_10_1').is(':checked')) {
1571            $('#gform_submit_button_16').attr('disabled', 'disabled');
1572            $("#input_16_10").append(errorPre);
1573
1574        }
1575
1576    });
1577    $('#choice_16_11_0').click(function() {
1578
1579        if ($('#choice_16_11_0').is(':checked')) {
1580            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1581            $('#gform_submit_button_16').removeAttr('disabled');
1582            $("#input_16_11").find('.na-msg').remove();
1583        }
1584
1585    });
1586
1587    $('#choice_16_11_1').click(function() {
1588
1589        if ($('#choice_16_11_1').is(':checked')) {
1590            $('#gform_submit_button_16').attr('disabled', 'disabled');
1591            $("#input_16_11").append(errorPre);
1592
1593        }
1594
1595    });
1596    $('#choice_16_12_0').click(function() {
1597
1598        if ($('#choice_16_12_0').is(':checked')) {
1599            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1600            $('#gform_submit_button_16').removeAttr('disabled');
1601            $("#input_16_12").find('.na-msg').remove();
1602        }
1603
1604    });
1605
1606    $('#choice_16_12_1').click(function() {
1607
1608        if ($('#choice_16_12_1').is(':checked')) {
1609            $('#gform_submit_button_16').attr('disabled', 'disabled');
1610            $("#input_16_12").append(errorPre);
1611
1612        }
1613
1614    });
1615    $('#choice_16_13_0').click(function() {
1616
1617        if ($('#choice_16_13_0').is(':checked')) {
1618            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1619            $('#gform_submit_button_16').removeAttr('disabled');
1620            $("#input_16_13").find('.na-msg').remove();
1621        }
1622
1623    });
1624
1625    $('#choice_16_13_1').click(function() {
1626
1627        if ($('#choice_16_13_1').is(':checked')) {
1628            $('#gform_submit_button_16').attr('disabled', 'disabled');
1629            $("#input_16_13").append(errorPre);
1630
1631        }
1632
1633    });
1634    $('#choice_16_14_0').click(function() {
1635
1636        if ($('#choice_16_14_0').is(':checked')) {
1637            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1638            $('#gform_submit_button_16').removeAttr('disabled');
1639            $("#input_16_14").find('.na-msg').remove();
1640        }
1641
1642    });
1643
1644    $('#choice_16_14_1').click(function() {
1645
1646        if ($('#choice_16_14_1').is(':checked')) {
1647            $('#gform_submit_button_16').attr('disabled', 'disabled');
1648            $("#input_16_14").append(errorPre);
1649
1650        }
1651
1652    });
1653
1654
1655    /*
1656     * erectile dys
1657     * @returns {undefined}
1658     */
1659    $('#choice_17_1_0').click(function() {
1660
1661        if ($('#choice_17_1_0').is(':checked')) {
1662            $('#gform_submit_button_17').removeAttr('disabled');
1663            $("#input_17_1").find('.na-msg').remove();
1664        }
1665
1666    });
1667
1668    $('#choice_17_1_1').click(function() {
1669
1670        if ($('#choice_17_1_1').is(':checked')) {
1671            $('#gform_submit_button_17').attr('disabled', 'disabled');
1672            $("#input_17_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/erectile-dysfunction-patient-information-leaflet/">erectile dysfunction medical information sheet</a> before proceeding</span>');
1673
1674        }
1675
1676    });
1677
1678    $('#choice_17_2_0').click(function() {
1679
1680        if ($('#choice_17_2_0').is(':checked')) {
1681            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1682            $('#gform_submit_button_17').removeAttr('disabled');
1683            $("#input_17_2").find('.na-msg').remove();
1684        }
1685
1686    });
1687
1688    $('#choice_17_2_1').click(function() {
1689
1690        if ($('#choice_17_2_1').is(':checked')) {
1691            $('#gform_submit_button_17').attr('disabled', 'disabled');
1692            $("#input_17_2").append(errorPre);
1693
1694        }
1695
1696    });
1697    $('#choice_17_3_0').click(function() {
1698
1699        if ($('#choice_17_3_0').is(':checked')) {
1700            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1701            $('#gform_submit_button_17').removeAttr('disabled');
1702            $("#input_17_3").find('.na-msg').remove();
1703        }
1704
1705    });
1706
1707    $('#choice_17_3_1').click(function() {
1708
1709        if ($('#choice_17_3_1').is(':checked')) {
1710            $('#gform_submit_button_17').attr('disabled', 'disabled');
1711            $("#input_17_3").append(errorPre);
1712
1713        }
1714
1715    });
1716    $('#choice_17_4_0').click(function() {
1717
1718        if ($('#choice_17_4_0').is(':checked')) {
1719            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1720            $('#gform_submit_button_17').removeAttr('disabled');
1721            $("#input_17_4").find('.na-msg').remove();
1722        }
1723
1724    });
1725
1726    $('#choice_17_4_1').click(function() {
1727
1728        if ($('#choice_17_4_1').is(':checked')) {
1729            $('#gform_submit_button_17').attr('disabled', 'disabled');
1730            $("#input_17_4").append(errorPre);
1731
1732        }
1733
1734    });
1735    $('#choice_17_5_0').click(function() {
1736
1737        if ($('#choice_17_5_0').is(':checked')) {
1738            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1739            $('#gform_submit_button_17').removeAttr('disabled');
1740            $("#input_17_5").find('.na-msg').remove();
1741        }
1742
1743    });
1744
1745    $('#choice_17_5_1').click(function() {
1746
1747        if ($('#choice_17_5_1').is(':checked')) {
1748            $('#gform_submit_button_17').attr('disabled', 'disabled');
1749            $("#input_17_5").append(errorPre);
1750
1751        }
1752
1753    });
1754    $('#choice_17_6_0').click(function() {
1755
1756        if ($('#choice_17_6_0').is(':checked')) {
1757            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1758            $('#gform_submit_button_17').removeAttr('disabled');
1759            $("#input_17_6").find('.na-msg').remove();
1760        }
1761
1762    });
1763
1764    $('#choice_17_6_1').click(function() {
1765
1766        if ($('#choice_17_6_1').is(':checked')) {
1767            $('#gform_submit_button_17').attr('disabled', 'disabled');
1768            $("#input_17_6").append(errorPre);
1769
1770        }
1771
1772    });
1773    $('#choice_17_7_0').click(function() {
1774
1775        if ($('#choice_17_7_0').is(':checked')) {
1776            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1777            $('#gform_submit_button_17').removeAttr('disabled');
1778            $("#input_17_7").find('.na-msg').remove();
1779        }
1780
1781    });
1782
1783    $('#choice_17_7_1').click(function() {
1784
1785        if ($('#choice_17_7_1').is(':checked')) {
1786            $('#gform_submit_button_17').attr('disabled', 'disabled');
1787            $("#input_17_7").append(errorPre);
1788
1789        }
1790
1791    });
1792    $('#choice_17_8_0').click(function() {
1793
1794        if ($('#choice_17_8_0').is(':checked')) {
1795            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1796            $('#gform_submit_button_17').removeAttr('disabled');
1797            $("#input_17_8").find('.na-msg').remove();
1798        }
1799
1800    });
1801
1802    $('#choice_17_8_1').click(function() {
1803
1804        if ($('#choice_17_8_1').is(':checked')) {
1805            $('#gform_submit_button_17').attr('disabled', 'disabled');
1806            $("#input_17_8").append(errorPre);
1807
1808        }
1809
1810    });
1811
1812
1813    /*
1814     * Prescription Genital Herpes
1815     * @returns {undefined}
1816     */
1817    $('#choice_20_1_0').click(function() {
1818
1819        if ($('#choice_20_1_0').is(':checked')) {
1820            $('#gform_submit_button_20').removeAttr('disabled');
1821            $("#input_20_1").find('.na-msg').remove();
1822        }
1823
1824    });
1825
1826    $('#choice_20_1_1').click(function() {
1827
1828        if ($('#choice_20_1_1').is(':checked')) {
1829            $('#gform_submit_button_20').attr('disabled', 'disabled');
1830            $("#input_20_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/genital-herpes-patient-information-leaflet/">genital herpes information sheet</a> before proceeding</span>');
1831
1832        }
1833
1834    });
1835
1836    $('#choice_20_2_0').click(function() {
1837
1838        if ($('#choice_20_2_0').is(':checked')) {
1839            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1840            $('#gform_submit_button_20').removeAttr('disabled');
1841            $("#input_20_2").find('.na-msg').remove();
1842        }
1843
1844    });
1845
1846    $('#choice_20_2_1').click(function() {
1847
1848        if ($('#choice_20_2_1').is(':checked')) {
1849            $('#gform_submit_button_20').attr('disabled', 'disabled');
1850            $("#input_20_2").append(errorPre);
1851
1852        }
1853
1854    });
1855    $('#choice_20_3_0').click(function() {
1856
1857        if ($('#choice_20_3_0').is(':checked')) {
1858            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1859            $('#gform_submit_button_20').removeAttr('disabled');
1860            $("#input_20_3").find('.na-msg').remove();
1861        }
1862
1863    });
1864
1865    $('#choice_20_3_1').click(function() {
1866
1867        if ($('#choice_20_3_1').is(':checked')) {
1868            $('#gform_submit_button_20').attr('disabled', 'disabled');
1869            $("#input_20_3").append(errorPre);
1870
1871        }
1872
1873    });
1874    $('#choice_20_4_0').click(function() {
1875
1876        if ($('#choice_20_4_0').is(':checked')) {
1877            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1878            $('#gform_submit_button_20').removeAttr('disabled');
1879            $("#input_20_4").find('.na-msg').remove();
1880        }
1881
1882    });
1883
1884    $('#choice_20_4_1').click(function() {
1885
1886        if ($('#choice_20_4_1').is(':checked')) {
1887            $('#gform_submit_button_20').attr('disabled', 'disabled');
1888            $("#input_20_4").append(errorPre);
1889
1890        }
1891
1892    });
1893    $('#choice_20_5_0').click(function() {
1894
1895        if ($('#choice_20_5_0').is(':checked')) {
1896            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1897            $('#gform_submit_button_20').removeAttr('disabled');
1898            $("#input_20_5").find('.na-msg').remove();
1899        }
1900
1901    });
1902
1903    $('#choice_20_5_1').click(function() {
1904
1905        if ($('#choice_20_5_1').is(':checked')) {
1906            $('#gform_submit_button_20').attr('disabled', 'disabled');
1907            $("#input_20_5").append(errorPre);
1908
1909        }
1910
1911    });
1912    $('#choice_20_8_0').click(function() {
1913
1914        if ($('#choice_20_8_0').is(':checked')) {
1915            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1916            $('#gform_submit_button_20').removeAttr('disabled');
1917            $("#input_20_8").find('.na-msg').remove();
1918        }
1919
1920    });
1921
1922    $('#choice_20_8_1').click(function() {
1923
1924        if ($('#choice_20_8_1').is(':checked')) {
1925            $('#gform_submit_button_20').attr('disabled', 'disabled');
1926            $("#input_20_8").append(errorPre);
1927
1928        }
1929
1930    });
1931    /*
1932     * Prescription Chlamydia
1933     * @returns {undefined}
1934     */
1935    $('#choice_25_1_0').on('touchstart click', function() {
1936
1937        if ($('#choice_25_1_0').is(':checked')) {
1938            $('#gform_submit_button_25').removeAttr('disabled');
1939            $("#input_25_1").find('.na-msg').remove();
1940        }
1941
1942    });
1943
1944    $('#choice_25_1_1').on('touchstart click', function() {
1945
1946        if ($('#choice_25_1_1').is(':checked')) {
1947            $('#gform_submit_button_25').attr('disabled', 'disabled');
1948            $("#input_25_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/chlamydia-patient-information-leaflet/">chlamydia information sheet</a> before proceeding</span>');
1949
1950        }
1951
1952    });
1953
1954    $('#choice_25_2_0').on('touchstart click', function() {
1955
1956        if ($('#choice_25_2_0').is(':checked')) {
1957            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1958            $('#gform_submit_button_25').removeAttr('disabled');
1959            $("#input_25_2").find('.na-msg').remove();
1960        }
1961
1962    });
1963
1964    $('#choice_25_2_1').on('touchstart click', function() {
1965
1966        if ($('#choice_25_2_1').is(':checked')) {
1967            $('#gform_submit_button_25').attr('disabled', 'disabled');
1968            $("#input_25_2").append(errorPre);
1969
1970        }
1971
1972    });
1973    $('#choice_25_3_0').on('touchstart click', function() {
1974
1975        if ($('#choice_25_3_0').is(':checked')) {
1976            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1977            $('#gform_submit_button_25').removeAttr('disabled');
1978            $("#input_25_3").find('.na-msg').remove();
1979        }
1980
1981    });
1982
1983    $('#choice_25_3_1').on('touchstart click', function() {
1984
1985        if ($('#choice_25_3_1').is(':checked')) {
1986            $('#gform_submit_button_25').attr('disabled', 'disabled');
1987            $("#input_25_3").append(errorPre);
1988
1989        }
1990
1991    });
1992    $('#choice_25_4_0').on('touchstart click', function() {
1993
1994        if ($('#choice_25_4_0').is(':checked')) {
1995            //$('#gform_submit_button_11').attr('disabled', 'disabled');
1996            $('#gform_submit_button_25').removeAttr('disabled');
1997            $("#input_25_4").find('.na-msg').remove();
1998        }
1999
2000    });
2001
2002    $('#choice_25_4_1').on('touchstart click', function() {
2003
2004        if ($('#choice_25_4_1').is(':checked')) {
2005            $('#gform_submit_button_25').attr('disabled', 'disabled');
2006            $("#input_25_4").append(errorPre);
2007
2008        }
2009
2010    });
2011    $('#choice_25_5_0').on('touchstart click', function() {
2012
2013        if ($('#choice_25_5_0').is(':checked')) {
2014            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2015            $('#gform_submit_button_25').removeAttr('disabled');
2016            $("#input_25_5").find('.na-msg').remove();
2017        }
2018
2019    });
2020
2021    $('#choice_25_5_1').on('touchstart click', function() {
2022
2023        if ($('#choice_25_5_1').is(':checked')) {
2024            $('#gform_submit_button_25').attr('disabled', 'disabled');
2025            $("#input_25_5").append(errorPre);
2026
2027        }
2028
2029    });
2030    $('#choice_25_6_0').on('touchstart click', function() {
2031
2032        if ($('#choice_25_6_0').is(':checked')) {
2033            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2034            $('#gform_submit_button_25').removeAttr('disabled');
2035            $("#input_25_6").find('.na-msg').remove();
2036        }
2037
2038    });
2039
2040    $('#choice_25_6_1').on('touchstart click', function() {
2041
2042        if ($('#choice_25_6_1').is(':checked')) {
2043            $('#gform_submit_button_25').attr('disabled', 'disabled');
2044            $("#input_25_6").append(errorPre);
2045
2046        }
2047
2048    });
2049    $('#choice_25_7_0').on('touchstart click', function() {
2050
2051        if ($('#choice_25_7_0').is(':checked')) {
2052            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2053            $('#gform_submit_button_25').removeAttr('disabled');
2054            $("#input_25_7").find('.na-msg').remove();
2055        }
2056
2057    });
2058
2059    $('#choice_25_7_1').on('touchstart click', function() {
2060
2061        if ($('#choice_25_7_1').is(':checked')) {
2062            $('#gform_submit_button_25').attr('disabled', 'disabled');
2063            $("#input_25_7").append(errorPre);
2064
2065        }
2066
2067    });
2068    $('#choice_25_8_0').on('touchstart click', function() {
2069
2070        if ($('#choice_25_8_0').is(':checked')) {
2071            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2072            $('#gform_submit_button_25').removeAttr('disabled');
2073            $("#input_25_8").find('.na-msg').remove();
2074        }
2075
2076    });
2077
2078    $('#choice_25_8_1').on('touchstart click', function() {
2079
2080        if ($('#choice_25_8_1').is(':checked')) {
2081            $('#gform_submit_button_25').attr('disabled', 'disabled');
2082            $("#input_25_8").append(errorPre);
2083
2084        }
2085
2086    });
2087    $('#choice_25_21_0').on('touchstart click', function() {
2088
2089        if ($('#choice_25_21_0').is(':checked')) {
2090            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2091            $('#gform_submit_button_25').removeAttr('disabled');
2092            $("#input_25_21").find('.na-msg').remove();
2093        }
2094
2095    });
2096
2097    $('#choice_25_21_1').on('touchstart click', function() {
2098
2099        if ($('#choice_25_21_1').is(':checked')) {
2100            $('#gform_submit_button_25').attr('disabled', 'disabled');
2101            $("#input_25_21").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">I am sorry we are unable to prescribe the medication on this occasion, please select Azithromycin 2x500mg or see your regular doctor</span>');
2102
2103        }
2104
2105    });
2106
2107
2108    /*
2109     * postpone
2110     * @returns {undefined}
2111     */
2112    $('#choice_18_1_0').click(function() {
2113
2114        if ($('#choice_18_1_0').is(':checked')) {
2115            $('#gform_submit_button_18').removeAttr('disabled');
2116            $("#input_18_1").find('.na-msg').remove();
2117        }
2118
2119    });
2120
2121    $('#choice_18_1_1').click(function() {
2122
2123        if ($('#choice_18_1_1').is(':checked')) {
2124            $('#gform_submit_button_18').attr('disabled', 'disabled');
2125            $("#input_18_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target ="_blank" target="_blank"  href="' + SITE_URL + '/pil/postponing-period-patient-information-leaflet/">postponing period medical information sheet</a> before proceeding</span>');
2126
2127        }
2128
2129    });
2130    $('#choice_18_2_0').click(function() {
2131
2132        if ($('#choice_18_2_0').is(':checked')) {
2133            $('#gform_submit_button_18').removeAttr('disabled');
2134            $("#input_18_2").find('.na-msg').remove();
2135        }
2136
2137    });
2138
2139    $('#choice_18_2_1').click(function() {
2140
2141        if ($('#choice_18_2_1').is(':checked')) {
2142            $('#gform_submit_button_18').attr('disabled', 'disabled');
2143            $("#input_18_2").append(errorPre);
2144
2145        }
2146
2147    });
2148
2149
2150
2151    $('#choice_18_3_1').click(function() {
2152
2153        if ($('#choice_18_3_1').is(':checked')) {
2154            $('#gform_submit_button_18').attr('disabled', 'disabled');
2155            $("#input_18_3").find('.na-msg').remove();
2156            $("#input_18_3").append(errorpostDOB);
2157
2158        }
2159
2160    });
2161
2162
2163
2164
2165
2166
2167    $('#choice_18_4_0').click(function() {
2168
2169        if ($('#choice_18_4_0').is(':checked')) {
2170            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2171            $('#gform_submit_button_18').removeAttr('disabled');
2172            $("#input_18_4").find('.na-msg').remove();
2173        }
2174
2175    });
2176
2177    $('#choice_18_4_1').click(function() {
2178
2179        if ($('#choice_18_4_1').is(':checked')) {
2180            $('#gform_submit_button_18').attr('disabled', 'disabled');
2181            $("#input_18_4").append(errorPre);
2182
2183        }
2184
2185    });
2186
2187    $('#choice_18_5_0').click(function() {
2188
2189        if ($('#choice_18_5_0').is(':checked')) {
2190            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2191            $('#gform_submit_button_18').removeAttr('disabled');
2192            $("#input_18_5").find('.na-msg').remove();
2193        }
2194
2195    });
2196
2197    $('#choice_18_5_1').click(function() {
2198
2199        if ($('#choice_18_5_1').is(':checked')) {
2200            $('#gform_submit_button_18').attr('disabled', 'disabled');
2201            $("#input_18_5").append(errorPre);
2202
2203        }
2204
2205    });
2206    $('#choice_18_6_0').click(function() {
2207
2208        if ($('#choice_18_6_0').is(':checked')) {
2209            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2210            $('#gform_submit_button_18').removeAttr('disabled');
2211            $("#input_18_6").find('.na-msg').remove();
2212        }
2213
2214    });
2215
2216    $('#choice_18_6_1').click(function() {
2217
2218        if ($('#choice_18_6_1').is(':checked')) {
2219            $('#gform_submit_button_18').attr('disabled', 'disabled');
2220            $("#input_18_6").append(errorPre);
2221
2222        }
2223
2224    });
2225    $('#choice_18_7_0').click(function() {
2226
2227        if ($('#choice_18_7_0').is(':checked')) {
2228            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2229            $('#gform_submit_button_18').removeAttr('disabled');
2230            $("#input_18_7").find('.na-msg').remove();
2231        }
2232
2233    });
2234
2235    $('#choice_18_7_1').click(function() {
2236
2237        if ($('#choice_18_7_1').is(':checked')) {
2238            $('#gform_submit_button_18').attr('disabled', 'disabled');
2239            $("#input_18_7").append(errorPre);
2240
2241        }
2242
2243    });
2244    $('#choice_18_21_0').click(function() {
2245
2246        if ($('#choice_18_21_0').is(':checked')) {
2247            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2248            $('#gform_submit_button_18').removeAttr('disabled');
2249            $("#input_18_21").find('.na-msg').remove();
2250        }
2251
2252    });
2253
2254    $('#choice_18_21_1').click(function() {
2255
2256        if ($('#choice_18_21_1').is(':checked')) {
2257            $('#gform_submit_button_18').attr('disabled', 'disabled');
2258            $("#input_18_21").append(errorPre);
2259
2260        }
2261
2262    });
2263    $('#choice_18_22_0').click(function() {
2264
2265        if ($('#choice_18_22_0').is(':checked')) {
2266            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2267            $('#gform_submit_button_18').removeAttr('disabled');
2268            $("#input_18_22").find('.na-msg').remove();
2269        }
2270
2271    });
2272
2273    $('#choice_18_22_1').click(function() {
2274
2275        if ($('#choice_18_22_1').is(':checked')) {
2276            $('#gform_submit_button_18').attr('disabled', 'disabled');
2277            $("#input_18_22").append(errorPre);
2278
2279        }
2280
2281    });
2282    $('#choice_18_23_0').click(function() {
2283
2284        if ($('#choice_18_23_0').is(':checked')) {
2285            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2286            $('#gform_submit_button_18').removeAttr('disabled');
2287            $("#input_18_23").find('.na-msg').remove();
2288        }
2289
2290    });
2291
2292    $('#choice_18_23_1').click(function() {
2293
2294        if ($('#choice_18_23_1').is(':checked')) {
2295            $('#gform_submit_button_18').attr('disabled', 'disabled');
2296            $("#input_18_23").append(errorPre);
2297
2298        }
2299
2300    });
2301    $('#choice_18_24_0').click(function() {
2302
2303        if ($('#choice_18_24_0').is(':checked')) {
2304            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2305            $('#gform_submit_button_18').removeAttr('disabled');
2306            $("#input_18_24").find('.na-msg').remove();
2307        }
2308
2309    });
2310
2311    $('#choice_18_24_1').click(function() {
2312
2313        if ($('#choice_18_24_1').is(':checked')) {
2314            $('#gform_submit_button_18').attr('disabled', 'disabled');
2315            $("#input_18_24").append(errorPre);
2316
2317        }
2318
2319    });
2320    $('#choice_18_8_0').click(function() {
2321
2322        if ($('#choice_18_8_0').is(':checked')) {
2323            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2324            $('#gform_submit_button_18').removeAttr('disabled');
2325            $("#input_18_8").find('.na-msg').remove();
2326        }
2327
2328    });
2329
2330    $('#choice_18_8_1').click(function() {
2331
2332        if ($('#choice_18_8_1').is(':checked')) {
2333            $('#gform_submit_button_18').attr('disabled', 'disabled');
2334            $("#input_18_8").append(errorPre);
2335
2336        }
2337
2338    });
2339
2340
2341
2342
2343    /*
2344     * Prescription hair loss
2345     * @returns {undefined}
2346     */
2347    $('#choice_21_1_0').click(function() {
2348
2349        if ($('#choice_21_1_0').is(':checked')) {
2350            $('#gform_submit_button_21').removeAttr('disabled');
2351            $("#input_21_1").find('.na-msg').remove();
2352        }
2353
2354    });
2355
2356    $('#choice_21_1_1').click(function() {
2357
2358        if ($('#choice_21_1_1').is(':checked')) {
2359            $('#gform_submit_button_21').attr('disabled', 'disabled');
2360            $("#input_21_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/hair-loss-patient-information-leaflet/">Hair Loss information sheet</a> before proceeding</span>');
2361
2362        }
2363
2364    });
2365
2366    $('#choice_21_2_0').click(function() {
2367
2368        if ($('#choice_21_2_0').is(':checked')) {
2369            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2370            $('#gform_submit_button_21').removeAttr('disabled');
2371            $("#input_21_2").find('.na-msg').remove();
2372        }
2373
2374    });
2375
2376    $('#choice_21_2_1').click(function() {
2377
2378        if ($('#choice_21_2_1').is(':checked')) {
2379            $('#gform_submit_button_21').attr('disabled', 'disabled');
2380            $("#input_21_2").append(errorPre);
2381
2382        }
2383
2384    });
2385
2386
2387    $('#choice_21_3_1').click(function() {
2388
2389        if ($('#choice_21_3_1').is(':checked')) {
2390            $('#gform_submit_button_21').attr('disabled', 'disabled');
2391            $("#input_21_3").find('.na-msg').remove();
2392            $("#input_21_3").append(errorPreDOB);
2393
2394        }
2395
2396    });
2397    $('#choice_21_4_0').click(function() {
2398
2399        if ($('#choice_21_4_0').is(':checked')) {
2400            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2401            $('#gform_submit_button_21').removeAttr('disabled');
2402            $("#input_21_4").find('.na-msg').remove();
2403        }
2404
2405    });
2406
2407    $('#choice_21_4_1').click(function() {
2408
2409        if ($('#choice_21_4_1').is(':checked')) {
2410            $('#gform_submit_button_21').attr('disabled', 'disabled');
2411            $("#input_21_4").append(errorPre);
2412
2413        }
2414
2415    });
2416    $('#choice_21_5_0').click(function() {
2417
2418        if ($('#choice_21_5_0').is(':checked')) {
2419            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2420            $('#gform_submit_button_21').removeAttr('disabled');
2421            $("#input_21_5").find('.na-msg').remove();
2422        }
2423
2424    });
2425
2426    $('#choice_21_5_1').click(function() {
2427
2428        if ($('#choice_21_5_1').is(':checked')) {
2429            $('#gform_submit_button_21').attr('disabled', 'disabled');
2430            $("#input_21_5").append(errorPre);
2431
2432        }
2433
2434    });
2435    $('#choice_21_6_0').click(function() {
2436
2437        if ($('#choice_21_6_0').is(':checked')) {
2438            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2439            $('#gform_submit_button_21').removeAttr('disabled');
2440            $("#input_21_6").find('.na-msg').remove();
2441        }
2442
2443    });
2444
2445    $('#choice_21_6_1').click(function() {
2446
2447        if ($('#choice_21_6_1').is(':checked')) {
2448            $('#gform_submit_button_21').attr('disabled', 'disabled');
2449            $("#input_21_6").append(errorPre);
2450
2451        }
2452
2453    });
2454    $('#choice_21_7_0').click(function() {
2455
2456        if ($('#choice_21_7_0').is(':checked')) {
2457            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2458            $('#gform_submit_button_21').removeAttr('disabled');
2459            $("#input_21_7").find('.na-msg').remove();
2460        }
2461
2462    });
2463
2464    $('#choice_21_7_1').click(function() {
2465
2466        if ($('#choice_21_7_1').is(':checked')) {
2467            $('#gform_submit_button_21').attr('disabled', 'disabled');
2468            $("#input_21_7").append(errorPre);
2469
2470        }
2471
2472    });
2473    $('#choice_21_8_0').click(function() {
2474
2475        if ($('#choice_21_8_0').is(':checked')) {
2476            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2477            $('#gform_submit_button_21').removeAttr('disabled');
2478            $("#input_21_8").find('.na-msg').remove();
2479        }
2480
2481    });
2482
2483    $('#choice_21_8_1').click(function() {
2484
2485        if ($('#choice_21_8_1').is(':checked')) {
2486            $('#gform_submit_button_21').attr('disabled', 'disabled');
2487            $("#input_21_8").append(errorPre);
2488
2489        }
2490
2491    });
2492    $('#choice_21_21_0').click(function() {
2493
2494        if ($('#choice_21_21_0').is(':checked')) {
2495            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2496            $('#gform_submit_button_21').removeAttr('disabled');
2497            $("#input_21_21").find('.na-msg').remove();
2498        }
2499
2500    });
2501
2502    $('#choice_21_21_1').click(function() {
2503
2504        if ($('#choice_21_21_1').is(':checked')) {
2505            $('#gform_submit_button_21').attr('disabled', 'disabled');
2506            $("#input_21_21").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">I am sorry we are unable to prescribe the medication on this occasion, please select Azithromycin 2x500mg or see your regular doctor</span>');
2507
2508        }
2509
2510    });
2511    $('#choice_21_22_0').click(function() {
2512
2513        if ($('#choice_21_22_0').is(':checked')) {
2514            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2515            $('#gform_submit_button_21').removeAttr('disabled');
2516            $("#input_21_22").find('.na-msg').remove();
2517        }
2518
2519    });
2520
2521    $('#choice_21_22_1').click(function() {
2522
2523        if ($('#choice_21_22_1').is(':checked')) {
2524            $('#gform_submit_button_21').attr('disabled', 'disabled');
2525            $("#input_21_22").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">I am sorry we are unable to prescribe the medication on this occasion, please select Azithromycin 2x500mg or see your regular doctor</span>');
2526
2527        }
2528
2529    });
2530    $('#choice_21_23_0').click(function() {
2531
2532        if ($('#choice_21_23_0').is(':checked')) {
2533            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2534            $('#gform_submit_button_21').removeAttr('disabled');
2535            $("#input_21_23").find('.na-msg').remove();
2536        }
2537
2538    });
2539
2540    $('#choice_21_23_1').click(function() {
2541
2542        if ($('#choice_21_23_1').is(':checked')) {
2543            $('#gform_submit_button_21').attr('disabled', 'disabled');
2544            $("#input_21_23").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">I am sorry we are unable to prescribe the medication on this occasion, please select Azithromycin 2x500mg or see your regular doctor</span>');
2545
2546        }
2547
2548    });
2549
2550
2551
2552    /*
2553     * mini pill
2554     * @returns {undefined}
2555     */
2556    $('#choice_22_1_0').click(function() {
2557
2558        if ($('#choice_22_1_0').is(':checked')) {
2559            $('#gform_submit_button_22').removeAttr('disabled');
2560            $("#input_22_1").find('.na-msg').remove();
2561        }
2562
2563    });
2564
2565    $('#choice_22_1_1').click(function() {
2566
2567        if ($('#choice_22_1_1').is(':checked')) {
2568            $('#gform_submit_button_22').attr('disabled', 'disabled');
2569            $("#input_22_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/mini-pill-progesterone-pill-pop-patient-information-leaflet/">mini pill medical information sheet</a> before proceeding</span>');
2570
2571        }
2572
2573    });
2574    $('#choice_22_3_0').click(function() {
2575
2576        if ($('#choice_22_3_0').is(':checked')) {
2577            $('#gform_submit_button_22').removeAttr('disabled');
2578            $("#input_22_3").find('.na-msg').remove();
2579        }
2580
2581    });
2582
2583    $('#choice_22_3_1').click(function() {
2584
2585        if ($('#choice_22_3_1').is(':checked')) {
2586            $('#gform_submit_button_22').attr('disabled', 'disabled');
2587            $("#input_22_3").append(errorPre);
2588
2589        }
2590
2591    });
2592
2593
2594
2595    $('#choice_22_2_1').click(function() {
2596
2597        if ($('#choice_22_2_1').is(':checked')) {
2598            $('#gform_submit_button_22').attr('disabled', 'disabled');
2599            $("#input_22_2").find('.na-msg').remove();
2600            $("#input_22_2").append(errorpostDOB);
2601
2602        }
2603
2604    });
2605
2606
2607
2608
2609
2610
2611    $('#choice_22_4_0').click(function() {
2612
2613        if ($('#choice_22_4_0').is(':checked')) {
2614            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2615            $('#gform_submit_button_22').removeAttr('disabled');
2616            $("#input_22_4").find('.na-msg').remove();
2617        }
2618
2619    });
2620
2621    $('#choice_22_4_1').click(function() {
2622
2623        if ($('#choice_22_4_1').is(':checked')) {
2624            $('#gform_submit_button_22').attr('disabled', 'disabled');
2625            $("#input_22_4").append(errorPre);
2626
2627        }
2628
2629    });
2630
2631    $('#choice_22_5_0').click(function() {
2632
2633        if ($('#choice_22_5_0').is(':checked')) {
2634            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2635            $('#gform_submit_button_22').removeAttr('disabled');
2636            $("#input_22_5").find('.na-msg').remove();
2637        }
2638
2639    });
2640
2641    $('#choice_22_5_1').click(function() {
2642
2643        if ($('#choice_22_5_1').is(':checked')) {
2644            $('#gform_submit_button_22').attr('disabled', 'disabled');
2645            $("#input_22_5").append(errorPre);
2646
2647        }
2648
2649    });
2650    $('#choice_22_6_0').click(function() {
2651
2652        if ($('#choice_22_6_0').is(':checked')) {
2653            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2654            $('#gform_submit_button_22').removeAttr('disabled');
2655            $("#input_22_6").find('.na-msg').remove();
2656        }
2657
2658    });
2659
2660    $('#choice_22_6_1').click(function() {
2661
2662        if ($('#choice_22_6_1').is(':checked')) {
2663            $('#gform_submit_button_22').attr('disabled', 'disabled');
2664            $("#input_22_6").append(errorPre);
2665
2666        }
2667
2668    });
2669    $('#choice_22_7_0').click(function() {
2670
2671        if ($('#choice_22_7_0').is(':checked')) {
2672            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2673            $('#gform_submit_button_22').removeAttr('disabled');
2674            $("#input_22_7").find('.na-msg').remove();
2675        }
2676
2677    });
2678
2679    $('#choice_22_7_1').click(function() {
2680
2681        if ($('#choice_22_7_1').is(':checked')) {
2682            $('#gform_submit_button_22').attr('disabled', 'disabled');
2683            $("#input_22_7").append(errorPre);
2684
2685        }
2686
2687    });
2688    $('#choice_22_21_0').click(function() {
2689
2690        if ($('#choice_22_21_0').is(':checked')) {
2691            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2692            $('#gform_submit_button_22').removeAttr('disabled');
2693            $("#input_22_21").find('.na-msg').remove();
2694        }
2695
2696    });
2697
2698    $('#choice_22_21_1').click(function() {
2699
2700        if ($('#choice_22_21_1').is(':checked')) {
2701            $('#gform_submit_button_22').attr('disabled', 'disabled');
2702            $("#input_22_21").append(errorPre);
2703
2704        }
2705
2706    });
2707    $('#choice_22_22_0').click(function() {
2708
2709        if ($('#choice_22_22_0').is(':checked')) {
2710            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2711            $('#gform_submit_button_22').removeAttr('disabled');
2712            $("#input_22_22").find('.na-msg').remove();
2713        }
2714
2715    });
2716
2717    $('#choice_22_22_1').click(function() {
2718
2719        if ($('#choice_22_22_1').is(':checked')) {
2720            $('#gform_submit_button_22').attr('disabled', 'disabled');
2721            $("#input_22_22").append(errorPre);
2722
2723        }
2724
2725    });
2726    $('#choice_22_23_0').click(function() {
2727
2728        if ($('#choice_22_23_0').is(':checked')) {
2729            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2730            $('#gform_submit_button_22').removeAttr('disabled');
2731            $("#input_22_23").find('.na-msg').remove();
2732        }
2733
2734    });
2735
2736    $('#choice_22_23_1').click(function() {
2737
2738        if ($('#choice_22_23_1').is(':checked')) {
2739            $('#gform_submit_button_22').attr('disabled', 'disabled');
2740            $("#input_22_23").append(errorPre);
2741
2742        }
2743
2744    });
2745    $('#choice_22_24_0').click(function() {
2746
2747        if ($('#choice_22_24_0').is(':checked')) {
2748            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2749            $('#gform_submit_button_22').removeAttr('disabled');
2750            $("#input_22_24").find('.na-msg').remove();
2751        }
2752
2753    });
2754
2755    $('#choice_22_24_1').click(function() {
2756
2757        if ($('#choice_22_24_1').is(':checked')) {
2758            $('#gform_submit_button_22').attr('disabled', 'disabled');
2759            $("#input_22_24").append(errorPre);
2760
2761        }
2762
2763    });
2764    $('#choice_22_8_0').click(function() {
2765
2766        if ($('#choice_22_8_0').is(':checked')) {
2767            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2768            $('#gform_submit_button_22').removeAttr('disabled');
2769            $("#input_22_8").find('.na-msg').remove();
2770        }
2771
2772    });
2773
2774    $('#choice_22_8_1').click(function() {
2775
2776        if ($('#choice_22_8_1').is(':checked')) {
2777            $('#gform_submit_button_22').attr('disabled', 'disabled');
2778            $("#input_22_8").append(errorPre);
2779
2780        }
2781
2782    });
2783
2784    /*
2785     * contraceptive
2786     * @returns {undefined}
2787     */
2788    $('#choice_23_1_0').click(function() {
2789
2790        if ($('#choice_23_1_0').is(':checked')) {
2791            $('#gform_submit_button_23').removeAttr('disabled');
2792            $("#input_23_1").find('.na-msg').remove();
2793        }
2794
2795    });
2796
2797    $('#choice_23_1_1').click(function() {
2798
2799        if ($('#choice_23_1_1').is(':checked')) {
2800            $('#gform_submit_button_23').attr('disabled', 'disabled');
2801            $("#input_23_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil/pill-combined-oral-contraceptive-pill-cocp-information-leaflet/">combined contraceptive pill medical information sheet</a> before proceeding</span>');
2802
2803        }
2804
2805    });
2806
2807
2808
2809
2810    $('#choice_23_2_1').click(function() {
2811
2812        if ($('#choice_23_2_1').is(':checked')) {
2813            $('#gform_submit_button_23').attr('disabled', 'disabled');
2814            $("#input_23_2").find('.na-msg').remove();
2815            $("#input_23_2").append(errorpostDOB);
2816
2817        }
2818
2819    });
2820
2821    $('#choice_23_3_1').click(function() {
2822
2823        if ($('#choice_23_3_1').is(':checked')) {
2824            $('#gform_submit_button_23').attr('disabled', 'disabled');
2825            $("#input_23_3").find('.na-msg').remove();
2826            $("#input_23_3").append(errorPreDOB);
2827
2828        }
2829
2830    });
2831
2832
2833
2834
2835
2836    $('#choice_23_4_0').click(function() {
2837
2838        if ($('#choice_23_4_0').is(':checked')) {
2839            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2840            $('#gform_submit_button_23').removeAttr('disabled');
2841            $("#input_23_4").find('.na-msg').remove();
2842        }
2843
2844    });
2845
2846    $('#choice_23_4_1').click(function() {
2847
2848        if ($('#choice_23_4_1').is(':checked')) {
2849            $('#gform_submit_button_23').attr('disabled', 'disabled');
2850            $("#input_23_4").append(errorPre);
2851
2852        }
2853
2854    });
2855
2856    $('#choice_23_5_0').click(function() {
2857
2858        if ($('#choice_23_5_0').is(':checked')) {
2859            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2860            $('#gform_submit_button_23').removeAttr('disabled');
2861            $("#input_23_5").find('.na-msg').remove();
2862        }
2863
2864    });
2865
2866    $('#choice_23_5_1').click(function() {
2867
2868        if ($('#choice_23_5_1').is(':checked')) {
2869            $('#gform_submit_button_23').attr('disabled', 'disabled');
2870            $("#input_23_5").append(errorPre);
2871
2872        }
2873
2874    });
2875    $('#choice_23_6_0').click(function() {
2876
2877        if ($('#choice_23_6_0').is(':checked')) {
2878            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2879            $('#gform_submit_button_23').removeAttr('disabled');
2880            $("#input_23_6").find('.na-msg').remove();
2881        }
2882
2883    });
2884
2885    $('#choice_23_6_1').click(function() {
2886
2887        if ($('#choice_23_6_1').is(':checked')) {
2888            $('#gform_submit_button_23').attr('disabled', 'disabled');
2889            $("#input_23_6").append(errorPre);
2890
2891        }
2892
2893    });
2894    $('#choice_23_7_0').click(function() {
2895
2896        if ($('#choice_23_7_0').is(':checked')) {
2897            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2898            $('#gform_submit_button_23').removeAttr('disabled');
2899            $("#input_23_7").find('.na-msg').remove();
2900        }
2901
2902    });
2903
2904    $('#choice_23_7_1').click(function() {
2905
2906        if ($('#choice_23_7_1').is(':checked')) {
2907            $('#gform_submit_button_23').attr('disabled', 'disabled');
2908            $("#input_23_7").append(errorPre);
2909
2910        }
2911
2912    });
2913    $('#choice_23_21_0').click(function() {
2914
2915        if ($('#choice_23_21_0').is(':checked')) {
2916            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2917            $('#gform_submit_button_23').removeAttr('disabled');
2918            $("#input_23_21").find('.na-msg').remove();
2919        }
2920
2921    });
2922
2923    $('#choice_23_21_1').click(function() {
2924
2925        if ($('#choice_23_21_1').is(':checked')) {
2926            $('#gform_submit_button_23').attr('disabled', 'disabled');
2927            $("#input_23_21").append(errorPre);
2928
2929        }
2930
2931    });
2932    $('#choice_23_22_0').click(function() {
2933
2934        if ($('#choice_23_22_0').is(':checked')) {
2935            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2936            $('#gform_submit_button_23').removeAttr('disabled');
2937            $("#input_23_22").find('.na-msg').remove();
2938        }
2939
2940    });
2941
2942    $('#choice_23_22_1').click(function() {
2943
2944        if ($('#choice_23_22_1').is(':checked')) {
2945            $('#gform_submit_button_23').attr('disabled', 'disabled');
2946            $("#input_23_22").append(errorPre);
2947
2948        }
2949
2950    });
2951    $('#choice_23_23_0').click(function() {
2952
2953        if ($('#choice_23_23_0').is(':checked')) {
2954            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2955            $('#gform_submit_button_23').removeAttr('disabled');
2956            $("#input_23_23").find('.na-msg').remove();
2957        }
2958
2959    });
2960
2961    $('#choice_23_23_1').click(function() {
2962
2963        if ($('#choice_23_23_1').is(':checked')) {
2964            $('#gform_submit_button_23').attr('disabled', 'disabled');
2965            $("#input_23_23").append(errorPre);
2966
2967        }
2968
2969    });
2970    $('#choice_23_23_0').click(function() {
2971
2972        if ($('#choice_23_23_0').is(':checked')) {
2973            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2974            $('#gform_submit_button_23').removeAttr('disabled');
2975            $("#input_23_23").find('.na-msg').remove();
2976        }
2977
2978    });
2979
2980    $('#choice_23_23_1').click(function() {
2981
2982        if ($('#choice_23_23_1').is(':checked')) {
2983            $('#gform_submit_button_23').attr('disabled', 'disabled');
2984            $("#input_23_23").append(errorPre);
2985
2986        }
2987
2988    });
2989    $('#choice_23_24_0').click(function() {
2990
2991        if ($('#choice_23_24_0').is(':checked')) {
2992            //$('#gform_submit_button_11').attr('disabled', 'disabled');
2993            $('#gform_submit_button_23').removeAttr('disabled');
2994            $("#input_23_24").find('.na-msg').remove();
2995        }
2996
2997    });
2998
2999    $('#choice_23_24_1').click(function() {
3000
3001        if ($('#choice_23_24_1').is(':checked')) {
3002            $('#gform_submit_button_23').attr('disabled', 'disabled');
3003            $("#input_23_24").append(errorPre);
3004
3005        }
3006
3007    });
3008    $('#choice_23_25_0').click(function() {
3009
3010        if ($('#choice_23_25_0').is(':checked')) {
3011            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3012            $('#gform_submit_button_23').removeAttr('disabled');
3013            $("#input_23_25").find('.na-msg').remove();
3014        }
3015
3016    });
3017
3018    $('#choice_23_25_1').click(function() {
3019
3020        if ($('#choice_23_25_1').is(':checked')) {
3021            $('#gform_submit_button_23').attr('disabled', 'disabled');
3022            $("#input_23_25").append(errorPre);
3023
3024        }
3025
3026    });
3027    $('#choice_23_26_0').click(function() {
3028
3029        if ($('#choice_23_26_0').is(':checked')) {
3030            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3031            $('#gform_submit_button_23').removeAttr('disabled');
3032            $("#input_23_26").find('.na-msg').remove();
3033        }
3034
3035    });
3036
3037    $('#choice_23_26_1').click(function() {
3038
3039        if ($('#choice_23_26_1').is(':checked')) {
3040            $('#gform_submit_button_23').attr('disabled', 'disabled');
3041            $("#input_23_26").append(errorPre);
3042
3043        }
3044
3045    });
3046    $('#choice_23_27_0').click(function() {
3047
3048        if ($('#choice_23_27_0').is(':checked')) {
3049            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3050            $('#gform_submit_button_23').removeAttr('disabled');
3051            $("#input_23_27").find('.na-msg').remove();
3052        }
3053
3054    });
3055
3056    $('#choice_23_27_1').click(function() {
3057
3058        if ($('#choice_23_27_1').is(':checked')) {
3059            $('#gform_submit_button_23').attr('disabled', 'disabled');
3060            $("#input_23_27").append(errorPre);
3061
3062        }
3063
3064    });
3065
3066    $('#choice_23_29_0').click(function() {
3067
3068        if ($('#choice_23_29_0').is(':checked')) {
3069            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3070            $('#gform_submit_button_23').removeAttr('disabled');
3071            $("#input_23_29").find('.na-msg').remove();
3072        }
3073
3074    });
3075
3076    $('#choice_23_29_1').click(function() {
3077
3078        if ($('#choice_23_29_1').is(':checked')) {
3079            $('#gform_submit_button_23').attr('disabled', 'disabled');
3080            $("#input_23_29").append(errorPre);
3081
3082        }
3083
3084    });
3085    $('#choice_23_30_0').click(function() {
3086
3087        if ($('#choice_23_30_0').is(':checked')) {
3088            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3089            $('#gform_submit_button_23').removeAttr('disabled');
3090            $("#input_23_30").find('.na-msg').remove();
3091        }
3092
3093    });
3094
3095    $('#choice_23_30_1').click(function() {
3096
3097        if ($('#choice_23_30_1').is(':checked')) {
3098            $('#gform_submit_button_23').attr('disabled', 'disabled');
3099            $("#input_23_30").append(errorPre);
3100
3101        }
3102
3103    });
3104    $('#choice_23_31_0').click(function() {
3105
3106        if ($('#choice_23_31_0').is(':checked')) {
3107            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3108            $('#gform_submit_button_23').removeAttr('disabled');
3109            $("#input_23_31").find('.na-msg').remove();
3110        }
3111
3112    });
3113
3114    $('#choice_23_31_1').click(function() {
3115
3116        if ($('#choice_23_31_1').is(':checked')) {
3117            $('#gform_submit_button_23').attr('disabled', 'disabled');
3118            $("#input_23_31").append(errorPre);
3119
3120        }
3121
3122    });
3123    $('#choice_23_32_0').click(function() {
3124
3125        if ($('#choice_23_32_0').is(':checked')) {
3126            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3127            $('#gform_submit_button_23').removeAttr('disabled');
3128            $("#input_23_32").find('.na-msg').remove();
3129        }
3130
3131    });
3132
3133    $('#choice_23_32_1').click(function() {
3134
3135        if ($('#choice_23_32_1').is(':checked')) {
3136            $('#gform_submit_button_23').attr('disabled', 'disabled');
3137            $("#input_23_32").append(errorPre);
3138
3139        }
3140
3141    });
3142
3143    $('#choice_23_33_0').click(function() {
3144
3145        if ($('#choice_23_33_0').is(':checked')) {
3146            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3147            $('#gform_submit_button_23').removeAttr('disabled');
3148            $("#input_23_33").find('.na-msg').remove();
3149        }
3150
3151    });
3152
3153    $('#choice_23_33_1').click(function() {
3154
3155        if ($('#choice_23_33_1').is(':checked')) {
3156            $('#gform_submit_button_23').attr('disabled', 'disabled');
3157            $("#input_23_33").append(errorPre);
3158
3159        }
3160
3161    });
3162
3163
3164    $('#choice_23_8_0').click(function() {
3165
3166        if ($('#choice_23_8_0').is(':checked')) {
3167            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3168            $('#gform_submit_button_23').removeAttr('disabled');
3169            $("#input_23_8").find('.na-msg').remove();
3170        }
3171
3172    });
3173
3174    $('#choice_23_8_1').click(function() {
3175
3176        if ($('#choice_23_8_1').is(':checked')) {
3177            $('#gform_submit_button_23').attr('disabled', 'disabled');
3178            $("#input_23_8").append(errorPre);
3179
3180        }
3181
3182    });
3183    $(document).ready(function() {
3184        if ($('#options').val() == "" || $('#send-me').val() == "") {
3185            $('.gform_next_button').attr('disabled', 'disabled');
3186            return;
3187        } else {
3188            $('.gform_next_button').removeAttr('disabled');
3189        }
3190    });
3191
3192    $('#options').change(function() {
3193
3194        if ($('#options').val() == "" || $('#send-me').val() == "") {
3195            $('.gform_next_button').attr('disabled', 'disabled');
3196            return;
3197        } else {
3198            $('.gform_next_button').removeAttr('disabled');
3199        }
3200
3201    });
3202    $('#send-me').change(function() {
3203
3204        if ($('#options').val() == "" || $('#send-me').val() == "") {
3205            $('.gform_next_button').attr('disabled', 'disabled');
3206            return;
3207        } else {
3208            $('.gform_next_button').removeAttr('disabled');
3209        }
3210
3211    });
3212
3213
3214
3215    /*
3216     * Prescription hayfever
3217     * @returns {undefined}
3218     */
3219    $('#choice_28_1_0').on('touchstart click', function() {
3220
3221        if ($('#choice_28_1_0').is(':checked')) {
3222            $('#gform_submit_button_28').removeAttr('disabled');
3223            $("#input_28_1").find('.na-msg').remove();
3224        }
3225
3226    });
3227
3228    $('#choice_28_1_1').on('touchstart click', function() {
3229
3230        if ($('#choice_28_1_1').is(':checked')) {
3231            $('#gform_submit_button_28').attr('disabled', 'disabled');
3232            $("#input_28_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil-items/hay-fever-allergies-patient-information-leaflet/">Hayfever/allergies medical information sheet</a> before proceeding</span>');
3233
3234        }
3235
3236    });
3237
3238    $('#choice_28_2_0').on('touchstart click', function() {
3239
3240        if ($('#choice_28_2_0').is(':checked')) {
3241            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3242            $('#gform_submit_button_28').removeAttr('disabled');
3243            $("#input_28_2").find('.na-msg').remove();
3244        }
3245
3246    });
3247
3248    $('#choice_28_2_1').on('touchstart click', function() {
3249
3250        if ($('#choice_28_2_1').is(':checked')) {
3251            $('#gform_submit_button_28').attr('disabled', 'disabled');
3252            $("#input_28_2").append(errorPre);
3253
3254        }
3255
3256    });
3257
3258    $('#choice_28_3_0').on('touchstart click', function() {
3259
3260        if ($('#choice_28_3_0').is(':checked')) {
3261            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3262            $('#gform_submit_button_28').removeAttr('disabled');
3263            $("#input_28_3").find('.na-msg').remove();
3264        }
3265
3266    });
3267
3268    $('#choice_28_3_1').on('touchstart click', function() {
3269
3270        if ($('#choice_28_3_1').is(':checked')) {
3271            $('#gform_submit_button_28').attr('disabled', 'disabled');
3272            $("#input_28_3").append(errorPre);
3273
3274        }
3275
3276    });
3277
3278    $('#choice_28_4_0').on('touchstart click', function() {
3279
3280        if ($('#choice_28_4_0').is(':checked')) {
3281            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3282            $('#gform_submit_button_28').removeAttr('disabled');
3283            $("#input_28_4").find('.na-msg').remove();
3284        }
3285
3286    });
3287
3288    $('#choice_28_4_1').on('touchstart click', function() {
3289
3290        if ($('#choice_28_4_1').is(':checked')) {
3291            $('#gform_submit_button_28').attr('disabled', 'disabled');
3292            $("#input_28_4").append(errorPre);
3293
3294        }
3295
3296    });
3297
3298    $('#choice_28_8_0').on('touchstart click', function() {
3299
3300        if ($('#choice_28_8_0').is(':checked')) {
3301            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3302            $('#gform_submit_button_28').removeAttr('disabled');
3303            $("#input_28_8").find('.na-msg').remove();
3304        }
3305
3306    });
3307
3308    $('#choice_28_8_1').on('touchstart click', function() {
3309
3310        if ($('#choice_28_8_1').is(':checked')) {
3311            $('#gform_submit_button_28').attr('disabled', 'disabled');
3312            $("#input_28_8").append(errorPre);
3313
3314        }
3315
3316    });
3317
3318    /*
3319     * Prescription singular
3320     * @returns {undefined}
3321     */
3322    $('#choice_27_1_0').on('touchstart click', function() {
3323
3324        if ($('#choice_27_1_0').is(':checked')) {
3325            $('#gform_submit_button_27').removeAttr('disabled');
3326            $("#input_27_1").find('.na-msg').remove();
3327        }
3328
3329    });
3330
3331    $('#choice_27_1_1').on('touchstart click', function() {
3332
3333        if ($('#choice_27_1_1').is(':checked')) {
3334            $('#gform_submit_button_27').attr('disabled', 'disabled');
3335            $("#input_27_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil-items/hay-fever-allergies-patient-information-leaflet/">Hayfever/allergies medical information sheet</a> before proceeding</span>');
3336
3337        }
3338
3339    });
3340
3341    $('#choice_27_2_0').on('touchstart click', function() {
3342
3343        if ($('#choice_27_2_0').is(':checked')) {
3344            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3345            $('#gform_submit_button_27').removeAttr('disabled');
3346            $("#input_27_2").find('.na-msg').remove();
3347        }
3348
3349    });
3350
3351    $('#choice_27_2_1').on('touchstart click', function() {
3352
3353        if ($('#choice_27_2_1').is(':checked')) {
3354            $('#gform_submit_button_27').attr('disabled', 'disabled');
3355            $("#input_27_2").append(errorPre);
3356
3357        }
3358
3359    });
3360
3361    $('#choice_27_3_0').on('touchstart click', function() {
3362
3363        if ($('#choice_27_3_0').is(':checked')) {
3364            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3365            $('#gform_submit_button_27').removeAttr('disabled');
3366            $("#input_27_3").find('.na-msg').remove();
3367        }
3368
3369    });
3370
3371    $('#choice_27_3_1').on('touchstart click', function() {
3372
3373        if ($('#choice_27_3_1').is(':checked')) {
3374            $('#gform_submit_button_27').attr('disabled', 'disabled');
3375            $("#input_27_3").append(errorPre);
3376
3377        }
3378
3379    });
3380
3381    $('#choice_27_4_0').on('touchstart click', function() {
3382
3383        if ($('#choice_27_4_0').is(':checked')) {
3384            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3385            $('#gform_submit_button_27').removeAttr('disabled');
3386            $("#input_27_4").find('.na-msg').remove();
3387        }
3388
3389    });
3390
3391    $('#choice_27_4_1').on('touchstart click', function() {
3392
3393        if ($('#choice_27_4_1').is(':checked')) {
3394            $('#gform_submit_button_27').attr('disabled', 'disabled');
3395            $("#input_27_4").append(errorPre);
3396
3397        }
3398
3399    });
3400
3401    $('#choice_27_8_0').on('touchstart click', function() {
3402
3403        if ($('#choice_27_8_0').is(':checked')) {
3404            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3405            $('#gform_submit_button_27').removeAttr('disabled');
3406            $("#input_27_8").find('.na-msg').remove();
3407        }
3408
3409    });
3410
3411    $('#choice_27_8_1').on('touchstart click', function() {
3412
3413        if ($('#choice_27_8_1').is(':checked')) {
3414            $('#gform_submit_button_27').attr('disabled', 'disabled');
3415            $("#input_27_8").append(errorPre);
3416
3417        }
3418
3419    });
3420
3421
3422
3423    /*
3424     * Prescription steriod
3425     * @returns {undefined}
3426     */
3427    $('#choice_26_1_0').on('touchstart click', function() {
3428
3429        if ($('#choice_26_1_0').is(':checked')) {
3430            $('#gform_submit_button_26').removeAttr('disabled');
3431            $("#input_26_1").find('.na-msg').remove();
3432        }
3433
3434    });
3435
3436    $('#choice_26_1_1').on('touchstart click', function() {
3437
3438        if ($('#choice_26_1_1').is(':checked')) {
3439            $('#gform_submit_button_26').attr('disabled', 'disabled');
3440            $("#input_26_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil-items/hay-fever-allergies-patient-information-leaflet/">Hayfever/allergies medical information sheet</a> before proceeding</span>');
3441
3442        }
3443
3444    });
3445
3446    $('#choice_26_2_0').on('touchstart click', function() {
3447
3448        if ($('#choice_26_2_0').is(':checked')) {
3449            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3450            $('#gform_submit_button_26').removeAttr('disabled');
3451            $("#input_26_2").find('.na-msg').remove();
3452        }
3453
3454    });
3455
3456    $('#choice_26_2_1').on('touchstart click', function() {
3457
3458        if ($('#choice_26_2_1').is(':checked')) {
3459            $('#gform_submit_button_26').attr('disabled', 'disabled');
3460            $("#input_26_2").append(errorPre);
3461
3462        }
3463
3464    });
3465
3466    $('#choice_26_3_0').on('touchstart click', function() {
3467
3468        if ($('#choice_26_3_0').is(':checked')) {
3469            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3470            $('#gform_submit_button_26').removeAttr('disabled');
3471            $("#input_26_3").find('.na-msg').remove();
3472        }
3473
3474    });
3475
3476    $('#choice_26_3_1').on('touchstart click', function() {
3477
3478        if ($('#choice_26_3_1').is(':checked')) {
3479            $('#gform_submit_button_26').attr('disabled', 'disabled');
3480            $("#input_26_3").append(errorPre);
3481
3482        }
3483
3484    });
3485
3486    $('#choice_26_4_0').on('touchstart click', function() {
3487
3488        if ($('#choice_26_4_0').is(':checked')) {
3489            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3490            $('#gform_submit_button_26').removeAttr('disabled');
3491            $("#input_26_4").find('.na-msg').remove();
3492        }
3493
3494    });
3495
3496    $('#choice_26_4_1').on('touchstart click', function() {
3497
3498        if ($('#choice_26_4_1').is(':checked')) {
3499            $('#gform_submit_button_26').attr('disabled', 'disabled');
3500            $("#input_26_4").append(errorPre);
3501
3502        }
3503
3504    });
3505
3506    $('#choice_26_8_0').on('touchstart click', function() {
3507
3508        if ($('#choice_26_8_0').is(':checked')) {
3509            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3510            $('#gform_submit_button_26').removeAttr('disabled');
3511            $("#input_26_8").find('.na-msg').remove();
3512        }
3513
3514    });
3515
3516    $('#choice_26_8_1').on('touchstart click', function() {
3517
3518        if ($('#choice_26_8_1').is(':checked')) {
3519            $('#gform_submit_button_26').attr('disabled', 'disabled');
3520            $("#input_26_8").append(errorPre);
3521
3522        }
3523
3524    });
3525
3526    /*
3527     * Prescription cold sores
3528     * @returns {undefined}
3529     */
3530    $('#choice_31_1_0').on('touchstart click', function() {
3531
3532        if ($('#choice_31_1_0').is(':checked')) {
3533            $('#gform_submit_button_31').removeAttr('disabled');
3534            $("#input_31_1").find('.na-msg').remove();
3535        }
3536
3537    });
3538
3539    $('#choice_31_1_1').on('touchstart click', function() {
3540
3541        if ($('#choice_31_1_1').is(':checked')) {
3542            $('#gform_submit_button_31').attr('disabled', 'disabled');
3543            $("#input_31_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil-items/cold-sores-patient-information-leaflet/">Cold Sores information sheet</a> before proceeding</span>');
3544
3545        }
3546
3547    });
3548
3549    $('#choice_31_2_0').on('touchstart click', function() {
3550
3551        if ($('#choice_31_2_0').is(':checked')) {
3552            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3553            $('#gform_submit_button_31').removeAttr('disabled');
3554            $("#input_31_2").find('.na-msg').remove();
3555        }
3556
3557    });
3558
3559    $('#choice_31_2_1').on('touchstart click', function() {
3560
3561        if ($('#choice_31_2_1').is(':checked')) {
3562            $('#gform_submit_button_31').attr('disabled', 'disabled');
3563            $("#input_31_2").append(errorPre);
3564
3565        }
3566
3567    });
3568
3569    $('#choice_31_3_0').on('touchstart click', function() {
3570
3571        if ($('#choice_31_3_0').is(':checked')) {
3572            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3573            $('#gform_submit_button_31').removeAttr('disabled');
3574            $("#input_31_3").find('.na-msg').remove();
3575        }
3576
3577    });
3578
3579    $('#choice_31_3_1').on('touchstart click', function() {
3580
3581        if ($('#choice_31_3_1').is(':checked')) {
3582            $('#gform_submit_button_31').attr('disabled', 'disabled');
3583            $("#input_31_3").append(errorPre);
3584
3585        }
3586
3587    });
3588
3589    $('#choice_31_4_0').on('touchstart click', function() {
3590
3591        if ($('#choice_31_4_0').is(':checked')) {
3592            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3593            $('#gform_submit_button_31').removeAttr('disabled');
3594            $("#input_31_4").find('.na-msg').remove();
3595        }
3596
3597    });
3598
3599    $('#choice_31_4_1').on('touchstart click', function() {
3600
3601        if ($('#choice_31_4_1').is(':checked')) {
3602            $('#gform_submit_button_31').attr('disabled', 'disabled');
3603            $("#input_31_4").append(errorPre);
3604
3605        }
3606
3607    });
3608    $('#choice_31_21_0').on('touchstart click', function() {
3609
3610        if ($('#choice_31_21_0').is(':checked')) {
3611            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3612            $('#gform_submit_button_31').removeAttr('disabled');
3613            $("#input_31_21").find('.na-msg').remove();
3614        }
3615
3616    });
3617
3618    $('#choice_31_21_1').on('touchstart click', function() {
3619
3620        if ($('#choice_31_21_1').is(':checked')) {
3621            $('#gform_submit_button_31').attr('disabled', 'disabled');
3622            $("#input_31_21").append(errorPre);
3623
3624        }
3625
3626    });
3627    $('#choice_31_22_0').on('touchstart click', function() {
3628
3629        if ($('#choice_31_22_0').is(':checked')) {
3630            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3631            $('#gform_submit_button_31').removeAttr('disabled');
3632            $("#input_31_22").find('.na-msg').remove();
3633        }
3634
3635    });
3636
3637    $('#choice_31_22_1').on('touchstart click', function() {
3638
3639        if ($('#choice_31_22_1').is(':checked')) {
3640            $('#gform_submit_button_31').attr('disabled', 'disabled');
3641            $("#input_31_22").append(errorPre);
3642
3643        }
3644
3645    });
3646    $('#choice_31_23_0').on('touchstart click', function() {
3647
3648        if ($('#choice_31_23_0').is(':checked')) {
3649            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3650            $('#gform_submit_button_31').removeAttr('disabled');
3651            $("#input_31_23").find('.na-msg').remove();
3652        }
3653
3654    });
3655
3656    $('#choice_31_23_1').on('touchstart click', function() {
3657
3658        if ($('#choice_31_23_1').is(':checked')) {
3659            $('#gform_submit_button_31').attr('disabled', 'disabled');
3660            $("#input_31_23").append(errorPre);
3661
3662        }
3663
3664    });
3665    $('#choice_31_24_0').on('touchstart click', function() {
3666
3667        if ($('#choice_31_24_0').is(':checked')) {
3668            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3669            $('#gform_submit_button_31').removeAttr('disabled');
3670            $("#input_31_24").find('.na-msg').remove();
3671        }
3672
3673    });
3674
3675    $('#choice_31_24_1').on('touchstart click', function() {
3676
3677        if ($('#choice_31_24_1').is(':checked')) {
3678            $('#gform_submit_button_31').attr('disabled', 'disabled');
3679            $("#input_31_24").append(errorPre);
3680
3681        }
3682
3683    });
3684
3685    $('#choice_31_25_0').on('touchstart click', function() {
3686
3687        if ($('#choice_31_25_0').is(':checked')) {
3688            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3689            $('#gform_submit_button_31').removeAttr('disabled');
3690            $("#input_31_25").find('.na-msg').remove();
3691        }
3692
3693    });
3694
3695    $('#choice_31_25_1').on('touchstart click', function() {
3696
3697        if ($('#choice_31_25_1').is(':checked')) {
3698            $('#gform_submit_button_31').attr('disabled', 'disabled');
3699            $("#input_31_25").append(errorPre);
3700
3701        }
3702
3703    });
3704    $('#choice_31_8_0').on('touchstart click', function() {
3705
3706        if ($('#choice_31_8_0').is(':checked')) {
3707            //$('#gform_submit_button_11').attr('disabled', 'disabled');
3708            $('#gform_submit_button_31').removeAttr('disabled');
3709            $("#input_31_8").find('.na-msg').remove();
3710        }
3711
3712    });
3713
3714    $('#choice_31_8_1').on('touchstart click', function() {
3715
3716        if ($('#choice_31_8_1').is(':checked')) {
3717            $('#gform_submit_button_31').attr('disabled', 'disabled');
3718            $("#input_31_8").append(errorPre);
3719
3720        }
3721
3722    });
3723    /*
3724     * Prescription bv
3725     * @returns {undefined}
3726     */
3727    jQuery('#choice_29_1_0').on('touchstart click', function() {
3728
3729        if (jQuery('#choice_29_1_0').is(':checked')) {
3730            jQuery('#gform_submit_button_29').removeAttr('disabled');
3731            jQuery("#input_29_1").find('.na-msg').remove();
3732        }
3733
3734    });
3735
3736    jQuery('#choice_29_1_1').on('touchstart click', function() {
3737
3738        if (jQuery('#choice_29_1_1').is(':checked')) {
3739            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3740            jQuery("#input_29_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil-items/bacterial-vaginosis-patient-information-leaflet/">Bacterial Vaginosis information sheet</a> before proceeding</span>');
3741
3742        }
3743
3744    });
3745
3746    jQuery('#choice_29_2_1').click(function() {
3747
3748        if (jQuery('#choice_29_2_1').is(':checked')) {
3749            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3750            jQuery("#input_29_2").find('.na-msg').remove();
3751            jQuery("#input_29_2").append(errorPreDOB);
3752
3753        }
3754
3755    });
3756
3757    jQuery('#choice_29_3_0').on('touchstart click', function() {
3758
3759        if (jQuery('#choice_29_3_0').is(':checked')) {
3760            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3761            jQuery('#gform_submit_button_29').removeAttr('disabled');
3762            jQuery("#input_29_3").find('.na-msg').remove();
3763        }
3764
3765    });
3766
3767    jQuery('#choice_29_3_1').on('touchstart click', function() {
3768
3769        if (jQuery('#choice_29_3_1').is(':checked')) {
3770            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3771            jQuery("#input_29_3").append(errorPre);
3772
3773        }
3774
3775    });
3776
3777    jQuery('#choice_29_4_0').on('touchstart click', function() {
3778
3779        if (jQuery('#choice_29_4_0').is(':checked')) {
3780            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3781            jQuery('#gform_submit_button_29').removeAttr('disabled');
3782            jQuery("#input_29_4").find('.na-msg').remove();
3783        }
3784
3785    });
3786
3787    jQuery('#choice_29_4_1').on('touchstart click', function() {
3788
3789        if (jQuery('#choice_29_4_1').is(':checked')) {
3790            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3791            jQuery("#input_29_4").append(errorPre);
3792
3793        }
3794
3795    });
3796
3797
3798    jQuery('#choice_29_21_0').on('touchstart click', function() {
3799
3800        if (jQuery('#choice_29_21_0').is(':checked')) {
3801            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3802            jQuery('#gform_submit_button_29').removeAttr('disabled');
3803            jQuery("#input_29_21").find('.na-msg').remove();
3804        }
3805
3806    });
3807
3808    jQuery('#choice_29_21_1').on('touchstart click', function() {
3809
3810        if (jQuery('#choice_29_21_1').is(':checked')) {
3811            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3812            jQuery("#input_29_21").append(errorPre);
3813
3814        }
3815
3816    });
3817
3818    jQuery('#choice_29_22_0').on('touchstart click', function() {
3819
3820        if (jQuery('#choice_29_22_0').is(':checked')) {
3821            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3822            jQuery('#gform_submit_button_29').removeAttr('disabled');
3823            jQuery("#input_29_22").find('.na-msg').remove();
3824        }
3825
3826    });
3827
3828    jQuery('#choice_29_22_1').on('touchstart click', function() {
3829
3830        if (jQuery('#choice_29_22_1').is(':checked')) {
3831            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3832            jQuery("#input_29_22").append(errorPre);
3833
3834        }
3835
3836    });
3837
3838    jQuery('#choice_29_23_0').on('touchstart click', function() {
3839
3840        if (jQuery('#choice_29_23_0').is(':checked')) {
3841            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3842            jQuery('#gform_submit_button_29').removeAttr('disabled');
3843            jQuery("#input_29_23").find('.na-msg').remove();
3844        }
3845
3846    });
3847
3848    jQuery('#choice_29_23_1').on('touchstart click', function() {
3849
3850        if (jQuery('#choice_29_23_1').is(':checked')) {
3851            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3852            jQuery("#input_29_23").append(errorPre);
3853
3854        }
3855
3856    });
3857
3858    jQuery('#choice_29_24_0').on('touchstart click', function() {
3859
3860        if (jQuery('#choice_29_24_0').is(':checked')) {
3861            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3862            jQuery('#gform_submit_button_29').removeAttr('disabled');
3863            jQuery("#input_29_24").find('.na-msg').remove();
3864        }
3865
3866    });
3867
3868    jQuery('#choice_29_24_1').on('touchstart click', function() {
3869
3870        if (jQuery('#choice_29_24_1').is(':checked')) {
3871            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3872            jQuery("#input_29_24").append(errorPre);
3873
3874        }
3875
3876    });
3877
3878    jQuery('#choice_29_25_0').on('touchstart click', function() {
3879
3880        if (jQuery('#choice_29_25_0').is(':checked')) {
3881            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3882            jQuery('#gform_submit_button_29').removeAttr('disabled');
3883            jQuery("#input_29_25").find('.na-msg').remove();
3884        }
3885
3886    });
3887
3888    jQuery('#choice_29_25_1').on('touchstart click', function() {
3889
3890        if (jQuery('#choice_29_25_1').is(':checked')) {
3891            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3892            jQuery("#input_29_25").append(errorPre);
3893
3894        }
3895
3896    });
3897
3898    jQuery('#choice_29_26_1').on('touchstart click', function() {
3899
3900        if (jQuery('#choice_29_26_1').is(':checked')) {
3901            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3902            jQuery('#gform_submit_button_29').removeAttr('disabled');
3903            jQuery("#input_29_26").find('.na-msg').remove();
3904        }
3905
3906    });
3907
3908    jQuery('#choice_29_26_0').on('touchstart click', function() {
3909
3910        if (jQuery('#choice_29_26_0').is(':checked')) {
3911            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3912            jQuery("#input_29_26").append(errorPre);
3913
3914        }
3915
3916    });
3917
3918    jQuery('#choice_29_27_0').on('touchstart click', function() {
3919
3920        if (jQuery('#choice_29_27_0').is(':checked')) {
3921            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3922            jQuery('#gform_submit_button_29').removeAttr('disabled');
3923            jQuery("#input_29_27").find('.na-msg').remove();
3924        }
3925
3926    });
3927
3928    jQuery('#choice_29_27_1').on('touchstart click', function() {
3929
3930        if (jQuery('#choice_29_27_1').is(':checked')) {
3931            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3932            jQuery("#input_29_27").append(errorPre);
3933
3934        }
3935
3936    });
3937
3938    jQuery('#choice_29_28_0').on('touchstart click', function() {
3939
3940        if (jQuery('#choice_29_28_0').is(':checked')) {
3941            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3942            jQuery('#gform_submit_button_29').removeAttr('disabled');
3943            jQuery("#input_29_28").find('.na-msg').remove();
3944        }
3945
3946    });
3947
3948    jQuery('#choice_29_28_1').on('touchstart click', function() {
3949
3950        if (jQuery('#choice_29_28_1').is(':checked')) {
3951            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3952            jQuery("#input_29_28").append(errorPre);
3953
3954        }
3955
3956    });
3957
3958
3959    jQuery('#choice_29_8_0').on('touchstart click', function() {
3960
3961        if (jQuery('#choice_29_8_0').is(':checked')) {
3962            //jQuery('#gform_submit_button_11').attr('disabled', 'disabled');
3963            jQuery('#gform_submit_button_29').removeAttr('disabled');
3964            jQuery("#input_29_8").find('.na-msg').remove();
3965        }
3966
3967    });
3968
3969    jQuery('#choice_29_8_1').on('touchstart click', function() {
3970
3971        if (jQuery('#choice_29_8_1').is(':checked')) {
3972            jQuery('#gform_submit_button_29').attr('disabled', 'disabled');
3973            jQuery("#input_29_8").append(errorPre);
3974
3975        }
3976
3977    });
3978
3979
3980    /*
3981     * Prescription asthama
3982     * @returns {undefined}
3983     */
3984    $('#choice_30_1_0').on('touchstart click', function() {
3985
3986        if ($('#choice_30_1_0').is(':checked')) {
3987            $('#gform_submit_button_30').removeAttr('disabled');
3988            $("#input_30_1").find('.na-msg').remove();
3989        }
3990
3991    });
3992
3993    $('#choice_30_1_1').on('touchstart click', function() {
3994
3995        if ($('#choice_30_1_1').is(':checked')) {
3996            $('#gform_submit_button_30').attr('disabled', 'disabled');
3997            $("#input_30_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">please read the <a target="_blank"  href="' + SITE_URL + '/pil-items/asthma-patient-information-leaflet/">Asthma information sheet</a> before proceeding</span>');
3998
3999        }
4000
4001    });
4002
4003    $('#choice_30_2_0').on('touchstart click', function() {
4004
4005        if ($('#choice_30_2_0').is(':checked')) {
4006            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4007            $('#gform_submit_button_30').removeAttr('disabled');
4008            $("#input_30_2").find('.na-msg').remove();
4009        }
4010
4011    });
4012
4013    $('#choice_30_2_1').on('touchstart click', function() {
4014
4015        if ($('#choice_30_2_1').is(':checked')) {
4016            $('#gform_submit_button_30').attr('disabled', 'disabled');
4017            $("#input_30_2").append(errorPre);
4018
4019        }
4020
4021    });
4022
4023
4024    jQuery('#choice_30_3_1').click(function() {
4025
4026        if (jQuery('#choice_30_3_1').is(':checked')) {
4027            jQuery('#gform_submit_button_30').attr('disabled', 'disabled');
4028            jQuery("#input_30_3").find('.na-msg').remove();
4029            jQuery("#input_30_3").append(errorPreDOB);
4030
4031        }
4032
4033    });
4034
4035    $('#choice_30_4_0').on('touchstart click', function() {
4036
4037        if ($('#choice_30_4_0').is(':checked')) {
4038            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4039            $('#gform_submit_button_30').removeAttr('disabled');
4040            $("#input_30_4").find('.na-msg').remove();
4041        }
4042
4043    });
4044
4045    $('#choice_30_4_1').on('touchstart click', function() {
4046
4047        if ($('#choice_30_4_1').is(':checked')) {
4048            $('#gform_submit_button_30').attr('disabled', 'disabled');
4049            $("#input_30_4").append(errorPre);
4050
4051        }
4052
4053    });
4054    $('#choice_30_21_0').on('touchstart click', function() {
4055
4056        if ($('#choice_30_21_0').is(':checked')) {
4057            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4058            $('#gform_submit_button_30').removeAttr('disabled');
4059            $("#input_30_21").find('.na-msg').remove();
4060        }
4061
4062    });
4063
4064    $('#choice_30_21_1').on('touchstart click', function() {
4065
4066        if ($('#choice_30_21_1').is(':checked')) {
4067            $('#gform_submit_button_30').attr('disabled', 'disabled');
4068            $("#input_30_21").append(errorPre);
4069
4070        }
4071
4072    });
4073    $('#choice_30_22_0').on('touchstart click', function() {
4074
4075        if ($('#choice_30_22_0').is(':checked')) {
4076            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4077            $('#gform_submit_button_30').removeAttr('disabled');
4078            $("#input_30_22").find('.na-msg').remove();
4079        }
4080
4081    });
4082
4083    $('#choice_30_22_1').on('touchstart click', function() {
4084
4085        if ($('#choice_30_22_1').is(':checked')) {
4086            $('#gform_submit_button_30').attr('disabled', 'disabled');
4087            $("#input_30_22").append(errorPre);
4088
4089        }
4090
4091    });
4092    $('#choice_30_23_0').on('touchstart click', function() {
4093
4094        if ($('#choice_30_23_0').is(':checked')) {
4095            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4096            $('#gform_submit_button_30').removeAttr('disabled');
4097            $("#input_30_23").find('.na-msg').remove();
4098        }
4099
4100    });
4101
4102    $('#choice_30_23_1').on('touchstart click', function() {
4103
4104        if ($('#choice_30_23_1').is(':checked')) {
4105            $('#gform_submit_button_30').attr('disabled', 'disabled');
4106            $("#input_30_23").append(errorPre);
4107
4108        }
4109
4110    });
4111    $('#choice_30_24_0').on('touchstart click', function() {
4112
4113        if ($('#choice_30_24_0').is(':checked')) {
4114            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4115            $('#gform_submit_button_30').removeAttr('disabled');
4116            $("#input_30_24").find('.na-msg').remove();
4117        }
4118
4119    });
4120
4121    $('#choice_30_24_1').on('touchstart click', function() {
4122
4123        if ($('#choice_30_24_1').is(':checked')) {
4124            $('#gform_submit_button_30').attr('disabled', 'disabled');
4125            $("#input_30_24").append(errorPre);
4126
4127        }
4128
4129    });
4130
4131    $('#choice_30_25_0').on('touchstart click', function() {
4132
4133        if ($('#choice_30_25_0').is(':checked')) {
4134            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4135            $('#gform_submit_button_30').removeAttr('disabled');
4136            $("#input_30_25").find('.na-msg').remove();
4137        }
4138
4139    });
4140
4141    $('#choice_30_25_1').on('touchstart click', function() {
4142
4143        if ($('#choice_30_25_1').is(':checked')) {
4144            $('#gform_submit_button_30').attr('disabled', 'disabled');
4145            $("#input_30_25").append(errorPre);
4146
4147        }
4148
4149    });
4150
4151    $('#choice_30_28_0').on('touchstart click', function() {
4152
4153        if ($('#choice_30_28_0').is(':checked')) {
4154            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4155            $('#gform_submit_button_30').removeAttr('disabled');
4156            $("#input_30_28").find('.na-msg').remove();
4157        }
4158
4159    });
4160
4161    $('#choice_30_28_1').on('touchstart click', function() {
4162
4163        if ($('#choice_30_28_1').is(':checked')) {
4164            $('#gform_submit_button_30').attr('disabled', 'disabled');
4165            $("#input_30_28").append(errorPre);
4166
4167        }
4168
4169    });
4170    $('#choice_30_26_0').on('touchstart click', function() {
4171
4172        if ($('#choice_30_26_0').is(':checked')) {
4173            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4174            $('#gform_submit_button_30').removeAttr('disabled');
4175            $("#input_30_26").find('.na-msg').remove();
4176        }
4177
4178    });
4179
4180    $('#choice_30_26_1').on('touchstart click', function() {
4181
4182        if ($('#choice_30_26_1').is(':checked')) {
4183            $('#gform_submit_button_30').attr('disabled', 'disabled');
4184            $("#input_30_26").append(errorPre);
4185
4186        }
4187
4188    });
4189    $('#choice_30_8_0').on('touchstart click', function() {
4190
4191        if ($('#choice_30_8_0').is(':checked')) {
4192            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4193            $('#gform_submit_button_30').removeAttr('disabled');
4194            $("#input_30_8").find('.na-msg').remove();
4195        }
4196
4197    });
4198
4199    $('#choice_30_8_1').on('touchstart click', function() {
4200
4201        if ($('#choice_30_8_1').is(':checked')) {
4202            $('#gform_submit_button_30').attr('disabled', 'disabled');
4203            $("#input_30_8").append(errorPre);
4204
4205        }
4206
4207    });
4208
4209    /*
4210     * Prescription gord
4211     * @returns {undefined}
4212     */
4213    $('#choice_32_1_0').on('touchstart click', function() {
4214
4215        if ($('#choice_32_1_0').is(':checked')) {
4216            $('#gform_submit_button_32').removeAttr('disabled');
4217            $("#input_32_1").find('.na-msg').remove();
4218        }
4219
4220    });
4221
4222    $('#choice_32_1_1').on('touchstart click', function() {
4223
4224        if ($('#choice_32_1_1').is(':checked')) {
4225            $('#gform_submit_button_32').attr('disabled', 'disabled');
4226            $("#input_32_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">Please read the <a target="_blank" href="' + SITE_URL + '/pil-items/acid-reflux-gord-patient-information-leaflet/">GORD</a> information sheet before proceeding</span>');
4227
4228        }
4229
4230    });
4231
4232    $('#choice_32_2_0').on('touchstart click', function() {
4233
4234        if ($('#choice_32_2_0').is(':checked')) {
4235            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4236            $('#gform_submit_button_32').removeAttr('disabled');
4237            $("#input_32_2").find('.na-msg').remove();
4238        }
4239
4240    });
4241
4242    $('#choice_32_2_1').on('touchstart click', function() {
4243
4244        if ($('#choice_32_2_1').is(':checked')) {
4245            $('#gform_submit_button_32').attr('disabled', 'disabled');
4246            $("#input_32_2").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">These symptoms require an urgent medical assessment, please see a doctor as soon as possible.</span>');
4247
4248        }
4249
4250    });
4251
4252    $('#choice_32_3_0').on('touchstart click', function() {
4253
4254        if ($('#choice_32_3_0').is(':checked')) {
4255            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4256            $('#gform_submit_button_32').removeAttr('disabled');
4257            $("#input_32_3").find('.na-msg').remove();
4258        }
4259
4260    });
4261
4262
4263    $('#choice_32_3_1').on('touchstart click', function() {
4264
4265        if ($('#choice_32_3_1').is(':checked')) {
4266            $('#gform_submit_button_32').attr('disabled', 'disabled');
4267            $("#input_32_3").append(errorPre);
4268
4269        }
4270
4271    });
4272
4273    $('#choice_32_4_0').on('touchstart click', function() {
4274
4275        if ($('#choice_32_4_0').is(':checked')) {
4276            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4277            $('#gform_submit_button_32').removeAttr('disabled');
4278            $("#input_32_4").find('.na-msg').remove();
4279        }
4280
4281    });
4282
4283
4284    $('#choice_32_4_1').on('touchstart click', function() {
4285
4286        if ($('#choice_32_4_1').is(':checked')) {
4287            $('#gform_submit_button_32').attr('disabled', 'disabled');
4288            $("#input_32_4").append(errorPre);
4289
4290        }
4291
4292    });
4293
4294
4295    $('#choice_32_21_0').on('touchstart click', function() {
4296
4297        if ($('#choice_32_21_0').is(':checked')) {
4298            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4299            $('#gform_submit_button_32').removeAttr('disabled');
4300            $("#input_32_21").find('.na-msg').remove();
4301        }
4302
4303    });
4304
4305    $('#choice_32_21_1').on('touchstart click', function() {
4306
4307        if ($('#choice_32_21_1').is(':checked')) {
4308            $('#gform_submit_button_32').attr('disabled', 'disabled');
4309            $("#input_32_21").append(errorPre);
4310
4311        }
4312
4313    });
4314
4315    $('#choice_32_22_0').on('touchstart click', function() {
4316
4317        if ($('#choice_32_22_0').is(':checked')) {
4318            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4319            $('#gform_submit_button_32').removeAttr('disabled');
4320            $("#input_32_22").find('.na-msg').remove();
4321        }
4322
4323    });
4324
4325    $('#choice_32_22_1').on('touchstart click', function() {
4326
4327        if ($('#choice_32_22_1').is(':checked')) {
4328            $('#gform_submit_button_32').attr('disabled', 'disabled');
4329            $("#input_32_22").append(errorPre);
4330
4331        }
4332
4333    });
4334
4335    $('#choice_32_23_0').on('touchstart click', function() {
4336
4337        if ($('#choice_32_23_0').is(':checked')) {
4338            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4339            $('#gform_submit_button_32').removeAttr('disabled');
4340            $("#input_32_23").find('.na-msg').remove();
4341        }
4342
4343    });
4344
4345    $('#choice_32_23_1').on('touchstart click', function() {
4346
4347        if ($('#choice_32_23_1').is(':checked')) {
4348            $('#gform_submit_button_32').attr('disabled', 'disabled');
4349            $("#input_32_23").append(errorPre);
4350
4351        }
4352
4353    });
4354    $('#choice_32_24_0').on('touchstart click', function() {
4355
4356        if ($('#choice_32_24_0').is(':checked')) {
4357            $('#gform_submit_button_32').attr('disabled', 'disabled');
4358            $("#input_32_24").append(errorPre);
4359            $("#field_32_25").hide();
4360        }
4361
4362    });
4363
4364    $('#choice_32_24_1').on('touchstart click', function() {
4365
4366
4367        if ($('#choice_32_24_1').is(':checked')) {
4368            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4369            $('#gform_submit_button_32').removeAttr('disabled');
4370            $("#input_32_24").find('.na-msg').remove();
4371            $("#field_32_25").show();
4372        }
4373    });
4374
4375    $('#choice_32_25_0').on('touchstart click', function() {
4376
4377        if ($('#choice_32_25_0').is(':checked')) {
4378            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4379            $('#gform_submit_button_32').removeAttr('disabled');
4380            $("#input_32_25").find('.na-msg').remove();
4381        }
4382
4383    });
4384
4385    $('#choice_32_25_1').on('touchstart click', function() {
4386
4387        if ($('#choice_32_25_1').is(':checked')) {
4388            $('#gform_submit_button_32').attr('disabled', 'disabled');
4389            $("#input_32_25").append(errorPre);
4390
4391        }
4392
4393    });
4394
4395    $('#choice_32_28_0').on('touchstart click', function() {
4396
4397        if ($('#choice_32_28_0').is(':checked')) {
4398            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4399            $('#gform_submit_button_32').removeAttr('disabled');
4400            $("#input_32_28").find('.na-msg').remove();
4401        }
4402
4403    });
4404
4405    $('#choice_32_28_1').on('touchstart click', function() {
4406
4407        if ($('#choice_32_28_1').is(':checked')) {
4408            $('#gform_submit_button_32').attr('disabled', 'disabled');
4409            $("#input_32_28").append(errorPre);
4410
4411        }
4412
4413    });
4414    $('#choice_32_26_0').on('touchstart click', function() {
4415
4416        if ($('#choice_32_26_0').is(':checked')) {
4417            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4418            $('#gform_submit_button_32').removeAttr('disabled');
4419            $("#input_32_26").find('.na-msg').remove();
4420        }
4421
4422    });
4423
4424    $('#choice_32_26_1').on('touchstart click', function() {
4425
4426        if ($('#choice_32_26_1').is(':checked')) {
4427            $('#gform_submit_button_32').attr('disabled', 'disabled');
4428            $("#input_32_26").append(errorPre);
4429
4430        }
4431
4432    });
4433    $('#choice_32_27_0').on('touchstart click', function() {
4434
4435        if ($('#choice_32_27_0').is(':checked')) {
4436            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4437            $('#gform_submit_button_32').removeAttr('disabled');
4438            $("#input_32_27").find('.na-msg').remove();
4439        }
4440
4441    });
4442
4443    $('#choice_32_27_1').on('touchstart click', function() {
4444
4445        if ($('#choice_32_27_1').is(':checked')) {
4446            $('#gform_submit_button_32').attr('disabled', 'disabled');
4447            $("#input_32_27").append(errorPre);
4448
4449        }
4450
4451    });
4452    $('#choice_32_8_0').on('touchstart click', function() {
4453
4454        if ($('#choice_32_8_0').is(':checked')) {
4455            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4456            $('#gform_submit_button_32').removeAttr('disabled');
4457            $("#input_32_8").find('.na-msg').remove();
4458        }
4459
4460    });
4461
4462    $('#choice_32_8_1').on('touchstart click', function() {
4463
4464        if ($('#choice_32_8_1').is(':checked')) {
4465            $('#gform_submit_button_32').attr('disabled', 'disabled');
4466            $("#input_32_8").append(errorPre);
4467
4468        }
4469
4470    });
4471
4472    /*
4473     * Prescription migrane
4474     * @returns {undefined}
4475     */
4476    $('#choice_33_1_0').on('touchstart click', function() {
4477
4478        if ($('#choice_33_1_0').is(':checked')) {
4479            $('#gform_submit_button_33').removeAttr('disabled');
4480            $("#input_33_1").find('.na-msg').remove();
4481        }
4482
4483    });
4484
4485    $('#choice_33_1_1').on('touchstart click', function() {
4486
4487        if ($('#choice_33_1_1').is(':checked')) {
4488            $('#gform_submit_button_33').attr('disabled', 'disabled');
4489            $("#input_33_1").append(errorPre);
4490
4491        }
4492
4493    });
4494
4495    $('#choice_33_2_0').on('touchstart click', function() {
4496
4497        if ($('#choice_33_2_0').is(':checked')) {
4498            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4499            $('#gform_submit_button_33').removeAttr('disabled');
4500            $("#input_33_2").find('.na-msg').remove();
4501        }
4502
4503    });
4504
4505    $('#choice_33_2_1').on('touchstart click', function() {
4506
4507        if ($('#choice_33_2_1').is(':checked')) {
4508            $('#gform_submit_button_33').attr('disabled', 'disabled');
4509            $("#input_33_2").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">Please read the <a target="_blank" href="' + SITE_URL + '/pil-items/migraine-patient-information-leaflet/">Migraine</a> information sheet before proceeding</span>');
4510
4511
4512        }
4513
4514    });
4515    $('#choice_33_31_1').on('touchstart click', function() {
4516
4517        if ($('#choice_33_31_1').is(':checked')) {
4518            $('#gform_submit_button_33').attr('disabled', 'disabled');
4519            $("#input_33_31").append(errorpostDOB);
4520
4521        }
4522
4523    });
4524    $('#choice_33_3_0').on('touchstart click', function() {
4525
4526        if ($('#choice_33_3_0').is(':checked')) {
4527            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4528            $('#gform_submit_button_33').removeAttr('disabled');
4529            $("#input_33_3").find('.na-msg').remove();
4530        }
4531
4532    });
4533
4534
4535    $('#choice_33_3_1').on('touchstart click', function() {
4536
4537        if ($('#choice_33_3_1').is(':checked')) {
4538            $('#gform_submit_button_33').attr('disabled', 'disabled');
4539            $("#input_33_3").append(errorPre);
4540
4541        }
4542
4543    });
4544
4545    $('#choice_33_4_0').on('touchstart click', function() {
4546
4547        if ($('#choice_33_4_0').is(':checked')) {
4548            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4549            $('#gform_submit_button_33').removeAttr('disabled');
4550            $("#input_33_4").find('.na-msg').remove();
4551        }
4552
4553    });
4554
4555
4556    $('#choice_33_4_1').on('touchstart click', function() {
4557
4558        if ($('#choice_33_4_1').is(':checked')) {
4559            $('#gform_submit_button_33').attr('disabled', 'disabled');
4560            $("#input_33_4").append(errorPre);
4561
4562        }
4563
4564    });
4565
4566
4567    $('#choice_33_21_0').on('touchstart click', function() {
4568
4569        if ($('#choice_33_21_0').is(':checked')) {
4570            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4571            $('#gform_submit_button_33').removeAttr('disabled');
4572            $("#input_33_21").find('.na-msg').remove();
4573        }
4574
4575    });
4576
4577    $('#choice_33_21_1').on('touchstart click', function() {
4578
4579        if ($('#choice_33_21_1').is(':checked')) {
4580            $('#gform_submit_button_33').attr('disabled', 'disabled');
4581            $("#input_33_21").append(errorPre);
4582
4583        }
4584
4585    });
4586
4587    $('#choice_33_22_0').on('touchstart click', function() {
4588
4589        if ($('#choice_33_22_0').is(':checked')) {
4590            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4591            $('#gform_submit_button_33').removeAttr('disabled');
4592            $("#input_33_22").find('.na-msg').remove();
4593        }
4594
4595    });
4596
4597    $('#choice_33_22_1').on('touchstart click', function() {
4598
4599        if ($('#choice_33_22_1').is(':checked')) {
4600            $('#gform_submit_button_33').attr('disabled', 'disabled');
4601            $("#input_33_22").append(errorPre);
4602
4603        }
4604
4605    });
4606
4607    $('#choice_33_23_0').on('touchstart click', function() {
4608
4609        if ($('#choice_33_23_0').is(':checked')) {
4610            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4611            $('#gform_submit_button_33').removeAttr('disabled');
4612            $("#input_33_23").find('.na-msg').remove();
4613        }
4614
4615    });
4616
4617    $('#choice_33_23_1').on('touchstart click', function() {
4618
4619        if ($('#choice_33_23_1').is(':checked')) {
4620            $('#gform_submit_button_33').attr('disabled', 'disabled');
4621            $("#input_33_23").append(errorPre);
4622
4623        }
4624
4625    });
4626    $('#choice_33_24_0').on('touchstart click', function() {
4627
4628        if ($('#choice_33_24_0').is(':checked')) {
4629            $('#gform_submit_button_33').attr('disabled', 'disabled');
4630            $("#input_33_24").append(errorPre);
4631            $("#field_33_25").hide();
4632        }
4633
4634    });
4635
4636    $('#choice_33_24_1').on('touchstart click', function() {
4637
4638
4639        if ($('#choice_33_24_1').is(':checked')) {
4640            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4641            $('#gform_submit_button_33').removeAttr('disabled');
4642            $("#input_33_24").find('.na-msg').remove();
4643            $("#field_33_25").show();
4644        }
4645    });
4646
4647    $('#choice_33_25_0').on('touchstart click', function() {
4648
4649        if ($('#choice_33_25_0').is(':checked')) {
4650            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4651            $('#gform_submit_button_33').removeAttr('disabled');
4652            $("#input_33_25").find('.na-msg').remove();
4653        }
4654
4655    });
4656
4657    $('#choice_33_25_1').on('touchstart click', function() {
4658
4659        if ($('#choice_33_25_1').is(':checked')) {
4660            $('#gform_submit_button_33').attr('disabled', 'disabled');
4661            $("#input_33_25").append(errorPre);
4662
4663        }
4664
4665    });
4666
4667    $('#choice_33_28_0').on('touchstart click', function() {
4668
4669        if ($('#choice_33_28_0').is(':checked')) {
4670            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4671            $('#gform_submit_button_33').removeAttr('disabled');
4672            $("#input_33_28").find('.na-msg').remove();
4673        }
4674
4675    });
4676
4677    $('#choice_33_28_1').on('touchstart click', function() {
4678
4679        if ($('#choice_33_28_1').is(':checked')) {
4680            $('#gform_submit_button_33').attr('disabled', 'disabled');
4681            $("#input_33_28").append(errorPre);
4682
4683        }
4684
4685    });
4686    $('#choice_33_26_0').on('touchstart click', function() {
4687
4688        if ($('#choice_33_26_0').is(':checked')) {
4689            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4690            $('#gform_submit_button_33').removeAttr('disabled');
4691            $("#input_33_26").find('.na-msg').remove();
4692        }
4693
4694    });
4695
4696    $('#choice_33_26_1').on('touchstart click', function() {
4697
4698        if ($('#choice_33_26_1').is(':checked')) {
4699            $('#gform_submit_button_33').attr('disabled', 'disabled');
4700            $("#input_33_26").append(errorPre);
4701
4702        }
4703
4704    });
4705    $('#choice_33_27_0').on('touchstart click', function() {
4706
4707        if ($('#choice_33_27_0').is(':checked')) {
4708            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4709            $('#gform_submit_button_33').removeAttr('disabled');
4710            $("#input_33_27").find('.na-msg').remove();
4711        }
4712
4713    });
4714
4715    $('#choice_33_27_1').on('touchstart click', function() {
4716
4717        if ($('#choice_33_27_1').is(':checked')) {
4718            $('#gform_submit_button_33').attr('disabled', 'disabled');
4719            $("#input_33_27").append(errorPre);
4720
4721        }
4722
4723    });
4724    $('#choice_33_29_0').on('touchstart click', function() {
4725
4726        if ($('#choice_33_29_0').is(':checked')) {
4727            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4728            $('#gform_submit_button_33').removeAttr('disabled');
4729            $("#input_33_29").find('.na-msg').remove();
4730        }
4731
4732    });
4733
4734    $('#choice_33_29_1').on('touchstart click', function() {
4735
4736        if ($('#choice_33_29_1').is(':checked')) {
4737            $('#gform_submit_button_33').attr('disabled', 'disabled');
4738            $("#input_33_29").append(errorPre);
4739
4740        }
4741
4742    });
4743    $('#choice_33_30_0').on('touchstart click', function() {
4744
4745        if ($('#choice_33_30_0').is(':checked')) {
4746            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4747            $('#gform_submit_button_33').removeAttr('disabled');
4748            $("#input_33_30").find('.na-msg').remove();
4749        }
4750
4751    });
4752
4753    $('#choice_33_30_1').on('touchstart click', function() {
4754
4755        if ($('#choice_33_30_1').is(':checked')) {
4756            $('#gform_submit_button_33').attr('disabled', 'disabled');
4757            $("#input_33_30").append(errorPre);
4758
4759        }
4760
4761    });
4762    $('#choice_33_8_0').on('touchstart click', function() {
4763
4764        if ($('#choice_33_8_0').is(':checked')) {
4765            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4766            $('#gform_submit_button_33').removeAttr('disabled');
4767            $("#input_33_8").find('.na-msg').remove();
4768        }
4769
4770    });
4771
4772    $('#choice_33_8_1').on('touchstart click', function() {
4773
4774        if ($('#choice_33_8_1').is(':checked')) {
4775            $('#gform_submit_button_33').attr('disabled', 'disabled');
4776            $("#input_33_8").append(errorPre);
4777
4778        }
4779
4780    });
4781
4782    /*
4783     * Prescription acne medication
4784     * @returns {undefined}
4785     */
4786    $('#choice_35_1_0').on('touchstart click', function() {
4787
4788        if ($('#choice_35_1_0').is(':checked')) {
4789            $('#gform_submit_button_35').removeAttr('disabled');
4790            $("#input_35_1").find('.na-msg').remove();
4791        }
4792
4793    });
4794
4795    $('#choice_35_1_1').on('touchstart click', function() {
4796
4797        if ($('#choice_35_1_1').is(':checked')) {
4798            $('#gform_submit_button_35').attr('disabled', 'disabled');
4799            $("#input_35_1").append('<span class="na-msg fs-error-group1" style="font-weight:lighter;color:red">Please read the <a target="_blank" href="' + SITE_URL + '/pil-items/acne-patient-information-leaflet/">Acne information sheet</a> information sheet before proceeding</span>');
4800
4801        }
4802
4803    });
4804
4805    $('#choice_35_2_0').on('touchstart click', function() {
4806
4807        if ($('#choice_35_2_0').is(':checked')) {
4808            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4809            $('#gform_submit_button_35').removeAttr('disabled');
4810            $("#input_35_2").find('.na-msg').remove();
4811        }
4812
4813    });
4814
4815    $('#choice_35_2_1').on('touchstart click', function() {
4816
4817        if ($('#choice_35_2_1').is(':checked')) {
4818            $('#gform_submit_button_35').attr('disabled', 'disabled');
4819            $("#input_35_2").append(errorPre);
4820
4821        }
4822
4823    });
4824
4825    $('#choice_35_3_0').on('touchstart click', function() {
4826
4827        if ($('#choice_35_3_0').is(':checked')) {
4828            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4829            $('#gform_submit_button_35').removeAttr('disabled');
4830            $("#input_35_3").find('.na-msg').remove();
4831        }
4832
4833    });
4834
4835
4836    $('#choice_35_3_1').on('touchstart click', function() {
4837
4838        if ($('#choice_35_3_1').is(':checked')) {
4839            $('#gform_submit_button_35').attr('disabled', 'disabled');
4840            $("#input_35_3").append(errorPre);
4841
4842        }
4843
4844    });
4845
4846    $('#choice_35_4_0').on('touchstart click', function() {
4847
4848        if ($('#choice_35_4_0').is(':checked')) {
4849            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4850            $('#gform_submit_button_35').removeAttr('disabled');
4851            $("#input_35_4").find('.na-msg').remove();
4852        }
4853
4854    });
4855
4856
4857    $('#choice_35_4_1').on('touchstart click', function() {
4858
4859        if ($('#choice_35_4_1').is(':checked')) {
4860            $('#gform_submit_button_35').attr('disabled', 'disabled');
4861            $("#input_35_4").append(errorPre);
4862
4863        }
4864
4865    });
4866
4867
4868    $('#choice_35_21_0').on('touchstart click', function() {
4869
4870        if ($('#choice_35_21_0').is(':checked')) {
4871            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4872            $('#gform_submit_button_35').removeAttr('disabled');
4873            $("#input_35_21").find('.na-msg').remove();
4874        }
4875
4876    });
4877
4878    $('#choice_35_21_1').on('touchstart click', function() {
4879
4880        if ($('#choice_35_21_1').is(':checked')) {
4881            $('#gform_submit_button_35').attr('disabled', 'disabled');
4882            $("#input_35_21").append(errorPre);
4883
4884        }
4885
4886    });
4887
4888    $('#choice_35_22_0').on('touchstart click', function() {
4889
4890        if ($('#choice_35_22_0').is(':checked')) {
4891            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4892            $('#gform_submit_button_35').removeAttr('disabled');
4893            $("#input_35_22").find('.na-msg').remove();
4894        }
4895
4896    });
4897
4898    $('#choice_35_22_1').on('touchstart click', function() {
4899
4900        if ($('#choice_35_22_1').is(':checked')) {
4901            $('#gform_submit_button_35').attr('disabled', 'disabled');
4902            $("#input_35_22").append(errorPre);
4903
4904        }
4905
4906    });
4907
4908    $('#choice_35_23_0').on('touchstart click', function() {
4909
4910        if ($('#choice_35_23_0').is(':checked')) {
4911            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4912            $('#gform_submit_button_35').removeAttr('disabled');
4913            $("#input_35_23").find('.na-msg').remove();
4914        }
4915
4916    });
4917
4918    $('#choice_35_23_1').on('touchstart click', function() {
4919
4920        if ($('#choice_35_23_1').is(':checked')) {
4921            $('#gform_submit_button_35').attr('disabled', 'disabled');
4922            $("#input_35_23").append(errorPre);
4923
4924        }
4925
4926    });
4927
4928    $('#choice_35_24_0').on('touchstart click', function() {
4929
4930        if ($('#choice_35_24_0').is(':checked')) {
4931            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4932            $('#gform_submit_button_35').removeAttr('disabled');
4933            $("#input_35_24").find('.na-msg').remove();
4934        }
4935
4936    });
4937
4938    $('#choice_35_24_1').on('touchstart click', function() {
4939
4940        if ($('#choice_35_24_1').is(':checked')) {
4941            $('#gform_submit_button_35').attr('disabled', 'disabled');
4942            $("#input_35_24").append(errorPre);
4943
4944        }
4945
4946    });
4947    $('#choice_35_25_0').on('touchstart click', function() {
4948
4949        if ($('#choice_35_25_0').is(':checked')) {
4950            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4951            $('#gform_submit_button_35').removeAttr('disabled');
4952            $("#input_35_25").find('.na-msg').remove();
4953        }
4954
4955    });
4956
4957    $('#choice_35_25_1').on('touchstart click', function() {
4958
4959        if ($('#choice_35_25_1').is(':checked')) {
4960            $('#gform_submit_button_35').attr('disabled', 'disabled');
4961            $("#input_35_25").append(errorPre);
4962
4963        }
4964
4965    });
4966    $('#choice_35_8_0').on('touchstart click', function() {
4967
4968        if ($('#choice_35_8_0').is(':checked')) {
4969            //$('#gform_submit_button_11').attr('disabled', 'disabled');
4970            $('#gform_submit_button_35').removeAttr('disabled');
4971            $("#input_35_8").find('.na-msg').remove();
4972        }
4973
4974    });
4975
4976    $('#choice_35_8_1').on('touchstart click', function() {
4977
4978        if ($('#choice_35_8_1').is(':checked')) {
4979            $('#gform_submit_button_35').attr('disabled', 'disabled');
4980            $("#input_35_8").append(errorPre);
4981
4982        }
4983
4984    });
4985    // Medical Certificate form: after a Next-page transition, return to the
4986    // top of the page instead of leaving the visitor at the footer.
4987    function returnMedicalCertificateToPageTop(formId, currentPage) {
4988        if (Number(formId) !== 2 || Number(currentPage) <= 1) {
4989            return;
4990        }
4991
4992        // Gravity Forms can restore focus after its page event. Wait for that
4993        // final browser scroll before returning the visitor to the page top.
4994        window.setTimeout(function() {
4995            $('html, body').stop(true).animate({
4996                scrollTop: 0
4997            }, 0);
4998        }, 1000);
4999    }
5000
5001    $(document).on('gform_page_loaded.qoctorMedicalCertificate', function(event, formId, currentPage) {
5002        returnMedicalCertificateToPageTop(formId, currentPage);
5003    });
5004
5005    $(document).on('gform_post_render.qoctorMedicalCertificate', function(event, formId, currentPage) {
5006        returnMedicalCertificateToPageTop(formId, currentPage);
5007    });
5008
5009    // Referral-letter forms: after a Next-page transition, start the new
5010    // step at the top of the page. Form 10 is Repeat Referral and retains
5011    // its separate pathway behaviour.
5012    var referralLetterScrollTimers = {};
5013
5014    function returnReferralLetterToPageTop(formId, currentPage) {
5015        var referralLetterFormIds = [4, 5, 6, 8, 11, 12, 13, 15, 81, 105, 113, 130, 134];
5016
5017        if (referralLetterFormIds.indexOf(Number(formId)) === -1 || Number(currentPage) <= 1) {
5018            return;
5019        }
5020
5021        // Gravity Forms restores the #_form_<id> anchor after its page event.
5022        // It can do that more than once while the mobile header finishes
5023        // rendering, so hold the first question below the sticky header for
5024        // the first five seconds without needlessly re-scrolling a correct view.
5025        (referralLetterScrollTimers[formId] || []).forEach(window.clearTimeout);
5026        referralLetterScrollTimers[formId] = [600, 1400, 2500, 3800, 5000].map(function(delay) {
5027            return window.setTimeout(function() {
5028                var page = $('#gform_page_' + formId + '_' + currentPage);
5029                var consultationQuestion = document.getElementById('field_' + formId + '_84');
5030                var firstQuestion = consultationQuestion && consultationQuestion.offsetParent !== null ? consultationQuestion : page.find('.gfield:visible').not('.gform_hidden').first().get(0);
5031                var form = document.getElementById('gform_wrapper_' + formId);
5032                var target = firstQuestion || form;
5033                var targetTop;
5034
5035                if (!target) {
5036                    return;
5037                }
5038
5039                targetTop = target.getBoundingClientRect().top;
5040                if (targetTop < 150 || targetTop > 230) {
5041                    target.scrollIntoView({ block: 'start', behavior: 'auto' });
5042                }
5043            }, delay);
5044        });
5045    }
5046
5047    $(document).on('gform_page_loaded.qoctorReferralLetter', function(event, formId, currentPage) {
5048        returnReferralLetterToPageTop(formId, currentPage);
5049    });
5050
5051    $(document).on('gform_post_render.qoctorReferralLetter', function(event, formId, currentPage) {
5052        returnReferralLetterToPageTop(formId, currentPage);
5053    });
5054
5055    // This entry flow can return from login after the browser has restored a
5056    // small previous scroll offset. Reset that restoration only while the
5057    // page is still near its opening position, so deliberate reading scrolls
5058    // are never interrupted.
5059    if ($('body').hasClass('page-id-94358') && window.matchMedia('(max-width: 600px)').matches) {
5060        var resetRepeatConsultEntryScroll = function() {
5061            if ($('#gform_wrapper_96').length && window.pageYOffset > 0 && window.pageYOffset < 260) {
5062                window.scrollTo(0, 0);
5063            }
5064        };
5065
5066        [250, 900, 1800].forEach(function(delay) {
5067            window.setTimeout(resetRepeatConsultEntryScroll, delay);
5068        });
5069
5070        window.addEventListener('pageshow', function() {
5071            window.setTimeout(resetRepeatConsultEntryScroll, 250);
5072            window.setTimeout(resetRepeatConsultEntryScroll, 1200);
5073        });
5074    }
5075
5076    $('.ginput_container_radio input').on('click', function() {
5077        if ($(this).val() != 'gf_other_choice') {
5078            scroll_ease($(this));
5079        }
5080    });
5081}(jQuery));
5082
5083
5084
5085
5086
5087
5088function toggle_custom() {
5089    var x = document.getElementById('toggle_c');
5090    if (x.style.display === 'none') {
5091        x.style.display = 'block';
5092    } else {
5093        x.style.display = 'none';
5094    }
5095}
5096/*
5097 * BMI calculator
5098 */
5099jQuery("#weight").keyup(function() {
5100    calculateBMI();
5101});
5102jQuery("#height").keyup(function() {
5103    if (jQuery("#weight").val() != "") {
5104        calculateBMI();
5105    }
5106});
5107
5108function calculateBMI() {
5109    var h = jQuery("#height").val();
5110    var w = jQuery("#weight").val();
5111    var r = parseFloat(w) / parseFloat(h);
5112    var f = r / parseFloat(h);
5113    f = Math.round(f * 100) / 100;
5114    jQuery("#result").html(f);
5115}
5116jQuery("#weight1").keyup(function() {
5117    calculateBMI1();
5118});
5119jQuery("#height1").keyup(function() {
5120    if (jQuery("#weight1").val() != "") {
5121        calculateBMI1();
5122    }
5123});
5124
5125function calculateBMI1() {
5126    var h = jQuery("#height1").val();
5127    var w = jQuery("#weight1").val();
5128    var r = parseFloat(w) / parseFloat(h);
5129    var f = r / parseFloat(h);
5130    f = Math.round(f * 100) / 100;
5131    jQuery("#result1").html(f);
5132}
5133//stattic search
5134
5135
5136(function($) {
5137    $.fn.extend({
5138        search: function(callback, timeout) {
5139            timeout = timeout || 100; // 1 second default timeout
5140            var timeoutReference,
5141                search = function(el) {
5142                    if (!timeoutReference)
5143                        return;
5144                    timeoutReference = null;
5145                    callback.call(el);
5146                };
5147            return this.each(function(i, el) {
5148                var $el = $(el);
5149                // Chrome Fix (Use keyup over keypress to detect backspace)
5150                // thank you @palerdot
5151                $el.is(':input') && $el.on('keyup keypress paste', function(e) {
5152                    // This catches the backspace button in chrome, but also prevents
5153                    // the event from triggering too preemptively. Without this line,
5154                    // using tab/shift+tab will make the focused element fire the callback.
5155                    if (e.type == 'keyup' && e.keyCode != 8)
5156                        return;
5157
5158                    // Check if timeout has been set. If it has, "reset" the clock and
5159                    // start over again.
5160                    if (timeoutReference)
5161                        clearTimeout(timeoutReference);
5162                    timeoutReference = setTimeout(function() {
5163
5164
5165                        var valor = el.value.toLowerCase();
5166
5167                        if (valor) {
5168
5169                            $(".containerItems").children().fadeOut('fast');
5170                            $(".containerItems [data-search*=" + valor + "]").fadeIn('fast');
5171
5172                        } else {
5173
5174                            $(".containerItems").children().fadeIn('fast');
5175
5176
5177                        }
5178
5179
5180
5181                        search(el);
5182
5183                    }, timeout);
5184                }).on('blur', function() {
5185                    //when leaving the input
5186
5187                    search(el);
5188                });
5189            });
5190
5191
5192
5193        }
5194    });
5195})(jQuery);
5196! function(e) {
5197    e.fn.extend({
5198        search: function(n, t) {
5199            t = t || 100;
5200            var a, u = function(e) {
5201                a && (a = null, n.call(e))
5202            };
5203            return this.each(function(n, c) {
5204                var i = e(c);
5205                i.is(":input") && i.on("keyup keypress paste", function(n) {
5206                    "keyup" == n.type && 8 != n.keyCode || (a && clearTimeout(a), a = setTimeout(function() {
5207                        var n = c.value.toLowerCase();
5208                        n = n.replace(/\s/g, '-');
5209                        n ? (e(".containerItems").children().fadeOut("fast"), e(".containerItems [data-search*=" + n + "]").fadeIn("fast")) : e(".containerItems").children().fadeIn("fast"), u(c)
5210                    }, t))
5211                }).on("blur", function() {
5212                    u(c)
5213                })
5214            })
5215        }
5216    })
5217}(jQuery);
5218jQuery('input.form-control.search-game').search(function() {
5219
5220    //execute after done typing.
5221
5222});
5223
5224
5225jQuery("#search").click(function() {
5226    jQuery("input.form-control.search-game").keypress();
5227});
5228//stattic search
5229
5230//for priority
5231function setCookieGlobal(cname, cvalue, exdays) {
5232    var d = new Date();
5233    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
5234    var expires = "expires=" + d.toUTCString();
5235    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
5236    console.log('cookies set');
5237}
5238function getCookieGlobal(cname) {
5239    var name = cname + "=";
5240    var decodedCookie = decodeURIComponent(document.cookie);
5241    var ca = decodedCookie.split(';');
5242    for (var i = 0; i < ca.length; i++) {
5243        var c = ca[i];
5244        while (c.charAt(0) == ' ') {
5245            c = c.substring(1);
5246        }
5247        if (c.indexOf(name) == 0) {
5248            return c.substring(name.length, c.length);
5249        }
5250    }
5251    return "";
5252}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.