$(".item_container .item").each(function(i) {
this.init = function() {
this.box = $(this).parent();
$(this).attr("index", i).css({
position : "absolute",
left : this.box.offset().left,
top : this.box.offset().top
}).appendTo(".item_container");
this.drag();
};
this.init = function() {
this.box = $(this).parent();
$(this).attr("index", i).css({
position : "absolute",
left : this.box.offset().left,
top : this.box.offset().top
}).appendTo(".item_container");
this.drag();
};