/**
 * @author arjruy
 */

ko = new Date();
ji = ko.getTime();
var path = escape(window.location.href);

  $(document).ready(function(){

	$('#mijnReizen').empty().load('/includes/mypages.php?url='+path+'&t='+ji);

			    
			    $('#slideshow').carousel({
			      hide: 'fadeOut', // jquery show / hide effect method name
			      show: 'fadeIn', // jquery show / hide effect method name
			      duration: 3500, // duration of wait in milliseconds
			      speed: 750, // speed in milliseconds, 'slow' or 'fast',
			      seed: 5 // length of random classname applied to item to keep things all nice and seperate
			              // warning: setting this to something ridiculous will make it take ages to load.
			    });

  });
  
  this.tooltip = function(){
  	var loader = "<img src=\"/images/ajax-loader.gif\" alt=\"loading .....\">";
    $('#tooltip').html(loader);	
	/* 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 */		
	$("a.tooltip").hover(function(e){											  
		this.t = "/includes/viewAcco.php?data="+this.title;
		
		$("body").append("<p id='tooltip'></p>");
		$('#tooltip').load(this.t);

		
		this.t = this.title;
		this.title = "";	
								  
		//$("body").append("<p id='tooltip'>"+ data+"</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();
});
