﻿function PerpareWaterMark() {
    $(function () {

        $(".withWater").each(function () {
            $tb = $(this);
            $tb.addClass("water");
            $tb.val(this.title);
        });

        $(".withWater").focus(function () {
            $tb = $(this);
            if ($tb.val() == this.title) {
                $tb.val("");
                $tb.removeClass("water");
            }
        });

        $(".withWater").blur(function () {
            $tb = $(this);
            if ($.trim($tb.val()) == "") {
                $tb.val(this.title);
                $tb.addClass("water");
            }
        });
    });
}



$(document).ready(function () {
    PerpareWaterMark();
});
