﻿
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){

// Notice the use of the each() method to acquire access to each elements attributes
   $('#content a[tooltip]').each(function()
   {
      $(this).qtip({
         content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content
         style: {name: 'blue',tip: true}, // Give it a crea mstyle to make it stand out
		 show: 'mouseover',
   		hide: 'mouseout'
      });
   });
   
 
   $('#main-header a[tooltip]').each(function()
   {
      $(this).qtip({
         content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content
         style: {name: 'blue',tip: true}, // Give it a crea mstyle to make it stand out
		 show: 'mouseover',
   		hide: 'mouseout'
      });
   });
   
  
   
   $('#container img[tooltip]').each(function()
   {
      $(this).qtip({
         content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content
         style: {name: 'blue',tip: true}, // Give it a crea mstyle to make it stand out
			position: {
			  corner: {
				 target: 'topRight',
				 tooltip: 'bottomLeft'
			  }
		   },
		show: 'mouseover',
   		hide: 'mouseout'
      });
   });


});