// Create the tooltips only when document ready
$(document).ready(function()
{
   $('#price_poa').qtip({        
         content: '<b>Call 0113 815 0243</b> to discuss your requirements with an expert',
         position: {  
             corner: {
             tooltip: 'leftMiddle', // Use the corner...
	     target: 'rightMiddle' // ...and opposite corner
            }
         },
         style: {
				width: 245,
				color: '#010166', 
				background: '#f9f1dc',
            border: {
               width: 4, 
               radius: 9, 
               color: '#618ce5'
            }, 
            tip: true, // Apply a tip at the default tooltip corner
            title: { 'color': '#fff', 'background': '#4E6AA4', 'overflow': 'hidden' }
         },
	     show: { when: { event: 'click' } }
   });
  /*   $('#price').each(function()
   {
      $(this).qtip(
      {        
         content: {
		url: 'pricehover.html',
				title: {
					text: 'Deal Of The Week!',
					button: 'X'					
				}
			}, 
         position: {  
             corner: {
             tooltip: 'leftMiddle', // Use the corner...
	     target: 'rightMiddle' // ...and opposite corner
            }
         },
         style: {
				width: 245,
				color: '#010166', 
				background: '#f9f1dc',
            border: {
               width: 2, 
               radius: 5, 
               color: '#19397c'
            }, 
            tip: true, // Apply a tip at the default tooltip corner
            title: { 'color': '#fff', 'background': '#4E6AA4', 'overflow': 'hidden' }
         },
	 show: { ready: true },
         hide: { when: 'mouseout', fixed: true }
      });
   });*/
/*
	$("#menu_img").qtip(
	{
        content: { text: 'testing a tooltip' },
		position: {
			corner: {
			 tooltip: 'topMiddle', // Use the corner...
			target: 'bottomMiddle' // ...and opposite corner
			}
		},
		style: {
			width: 224,
			color: '#000',
			textAlign: 'center',
			background: '#fff',
			border: {
				width: 3, 
				radius: 3, 
				color: '#26395F'
			}, 
			tip: true // Apply a tip at the default tooltip corner
		}
	});*/
/*
	$("img#product").qtip(
	{
		position: {
			corner: {
			 tooltip: 'topLeft', // Use the corner...
			 target: 'bottomRight' // ...and opposite corner
			}
		},
         content: {
				url: 'NAShover.html',
				title: {
					text: 'Want to play music with your PC off?',
					button: 'X' 
				}
			}, 
         style: {
				width: 365,
				color: '#000',  
				background: '#fff',  
            //name: 'blue', // Give it the preset dark style
            border: {
               width: 1, 
               radius: 5, 
               color: '#999'
            }, 
            tip: true, // Apply a tip at the default tooltip corner
            title: { 'color': '#fff', 'background': '#4E6AA4', 'overflow': 'hidden' }
         },
 			show: { ready: true },
        hide: { when: { event: 'click' } }
	});
*/
/*
var shared = {
    position: {
        corner: {
           target: 'bottomLeft', // Position the tooltip above the link
           tooltip: 'topLeft'
        },
        adjust: {
           screen: true// Keep the tooltip on-screen at all times
        }
    //target: $('ul:first li:first')
    },
    show: { 
        solo: true,
        when: 'click mouseenter', 
        effect: function(offset) {
            $(this).slideDown(100); // "this" refers to the tooltip
        }
    },
    hide: 'click unfocus',
    style: {
        tip: false, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
        border: {
           width: 0,
           radius: 1,
           color: '#303030'
        },
        background: '#505050',
        color: '#FFFFFF',
        width:  $(this).attr('rev'),
        height: $(this).attr('tabindex')
     }
};
    


   // Use the each() method to gain access to each elements attributes
   $('#satsumamenu a[title]').each(function()
   {
       $(this).qtip( $.extend({}, shared, { 
           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.silver-satsuma.co.uk/acatalog/throbber.gif" alt="Loading..." />',
           url: $(this).attr('rel') // Use the rel attribute of each element for the url to load
           }
       }))
   });

*/

/*
$(document).ready(function()
{
   $('a[rel="modal"]:first').qtip(
   {
      content: {
         title: {
            text: 'Silver Satsuma Enquiry Form',
            button: 'Close'
         },
		 url: 'enquiryform.html'
      },
      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: false,
      style: {
         width: { max: 650 },
         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);
         }
      }
   });

   // Create the modal backdrop on document load so all modal tooltips can use it
   $('<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...
         width: '100%', // ...and full width

         opacity: 0.7, // 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
});
*/
$("a.brochurelink[title]").qtip(
{
    position: {
    corner: {
    tooltip: 'leftMiddle', // Use the corner...
    target: 'rightMiddle' // ...and opposite corner
    }
    },
    style: {
    width: 224,
    color: '#000',
    textAlign: 'center',
    background: '#fff',
    border: {
    width: 3, 
    radius: 3, 
    color: '#26395F'
    }, 
    tip: true // Apply a tip at the default tooltip corner
    }
});


}); 

