// Create the tooltips only on document load
$(document).ready(function() 
{
   // Use the each() method to gain access to each elements attributes
   $('#content a[rel]').each(function()
   {
      $(this).qtip(
      {
         content: {
            // Set the text to an image HTML string with the correct src URL to the loading image you want to use
            text: '<img class="throbber" src="http://www.uvica.fr/skin/loader.gif" alt="chargement..." />',
			//text: '<img class="throbber" src="http://www.cave-lablachere.fr/skin/loader.gif" alt="chargement..." />',
            //url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load
			//url: 'http://www.cave-lablachere.fr/minicart.php', method: 'get',
			url: 'http://www.uvica.fr/minicart.php', method: 'get',
            title: {
               text: 'Contenu de votre panier  ' + $(this).text(), // Give the tooltip a title using each elements text
               button: 'X' // Show a close link in the title
            }
         },
         position: {
            corner: {
               target: 'leftTop', // Position the tooltip above the link
               tooltip: 'topRight'
            },
            adjust: {
               screen: true // Keep the tooltip on-screen at all times
            }
         },
         show: { 
            when: 'mouseover', 
            solo: true // Only show one tooltip at a time
         },
         hide: { fixed: true, delay: 300 },
         style: {
		 	title: { 'font-size': 12 },
            tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
            border: {
               width: 3,
               radius: 0
            },
            name: 'vignesens', // Use the default light style
            width: 250 // Set the tooltip width
         }
      })
   });
});


setTimeout(function() {
    $('#confirmbox').fadeOut('slow');
}, 3000);
