$(document).ready(function() {
	Cufon.replace( $('.call-head, .title, h1, h2, h3, h4, label, #keywords'), { fontFamily: 'DIN' } ); // for nav
  
});




function rmPix(varin) {
	out = varin.replace("px", "") * 1;
	return out;
}

function even_divs(obj) {
	big = 0;
	$(obj).each(function() {
		var height = $(this).height();
		if ( height >= big ) { big = height; } // Get the largest object
	});
	$(obj).each(function() { 
		current = rmPix($(this).css('padding-bottom')); //Current padding
		height = $(this).height();
		var padding = (big - height) + current;//new padding based on need to expand. 
		$(this).delay(125).animate({paddingBottom: padding}, 250).delay(125);
	});
}

function form_replace() {
	$('form').find('input:text, textarea').each(function() {
		if ( $('body').attr('class') == 'admin' ) {} else {
			$(this).focus(function() { value = $(this).val(); $(this).val(''); });
			$(this).blur(function() {
				if ( $.trim($(this).val()) == '' ) { $(this).val(value); }
			})
		}
	});
}

function isValidEmailAddress(emailAddress) {
	var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
	return pattern.test(emailAddress);
}


