﻿$(document).ready(function () {
    $("#fName").attr("value", "First Name:").css("color", "#20467F ");
    $("#lName").attr("value", "Last Name:").css("color", "#20467F ");
    $("#email").attr("value", "Email:").css("color", "#20467F ");
    $("#phone").attr("value", "Phone:").css("color", "#20467F ");

	var text = "First Name:";
	var text2 = "Last Name:";
	var text3 = "Email:";
	var text4 = "Phone:";

	// First Name
	$("#fName").focus(function () {
	    $("#fName").css("color", "#fff");
		$(this).addClass("active");
		if ($(this).attr("value") == text) $(this).attr("value", "");
	});

$("#fName").blur(function () {
    $("#fName").css("color", "#20467F");
		$(this).removeClass("active");
		if ($(this).attr("value") == "") $(this).attr("value", text);
	});

	// LastName
$("#lName").focus(function () {
    $("#lName").css("color", "#fff");
		$(this).addClass("active");
		if ($(this).attr("value") == text2) $(this).attr("value", "");
	});

$("#lName").blur(function () {
    $("#lName").css("color", "#20467F");
		$(this).removeClass("active");
		if ($(this).attr("value") == "") $(this).attr("value", text2);
	});

	// Email
$("#email").focus(function () {
    $("#email").css("color", "#fff");
		$(this).addClass("active");
		if ($(this).attr("value") == text3) $(this).attr("value", "");
	});

$("#email").blur(function () {
    $("#email").css("color", "#20467F");
		$(this).removeClass("active");
		if ($(this).attr("value") == "") $(this).attr("value", text3);
	});

	// Phone
$("#phone").focus(function () {
	    $("#phone").css("color", "#fff");
		$(this).addClass("active");
		if ($(this).attr("value") == text4) $(this).attr("value", "");
	});

$("#phone").blur(function () {
	    $("#phone").css("color", "#20467F");
		$(this).removeClass("active");
		if ($(this).attr("value") == "") $(this).attr("value", text4);
	});

});
