$j("document").ready(function ()
    {
        $j(".delete-comment").each(function ()
        {
            $j(this).click(function (event)
            {
                var id = $j(event.target).attr("rel");
                if (confirm("Удалить комментарий?"))
                {
                    $j.ajax({
                        type: 'POST',
                        url: '/comment/delete/',
                        data: {
                            'id': id
                        },
                        async: false,
                        success: function (response)
                        {
                            location.href = location.href;
                        }
                    });
                    setTimeout(function()
                    		{
                    	location.href = location.href;
                    		},2000);
                }
            });
        });
        $j(".reply-comment").each(function ()
        {
            $j(this).click(function (event)
            {
                var id = $j(event.target).attr("rel");
                $j("#reply-comment-form-" + id).toggle();
            });
        });
    });
