fgc.myaccount.js
3.31 KB
jQuery(document).ready(function(a){a(".your_bonus").length > 0 && a(".your_bonus").hover(function(){a(".referral_box").fadeIn()}, function(){a(".referral_box").fadeOut()}), a(document).mouseup(function(b){var c = a(".select2-drop"); c.is(b.target) || 0 !== c.has(b.target).length || c.addClass("select2-display-none")}), a("#stripe-card-expiry-year option").each(function(){a(".select2-container.year_select #select2-drop .select2-results").append('<li class="select2-results-dept-0 select2-result select2-result-selectable" role="presentation"><div class="select2-result-label" id="select2-result-label-159" role="option">' + jQuery(this).val() + "</div></li>")}), a("#stripe-card-expiry-month option").each(function(){a(".select2-container.month_select #select2-drop .select2-results").append('<li class="select2-results-dept-0 select2-result select2-result-selectable" role="presentation"><div class="select2-result-label" id="select2-result-label-159" role="option">' + jQuery(this).val() + "</div></li>")}), year_option = a("#stripe-card-expiry-year"), year_option.length > 0 && a(".select2-container.year_select .select2-chosen").html(year_option.val()), month_option = a("#stripe-card-expiry-month"), month_option.length > 0 && a(".select2-container.month_select .select2-chosen").html(month_option.val()), a(".select2-choice").click(function(){select2_drop = a(this).closest(".select2-container").find("#select2-drop"), select2_drop.hasClass("select2-display-none")?select2_drop.removeClass("select2-display-none"):select2_drop.addClass("select2-display-none")}), a(".select2-container.year_select #select2-drop .select2-result-selectable .select2-result-label").click(function(){this_year = a(this).html(), a("#stripe-card-expiry-year").val(this_year), select2_container = a(this).closest(".select2-container"), select2_container.find(".select2-chosen").html(this_year), select2_container.find("#select2-drop").addClass("select2-display-none")}), a(".select2-container.month_select #select2-drop .select2-result-selectable .select2-result-label").click(function(){this_month = jQuery(this).html(), a("#stripe-card-expiry-month").val(this_month), select2_container = jQuery(this).closest(".select2-container"), select2_container.find(".select2-chosen").html(this_month), select2_container.find("#select2-drop").addClass("select2-display-none")}), a(".plan_options").length > 0 && a(".plan_options .too_much_reize .button").click(function(){a('.plan_options input[name="take-month-off"]').length > 0 && a('.plan_options input[name="take-month-off"]').val() > 0 && alert("Your subscription has been frozen for a month. You cannot take a month off again. If you need to make a change now, please contact steve@reize.com.au")}), a(".amount").each(function(){current_amount = a(this).html(), current_amount.indexOf("AUD") === - 1 && current_amount.indexOf("$") !== - 1 && a(this).html(a(this).html() + " AUD")}), jQuery("#link_affiliates").prop("readonly", !0), jQuery("#sharing_email").length > 0 && (0 === jQuery("#sharing_email .email-content").length && jQuery("#sharing_email .errors-1").html("Sorry, you can only send to one email address at a time."), jQuery("body").on("DOMNodeInserted", " .email-content .response", function(){jQuery(".response .response-sub").html("For every friend that joins the REIZE club you will receive a $15 credit, so keep spreading the word")}))});