[et_pb_section fb_built="1" fullwidth="on" _builder_version="4.23.1" module_alignment="center" global_colors_info="{}"][et_pb_fullwidth_image src="https://www.tucsonmariachi.org/wp-content/uploads/2017/01/register-page.jpg" _builder_version="4.16" animation="off" use_border_color="off" border_color="#ffffff" border_style="solid" global_colors_info="{}"]&nbsp;[/et_pb_fullwidth_image][/et_pb_section][et_pb_section fb_built="1" admin_label="REGISTRATION CLOSED - LIVE" _builder_version="4.20.0" custom_padding="0px|0px|0px|0px" transparent_background="off" make_fullwidth="off" use_custom_width="off" width_unit="on" global_colors_info="{}"][et_pb_row _builder_version="4.16" background_size="initial" background_position="top_left" background_repeat="repeat" custom_margin="||0px|" custom_padding="60px||60px|" global_colors_info="{}"][et_pb_column type="4_4" _builder_version="4.16" custom_padding="|||" global_colors_info="{}" custom_padding__hover="|||"][et_pb_code _builder_version="4.23.1" _module_preset="default" module_alignment="center" custom_css_free_form="@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,500;0,600;1,200;1,300;1,400;1,500;1,600&display=swap');||||* {||    margin: 0;||    padding: 0;||    box-sizing: border-box;||    font-family: 'Poppins', sans-serif;||}||||body {||    min-height: 100vh;||    display: flex;||    align-items: center;||    justify-content: center;||    background: #008000||}||||.form-container {||    background-color: #fff;||    position: relative;||    max-width: 900px;||    width: 100%;||    border-radius: 6px;||    padding: 30px;||    margin: 25px 15px;||    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);||}||||.container header {||    font-size: 20px;||    font-weight: 600;||    color: #333;||}||||.container form {||    position: relative;||    background-color: #fff;||}||||.pre-form {||    display: flex;||    flex-direction: column;||    width: 40%;||}||||.button-container {||    display: flex;||    justify-content: space-evenly;||}||||#participant-type {||    max-width: 175px;||}||||#group-number {||    max-width: 80px;||}||||.number {||    display: flex;||    flex-direction: column;||}||||.title {||    display: block;||    margin-bottom: 8px;||    font-size: 16px;||    font-weight: 600;||    margin: 6px 0;||    color: #333;||}||||.fields {||    display: flex;||    flex-wrap: wrap;||    align-items: center;||    justify-content: space-between;||}||||.input-field {||    display: flex;||    flex-direction: column;||    width: calc(100% / 2 - 10px);||    margin: 4px 0||}||||#address {||    width: 100%||}||||label {||    font-size: 12px;||    font-weight: 500;||    color: #2e2e2e;||}||||p {||    font-size: 14px;||    font-weight: 500;||    color: #2e2e2e;||    margin-bottom: 15px;||}||||input {||    height: 42px;||    margin: 8px 0;||    outline: none;||    font-size: 14px;||    font-weight: 400;||    color: #333;||    border-radius: 5px;||    border: 1px solid #aaa;||    padding: 0 15px;||}||||select {||    height: 42px;||    margin: 8px 0;||    outline: none;||    font-size: 14px;||    font-weight: 400;||    color: #333;||    border-radius: 5px;||    border: 1px solid #aaa;||    padding: 0 15px;||}||||.hide {||    display: none;||}||||.block {||    display: block||}||||button {||    font-size: 14px;||    font-weight: 400;||    color: #333;||    border-radius: 5px;||    border: 1px solid #aaa;||    padding: 0 15px;||    height: 42px;||    margin: 8px 0;||}||||.song-container {||    display: flex;||    flex-wrap: wrap;||    align-items: center;||    justify-content: space-between;||    flex-direction: column;||}||||.button-container {||    display: flex;||    justify-content: space-between;||}||||/* Style for individual detail sections */||.performer-details, .total-cost {||    background-color: #fff; /* white background for content blocks */||    border: 1px solid #e0e0e0; /* light border around content blocks */||    border-left: 5px solid #4CAF50; /* thick green left border for highlight */||    padding: 15px;||    margin-bottom: 15px; /* spacing between sections */||}||||/* Text content styles */||.confirmation-section p {||    color: #666; /* darker grey for text for readability */||    margin:  5px 0; /* vertical spacing for paragraphs */||}||||.performer-info {||    background-color: #fff;||    padding: 10px;||    margin-bottom: 10px;||    border: 1px solid #eee;||    box-shadow: 0 1px 3px rgba(0,0,0,0.05);||}||||.payment-container {||  display: flex;||  justify-content: flex-end;||}||||.back-to-form, .payment {||    margin-top: 10px;||    margin-right: 5px;||}||||.delete-button-container {||  display: flex;||  justify-content: flex-end;||}||||.delete-performer {||  background-color: rgba(255, 0, 0, 0.7);||}" global_colors_info="{}"]<div class="form-container"><!-- [et_pb_line_break_holder] -->    <h1>Add Participant</h1><!-- [et_pb_line_break_holder] -->    <form class="form group"><!-- [et_pb_line_break_holder] -->        <div class="form-inputs"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            <div class="group-performer-container"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                <div class="group-performer-details"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                    <div class="performer-title-container"><!-- [et_pb_line_break_holder] -->                        <span class="title">Participant 1 Details</span><!-- [et_pb_line_break_holder] -->                    </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                    <div class="fields"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field"><!-- [et_pb_line_break_holder] -->                            <label for="performer-first-name">Participant First Name</label><!-- [et_pb_line_break_holder] -->                            <input id="performer-first-name" name="performer-first-name" type="text"<!-- [et_pb_line_break_holder] -->                                class="performer-first-name" placeholder="Enter performer's first name"><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field"><!-- [et_pb_line_break_holder] -->                            <label for="performer-last-name">Participant Last Name</label><!-- [et_pb_line_break_holder] -->                            <input class="performer-last-name" name="performer-last-name" type="text"<!-- [et_pb_line_break_holder] -->                                placeholder="Enter performer's last name"><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field number"><!-- [et_pb_line_break_holder] -->                            <label for="performer-age">Participant Age</label><!-- [et_pb_line_break_holder] -->                            <input class="performer-age" name="performer-age" type="number" /><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field"><!-- [et_pb_line_break_holder] -->                            <label for="performer-gender">Participant Gender</label><!-- [et_pb_line_break_holder] -->                            <select class="performer-gender" name="performer-gender"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option disabled="disabled" selected="selected" value="select-gender">Select a gender<!-- [et_pb_line_break_holder] -->                                </option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Male">Male</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Female">Female</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                            </select><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] -->                      <!-- [et_pb_line_break_holder] -->                      	<div class="input-field"><!-- [et_pb_line_break_holder] --> <label for="performer-race">Participant Race</label><!-- [et_pb_line_break_holder] --><select class="performer-race" name="performer-race"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><option disabled="disabled" selected="selected" value="select-race">Select a race</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><option value="African American">African American</option><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] --><option value="Asian American">Asian American</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><option value="Hispanic">Hispanic</option><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] --><option value="Mexican American">Mexican American</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><option value="Native American">Native American</option><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] --><option value="White">White</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><option value="Other">Other</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --></select><!-- [et_pb_line_break_holder] --></div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field"><!-- [et_pb_line_break_holder] -->                            <label for="performer-grade">Participant Grade</label><!-- [et_pb_line_break_holder] -->                            <select class="performer-grade" name="performer-grade"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option disabled="disabled" selected="selected" value="select-grade">Select a grade<!-- [et_pb_line_break_holder] -->                                </option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Elementary School">Elementary School</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Middle">Middle School</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="High">High School</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="College">College</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="N/A">N/A</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                            </select><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field"><!-- [et_pb_line_break_holder] -->                            <label for="performer-class">Participant Class</label><!-- [et_pb_line_break_holder] -->                            <select class="performer-class" name="performer-class"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option disabled="disabled" selected="selected" value="select-class">Select a class<!-- [et_pb_line_break_holder] -->                                </option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Dance">Dance</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Guitar">Guitar</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Guitarron">Guitarron</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Harp">Harp</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Trumpet">Trumpet</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Vihuela">Vihuela</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Violin">Violin</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Voice">Voice</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                            </select><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                        <div class="input-field"><!-- [et_pb_line_break_holder] -->                            <label for="performer-level">Participant Level</label><!-- [et_pb_line_break_holder] -->                            <select class="performer-level" name="performer-level"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option disabled="disabled" selected="selected" value="select-level">Select a level<!-- [et_pb_line_break_holder] -->                                </option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="I">I</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="II">II</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="III">III</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                                <option value="Master">Master</option><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                            </select><!-- [et_pb_line_break_holder] -->                        </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                    </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            <div class="add-participant-button"><!-- [et_pb_line_break_holder] -->                <button class="add-participant" type="button">Click to Add Another Participant</button><!-- [et_pb_line_break_holder] -->            </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            <div class="button-container"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                <div><!-- [et_pb_line_break_holder] -->                    <button class="continue" href="#" type="button">Continue to Confirmation</button><!-- [et_pb_line_break_holder] -->                </div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->            </div><!-- [et_pb_line_break_holder] -->        </div><!-- [et_pb_line_break_holder] -->        <div class="confirmation-section" style="display: none;"><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        </div><!-- [et_pb_line_break_holder] -->    </form><!-- [et_pb_line_break_holder] --></div><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><script src="https://code.jquery.com/jquery-3.7.1.min.js"<!-- [et_pb_line_break_holder] -->        integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><script src="https://js.stripe.com/v3/"></script><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><script><!-- [et_pb_line_break_holder] -->  $(document).ready(function () {<!-- [et_pb_line_break_holder] -->  initiateStripePayment();<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->  $(".add-participant").on("click", function () {<!-- [et_pb_line_break_holder] -->    addPerformerContainer();<!-- [et_pb_line_break_holder] -->  });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->$(".continue").on("click", function () {<!-- [et_pb_line_break_holder] -->    if (validateForm()) {<!-- [et_pb_line_break_holder] -->    displayConfirmation();<!-- [et_pb_line_break_holder] -->    bindBackButton();<!-- [et_pb_line_break_holder] -->    bindMoneyOrderButton();<!-- [et_pb_line_break_holder] -->    $('.form-inputs').hide();<!-- [et_pb_line_break_holder] -->    $('.confirmation-section').show();<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->});<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  $('#back-to-form').on('click', function() {<!-- [et_pb_line_break_holder] -->    $('.confirmation-section').hide();<!-- [et_pb_line_break_holder] -->    $('.form-inputs').show();<!-- [et_pb_line_break_holder] -->	});<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  setupCharacterLimit("#group-name", 50);<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] --> // Retrieve the token from the URL<!-- [et_pb_line_break_holder] -->    let token = getQueryParam('token');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Handle form submission with token<!-- [et_pb_line_break_holder] -->    $(".form-submit").on("click", function() {<!-- [et_pb_line_break_holder] -->        let data = compileData();<!-- [et_pb_line_break_holder] -->        data.token = token; // Append the token to your data<!-- [et_pb_line_break_holder] -->        sendDataToServer(data); // Modify this function as needed to handle token<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] -->            $(document).on("click", ".delete-performer", function() {<!-- [et_pb_line_break_holder] -->      $(this).closest(".group-performer-container").remove();<!-- [et_pb_line_break_holder] -->      updateDeleteButtons(); // Update the delete buttons after removal<!-- [et_pb_line_break_holder] -->            });<!-- [et_pb_line_break_holder] -->});<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function getQueryParam(param) {<!-- [et_pb_line_break_holder] -->    let params = new URLSearchParams(window.location.search);<!-- [et_pb_line_break_holder] -->    return params.get(param);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function addPerformerContainer() {<!-- [et_pb_line_break_holder] -->    let newPerformer = $(".group-performer-container").last().clone();<!-- [et_pb_line_break_holder] -->    let performerCount = $(".group-performer-container").length + 1;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Updating the title for the new performer<!-- [et_pb_line_break_holder] -->    newPerformer.find(".title").text("Participant " + performerCount + " Details");<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Clear input values and reset dropdowns in the cloned container<!-- [et_pb_line_break_holder] -->    newPerformer.find("input[type='text'], input[type='number']").val("");<!-- [et_pb_line_break_holder] -->    newPerformer.find("select").prop("selectedIndex", 0);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Append the new performer container to the form<!-- [et_pb_line_break_holder] -->    $(".group-performer-container").last().after(newPerformer);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Update delete buttons<!-- [et_pb_line_break_holder] -->    updateDeleteButtons();<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->// Function to update delete buttons<!-- [et_pb_line_break_holder] -->function updateDeleteButtons() {<!-- [et_pb_line_break_holder] -->    // Remove existing delete buttons<!-- [et_pb_line_break_holder] -->    $(".delete-performer").remove();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Only add delete button if there are multiple performers<!-- [et_pb_line_break_holder] -->    if ($(".group-performer-container").length > 1) {<!-- [et_pb_line_break_holder] -->        let deleteButtonContainer = $("<div class='delete-button-container'></div>");<!-- [et_pb_line_break_holder] -->        let deleteButton = $("<button class='delete-performer' type='button'>Delete Participant</button>");<!-- [et_pb_line_break_holder] -->        deleteButtonContainer.append(deleteButton);<!-- [et_pb_line_break_holder] -->        $(".group-performer-container").last().append(deleteButtonContainer);<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function setupCharacterLimit(inputSelector, maxCharacterCount) {<!-- [et_pb_line_break_holder] -->  $(inputSelector).on("input", function () {<!-- [et_pb_line_break_holder] -->    const currentCharacterCount = $(this).val().length;<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    if (currentCharacterCount > maxCharacterCount) {<!-- [et_pb_line_break_holder] -->      alert(`Character limit exceeded! Maximum allowed: ${maxCharacterCount}`);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->      const trimmedValue = $(this).val().substring(0, maxCharacterCount);<!-- [et_pb_line_break_holder] -->      $(this).val(trimmedValue);<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->  });<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function gatherPerformerData() {<!-- [et_pb_line_break_holder] -->  let performers = [];<!-- [et_pb_line_break_holder] -->  let token = getQueryParam('token'); // Retrieve the token from the URL<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  $(".group-performer-container").each(function () {<!-- [et_pb_line_break_holder] -->    let performer = {<!-- [et_pb_line_break_holder] -->      performerFirstName: $(this).find(".performer-first-name").val(),<!-- [et_pb_line_break_holder] -->      performerLastName: $(this).find(".performer-last-name").val(),<!-- [et_pb_line_break_holder] -->      performerAge: $(this).find(".performer-age").val(),<!-- [et_pb_line_break_holder] -->      performerGender: $(this).find(".performer-gender").val(),<!-- [et_pb_line_break_holder] -->      performerGrade: $(this).find(".performer-grade").val(),<!-- [et_pb_line_break_holder] -->      performerClass: $(this).find(".performer-class").val(),<!-- [et_pb_line_break_holder] -->      performerLevel: $(this).find(".performer-level").val(),<!-- [et_pb_line_break_holder] -->      performerRace: $(this).find(".performer-race").val()<!-- [et_pb_line_break_holder] -->    };<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    performers.push(performer);<!-- [et_pb_line_break_holder] -->  });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  return {<!-- [et_pb_line_break_holder] -->    token: token, // Include the token in the result<!-- [et_pb_line_break_holder] -->    performers: performers<!-- [et_pb_line_break_holder] -->  };<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function compileData() {<!-- [et_pb_line_break_holder] -->  return {<!-- [et_pb_line_break_holder] -->    performers: gatherPerformerData(),<!-- [et_pb_line_break_holder] -->  };<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function displayConfirmation() {<!-- [et_pb_line_break_holder] -->    // Gather data from inputs<!-- [et_pb_line_break_holder] -->    let performersData = gatherPerformerData(); // This now contains an object with token and performers<!-- [et_pb_line_break_holder] -->    console.log(performersData);<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    let confirmationHtml = '<h3>Confirmation Details</h3>';<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Check if we have performer data to display<!-- [et_pb_line_break_holder] -->    if (performersData.performers.length === 0) { // Make sure to reference performerData.performers<!-- [et_pb_line_break_holder] -->        confirmationHtml += '<p>No performers added.</p>';<!-- [et_pb_line_break_holder] -->    } else {<!-- [et_pb_line_break_holder] -->    // Display Performer Data<!-- [et_pb_line_break_holder] -->    confirmationHtml += '<div class="performer-details"><h4>Participant Details</h4>';<!-- [et_pb_line_break_holder] -->    performersData.performers.forEach(function(performer, index) {<!-- [et_pb_line_break_holder] -->      	const performerCost = calculatePerformerCost(performer);<!-- [et_pb_line_break_holder] -->        confirmationHtml += '<div class="performer-info">';<!-- [et_pb_line_break_holder] -->        confirmationHtml += '<h5>Performer ' + (index + 1) + '</h5>';<!-- [et_pb_line_break_holder] -->        confirmationHtml += '<p><strong>Name:</strong> ' + performer.performerFirstName + ' ' + performer.performerLastName + '</p>';<!-- [et_pb_line_break_holder] -->        confirmationHtml += '<p><strong>Class:</strong> ' + performer.performerClass + '</p>';<!-- [et_pb_line_break_holder] -->        confirmationHtml += '<p><strong>Level:</strong> ' + performer.performerLevel + '</p>';<!-- [et_pb_line_break_holder] -->    		confirmationHtml += '<p><strong>Cost:</strong> $' + performerCost + '</p>';<!-- [et_pb_line_break_holder] -->        confirmationHtml += '</div>';<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] -->    confirmationHtml += '</div>';<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->     	// Calculate total cost for all performers<!-- [et_pb_line_break_holder] -->		let totalCostForAllPerformers = calculateTotalCost(performersData);<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->     	// Create a dynamic div for displaying the total cost<!-- [et_pb_line_break_holder] -->    confirmationHtml += '<div class="total-cost"><p><strong>Total Cost:</strong> $' + totalCostForAllPerformers + '</p></div>';<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->    confirmationHtml += '<button class="back-to-form" type="button">Back to Form</button>';<!-- [et_pb_line_break_holder] -->    confirmationHtml += '<div class="payment-container"><button class="payment" type="button">Pay With Credit Card</button></div>';<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Inject this HTML into a confirmation section/div and make sure it's visible<!-- [et_pb_line_break_holder] -->    $('.confirmation-section').html(confirmationHtml).show(); // Make sure to show the div if it's hidden<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function bindBackButton() {<!-- [et_pb_line_break_holder] -->    $('.back-to-form').on('click', function() {<!-- [et_pb_line_break_holder] -->        // Hide the confirmation section<!-- [et_pb_line_break_holder] -->        $('.confirmation-section').hide();<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        // Show the form sections<!-- [et_pb_line_break_holder] -->        $('.form-inputs').show();<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->function bindMoneyOrderButton() {<!-- [et_pb_line_break_holder] -->  $('.pay-with-money-order').on('click', function() {<!-- [et_pb_line_break_holder] -->    // Save current form data to sessionStorage first<!-- [et_pb_line_break_holder] -->    if (confirm("Are you sure you want to proceed with Money Order payment?")) {<!-- [et_pb_line_break_holder] -->      // User clicked 'Yes', proceed with Money Order payment process<!-- [et_pb_line_break_holder] -->      saveToSessionStorage();<!-- [et_pb_line_break_holder] -->      console.log('Proceeding with Money Order payment');<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    } else {<!-- [et_pb_line_break_holder] -->      // User clicked 'No', cancel the Money Order payment process<!-- [et_pb_line_break_holder] -->      console.log('Money Order payment cancelled by user.');<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] --> });<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->function saveToSessionStorage(token, performers) {<!-- [et_pb_line_break_holder] -->    let sessionData = {<!-- [et_pb_line_break_holder] -->        token: token,<!-- [et_pb_line_break_holder] -->        performers: performers<!-- [et_pb_line_break_holder] -->    };<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    sessionStorage.setItem("addPerformerData", JSON.stringify(sessionData));<!-- [et_pb_line_break_holder] -->    console.log('Performer data saved to Session Storage!');<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->function sendDataToServer(data) {<!-- [et_pb_line_break_holder] -->    const url = "../wp-content/themes/customtheme/add-performer.php"; // Updated URL to point to add-performer.php<!-- [et_pb_line_break_holder] -->    console.log("Data being sent:", data);<!-- [et_pb_line_break_holder] -->    $.ajax({<!-- [et_pb_line_break_holder] -->        url: url,<!-- [et_pb_line_break_holder] -->        type: "POST",<!-- [et_pb_line_break_holder] -->        contentType: "application/json",<!-- [et_pb_line_break_holder] -->        data: JSON.stringify(data),<!-- [et_pb_line_break_holder] -->        success: function(response) {<!-- [et_pb_line_break_holder] -->            console.log("Server response:", response);<!-- [et_pb_line_break_holder] -->            // Handle the response here, e.g., show a success message or redirect<!-- [et_pb_line_break_holder] -->        },<!-- [et_pb_line_break_holder] -->        error: function(xhr, status, error) {<!-- [et_pb_line_break_holder] -->            console.error("Error:", error);<!-- [et_pb_line_break_holder] -->            // Handle the error here, e.g., show an error message<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function initiateStripePayment() {<!-- [et_pb_line_break_holder] -->  const stripe = Stripe("pk_live_odbJE8ek2vn50XiF7r118nwp"); // Replace with your Stripe public key<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->  $(document).on('click', '.payment', function () {<!-- [et_pb_line_break_holder] -->    // Confirmation prompt<!-- [et_pb_line_break_holder] -->    if (confirm("Are you sure you want to continue to payment?")) {<!-- [et_pb_line_break_holder] -->      // User clicked 'Yes', proceed with payment process<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->      // Save current form data to sessionStorage first<!-- [et_pb_line_break_holder] -->      let performerData = gatherPerformerData();<!-- [et_pb_line_break_holder] -->      saveToSessionStorage(performerData.token, performerData.performers)<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->      let performers = gatherPerformerData(); // Assuming this function exists and returns an array of performers<!-- [et_pb_line_break_holder] -->      let totalCost = calculateTotalCost(performers); // Function to calculate the total cost<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->      $.ajax({<!-- [et_pb_line_break_holder] -->        url: "/wp-content/themes/customtheme/add-performer-payment.php", // The URL to your payment-server.php file<!-- [et_pb_line_break_holder] -->        method: "POST",<!-- [et_pb_line_break_holder] -->        dataType: "json",<!-- [et_pb_line_break_holder] -->        data: JSON.stringify({<!-- [et_pb_line_break_holder] -->          performers: performers,<!-- [et_pb_line_break_holder] -->          totalCost: totalCost,<!-- [et_pb_line_break_holder] -->        }),<!-- [et_pb_line_break_holder] -->        success: function (session) {<!-- [et_pb_line_break_holder] -->          stripe.redirectToCheckout({ sessionId: session.id })<!-- [et_pb_line_break_holder] -->            .then(function (result) {<!-- [et_pb_line_break_holder] -->              if (result.error) {<!-- [et_pb_line_break_holder] -->                alert(result.error.message);<!-- [et_pb_line_break_holder] -->              }<!-- [et_pb_line_break_holder] -->            });<!-- [et_pb_line_break_holder] -->        },<!-- [et_pb_line_break_holder] -->        error: function (jqXHR, textStatus, errorThrown) {<!-- [et_pb_line_break_holder] -->          console.error("Error:", errorThrown);<!-- [et_pb_line_break_holder] -->        },<!-- [et_pb_line_break_holder] -->      });<!-- [et_pb_line_break_holder] -->    } else {<!-- [et_pb_line_break_holder] -->      // User clicked 'No', cancel the payment process<!-- [et_pb_line_break_holder] -->      console.log('Payment cancelled by user.');<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->  });<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->function calculateTotalCost(data) {<!-- [et_pb_line_break_holder] -->  console.log("Performers Data:", data);<!-- [et_pb_line_break_holder] -->  let totalCost = 0;<!-- [et_pb_line_break_holder] -->  if (data.performers && Array.isArray(data.performers)) { // Check if performers is an array<!-- [et_pb_line_break_holder] -->    data.performers.forEach(function (performer) { // Iterate over the performers array<!-- [et_pb_line_break_holder] -->      if (performer.performerLevel === "Master" && performer.performerClass !== "Voice") {<!-- [et_pb_line_break_holder] -->        totalCost += 165;<!-- [et_pb_line_break_holder] -->      } else if (performer.performerLevel === "Master" && performer.performerClass === "Voice") {<!-- [et_pb_line_break_holder] -->        totalCost += 115;<!-- [et_pb_line_break_holder] -->      } else if (["I", "II", "III"].includes(performer.performerLevel)) { // Simplified condition<!-- [et_pb_line_break_holder] -->        totalCost += 115;<!-- [et_pb_line_break_holder] -->      }<!-- [et_pb_line_break_holder] -->      // No else needed as the default value for totalCost is already set to 0<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] -->  }<!-- [et_pb_line_break_holder] -->  return totalCost;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->function calculatePerformerCost(performer) {<!-- [et_pb_line_break_holder] -->    if (performer.performerLevel === "Master" && performer.performerClass !== "Voice") {<!-- [et_pb_line_break_holder] -->        return 165;<!-- [et_pb_line_break_holder] -->    } else {<!-- [et_pb_line_break_holder] -->        return 115;<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] -->};<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] --> // Function to validate the form<!-- [et_pb_line_break_holder] -->function validateForm() {<!-- [et_pb_line_break_holder] -->    // Reset any previous error messages<!-- [et_pb_line_break_holder] -->    const errorMessages = [];<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Validate performer class and level for each performer<!-- [et_pb_line_break_holder] -->    $(".group-performer-container").each(function (index) {<!-- [et_pb_line_break_holder] -->        const performerClass = $(this).find(".performer-class").val();<!-- [et_pb_line_break_holder] -->        const performerLevel = $(this).find(".performer-level").val();<!-- [et_pb_line_break_holder] -->        const performerFirstName = $(this).find(".performer-first-name").val(); // Add this line<!-- [et_pb_line_break_holder] -->        const performerLastName = $(this).find(".performer-last-name").val(); // Add this line<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        if (performerClass === "select-class" || performerLevel === "select-level" || performerFirstName.trim() === "" || performerLastName.trim() === "") {<!-- [et_pb_line_break_holder] -->            errorMessages.push(`Participant ${index + 1} is missing required inputs.`);<!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->    });<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // Display error messages if any<!-- [et_pb_line_break_holder] -->    if (errorMessages.length > 0) {<!-- [et_pb_line_break_holder] -->        const errorMessageString = errorMessages.join("\n");<!-- [et_pb_line_break_holder] -->        alert("Validation Error:\n" + errorMessageString);<!-- [et_pb_line_break_holder] -->        return false; // Prevent form submission<!-- [et_pb_line_break_holder] -->    }<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    return true; // Form is valid<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] --></script><!-- [et_pb_line_break_holder] -->[/et_pb_code][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built="1" admin_label="REGISTRATION OPEN - HIDDEN" _builder_version="4.20.0" custom_padding="0px|0px|0px|0px" custom_css_main_element="display: none !important;" transparent_background="off" make_fullwidth="off" use_custom_width="off" width_unit="on" global_colors_info="{}"][et_pb_row _builder_version="4.16" background_size="initial" background_position="top_left" background_repeat="repeat" custom_margin="||0px|" custom_padding="60px||60px|" global_colors_info="{}"][et_pb_column type="4_4" _builder_version="4.16" custom_padding="|||" global_colors_info="{}" custom_padding__hover="|||"][et_pb_text _builder_version="4.16" background_size="initial" background_position="top_left" background_repeat="repeat" text_orientation="center" module_alignment="center" custom_margin="||0px|" custom_padding="||0px|" use_border_color="off" global_colors_info="{}"]<h2>REGISTRATION</h2>[/et_pb_text][et_pb_text admin_label="OPEN" _builder_version="4.16" background_color="#f2f2f2" custom_padding="20px|20px|20px|20px" global_colors_info="{}"]<h2><span style="color: #d50022;">IMPORTANT!  PLEASE NOTE</span></h2>
<strong>Only the first 15 groups to register <em>and</em> pay for workshops will have the opportunity to perform in the Showcase Concert.</strong>  Performance time is a total of 9 minutes.

