(function(a){jQuery.fn.gotoTop=function(b){var i=this;var d=a(window);var g=a("html,body");var f=false;var e={offset:420,speed:500,iconSpeed:200,animationShow:{"opacity":"1"},animationHide:{"opacity":"0"}};var j=a.extend(e,b);i.click(function(){g.animate({scrollTop:"0"},j.speed)});a.each(j.animationShow,function(k){if(k=="transform"){f=true}});function c(){if(f){i.css(j.animationShow)}else{i.stop().animate(j.animationShow,j.iconSpeed)}}function h(){if(f){i.css(j.animationHide)}else{i.stop().animate(j.animationHide,j.iconSpeed)}}d.scroll(function(){if(d.scrollTop()>j.offset){c()}else{h()}});if(d.scrollTop()>j.offset){i.css(j.animationShow)}else{i.css(j.animationHide)}}}(jQuery));