// JavaScript Document
$.noConflict();
jQuery(document).ready(function ($) {

function tooltipOn (e) {
	if ($(this).find('span').html() != '') {
		//var position = $(this).position();
		$('div#tooltip').html($(this).find('span').html()).css({left: (e.pageX - 69), top: (e.pageY + 20)}).show();
	}	
} 
function tooltipOff () {
	$('div#tooltip').hide();
} 
function tooltipMove (e) {
	$('div#tooltip').css({left: (e.pageX - 69), top: (e.pageY + 20)});
}

$('.tblplan a').bind({
	mouseover: tooltipOn,
	mouseout: tooltipOff,
	mousemove: tooltipMove
}); 
$('.timeplan a').bind({
	mouseover: tooltipOn,
	mouseout: tooltipOff,
	mousemove: tooltipMove
}); 

//window.print(); 
$('#icon_print img').click(function(){
		window.print(); 
});


/* SLIDESHOW */
/* ~~~~~~~~~ */

function nextImage () {
	$('div#slideshow>img').eq(current).fadeIn(speed).delay(interval + speed).fadeOut(speed, nextImage);
	if (current == total) current = 0;
	else current++;
}

var current = 0;
var total = $('div#slideshow>img').length - 1;
var speed = 500;
var interval = 10000;

$('div#slideshow>img').hide();
nextImage();

});
