$(document).ready(function(){
	
	//Glossary hover functionality
	$("a.glossary-term").hover(
		function() {
			$(this).find('span.hover-definition').prepend('<div></div>');
			$(this).find('span.hover-definition').css('display','block');
		},
		function () {
			$(this).find('span.hover-definition div').remove();
			$(this).find('span.hover-definition').css('display','none');
		}
	);

	//Image swapping
	
	//turn off all the second images
	$('.image-swap img:last-child').css("display", "none");

	//add hover functionality
	$('.image-swap').hover(
		function(){
			$(this).children().toggle();
		},
		function(){
			$(this).children().toggle();
		}
	);
	
});