This is a long form with multiple parts.  For your convenience, you may "save and continue" filling out the form at a later time.  Click the button at the bottom of the page, enter your email, and we'll send you a link to continue filling out the form later.[/et_pb_text][et_pb_text admin_label="FORM" _builder_version="4.16" global_colors_info="{}"][gravityform id="1" title="false" description="false"][/et_pb_text][et_pb_text admin_label="CLOSED" _builder_version="4.16" background_color="#f2f2f2" text_orientation="center" custom_padding="20px|20px|20px|20px" custom_css_main_element="display: none !important;" global_colors_info="{}"]<h2><span style="color: #d50022;">Mariachi Workshop Registration Opens February 8, 2022
</span></h2>
<div><b><strong>Please check back then, to begin registration.
LEVELS 1-111: $110          MASTERS: $160
</strong></b></div>
<div></div>
<div><strong>Mariachi Workshops</strong></div>
<div>Wednesday – Friday, May 4 – May 6, 2022
Tucson Convention Center Grand Lobby<b>
</b>260 S. Church Ave
Tucson, AZ 85701</div>[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built="1" _builder_version="4.16" background_color="#527839" custom_padding="30px|0px|20px|0px" global_colors_info="{}"][et_pb_row _builder_version="4.16" background_size="initial" background_position="top_left" background_repeat="repeat" custom_margin="0px||0px|" custom_padding="0px|0px|0px|0px" custom_css_main_element="border: 1px solid #d6d6d6;" make_fullwidth="off" use_custom_width="off" width_unit="on" global_colors_info="{}"][et_pb_column type="4_4" _builder_version="4.16" background_color="#f2f2f2" custom_padding="|||" global_colors_info="{}" custom_padding__hover="|||"][et_pb_text admin_label="EXPLANATORY TEXT - HIDDEN" _builder_version="4.23.1" background_size="initial" background_position="top_left" background_repeat="repeat" text_orientation="center" module_alignment="center" custom_margin="0px||0px|" custom_padding="20px|20px|20px|20px" use_border_color="off" global_colors_info="{}"]<p>&nbsp;</p>
<h3><span style="color: #d50022;">PARTICIPANT RELEASE FORM</span></h3>
<p><strong>A MEDICAL RELEASE FORM AND PHOTO/PUBLICITY FORM, MUST BE SIGNED BY ALL PARTICIPANTS OR PARENT/GUARDIAN OF PARTICIPANTS UNDER AGE 18. THIS FORM IS REQUIRED.</strong><br />Make copies of this form as needed, and email a copy to:  <a href="mailto:tlagunas@lafrontera.org">info@tucsonmariachi.org</a></p>
<p>&nbsp;</p>[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row _builder_version="4.16" background_size="initial" background_position="top_left" background_repeat="repeat" global_colors_info="{}"][et_pb_column type="4_4" _builder_version="4.16" custom_padding="|||" global_colors_info="{}" custom_padding__hover="|||"][et_pb_button button_url="https://www.tucsonmariachi.org/wp-content/uploads/2024/01/2024-TIMC-Release.pdf" url_new_window="on" button_text="DOWNLOAD PARTICIPANT RELEASE FORM" button_alignment="center" admin_label="PARTICIPANT RELEASE" _builder_version="4.23.1" background_layout="dark" global_colors_info="{}" button_text_size__hover_enabled="off" button_text_size__hover="null" button_one_text_size__hover_enabled="off" button_one_text_size__hover="null" button_two_text_size__hover_enabled="off" button_two_text_size__hover="null" button_text_color__hover_enabled="off" button_text_color__hover="null" button_one_text_color__hover_enabled="off" button_one_text_color__hover="null" button_two_text_color__hover_enabled="off" button_two_text_color__hover="null" button_border_width__hover_enabled="off" button_border_width__hover="null" button_one_border_width__hover_enabled="off" button_one_border_width__hover="null" button_two_border_width__hover_enabled="off" button_two_border_width__hover="null" button_border_color__hover_enabled="off" button_border_color__hover="null" button_one_border_color__hover_enabled="off" button_one_border_color__hover="null" button_two_border_color__hover_enabled="off" button_two_border_color__hover="null" button_border_radius__hover_enabled="off" button_border_radius__hover="null" button_one_border_radius__hover_enabled="off" button_one_border_radius__hover="null" button_two_border_radius__hover_enabled="off" button_two_border_radius__hover="null" button_letter_spacing__hover_enabled="off" button_letter_spacing__hover="null" button_one_letter_spacing__hover_enabled="off" button_one_letter_spacing__hover="null" button_two_letter_spacing__hover_enabled="off" button_two_letter_spacing__hover="null" button_bg_color__hover_enabled="off" button_bg_color__hover="null" button_one_bg_color__hover_enabled="off" button_one_bg_color__hover="null" button_two_bg_color__hover_enabled="off" button_two_bg_color__hover="null"][/et_pb_button][/et_pb_column][/et_pb_row][/et_pb_section]