// Scroll Top

jQuery(function(){
// Scroll to Top
jQuery.fn.scrollToTop=function(){
var ToTop=jQuery(this); // Variable initialisieren
jQuery(this).removeAttr("href");

jQuery(window).scroll(function(){ // Windows Scroll-Event
if(jQuery(window).scrollTop()=="0"){
jQuery(ToTop).fadeOut("slow") // ToTop-Link ausblenden wenn die Scroll-Position 0 ist
} else{
jQuery(ToTop).fadeIn("slow") // ToTop-Link einblenden wenn die Scroll-Position nicht 0 ist
}
});

jQuery(this).click(function(){ // Klick des ToTop-Links
jQuery("html, body").animate({scrollTop:0}, {duration:'slow', easing: ''});
})
}

jQuery(document).ready(function(){
jQuery(function() {
jQuery("#goTop").scrollToTop(); // Zuweisen von scrollToTop
});
});

}); 

