o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1349474076.5012648¹: @value"*{I" class:EFI"BundledAsset;FI"logical_path;FI"web-app/helpers.js;FI" pathname;FI"a/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/web-app/helpers.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-10-05T18:14:04-03:00;FI" length;FiF I" digest;F"%160c3ed20a13ed8c4dc92a71400139c6I" source;FI"F (function() { this.detectLanguage = function() { var language; language = window.navigator.userLanguage || window.navigator.language; return language = language.toLowerCase().replace('-', '').replace('_', ''); }; this.getMousePos = function(event) { var cur_x, cur_y, touch; if (TOUCH_SUPPORT) { touch = event.originalEvent.touches[0] || event.originalEvent.changedTouches[0]; cur_x = touch.pageX; cur_y = touch.pageY; } else { cur_x = event.clientX; cur_y = event.clientY; } return { x: cur_x, y: cur_y }; }; this.distanceFrom = function(x, y, x0, y0) { return Math.sqrt((x -= x0) * x + (y -= y0) * y); }; this.buildParameters = function(_additional_parameters) { if (_additional_parameters == null) { _additional_parameters = {}; } return _.extend(_additional_parameters, { _t: _t, i18n: i18n, _p: _p }); }; this.debug = function(text) { if (!enable_debug) { return; } return console.log(text); }; String.prototype.capitalize = function() { return this.replace(/(^|\s)([a-z])/g, function(m, p1, p2) { return p1 + p2.toUpperCase(); }); }; this._callback_xdr = function() { app.ajax = app._xdr_frame.contentWindow.jQuery.ajax; return app._features['xdr'] = true; }; this._features_check = function() { debug('Waiting featured to be loaded...'); if (_.indexOf(_.values(this.app._features), false) !== -1) { return; } if (this.app._features_checker_interval) { clearInterval(this.app._features_checker_interval); } this.app._features_checker_interval = null; debug('All featured loaded'); _.each(this.app._routers, function(index) { return new index; }); if (this.app.initialize_backbone_history && Backbone.history) { debug('BackBone History Detected'); return Backbone.history.start({ pushState: true, root: this.app.root }); } }; this.run_webapp = function(run_routes) { if (run_routes == null) { run_routes = false; } debug('Running Application'); if (app_domain && enable_ajax_on_subdomain) { this.app.APP_DOMAIN = app_domain; document.domain = this.app.APP_DOMAIN; } if (this.app.API_IFRAME) { debug('Requested API calls inside