  $(document).ready(function(){
  
                $('#anima').cycle({
                    fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
                    speed: 1000,
                    timeout: 3500,
                    next: '#anima',
                    pause: 1
                });
				
				// simple accordion
				$('#list1a').accordion({
					autoheight: false,
					animated: 'easeslide',
					header: '.sezione', 
					navigation: true
				});
				
			
				
				var tip1 = $('#chart_1').html();

				// Use the each() method to gain access to each elements attributes
				   $('area').each(function()
				   {
					  $(this).qtip(
					  {
						 content: {
							
							text: $(this).attr('cont'), // Use the rel attribute of each element for the url to load

							
							title: {
							   text: $(this).attr('tit'), // Give the tooltip a title using each elements text
							   button: '[x]' // Show a close link in the title
							}
						 },
						 style: {
							name: 'dark', // Give it the preset dark style
							border: {
							   width: 2, 
							   radius: 4 
							}, 
							tip: true // Apply a tip at the default tooltip corner
						 },
						 position: {
							  corner: {
								 target: 'topLeft',
								 tooltip: 'rightBottom'
							  }
						 },
						 show: { 
							when: 'click', 
							solo: true // Only show one tooltip at a time
						 },
						 hide: 'unfocus',
						 
						 effect: {
							type: 'fade',
							lenght: 900
						 }
						 
					  });
					  $(this).css("cursor", "pointer" );
				    });
					
					
					

					$('#pp').qtip(
						   {
							  content: {
								url: 'legals.htm',
								title: {
								   text: 'Note Legali', // Give the tooltip a title using each elements text
								   button: '[x]' // Show a close link in the title
								}
							 },
							  position: {
								 target: $(document.body), // Position it via the document body...
								 corner: 'center' // ...at the center of the viewport
							  },
							  show: {
								 when: 'click', // Show it on click
								 solo: true // And hide all other tooltips
							  },
							   hide: 'unfocus',
							  style: {
								 width: 500,
								 padding: '14px',
								 border: {
									width: 9,
									radius: 9,
									color: '#666666'
								 },
								 name: 'light'
							  },
							  api: {
								 beforeShow: function()
								 {
									// Fade in the modal "blanket" using the defined show speed
									$('#qtip-blanket').fadeIn(this.options.show.effect.length);
								 },
								 beforeHide: function()
								 {
									// Fade out the modal "blanket" using the defined hide speed
									$('#qtip-blanket').fadeOut(this.options.hide.effect.length);
								 }
							  }
						});
						
						$('#mp').qtip(
						   {
							  content: {
							  //INSERIRE AL FONDO NOME PRODOTTO X RICHIESTA FORM
								url: 'mailframe.php?prod='+prod,
								title: {
								   text: 'Richiesta Informazioni su '+prod, // Give the tooltip a title using each elements text
								   button: '[x]' // Show a close link in the title
								}
							 },
							  position: {
								 target: $(document.body), // Position it via the document body...
								 corner: 'center' // ...at the center of the viewport
							  },
							  show: {
								 when: 'click', // Show it on click
								 solo: true // And hide all other tooltips
							  },
							   hide: 'unfocus',
							  style: {
								 width: 500,
								 padding: '14px',
								 border: {
									width: 9,
									radius: 9,
									color: '#666666'
								 },
								 name: 'light'
							  },
							  api: {
								 beforeShow: function()
								 {
									// Fade in the modal "blanket" using the defined show speed
									$('#qtip-blanket').fadeIn(this.options.show.effect.length);
								 },
								 beforeHide: function()
								 {
									// Fade out the modal "blanket" using the defined hide speed
									$('#qtip-blanket').fadeOut(this.options.hide.effect.length);
								 }
							  }
						});
					
					$('<div id="qtip-blanket">')
						  .css({
							 position: 'absolute',
							 top: $(document).scrollTop(), // Use document scrollTop so it's on-screen even if the window is scrolled
							 left: 0,
							 //height: $(document).height(), // Span the full document height...
							 height: '250%',
							 width: '100%', // ...and full width

							 opacity: 0.6, // Make it slightly transparent
							 backgroundColor: 'black',
							 zIndex: 5000  // Make sure the zIndex is below 6000 to keep it below tooltips!
						  })
						  .appendTo(document.body) // Append to the document body
						  .hide(); // Hide it initially
						  
						  
					
            });
