

$(document).ready(function() {

	addClickHandlers();
	$('span.mailme').mailme();
	
});

function removeBene() {

	$(".benejourney").hide();
	$(".beneprocess").hide();
	$(".beneplan").hide();

}


function addClickHandlers() {

	$(".link1").mouseover(function(){
	
    	removeBene();
    	$(".benejourney").show();
    
    });

	$(".link2").mouseover(function(){
    
    	removeBene();
    	$(".beneprocess").show();
    
    });

	$(".link3").mouseover(function(){
    
    	removeBene();
    	$(".beneplan").show();
    
    });

	$(".link1").mouseout(function(){
    
    	removeBene();
    
    });

	$(".link2").mouseout(function(){
    
    	removeBene();
    
    });

	$(".link3").mouseout(function(){
    
    	removeBene();
    
    });

}

jQuery.fn.mailme = function() {
    var at = / at /;
    var dot = / dot /g;
    this.each( function() {
        var addr = jQuery(this).text().replace(at,"@").replace(dot,".");
        var title = jQuery(this).attr('title')
        $(this)
            .after('<a href="mailto:'+addr+'" title="'+title+'">'+ addr +'</a>')
            .remove();
    });
};