﻿/// <reference path="jquery-1.4.2.min.js" />
/// will not wait for response it continues at its pace


$(function () {
    $("input[data-qwer]").focus(function () {
        var defaultText = $(this).attr("data-qwer");
        if ($(this).val() == defaultText) {

            $(this).val("");
        }

    });
    $("input[data-qwer]").focusout(function () {

        if ($.trim($(this).val()).length == 0) {

            var defaultText = $(this).attr("data-qwer");
            $(this).val(defaultText);
        }


    });

    

});

$.ajaxRequest = function (Requrl, Reqdata, SuccessCallback) {
   
    $.ajax({
        type: "post",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: Reqdata,
        url: "/" + Requrl,
        success: SuccessCallback

    });

}
/// wait for response and then continues
$.ajaxRequestSync = function (Requrl, Reqdata, SuccessCallback) {
    $.ajax({
        type: "post",
        async: false,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: Reqdata,
        url: "/" + Requrl,
        success: SuccessCallback
    });

}

