﻿

    $(function () {
        $(".Menu").buildMenu(
    {
        template: "/Components/mnnu.ashx",
        additionalData: "",
        menuWidth: 200,
        openOnRight: true,
        menuSelector: ".menuContainer",
        iconPath: "",
        hasImages: false,
        fadeInTime: 100,
        fadeOutTime: 300,
        adjustLeft: 2,
        minZindex: "auto",
        adjustTop: 10,
        opacity: .95,
        shadow: false,
        shadowColor: "#ccc",
        hoverIntent: 0,
        openOnClick: false,
        closeOnMouseOut: true,
        closeAfter: 1000,
        submenuHoverIntent: 200
    });



    });

    //this function get the id of the element that fires the context menu.
    function testForContextMenu(el) {
        if (!el) el = $.mbMenu.lastContextMenuEl;
        alert("the ID of the element is:   " + $(el).attr("id"));
    }

    function recallcMenu(el) {
        if (!el) el = $.mbMenu.lastContextMenuEl;
        var cmenu = +$(el).attr("cmenu");
        $(cmenu).remove();
    }



    function showMessage(msg) {
        var msgBox = $("<div>").addClass("msgBox");
        $("body").append(msgBox);
        msgBox.append("You click on: <br>" + msg);
        setTimeout(function () { msgBox.fadeOut(500, function () { msgBox.remove(); }) }, 3000)
    }

   

