$.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')));  });};$.fn.imagesLoaded = function(callback){  var elems = this.filter('img'),      len   = elems.length,      blank = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";        elems.bind('load.imgloaded',function(){      if (--len <= 0 && this.src !== blank){         elems.unbind('load.imgloaded');        callback.call(elems,this);       }  }).each(function(){     if (this.complete || this.complete === undefined){        var src = this.src;        this.src = blank;        this.src = src;     }    });   return this;};$(document).ready(function() {		$('.obfuscated').defuscate();		Cufon.replace('span', { fontFamily: 'HelveticaTextbook LT Roman', fontWeight: '400' });	Cufon.replace('h1', { fontFamily: 'TalonBold', fontWeight: '500', textDecoration: 'underline' });			$('input[name=ema_email]').focus(function() {		$('#NavCol #InputBox input.bton').css('display', 'block');	});		$('input[name=ema_email]').blur(function() {		if ($(this).val() == "") $('#NavCol #InputBox input.bton').css('display', 'none');	});		$('#NavCol #InputBox input.bton').click(function() {		$(this).css('display', 'none');	});		/*$('.swapper img',this).imagesLoaded(function() {  		$('.swapper').css('background-image', 'url(images/homeafter.gif)');  		setTimeout(function() {$('.swapper img').animate({opacity: 0}, 3000);}, 1000);	});*/			$('.swapper').cycle({ 		fx:      'fade', 		speed:  2000,		timeout: 6000	});});//function to check valid email addressfunction isValidEmail(){  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;  strEmail = document.forms[0].ema_email.value;   // search email text for regular exp matches    if (strEmail.search(validRegExp) == -1)    {      alert('A valid e-mail address is required.\nPlease amend and retry.');      return false;    }     return true; }
