	$(document).ready(function () {

		//transitions
		//for more transition, goto http://gsgd.co.uk/sandbox/jquery/easing/
		var style = 'easeOutExpo';
		var default_left = Math.round($('.social_network').offset().left);
		var default_top = 0;

		//Set the default position and text for the tooltips
		$('#box').css({left: default_left, top: default_top});
		$('#box .head').html($('.social_network').find('a.selected').attr('name'));				
		$('#box').hide();
		//if mouseover the menu item
		$('.social_network a').hover(function () {
			
			left = Math.round($(this).offset().left+5);

			//Set it to current item position and text
			$('#box .head').html($(this).attr('name'));
			$('#box').stop(false, true).animate({left: left},{duration:500, easing: style});	
$('#box').fadeIn();
		
		//if user click on the menu
		}).hover(function () {
			
			//reset the selected item
			$('.social_network a').removeClass('selected');	
			
			//select the current item
			$(this).addClass('selected');
	
		});
		
		//If the mouse leave the menu, reset the floating bar to the selected item
		$('.social_network').mouseleave(function () {

			default_left = Math.round($('.social_network a.selected').offset().left - $('.social_network').offset().left);

			//Set it back to default position and text
			$('#box').fadeOut();
			
		});
		
	});

