$(document).ready(function($){

	function getBackToTop() {	
		$(window).scroll(function(){
			if($(window).scrollTop() > 600){
				$("#back-to-top").fadeIn(200);
			} else{
				$("#back-to-top").fadeOut(200);
			}
		});

		$('#back-to-top, .back-to-top').click(function() {
			$('html, body').animate({ scrollTop:0 }, '800');
			return false;
		});
	}

	try {
		getBackToTop();			
	}
	catch ( e){
		console.log("File: `custom.back-to-top.js` contains errors.");
		console.log(e);
	}	
	

});