$(document).ready(function(){
    var $popb = $('#popup-banner');
    if($popb.length > 0) {
        var width = $popb.data('width');
        var effect = $popb.data('effect');
        Custombox.open({
            target: '#popup-banner',
            effect: effect,
            position: ['center', 'center'],
            width: width,
            loading: {
                delay: 2000,
                parent: ['roundspinner'],
                childrens: [
                    ['double-bounce1'],
                    ['double-bounce2']
                ]
            }
        });

        $('.popb-close', $popb).on('click', function(e){
            Custombox.close();
            e.preventDefault();
        });
    }
});