window.onscroll = function() {
    var pos = window.pageYOffset;
    if(pos > 50) {
        document.getElementById('chbg').style.background = "transparent";
    } else {
        document.getElementById('chbg').style.background = "black";
    }
}
