something like:
$('#doc').click(function(e){
e.preventDefault()
e.stopImmediatePropagation() //charles ma is right about that, but stopPropagation isn't also needed
});
should do the job you could also bind more mouse events with replacing for: edit: add this in the feezing part
$('#doc').bind('click mousedown dblclick',function(e){
e.preventDefault()
e.stopImmediatePropagation()
});
and this in the unfreezing:
$('#doc').unbind();