pageTopFade
var $pagetop = $('${1}');
$pagetop.css({
'display': 'none',
'position': 'fixed',
'bottom': '20px',
'right': '20px',
'z-index': '100'
});
$(window).on('scroll', function() {
if ( $(this).scrollTop() > 500 ) {
$pagetop.fadeIn();
} else {
$pagetop.fadeOut();
}
});
$pagetop.on('click', function(e) {
$('html, body').animate({scrollTop: 0}, 500, 'linear');
e.preventDefault();
});