function checkEmail(v) {
	if (v.search(/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i)==-1) {
		alert('Please enter a valid email address.');
		return false;
	}
	return true;
}
var swop;
function loader() {
	$$('#sweepsemail','#instantemail').each(function(i) {
		i.addEvent('focus', function() {
			if (i.getValue()=='e-mail address') i.value = '';
		});
		i.addEvent('blur', function() {
			if (i.getValue()=='') i.value = 'e-mail address';
		});
	});

	var sOvl = new Element('div');
	sOvl.id = 'sweepsoverlay';
	sOvl.setOpacity(0);
	sOvl.injectInside('sweeps');
	
	swop = new Fx.Elements($$('#sweepsincludes', '#sweepsoverlay')).set({
		'0': { 'opacity': 0 },
		'1': { 'opacity': 0 }
	});

	var sHot = new Element('div');
	sHot.id = 'sweepshotspot';
	sHot.setStyle('background','white');
	sHot.setOpacity(.01);
	sHot.injectInside('sweeps');
	sHot.addEvent('mouseenter', function() {
		swop.stop();
		swop.start({
			'0': { 'opacity': 1 },
			'1': { 'opacity': 0.9 }
		});
	});
	sHot.addEvent('mouseleave', function() {
		swop.stop();
		swop.start({
			'0': { 'opacity': 0 },
			'1': { 'opacity': 0 }
		});
	});
}
window.addEvent('domready', loader);
