$(document).ready(function() { var html = '', is_modal = false; if ('modal' === 'bnBottom' || $.cookie('_wb_client_popup_3068') !== 'done') { is_modal = true; html += ''; } if ('bnBottom' === 'bnBottom' || $.cookie('_wb_client_popup_3119') !== 'done') { html += '
'; html += '
'; html += ' '; html += ' '; html += ' '; html += '
'; html += '
'; html += ' '; html += '
'; html += '
'; } if ('layer' === 'bnBottom' || $.cookie('_wb_client_popup_3129') !== 'done') { html += '
'; html += '
'; html += ' '; html += ' '; html += ' '; html += '
'; html += ''; html += '
'; } if ('layer' === 'bnBottom' || $.cookie('_wb_client_popup_3130') !== 'done') { html += '
'; html += '
'; html += ' '; html += ' '; html += ' '; html += '
'; html += ''; html += '
'; } if (html !== '') { html += '
'; $('body').append(html); $('.PopupWrap').fadeIn(); $('#PopupBackWrap').fadeIn(); } $('.PopupWrap').on('click', '.btn-popup-close', function() { var popup_idx = $(this).data('popup-idx'); var hide_days = $(this).data('popup-hide-days'); $(this).parents('.PopupWrap').fadeOut(); if (hide_days !== '') { var domains = location.hostname.split('.'); var domain = '.' + domains[domains.length - 2] + '.' + domains[domains.length - 1]; $.cookie('_wb_client_popup_' + popup_idx, 'done', { domain: domain, path: '/', expires: hide_days }); } if ($(this).parents('.PopupWrap').hasClass('youtube') === true) { $(this).parents('.PopupWrap').find('.Layer-Cont').html(''); } if ($(this).parents('.PopupWrap').hasClass('modal-popup') === true) { $('#PopupBackWrap').fadeOut(); } }); $('#PopupBackWrap.willbes-Layer-Black').on('click', function() { $('.PopupWrap.youtube').find('.Layer-Cont').html(''); $('.PopupWrap.modal-popup').fadeOut(); $(this).fadeOut(); }); });