(function ($, $S) { //$ jQuery //$S window.localStorage //Variables Declaration var $board = $('#board'), //Board where the Posticks are sticked Postick, //Singleton Object containing the Functions to work with the LocalStorage len = 0, //Length of Objects in the LocalStorage currentNotes = '', //Storage the html construction of the posticks o; //Actual Postick data in the localStorage //Manage the Posticks in the Local Storage //Each postick is saved in the localStorage as an Object Postick = { add: function (obj) { obj.id = $S.length; $S.setItem(obj.id, JSON.stringify(obj)); }, retrive: function (id) { return JSON.parse($S.getItem(id)); }, remove: function (id) { $S.removeItem(id); }, removeAll: function () { $S.clear(); } }; //If exist any postick, Create it/them len = $S.length; if (len) { for (var i = 0; i < len; i++) { //Create all posticks saved in localStorage var key = $S.key(i); o = Postick.retrive(key); currentNotes += '