You can reduce your js like this
$("#div1,#div2,#div3,#div4").draggable({
revert: true,
start: function (event, ui) {
$("#imagetoshow").fadeIn();
},
stop: function (event, ui) {
$("#imagetoshow").hide();
}
});
Or you can use classes instead of id in your div and call this class in the js