$(document).ready(function() {
	var texto;
	$('#termoBusca').focus(function() {
		texto = $(this).val();
		$(this).val("");
	});
	
	$("#termoBusca").blur(function() {
		if($(this).val() == "") $(this).val(texto);
	});
	
	$("#formContatoLateral").validate({
		errorClass: "textoErroForm",
		rules: {
			contatoNome: "required",
			contatoEmail: {
				required: true,
				email: true
			},
			contatoMensagem: "required"
		},
		submitHandler: function(form) {
			$("#botaoEnviaContatoLateral").hide();
			$("#enviandoContatoLateral").show();
			form.submit();
		}
	});
	
});	

function fb_click(){
	u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(top.location.href) + '&t=' + encodeURIComponent(top.document.title), 'sharer', 'toolbar=no,width=700,height=400,scrollbars=yes,resizable');                                
}

swfobject.embedSWF("v-banner.swf", "divVBanner", "154", "641", "9.0.0");

function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}
