$(document).ready(function(){$('#sub-popup-menu').on('click',function(){if($('#sub-popup-menu .popup-list-wrapper').css('display')=='none'){$('#sub-popup-menu .popup-list-wrapper').css({display:'block',left:'auto',right:'0',opacity:'1'});}});$('#log-popup-menu').on('click',function(){if($('#log-popup-menu .popup-list-wrapper').css('display')=='none'){$('#log-popup-menu .popup-list-wrapper').css({display:'block',left:'auto',right:'0',opacity:'1'});}});$('#reg-popup-menu').on('click',function(){if($('#reg-popup-menu .popup-list-wrapper').css('display')=='none'){$('#reg-popup-menu .popup-list-wrapper').css({display:'block',left:'auto',right:'0',opacity:'1'});}});$(document).on('click touchstart',function(event){if(!$(event.target).closest('#sub-popup-menu').length){if($('#sub-popup-menu .popup-list-wrapper').css('display')=='block'){$('#sub-popup-menu .popup-list-wrapper').css({display:'none',left:'-9999px',opacity:'0'});}}
if(!$(event.target).closest('#log-popup-menu').length){if($('#log-popup-menu .popup-list-wrapper').css('display')=='block'){$('#log-popup-menu .popup-list-wrapper').css({display:'none',left:'-9999px',opacity:'0'});}}
if(!$(event.target).closest('#reg-popup-menu').length){if($('#reg-popup-menu .popup-list-wrapper').css('display')=='block'){$('#reg-popup-menu .popup-list-wrapper').css({display:'none',left:'-9999px',opacity:'0'});}}});});