$(document).ready(function () { $('input[type="checkbox"], input[type="radio"]').uniform(); $("html").niceScroll({ styler: "fb", cursorcolor: "#eb540a", cursorwidth: '20', cursorborderradius: '10px', background: '#404040', horizrailenabled: false }); var winwidth = $(window).width(); var mobup_parent = $('#mobup').parent(); if (winwidth < 768) { $('#mobup').prependTo(mobup_parent); } else { $('#mobup').appendTo(mobup_parent); } $('.wouldlike').on('click', function () { var update_seminar = $('#rsvptoview input[name="update_seminar"]'); var preview_seminar = $('#rsvptoview input[name="preview_seminar"]'); if ($(update_seminar).is(':checked') && $(preview_seminar).is(':checked')) { $('.attendtable').fadeOut('fast'); $('#preview_update').fadeIn('slow'); } else if ($(update_seminar).is(':checked')) { $('.attendtable').fadeOut('fast'); $('#update_only').fadeIn(); } else if ($(preview_seminar).is(':checked')) { $('.attendtable').fadeOut('fast'); $('#new_ipsoft_preview').fadeIn(); } else { $('.attendtable').fadeOut('slow'); } }); $('#rsvptoview input[name="payme"]').on('click', function () { var string = ''; if ($(this).is(':checked')) { if ($(this).val() == 'Charge my account on file') { string = 'Your seat will be reserved with the best discount applicable.'; } else if ($(this).val() == 'Contact me to make arrangements') { string = 'Your local coordinator will contact you to finalize enrollment'; } } $('#paymenote').html(string); }); }); $(window).resize(function () { var winwidth = $(window).width(); var mobup_parent = $('#mobup').parent(); if (winwidth < 768) { $('#mobup').prependTo(mobup_parent); } else { $('#mobup').appendTo(mobup_parent); } }); $(window).load(function () { $('.crbite .form-group').each(function () { var spantext = $(this).children('label').attr('for'); if ($(this).children('label').find('span').children('em').length == 0) { $(this).children('label').find('span').append('' + spantext + ''); } }); });