﻿$(document).ready(function () {
    $('a.people').click(function () {
        var $id = $(this).parent().children("input[id*='hdnPersonId']");
        var $nodeId = $("input[id*='hdnCurrentNodeId']");

        var webServiceInput = { "id": $id.val(), "nodeId": $nodeId.val() };
        var jsonStr = JSON.stringify(webServiceInput);
        $.ajax({
            type: 'POST',
            async: false,
            url: '/Services/ArtisService.svc/GetPersonDetails',
            data: jsonStr,
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            success: function (res) {
                if (res.d != "") {
                    $("div#people").html(res.d);
                }
            }
        });

        return false;
    });

    $('a.people').hover(function () {
        playArtisSound(this, $('input[id$=hdnCommentSoundText]').val());
    }, function () {
        hideNextDiv(this);
    });    
});

