// JavaScript Document

// hide the text box until the page is loaded

$(document).ready(function ()
{
	$("#ajax_loader").hide();
	$("#ea_name").show();
});

// end

// new build developer directory row highlighting

$(document).ready(function ()
{
	$(".eaSR").hover(
      function () {
        $(this).addClass('eaSRhover');
      }, 
      function () {
        $(this).removeClass('eaSRhover');
      }
    );
});

// END


// check estate agent contact

function eaContact()
{
	var themessage = "Please enter...\n";
	
	if ( $("#email").val() == '' )
	{
		themessage = themessage + " - Your email address\n";
	}
	
	if ( $("#name").val() == '' )
	{
		themessage = themessage + " - Your name\n";
	}
	
	if ( $("#message").val() == '' )
	{
		themessage = themessage + " - Your message\n";
	}

	//alert if fields are empty and cancel form submit
	
	if (themessage == "Please enter...\n")
	{
		return true;
	}
	else
	{
		alert(themessage);
		return false;
	}
}

// end



// highlight the submit button hover


$(document).ready(function ()
{
	$("#eaSubmit").hover(
      function () {
        $(this).css('fontWeight','bold');
		$(this).css('borderColor','#00125C');
      }, 
      function () {
        $(this).css('fontWeight','normal');
		$(this).css('borderColor','#ccc');
      }
    );
});



// end
