var Grid; exports.init = function() { var instances = []; this.$el = $(".grid"); this.$el.each(function() { instances.push(new Grid(this)); }); }; Grid = (function() { var __bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; function G(grid_element) { this.transform_html(grid_element); this.bind_mouse_events(); } G.prototype.transform_html = function(grid_element) { var fragment, el, el_images, el_input, $grid; // document fragment for the images fragment = document.createDocumentFragment(); // transform images html $grid = $(grid_element); $grid.find("li").not(":last-child").each(function() { var grid_piece = document.createElement("li"); grid_piece.innerHTML = this.innerHTML.replace("