$(document).ready(function(){function e(e){var t=e.getFullYear(),a=e.getMonth()+1,e=e.getDate();return e+"-"+a+"-"+t}var t=document.getElementsByClassName("registration");if(t.length>0?($(".miniheader, .header, .button__register--mobile").css("cssText","display:none;"),$(".header--registration").css("cssText","display:block;"),$(".registration").first().width()<768&&zE(function(){zE.hide()})):$(".header .container1330").append("<a href='/registration' class='button--1 button__register--mobile'>REGISTER</a>"),$("input:not(.special-characters), textarea:not(.special-characters)").focusout(function(){if(""==$(this).val()){var e=$(this).parent().attr("data-text");"undefined"!=typeof e&&e!==!1?$(this).parent().hasClass("input--2")||$(this).parent().addClass("input--error2"):$(this).parent().addClass("input--error")}else $(this).parent().removeClass("input--error2"),$(this).parent().removeClass("input--error")}),$("input[type='checkbox']").on("change",function(){$("input[name='ideclare']").is(":checked")?$(".confirmcheck__button").removeClass("disabled"):$(".confirmcheck__button").addClass("disabled")}),"undefined"!=typeof START_DATE&&START_DATE!==!1&&"undefined"!=typeof MAX_DATE&&MAX_DATE!==!1){$(".airdatepicker-birthdate").datepicker({language:"en",dateFormat:"dd-MM-yyyy",startDate:START_DATE,maxDate:MAX_DATE,onSelect:function(e,t){$("#datepickers-container").addClass("active"),$(".airdatepicker-birthdate").parent().removeClass("input--error, input--error2"),$("#datepickers-container .datepicker").hasClass("active")&&$("#datepickers-container .datepicker").removeClass("active")}});var a=new Date,n=a.getMonth(),r=a.getDate(),i=a.getFullYear(),o=["18-5-2020","19-5-2020","20-5-2020","21-5-2020","22-5-2020","23-5-2020","24-5-2020","25-5-2020","26-5-2020"];$("#installation_date").datepicker({language:"en",dateFormat:"dd-MM-yyyy",minDate:new Date(i,n,r+1),maxDate:new Date(i,n,r+31),onRenderCell:function(t,a){if("day"==a){var n=!1,r=e(t);return n=o.filter(function(e){return e==r}).length,{disabled:n}}},onSelect:function(e,t){$("#datepickers-container").addClass("active"),$("#installation_date").parent().removeClass("input--error, input--error2"),$("#datepickers-container .datepicker").hasClass("active")&&$("#datepickers-container .datepicker").removeClass("active")}})}$(".airdatepicker-birthdate, .datepicker--nav, .datepicker--content").on("click",function(e){e.stopPropagation()}),$(".airdatepicker-installation_date, .datepicker--nav, .datepicker--content").on("click",function(e){e.stopPropagation()}),$(".number").on("keydown",function(e){if(!(e.keyCode>95&&e.keyCode<106||e.keyCode>47&&e.keyCode<58||8==e.keyCode||"Tab"==e.key))return!1})}),$(document).scroll(function(){if($(body).scrollTop()>138){var e=document.getElementsByClassName("registration");if(widthviewport>600&&e.length>0){$(body).scrollTop();$(".package_selection__myorder").addClass("sticky")}}else $(".package_selection__myorder").removeClass("sticky")}),$("#wwyb_yes").click(function(){$(".address_menu").css("display","block")}),$("#wwyb_no").click(function(){$(".address_menu").css("display","none"),swal({title:"Apakah kamu yakin?",text:"Karena ada promo menarik dari we want you back",icon:"warning",buttons:!0,dangerMode:!0}).then(function(e){e&&(window.location.href="wwyb-thank-you")}),$(document).ready(function(){$("#fullname").change(function(){var e=$("#fullname").val(),t=/^[A-Za-z0-9 ]*[A-Za-z0-9][A-Za-z0-9 ]*$/;alert(t.test(e))})})});