﻿(function ($) {
    WebClick = function (action, dto) {
        $.ajax({
            type: 'POST',
            url: action,
            dataType: 'json',
            data: dto,
            success: function (data) { },
            error: function (req, status, error) { }
        });
    }

    SelectModuleDisplay = function(inid) {
        var id = lookUpById(inid);
        var div = "#" + (id);
        var arr = id.split("_");
        var contId = arr[1];
        var content = "#" + contId;
        
        
        _gaq.push(['_trackEvent', 'Menu', 'Solutions', id]);
        _gaq.push(['_trackPageview', contId]);

        $(div).addClass("selected-item");
        $(div).children(".img").addClass("img-selected");
        $(div).children(".info").children("h4").addClass("selectedh4");      //SELECTED ARROW
        $(content).removeClass("DisplayNone");
        $(content).addClass("DisplayBlock");
    }
    lookUpById = function(id) {
        if (id == 0) {
            return "Display_StrategyManagement"
        } else if (id == 1) {
            return "Display_PortfolioManagement"
        } else if (id == 2) {
            return "Display_ProjectManagement"
        } else if (id == 3) {
            return "Display_ReportingAndDashboards"
        } else if (id == 4) {
            return "Display_Collaboration"
        } else {
            return "Display_StrategyManagement"
        }

    }

    checkMarks = function(inString) {
        var str = inString;
        if (inString == undefined) {
            str = 0;
        } else {
            str = 1;
        }
        return str;
    }
})(jQuery);
