Anwser:
$("#snaptarget").droppable({
accept: '#snaptarget > img, #divPrompt > img',
drop: function(event, ui) {
var id = ui.draggable.attr('id');
var top = ui.draggable.css('top');
var src = ui.draggable.attr('src');
var left = ui.draggable.css('left');
ui.draggable.remove();
$('#snaptarget').prepend('<img id="' + id + '" name="dropped" src="' + src + '" style="position:absolute;" onmouseover="javascript:showDiv(this);" onmouseout="javascript:setTimeout(function(){ removeDiv(' + id + '); },200);"/>');
$('#' + id).css({ "top" : top, "left" : left });
$('#' + id).draggable({ snap: true, revert: 'invalid', cursor: 'move', containment: 'document', scroll: false,
drag: function() {
$("div [name='divOptions']").remove();
},
});
}
});
showDiv = function(objCurrent){
var IdParent = $(objCurrent).closest("div").attr("id");
if ($.trim(IdParent) == "snaptarget"){
var Id = $(objCurrent).attr("id");
var leftPos = $(objCurrent).css("left");
var bottomPos = parseInt($(objCurrent).css("bottom")) - 20 + "px";
$('#snaptarget').prepend(
'<div id="divOpc' + Id + '" name="divOptions" onmouseover="javascript:bolOverride=true;">' +
'<div id="divMenu' + Id + '" name="divMenuInsert" onmouseover="javascript:bolOverride=true;">' +
'<img src="images/BotaoAdicionar.png" width="12" height="12" alt="Adicionar Roda Simples" onclick="addRodaSimples();" onmouseover="javascript:bolOverride=true;" onmouseout="javascript:bolOverride=false;removeDiv('+ Id + ');"/>' +
'</div>' +
'</div>'
);
$('#divOpc' + Id).css({"left" : leftPos, "bottom" : bottomPos, "width" : "10px", "height" : "10px", "border-color" : "#F0F", "position" : "absolute" });
}
}
removeDiv = function(objCurrent){
var IdParent = $(objCurrent).closest("div").attr("id");
if (($.trim(IdParent) == "snaptarget")&&(bolOverride==false)){
$("#divOpc" + $(objCurrent).attr('id')).remove();
}
}