$(document).ready(function(){
	
	// Used on golf memberships page
	tooltip();
	
	// Logo
	$('#header h1').css({'display' : 'none'}).fadeIn(1000);
	$("#header h1").hover(function(){
		$(this).fadeTo("fast", 0.6); // hover
	},function(){
		$(this).fadeTo("fast", 1.0); // mouseout
	});
	
	// BGR Logo
	$("#header #bgr").fadeTo("fast", 0.6); // pageload
	$("#header #bgr").hover(function(){
		$(this).fadeTo("fast", 1.0); // hover
	},function(){
		$(this).fadeTo("fast", 0.6); // mouseout
	});
	
	// Hover effect for main menu
	$("ul.fade li a").hover(function(){
		$(this).animate( { backgroundColor: '#222' }, 300)
	},function(){
		$(this).animate( { backgroundColor: '#000' }, 300)
	});

	// Fade in homepage images
	$("#buttons img").each(function (i) {
		var $item = $(this);
		setTimeout(function () { $($item).css({'display' : 'none'}).fadeIn(1000); }, 50 * (i + 1));
	});
	// Hover homepage images
	$("#buttons img").hover(function(){
		$(this).fadeTo("fast", 0.7); // hover
	},function(){
		$(this).fadeTo("fast", 1.0); // mouseout
	});

	// Reflect homepage image
	$("#buttons img").reflect({
		'height':0.15,
		'opacity':0.4
	});
	
	$("#logos img").hover(function(){
		$(this).fadeTo("fast", 0.5); // hover
	},function(){
		$(this).fadeTo("fast", 1.0); // mouseout
	});
	
});
