/// class PD.Web.Type

PD.Type = Class.extend({
});

PD.Type.isObject = function (value) {
    return value !== null
        && (typeof value === "function" || typeof value === "object")
};

PD.Type.isFunction = function (value) {
    return value && {}.toString.call(value) === '[object Function]';
};

PD.Type.isArray = function (value) {
    return value && {}.toString.call(value) === '[object Array]';
};

PD.Type.isString = function (value) {
    return typeof value == 'string' || value instanceof String;
};

PD.Type.isGuid = function (value) {
    return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value);
};

PD.Type.isEmptyGuid = function (value) {
    return value === "00000000-0000-0000-0000-000000000000";
};

PD.Type.getType = function (value) {

    if (value == null) {
        return null;
    }

    var pieces = value.split("."),
        source = window,
        i = 0;

    for (i = 0; i < pieces.length; i++) {
        source = source[pieces[i]];
    }

    return source ? source : null;

};

PD.Type.guid = function () {
    return uuid.v4();
};