this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	jQuery("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		jQuery("#tooltip").remove();
    });	
	jQuery("a.tooltip").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

jQuery(document).ready(function(){

/***************************/
// TITLE TEXT POPUP
/***************************/
	tooltip();

/***************************/
// THUMBNAIL SLIDER
/***************************/
	// public vars
	var imageWidth = 145;
	var imageHeight = 136;
	var imageMargin = 5;
	var currentPosition = 0;
	var noOfThumbs = 10;
	var imagesDisplayed = 4;	
	
	// internal vars
	var currentMargin = 0;
	
	// Manipulate CSS to prepare for slider
	jQuery("#slideShow").css({"overflow" : "hidden"});
	jQuery("#slideShow").css({"height" : imageHeight});
	jQuery("#slideShow").css({"display" : "block"});
	
	// clickables
	jQuery("#slide_left").click
	(
		function()
		{
			if (currentPosition > 0)
			{
				currentMargin = currentMargin + imageWidth + imageMargin;				
				jQuery('#slideContainer').animate({'marginLeft' : currentMargin}, 400, 'swing');
				currentPosition--;
			}
		}
	)
	
	jQuery("#slide_right").click
	(
		function()
		{
			if (currentPosition == noOfThumbs - imagesDisplayed)
			{
			}
			else
			{
				currentMargin = currentMargin - imageWidth - imageMargin;			
				jQuery('#slideContainer').animate({'marginLeft' : currentMargin}, 400, 'swing');
				currentPosition++;
			}
		}
	)



/***************************/
// MENU
/***************************/
jQuery('.center_links > a > img').hover(function() {
        
	// Stuff that happens when you hover on
	jQuery(this).stop().animate({
		   'opacity': 0
		   }, 300)
	
	},function() {
	
		   // Stuff that happens when you unhover
		   jQuery(this).stop().animate({
				   'opacity': 1
				   }, 300)
	})
	
});
