this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 25;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.social").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'><img src='http://baboon-game.net/template/baboon/images/eckelinks.png'/>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$(document).ready(function(){
	tooltip();
});


    $(document).ready(function() {	
    
	     // Header Innerfade
 		$('.full').innerfade({ 
 			speed: 'slow', 
 			timeout: 5000, 
 			type: 'sequence', 
 			containerheight: '338px' 
 		}); 
 		
 		$('#login').hide();
 		
 		$('#register').hide();
 		
 		// Fade Toggle
		jQuery.fn.fadeToggle = function(speed, easing, callback) {
			return this.animate({opacity: 'toggle'}, speed, easing, callback);
		};
 		
 		$('.login-toggle').click(function() {
 			$(this).toggleClass('active');
  			$('#login').fadeToggle('fast');
  			$('#register').fadeOut('fast');
  			$('.register-toggle').removeClass('active');
		});
		
 		$('.register-toggle').click(function() {
 			$(this).toggleClass('active');
  			$('#register').fadeToggle('fast');
  			$('#login').fadeOut('fast');
  			$('.login-toggle').removeClass('active');
		});
		
		// Fancybox
		$("a.group").fancybox();
				
	});
