var loadBubbles = function() {

   $('body').bubble({
       'trigger' : '#groutTrigger', // selector for the trigger element
       'popup' : '#grout', // selector for the actual bubble (within 'body')
       'distance' : 40, // distance in px it will travel
       'hideDelay' : 50, // time before hiding
       'effectTime' : 250, // total time for effect
       'showDelay' : 250,
       'popupPosition' : {left: 108, top: -4},
       'directionFadeIn' : 'right',
       'directionFadeOut' : 'right'
    });

   $('body').bubble({
       'trigger' : '#showerTrigger', // selector for the trigger element
       'popup' : '#shower', // selector for the actual bubble (within 'body')
       'distance' : 40, // distance in px it will travel
       'hideDelay' : 50, // time before hiding
       'effectTime' : 250, // total time for effect
       'showDelay' : 250,
       'popupPosition' : {left: 108, top: -4},
       'directionFadeIn' : 'right',
       'directionFadeOut' : 'right'       
    });
    
   $('body').bubble({
       'trigger' : '#tileTrigger', // selector for the trigger element
       'popup' : '#tile', // selector for the actual bubble (within 'body')
       'distance' : 40, // distance in px it will travel
       'hideDelay' : 50, // time before hiding
       'effectTime' : 250, // total time for effect
       'showDelay' : 250,
       'popupPosition' : {left: 108, top: -4},
       'directionFadeIn' : 'right',
       'directionFadeOut' : 'right'       
    }); 

   $('body').bubble({
       'trigger' : '#toiletTrigger', // selector for the trigger element
       'popup' : '#toilet', // selector for the actual bubble (within 'body')
       'distance' : 40, // distance in px it will travel
       'hideDelay' : 50, // time before hiding
       'effectTime' : 250, // total time for effect
       'showDelay' : 250,
       'popupPosition' : {left: 108, top: -4},
       'directionFadeIn' : 'right',
       'directionFadeOut' : 'right'  
    });

   $('body').bubble({
       'trigger' : '#sinksTrigger', // selector for the trigger element
       'popup' : '#sinks', // selector for the actual bubble (within 'body')
       'distance' : 40, // distance in px it will travel
       'hideDelay' : 50, // time before hiding
       'effectTime' : 250, // total time for effect
       'showDelay' : 250,
       'popupPosition' : {left: 108, bottom: 0},
       'directionFadeIn' : 'right',
       'directionFadeOut' : 'right'  
    });
    
  
    $('body').bubble({
       'trigger' : '#bathtubTrigger', // selector for the trigger element
       'popup' : '#bathtub', // selector for the actual bubble (within 'body')
       'distance' : 40, // distance in px it will travel
       'hideDelay' : 50, // time before hiding
       'effectTime' : 250, // total time for effect
       'showDelay' : 250,
       'popupPosition' : {left: 108, bottom: -0},
       'directionFadeIn' : 'right',
       'directionFadeOut' : 'right'  
    });
}


// initialize all functions on document ready
$(document).ready(loadBubbles);

//Activate links
$(document).ready(function() {
	//Make the images click to the same place as the titles
	$('.tooltip .left, .tooltip .right').click(function(event){
			window.location.href = $('a', this)[0].href;
	});
});


