function progressbar(step, of, elm){
	this.elm = elm
	this.bar = false;
	this.meter = false;
	this.steps = of;
	this.step = step;
	this.progress = '0%';
	this.getprogress();
	if($(this.elm).length){
		this.init();
	}
	
	return this;
}
progressbar.prototype.init = function(step){

        var d = $(this.elm + '> div');
	if(step){this.setprogress(step)};
	
	d.css('width', this.progress);
	
}
progressbar.prototype.getprogress = function(){
	this.progress = parseInt(100/this.steps*this.step) + '%';
	return this.progress;
}
progressbar.prototype.setprogress = function(step){
	this.step = step;
	return this.getprogress();
}

