$(document).ready(function() {
 var conf = {
    className : 'btn',
    postfix : '2'
  };
  var image_cache = new Object();
  $('img.'+conf.className).each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) +  conf.postfix + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
});

jQuery.easing.easeOutQuart = function (x, t, b, c, d) {return -c * ((t=t/d-1)*t*t*t - 1) + b;}

$(function () {
    $('#gotop').click(function () {
		$(this).blur();
        $('html,body').animate({ scrollTop: 0 }, 850, 'easeOutQuart');
		return false;
    });
});