jQuery.fn.defuscate = function( settings ) {
    settings = jQuery.extend({
        link: true
    }, settings);
    var regex = /\b([A-Z0-9._%-]+)\([^)]+\)((?:[A-Z0-9-]+\.)+[A-Z]{2,6})\b/gi;
    return this.each(function() {
        if ( $(this).is('a[@href]') ) {
            // If it's an <a> element, defuscate the href attribute
            $(this).attr('href', $(this).attr('href').replace(regex, '$1@$2'));
            // Make sure that the element's contents is not made into a link
            var is_link = true;
            //alert($(this).attr('href'));
        }
        // Defuscate the element's contents
        $(this).html($(this).html().replace(regex, (settings.link && !is_link ? '<a href="mailto:$1@$2">$1@$2</a>' : '$1@$2')));
  });
}

function equalHeight(group) {
    tallest = 0;
    group.each(function() {
		// first, clear any css height setting
		$(this).css('height', 'auto');
		// then get the height of the tallest element
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
	// set all elements to that height
    group.height(tallest);
}

$(document).ready(function() { 
	$('ul.sf-menu').superfish(); 
	equalHeight($("#index .special"));
	equalHeight($('.row1'));
	equalHeight($('.row2'));
	equalHeight($('.row3'));
	equalHeight($('.row4'));
	equalHeight($('.row5'));
	$("#index #contact").click(function(){
		window.location.href = "contact_us.php";
	}).css({cursor:"pointer"});
	$(".eml").defuscate();
}); 

