// JavaScript Document
// Create the tooltips only on document load
$(document).ready(function(){
	$('div[title]').qtip({ 
		  content: {
			 text: false
		  },
		  position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'},adjust: {screen: true}},
		  style: { 
			  width: 200,
			  padding: 5,
			  background: '#f1f1f1',
			  color: 'black',
			  textAlign: 'center',
			  border: {
				 width: 7,
				 radius: 5,
				 color: '#f1f1f1'
			  },
		  	  tip: true,
		  	  name: 'light'
		  }
	});

						   
						   
   $('#over1[rel]').each(function(){
      $(this).qtip({
         content: {
            text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />',
            url: $(this).attr('rel'),
			title: {text: $(this).text(),
					button: 'Fermer'}},
         position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'},adjust: {screen: true}},
         show: {when: 'click',solo: true},hide: 'unfocus',
         style: {tip: true,border: {width: 0,radius: 4},name: 'light',width: 570}
      })
   });
   $('#over2[rel]').each(function(){
      $(this).qtip({
         content: {
            text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />',
            url: $(this).attr('rel'),title: {text: $(this).text(),button: 'Fermer'}},
         position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'},adjust: {screen: true}},
         show: {when: 'click',solo: true},hide: 'unfocus',
         style: {tip: true,border: {width: 0,radius: 4},name: 'light',width: 570}
      })
   });
   $('#over3[rel]').each(function(){
      $(this).qtip({
         content: {
            text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />',
            url: $(this).attr('rel'),title: {text: $(this).text(),button: 'Fermer'}},
         position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'},adjust: {screen: true}},
         show: {when: 'click',solo: true},hide: 'unfocus',
         style: {tip: true,border: {width: 0,radius: 4},name: 'light',width: 570}
      })
   });
   $('#over4[rel]').each(function(){
      $(this).qtip({
         content: {
            text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />',
            url: $(this).attr('rel'),title: {text: $(this).text(),button: 'Fermer'}},
         position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'},adjust: {screen: true}},
         show: {when: 'click',solo: true},hide: 'unfocus',
         style: {tip: true,border: {width: 0,radius: 4},name: 'light',width: 570}
      })
   });
   $('#over5[rel]').each(function(){
      $(this).qtip({
         content: {
            text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />',
            url: $(this).attr('rel'),title: {text: $(this).text(),button: 'Fermer'}},
         position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'},adjust: {screen: true}},
         show: {when: 'click',solo: true},hide: 'unfocus',
         style: {tip: true,border: {width: 0,radius: 4},name: 'light',width: 570}
      })
   });
});

