main.prototype.drag = function(data) {
var drag = this.obj;
drag.onmousedown = function(e) {
var self = this;
e = mj().getEvent(e);
drag.style.position = 'absolute';
var coords = mj().getCoords(self);
var shiftX = e.pageX - coords.left;
var shiftY = e.pageY - coords.top;
document.onmousemove = function(e) {
if(data['move']) data['move'](); /////ПРОБЛЕМА ТУТ //////
drag.style.left = e.pageX - shiftX + 'px';
drag.style.top = e.pageY - shiftY + 'px';
};
document.onmouseup = function() {
drag.style.cursor = 'default';
document.onmousemove = document.onmousemove = document.onmouseup = document.ondragstart = document.body.onselectstart = null;
};
};
drag.ondragstart = function() { return false; };
}