﻿$(function () {
    var location = document.location.toString();
    $(".fnClsMenuLink").each(function () {
        var current_href = $(this).attr("href");
        if (current_href.length > 1) {
            if (location.indexOf(current_href) > 0) {
                $(this).addClass("Active");
                $(this).find("span").addClass("Active");
            }
        }
    });
    $(document).ajaxStart(function () {
        $("#loading").show();
        $("#loading").addClass("StatusBarHighlight");
    });
    $(document).ajaxStop(function () {
        $("#loading").hide();
        $("#loading").removeClass("StatusBarHighlight");
    });
    $(document).ajaxError(function (e, xhr, settings, exception) {
        Notify("Ajax error", xhr.statusText);
    });
});

//************************ Gritter Scripts**********************
function Notify(title, msg) {
    $.gritter.add({
        title: title,
        text: msg,
        sticky: false,
        time: ''
    });
    return false;
}
//~Gritter Scripts

