on.thick + 'px';
            progress.style.height = '100%';
            div.style.width = '100%';
        break;
        default:
        return;
    }

    // detect scroll progress
    window.addEventListener('scroll', function() {
        if (dom.scrollTop) {
            percent = (dom.scrollTop/(dom.scrollHeight - document.documentElement.clientHeight))*100 + '%';
        } else {
            percent = (window.pageYOffset/(dom.scrollHeight - document.documentElement.clientHeight))*100 + '%';
        }
