$(function () {
    var bd = $('<iframe id="bd_iframe"></iframe>').css({
        position: 'fixed',
        top: 0,
        right: 0,
        bottom: 0,
        left: 0,
        zIndex: 9999999,
        width: '100%',
        height: '100%',
        border: 0,
    });
    if (bd_image) {
        bd.css({
            backgroundImage: 'url(' + bd_image + ')',
            backgroundSize: '100%',
            backgroundRepeat: 'no-repeat',
        });
    }
    $('body').append(bd);
    if (bd_link) {
        $(document.getElementById('bd_iframe').contentWindow.document.body).click(function () {
            parent.location.href = bd_link;
        })
    }
});
