// JavaScript Document

// Define your contents array
var contents = [
	'<div class="sottomenu-link"><a href="hotel-piaz-servizi.php#restaurant">Ristorante</a><a href="hotel-piaz-servizi.php#relax">Sala Relax</a><a href="hotel-piaz-servizi.php#cucina">La Cucina</a><a href="hotel-piaz-servizi.php#bar">Il Bar</a></div>',
	'<div class="sottomenu-link"><a href="hotel-pera-di-fassa-prezzi.php">Estate</a><a href="hotel-pera-di-fassa-prezzi_inverno.php">Inverno</a><a href="hotel-piaz-last-minute-val-di-fassa.php">Offerte</a></div>'
];

$("#menu-container a.sottomenu").each(function(i) // Notice the 'i' argument
{
   $(this).qtip({
      content: contents[i], // Use the current 'i' value to grab the content for this particular tooltip
 	  style: {
		  width: 150,
		  padding: 5,
		  background: '#fcf3f3',
		  textAlign: 'center',
		  border: {
			  width: 5,
			  radius: 5
		  },
		  tip: 'topMiddle',
		  name: 'red' // Inherit the rest of the attributes from the preset dark style
 	  },
	  position: {
		  corner: {
			  target: 'bottomMiddle',
			  tooltip: 'topMiddle'
			  }
	  },
	  hide: {
		  when: 'mouseout',
		  fixed: true
	  }
   });
});
