$(document).ready(function(){ 
	$(".gotomain").click(function(){$("html, body").animate({scrollTop: 0}, "slow");});
	$(".gototop.jqtype1").click(function(){$("html, body").animate({scrollTop:($("#contbody").offset().top)}, "slow");});
	$(".gototop.jqtype2").click(function(){$("html, body").animate({scrollTop:($("#explore").offset().top)}, "slow");});
	
	var pxShow = 300;//height on which the button will show
	var fadeInTime = 1000;//how slow/fast you want the button to show
	var fadeOutTime = 1000;//how slow/fast you want the button to hide
	var scrollSpeed = 1000;//how slow/fast you want the button to scroll to top. can be a value, 'slow', 'normal' or 'fast'
	jQuery(window).scroll(function(){
		if(jQuery(window).scrollTop() >= pxShow){
			jQuery("#gotomain a").fadeIn(fadeInTime);
		}else{
			jQuery("#gotomain a").fadeOut(fadeOutTime);
		}
	});
	jQuery('#gotomain a').click(function(){
		jQuery('html, body').animate({scrollTop:0}, scrollSpeed); 
		return false; 
	}); 
});
