
window.onload = function () {
    return stickyHeaders.load($(".followMeBar"));
}
$(function () {
   
    view = new viewModel();
    view.LoginControl();
    if (view.loginInfo() === undefined) {
        ko.applyBindings(view, document.getElementById("binding"));
        view.Navigation("Login");
        view.IsLoading(false);
        return false;
    }
    else {
        view.Run();
        ko.applyBindings(view, document.getElementById("binding"));
        //setInterval(function () {
        //    view.LoadNotifications();
        //}, 10000);
        var notifications = JSON.parse(app.LocalStorage.Read("notifications"))
        if (notifications != null) {
            view.SignalRNotifications(ko.mapping.fromJS(notifications)());
        }
        view.GetAppConfig();
    }
    //view.showSearch(true);
   
});
