﻿function customAjax(options) {
    $.ajax({ url: options.url,
        data: (options.contentType != null && options.contentType == 'application/json') ? 
            options.data
            : jQuery.extend(options.data, { isAjax: true, random_param: Math.random() }),
        success: options.success,
        type: ((options.type == null) ? 'GET': options.type),
        error: options.error,
        complete: options.complete,
        async: ((options.async == null) ? true : options.async),
        contentType: ((options.contentType == null) ? 'application/x-www-form-urlencoded' : options.contentType)
    });
}
