(function($) { UABBProgressBar = function( settings ) { this.settings = settings; this.animation_delay = settings.animation_delay; this.viewport_position = 90; this.animation_speed = settings.animation_speed; this.nodeClass = '.fl-node-' + settings.id; this._init(); }; UABBProgressBar.addCommas = function( n ){ var rgx = /(\d+)(\d{3})/; n += ''; x = n.split('.'); x1 = x[0]; x2 = x.length > 1 ? '.' + x[1] : ''; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; }; UABBProgressBar.prototype = { settings : {}, nodeClass : '', animation : '', animation_speed : '1000', animation_delay : 0, viewport_position : 90, _init: function() { if( typeof jQuery.fn.waypoint !== 'undefined' ) { $(this.nodeClass).waypoint({ offset: this.viewport_position + '%', handler: $.proxy( this._initProgressBar, this ) }); } }, /** * Initiate animation. * * @since 0.0.7 * @access private * @method _initProgressBar */ _initProgressBar: function() {