
	PEPS = {};
	
	PEPS.rollover = 
	{
	   init: function()
	   {
		  this.preload();
		  
		  $(".ro").hover(
			 function () { $(this).attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); }, 
			 function () { $(this).attr( 'src', PEPS.rollover.oldimage($(this).attr('src')) ); }
		  );
	   },
	
	   preload: function()
	   {
		  $(window).bind('load', function() {
			 $('.ro').each( function( key, elm ) { $('<img>').attr( 'src', PEPS.rollover.newimage( $(this).attr('src') ) ); });
		  });
	   },
	   
	   newimage: function( src )
	   { 
		  return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '_o' + src.match(/(\.[a-z]+)$/)[0]; 
	   },
	
	   oldimage: function( src )
	   { 
		  return src.replace(/_o\./, '.'); 
	   }
	};

	/* 
	 * Copyright (c) 2008 Mike Branski (www.leftrightdesigns.com)
	 * Licensed under GPL (www.leftrightdesigns.com/library/jquery/nospam/gpl.txt)
	 */
	jQuery.fn.nospam = function(settings) {
		settings = jQuery.extend({
			replaceText: false, 	// optional, accepts true or false
			filterLevel: 'normal' 	// optional, accepts 'low' or 'normal'
		}, settings);
		
		return this.each(function(){
			e = null;
			if(settings.filterLevel == 'low') { // Can be a switch() if more levels added
				if($(this).is('a[rel]')) {
					e = $(this).attr('rel').replace('//', '@').replace(/\//g, '.');
				} else {
					e = $(this).text().replace('//', '@').replace(/\//g, '.');
				}
			} else { // 'normal'
				if($(this).is('a[rel]')) {
					e = $(this).attr('rel').split('').reverse().join('').replace('//', '@').replace(/\//g, '.');
				} else {
					e = $(this).text().split('').reverse().join('').replace('//', '@').replace(/\//g, '.');
				}
			}
			if(e) {
				if($(this).is('a[rel]')) {
					$(this).attr('href', 'mailto:' + e);
					if(settings.replaceText) {
						$(this).text(e);
					}
				} else {
					$(this).text(e);
				}
			}
		});
	};


	$(document).ready(function(){
							   
		PEPS.rollover.init();
		
		$('a.email').nospam({
		  replaceText: true,    // BOOLEAN, optional default false. If set to true, replaces matched elements' text with the e-mail address
		  filterLevel: 'normal' // STRING, optional accepts 'low' or 'normal', default 'normal'.
								// low: email/domain/tld
								// normal: dlt/niamod/liame (email/domain/tld reversed)
		});
		
	});
  

