// JavaScript Document
$(document).ready(function() {
						   
	// --------------------OTHER PROVIDER--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#other").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#other").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
						   
	// --------------------FIRST NAME--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#fname").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#fname").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------LAST NAME--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#lname").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not 
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#lname").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------HOME PHONE--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#phone_home").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#phone_home").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------WORK PHONE--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#phone_work").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#phone_work").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------ADDRESS--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#address").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#address").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------APARTMENT--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#app").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#app").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------CITY--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#city").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#city").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------POSTAL CODE--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#postal_code").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#postal_code").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------EMAIL--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#email").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#email").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
	
	
	// --------------------EMAIL CONFIRM--------------------
    // Define what happens when the textbox comes under focus
    // Remove the watermark class and clear the box
    $("#email2").focus(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == "" || $(this).val() == $(this).attr('title')

        }).val("");

    });

    // Define what happens when the textbox loses focus
    // Add the watermark class and default text
    $("#email2").blur(function() {

        $(this).filter(function() {

            // We only want this to apply if there's not
            // something actually entered
            return $(this).val() == ""

        }).val($(this).attr('title'));
    });
});
