﻿var Global = {
    //BasePath : '/NrccuaCmsSite/',
    //MvcBasePath: 'http://localhost:51983/' //51983
    BasePath : 'http://www.nrccua.org/cms/',
    MvcBasePath: 'http://www.nrccua.org/'
};

var NetInsight =
{
    LogPage: function () {
        var url  = Global.MvcBasePath + 'Account/NetInsightCms';
        $.post(url, null, null);
    }
};

var GlobalCssClasses = {
    MessageBoxError: 'messageboxerror',
    MessageBoxOk: 'messageboxok',
    Messagebox: 'messagebox'
};

var AjaxDataTypes = {
    XML: 'xml', //Treat the response as an XML document that can be processed via jQuery. 
    HTML: 'html', //Treat the response as HTML (plain text); included script tags are evaluated. 
    SCRIPT: 'script', //Evaluates the response as JavaScript and evaluates it. 
    JSON: 'json' //Evaluates the response as JSON and sends a JavaScript Object to the success callback
};

var AjaxMethodType = {
    POST: 'POST',
    GET: 'GET',
    PUT: 'PUT',
    DELETE: 'DELETE'
};

var AjaxContentType = {
    AppJSON: "application/json; charset=utf-8"
}

function sniffRedirectToLogin() {
    var redirectUrl = $.url.param("ReturnUrl");
    if (redirectUrl != null && redirectUrl != "") {
        $('#msgboxSignInHomeLeftColumn').fadeTo(200, 0.1, function () {
            $(this).html("Sign in is required to gain access...").addClass('messageboxerror').fadeTo(900, 1);
        });
    }
}

function setupSessionTimeout() {
    sessionTimeOut.checkAJAXURL = Global.BasePath + 'NrccuaService.asmx/CheckSession';
    sessionTimeOut.LogoutUrl = Global.MvcBasePath + 'Account/LogOff';
}

//for checkboxlist and radiobuttnlist lables
$(document).ready(function () {
    $(".label tr td").find("label").css('padding-left', '5px');
});

