/*! Simple animated 'Go to Top' scroll by cara-tm.com, MIT license. */
'use strict';_dis=document.body.clientHeight||document.documentElement.clientHeight,_el=document.getElementById('gotop');window.onscroll=function(){_el.className=document.documentElement.scrollTop>_dis-100?'visible':''};_el.onclick=function(z){function o(){n=(new Date()).getTime()-u,e>n&&(t.scrollTop=a-a*(1-Math.cos(n/e*Math.PI))/2,c=setTimeout(function(){o();},10));}var e=(document.body.offsetHeight||document.documentElement.offsetHeight||window.innerHeight)+100,t='BackCompat'==document.compatMode?document.body:document.documentElement;0===t.scrollTop&&(t=document.body);var c,n,m=t.scrollTop,u=(new Date()).getTime(),a=m;clearTimeout(c),o();return false;};

/*! Simple animated 'Go to Top' scroll by cara-tm.com, MIT license. */
var distance=300, D=document,_dis=Math.max(D.body.scrollHeight,D.documentElement.scrollHeight,D.body.offsetHeight,D.documentElement.offsetHeight,D.body.clientHeight,D.documentElement.clientHeight),_el=document.getElementById('gotop');window.onscroll=function(){_el.className=document.documentElement.scrollTop>_dis-(document.body.clientHeight||document.documentElement.clientHeight)-distance?'visible':''},_el.onclick=function(){function d(){k=new Date().getTime()-p,f>k&&(g.scrollTop=q-q*(1-Math.cos(k/f*Math.PI))/2,j=setTimeout(function(){d()},10))}var f=(document.body.offsetHeight||document.documentElement.offsetHeight||window.innerHeight)+100,g='BackCompat'==document.compatMode?document.body:document.documentElement;0===g.scrollTop&&(g=document.body);var j,k,l=g.scrollTop,p=new Date().getTime(),q=l;return clearTimeout(j),d(),!1};

Update GoTop.min.js