/* 

2011/04/26  DJV  Created document with superfish 
2011/05/06  DJV  Added qtip init  
2011/11/14  DJV  Qtip was causing error on slideshow page. Added conditional launch of qTip
*/

$(document).ready(function() {
	
	// Initialize drop down menus
	$('ul.sf-menu').superfish();

// Create the tooltips only when document ready


if( $("#first").length){
   // We'll target all AREA elements with alt tags (Don't target the map element!!!)
   $('#first').qtip(
   {
      content: {
         attr: 'rel' // Use the ALT attribute of the area map for the content
      },
      style: {
         classes: 'ui-tooltip-tipsy'
      },
	  position: {
		  my: 'top left',  
		  at: 'left top', 
		  target: $('#first') // my target
	   },
	   hide: {
		  fixed: 'true' 
	   }
   });
}

if( $("#second").length){
   $('#second').qtip(
   {
      content: {
         attr: 'rel' // Use the ALT attribute of the area map for the content
      },
      style: {
         classes: 'ui-tooltip-tipsy'
      },
	  position: {
		  my: 'top left',  
		  at: 'left top', 
		  target: $('#second') // my target
	   },
	   hide: {
		  fixed: 'true' 
	   }
   });
}

if( $("#third").length){   
  $('#third').qtip(
   {
      content: {
         attr: 'rel' // Use the ALT attribute of the area map for the content
      },
      style: {
         classes: 'ui-tooltip-tipsy'
      },
	  position: {
		  my: 'bottom right',  
		  at: 'right bottom', 
		  target: $('#third') // my target
	   },
	   hide: {
		  fixed: 'true' 
	   }
   });
}
   
});
