/* qTip Style for Navigation */

$.fn.qtip.styles.plNav = { // Last part is the name of the style
   background: '#c9dff4',
   color: '#000',
   textAlign: 'center',
   fontSize: '12px',
   border: {
	  width: 1,
	  radius: 3,
	  color: '#c9dff4'
   },
   tip: {
	   corner: 'bottomMiddle',
	   size: {
		x: 5, // Be careful that the x and y values refer to coordinates on screen, not height or width.
		y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
		}		   
   },
   name: 'blue' // Inherit the rest of the attributes from the preset dark style
}

/* qTip style for Contact CTA Button */

$.fn.qtip.styles.plContact = { // Last part is the name of the style
   background: '#df5e5f',
   color: '#000',
   textAlign: 'center',
   fontSize: '12px',
   border: {
	  width: 1,
	  radius: 3,
	  color: '#df5e5f'
   },
   tip: {
	   corner: 'topMiddle',
	   size: {
		x: 5, // Be careful that the x and y values refer to coordinates on screen, not height or width.
		y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
		}		   
   },
   name: 'blue' // Inherit the rest of the attributes from the preset dark style
}

/* qTip style for Small Contact CTA Button */

$.fn.qtip.styles.plContactSM = { // Last part is the name of the style
   background: '#df5e5f',
   color: '#000',
   textAlign: 'center',
   fontSize: '12px',
   border: {
	  width: 1,
	  radius: 3,
	  color: '#df5e5f'
   },
   tip: {
	   corner: 'topMiddle',
	   size: {
		x: 5, // Be careful that the x and y values refer to coordinates on screen, not height or width.
		y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
		}		   
   },
   name: 'blue' // Inherit the rest of the attributes from the preset dark style
}

/* qTip style for BBB Button */

$.fn.qtip.styles.plBBB = { // Last part is the name of the style
   background: '#006494',
   color: '#FFF',
   textAlign: 'center',
   fontSize: '12px',
   border: {
	  width: 1,
	  radius: 3,
	  color: '#006494'
   },
   tip: {
	   corner: 'topMiddle',
	   size: {
		x: 5, // Be careful that the x and y values refer to coordinates on screen, not height or width.
		y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
		}		   
   },
   name: 'blue' // Inherit the rest of the attributes from the preset dark style
}

/* qTip styles for default tooltips */

$.fn.qtip.styles.plDef = { // Last part is the name of the style
   background: '#777',
   color: '#FFF',
   textAlign: 'center',
   width: 160,
   fontSize: '12px',
   border: {
	  width: 1,
	  radius: 3,
	  color: '#777'
   },
   tip: {
	   corner: 'rightMiddle',
	   size: {
		x: 5, // Be careful that the x and y values refer to coordinates on screen, not height or width.
		y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
		}		   
   },
   name: 'blue' // Inherit the rest of the attributes from the preset dark style
}

$(document).ready(function(){

	// Initialize all elements which should have qTips

	$('#navigation span a[title]').qtip({ 
	
		style: { name: 'plNav' },
		content: { text: false },	
		position: {
			corner: {
				target: 'topMiddle',
				tooltip: 'bottomMiddle'
			}
		}
	})
	
	$('#header #header-navigation span.contact a[title]').qtip({ 
	
		style: { name: 'plContact' },
		content: { text: false },	
		position: {
			corner: {
				target: 'bottomMiddle',
				tooltip: 'topMiddle'
			}
		}
	})
	
	$('span.bbbs a[title]').qtip({ 
	
		style: { name: 'plBBB' },
		content: { text: false },	
		position: {
			corner: {
				target: 'bottomMiddle',
				tooltip: 'topMiddle'
			}
		}
	})
	
	$('*.tip').qtip({ 
	
		style: { name: 'plDef' },
		content: { text: false },	
		position: {
			corner: {
				target: 'leftMiddle',
				tooltip: 'rightMiddle'
			}
		}
	})
	
	$('a[title].contact_sm').qtip({ 
	
		style: { name: 'plContactSM' },
		content: { text: false },	
		position: {
			corner: {
				target: 'bottomMiddle',
				tooltip: 'topMiddle'
			}
		}
	})

});