(function () { var ns = $.namespace('pskl.utils'); ns.FileUtils = { readFile : function (file, callback) { var reader = new FileReader(); reader.onload = function(event){ callback(event.target.result); }; reader.readAsDataURL(file); } }; })();