﻿

$(document).ready(function() { 



/*.txtUserName

.txtPassword
*watermark input
*/
    //set default background 
	 if ($(".txtnewsletter").val() == "") {
    $(".txtnewsletter").css("background", "url('images/common/homepage/watermark_email.gif') no-repeat #fff left");
	 }
    //remove background image when focus
    $(".txtnewsletter").focus(function() {
        $(".txtnewsletter").css("background", "#fff");
    });

    //reapply background if no text entered
    $(".txtnewsletter").blur(function() {
        if ($(".txtnewsletter").val() == "") {
            $(".txtnewsletter").css("background", "url('images/common/homepage/watermark_email.gif') no-repeat #fff left");
        }
    });





    //set default background
	if ($(".txtUserName").val() == "") {
    $(".txtUserName").css("background", "url('images/common/homepage/watermark_username.jpg') no-repeat #fff left");
	}
    //remove background image when focus
    $(".txtUserName").focus(function() {
    $(".txtUserName").css("background", "#fff");
    });

    //reapply background if no text entered
    $(".txtUserName").blur(function() {
    if ($(".txtUserName").val() == "") {
        $(".txtUserName").css("background", "url('images/common/homepage/watermark_username.jpg') no-repeat #fff left");
        }
    });




    //set default background
	if ($(".txtPassword").val() == "") {
    $(".txtPassword").css("background", "url('images/common/homepage/watermark_password.jpg') no-repeat #fff left");
	}
    //remove background image when focus
    $(".txtPassword").focus(function() {
    $(".txtPassword").css("background", "#fff");
    });

    //reapply background if no text entered
    $(".txtPassword").blur(function() {
    if ($(".txtPassword").val() == "") {
        $(".txtPassword").css("background", "url('images/common/homepage/watermark_password.jpg') no-repeat #fff left");
        }
    });
    /*
    *End watermark
    */


    $(".btnLogin").click(function() {


        if ($(".txtUserName").val() == '' && $(".txtUserName").val() == '') {
            jQuery.facebox(' <h2 class="pageTitle">Tenant Login</h2><p>Please enter your username and password.<p>');
            return false;
        }

    });
});