$(document).ready(function() {
  $('img.fade').each(function(i) {
    $(this).hover(
      function() { $(this).stop(true, true).fadeTo(0,.5); },
      function() { $(this).stop(true, true).fadeTo(0,1.0); });
	});
	$('div#header div#menu a img').each(function(i) {
    $(this).hover(
      function() { $(this).stop(true, true).fadeTo(0,.5); },
      function() { $(this).stop(true, true).fadeTo(0,1.0); });
  });
  $('#pagetop a').click(function () {
		$(this).blur();
        $('html,body').animate({ scrollTop: 0 }, 550, 'easeOutQuart');
		return false;
	});
  });
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {return -c * ((t=t/d-1)*t*t*t - 1) + b;}
