$(function()
{
	
  //--- MENU TOPO (end)
  var int_util_box=500;
  var timer_util_box=0;
  var close_util_box=function()
  {
    $(".caixa_destaques").fadeOut();
    $('#more a').css('background-image','');
    clearTimeout(timer_util_box); 
  };
  
  $("#more a").hover(function()
  {    
    //$(".caixa_destaques").fadeOut();
    //$('#more a').css('background-image','');
    //clearTimeout(timer_util_box);
	//$(".caixa_destaques").fadeIn();
  },
  function()
  {
	$(this).css('background-image',$(this).css('background-image'));
    timer_util_box=setTimeout(close_util_box,int_util_box);        
  });
  
  $(".caixa_destaques").hover(function()
  {clearTimeout(timer_util_box);},
  function()
  {timer_util_box=setTimeout(close_util_box,int_util_box);});
  

});
function validacomentario(){
	if(document.formcoment.comentario.value.length == 0){
		alert("Your comment is invalid. Please check that it is entered correctly.");
		document.formcoment.comentario.focus();
		return false;
	}
	if(document.formcoment.name.value.length == 0){
		alert("Your name is invalid. Please check that it is entered correctly.");
		document.formcoment.name.focus();
		return false;
	}
	if(document.formcoment.email.value.length == 0){
		alert("Your email is invalid. Please check that it is entered correctly.");
		document.formcoment.email.focus();
		return false;
	}
}
function checkdados() {
	
	if (document.formregisto.username.value.length < 4) {
	  alert('Your username is invalid. Please check that it is entered correctly.');
	  document.formregisto.username.focus();
	  return false;
	}
	if (document.formregisto.password1.value.length < 4) {
	  alert('Your password is invalid. Please check that it is entered correctly.');
	  document.formregisto.password1.focus();
	  return false;
	}
	if (document.formregisto.email.value.length == 0) {
	  alert('Your email address is invalid. Please check that it is entered correctly.');
	  document.formregisto.email.focus();
	  return false;
	}
	
	if (document.formregisto.password1.value != document.formregisto.password2.value) {
	  alert('Your password is diferent. Please check that it is entered correctly..');
	  document.formregisto.password1.focus();
	  return false;
	}
	if (document.formregisto.nome.value.length == 0) {
	  alert('Your name is invalid. Please check that it is entered correctly.');
	  document.formregisto.nome.focus();
	  return false;
	}
	
}
function checkdados_act(){
	if(document.formregisto.nome.value.length == 0){
		alert("Your name is invalid. Please check that it is entered correctly.");
		document.formregisto.name.focus();
		return false;
	}
	if(document.formregisto.email.value.length == 0){
		alert("Your email is invalid. Please check that it is entered correctly.");
		document.formregisto.email.focus();
		return false;
	}
	if (document.formregisto.password1.value.length < 4) {
	  alert('Your password is invalid. Please check that it is entered correctly.');
	  document.formregisto.password1.focus();
	  return false;
	}
	if (document.formregisto.password1.value != document.formregisto.password2.value) {
	  alert('Your password is diferent. Please check that it is entered correctly..');
	  document.formregisto.password1.focus();
	  return false;
	}
}
function checkdados_Contact(){
	if(document.fomrcontact.name.value.length == 0){
		alert("Your name is invalid. Please check that it is entered correctly.");
		document.fomrcontact.name.focus();
		return false;
	}
	if(document.fomrcontact.email.value.length == 0){
		alert("Your email is invalid. Please check that it is entered correctly.");
		document.fomrcontact.email.focus();
		return false;
	}
	if (document.fomrcontact.subject.value.length == 0) {
	  alert('Your subject is invalid. Please check that it is entered correctly.');
	  document.fomrcontact.subject.focus();
	  return false;
	}
	if (document.fomrcontact.message.value.length == 0) {
	  alert('Your message is invalid. Please check that it is entered correctly.');
	  document.fomrcontact.message.focus();
	  return false;
	}
	
}
function checkdados_Coollink(){
	if(document.formcoollink.name.value.length == 0){
		alert("Your name is invalid. Please check that it is entered correctly.");
		document.formcoollink.name.focus();
		return false;
	}
	if(document.formcoollink.nameitem.value.length == 0){
		alert("Your name of the item is invalid. Please check that it is entered correctly.");
		document.formcoollink.nameitem.focus();
		return false;
	}
	if (document.formcoollink.source.value.length == 0) {
	  alert('Your source is invalid. Please check that it is entered correctly.');
	  document.formcoollink.source.focus();
	  return false;
	}
	if (document.formcoollink.description.value.length == 0) {
	  alert('Your description is invalid. Please check that it is entered correctly.');
	  document.formcoollink.description.focus();
	  return false;
	}
	
}

