$(document).ready(function() {	
	//This is the list of all the social buttons which will be used to create the effects
	var social_buttons = new Array("#facebook", "#twitter", "#youtube", "#newsletter");

	for ( var i in social_buttons ) {

		var button_position = $(social_buttons[i]).position(); //button position is relative to the socialbar
		
		//Set hint positions
		$(social_buttons[i] + "-hint").css("top", button_position.top + 150); //150 is the socialbar position
		
		//Register event handlers
		$(social_buttons[i]).mouseover(function(){
			$("#" + $(this).attr("id") + "-hint").stop().fadeTo(300, 1);
		});
		
		$(social_buttons[i]).mouseout(function(){
			$("#" + $(this).attr("id") +  "-hint").stop().fadeTo(300, 0)
		});
	}
});
