//Facebook Like button
(function(d, s, id) {
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) {return;}
	js = d.createElement(s); js.id = id;
	js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
	fjs.parentNode.insertBefore(js, fjs);
}
(document, 'script', 'facebook-jssdk'));

//Google Plus button
window.___gcfg = {lang: 'en-GB'};
(function() {
	var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
	po.src = 'https://apis.google.com/js/plusone.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

$(document).ready(
	//Run on load
	function(){
		$("#social").show();
		$("#social").fadeTo("slow", 0.5); // This sets the opacity of the thumbs to fade down to 50% when the page loads
		$("#social").hover(function(){
		$(this).fadeTo("slow", 1.0); // This sets the opacity to 100% on hover
		},function(){
		$(this).fadeTo("slow", 0.5); // This sets the opacity back to 60% on mouseout
	});
});

$("#top").click(function() {
	$('html, body').animate({ scrollTop:0 }, '1000');
	return false;
});
