// JavaScript Document

/*
My suspicion is that it is a conflict between jQuery and Moo Tools, a library of JavaScript functions we've installed on the site. We've had other issues due to this conflict (e.g. Collapsible Field Sets won't open or close, etc.).
The solution for us has been to look in various JavaScript files (*.js), mostly in the 'misc' folder and make the following edit:
change all instances of '$(' to 'jQuery('
*/

/* Antispam */
jQuery(function() {  
   jQuery('.email').each(function() {  
      var $email = jQuery(this);  
      var address = $email.text()  
         .replace(/\s*\[at\]\s*/, '@')  
         .replace(/\s*\[dot\]\s*/g, '.');  
      $email.html('<a href="mailto:' + address + '">'  
         + address +'</a>');  
   });  
});

/* Rollovers */
jQuery(function() {
	jQuery('.rollover').hover(function() {
		var currentImg = jQuery(this).attr('src');
		jQuery(this).attr('src', jQuery(this).attr('hover'));
		jQuery(this).attr('hover', currentImg);
	}, function() {
		var currentImg = jQuery(this).attr('src');
		jQuery(this).attr('src', jQuery(this).attr('hover'));
		jQuery(this).attr('hover', currentImg);
	});
});
