/* Add your custom JavaScript code */
var win = $(window); //Define 'win' as the jQuery window object

// scrollTop init
var totop = $('#scrollUp');

win.on('scroll', function() {
    if (win.scrollTop() > 150) {
        totop.fadeIn();
    } else {
        totop.fadeOut();
    }
});

totop.on('click', function() {
    $("html,body").animate({
        scrollTop: 0
    }, 500);
});
