var EWM_Form_Enviando = false;

$(document).ready(function()
	{
	$('a[href^="http://"]').attr({ target: '_blank' });
	$('a[href^="https://"]').attr({ target: '_blank' });
	$('a.Foto').fancybox({ 'transitionIn': 'elastic', 'transitionOut': 'elastic' });
	$('a.Youtube').click(function() { $.fancybox({ 'padding': 0, 'autoScale': false, 'transitionIn': 'none', 'transitionOut': 'none', 'title': this.title, 'width': 640, 'height': 385, 'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), 'type': 'swf', 'swf': { 'wmode': 'transparent', 'allowfullscreen': 'true' } }); return false; });
	});

$('form').submit(function()
	{
	if (EWM_Form_Enviando)
		{
		alert('Os dados estão sendo processados. Por favor, aguarde.');
		return false;
		}
	else
		{
		EWM_Form_Enviando = true; $.fancybox.showActivity();
		}
	});
