virtas,
<script>
document.onscroll = function (event) {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
console.log(scrollTop);
if(scrollTop > 200) {
var el = document.getElementsByClassName('main-navbar')[0];
el.className = 'main-navbar2';
}
}
</script>