/**
 * Simply not for you ;)
 *
 * Licensed under the GPLv3 license - http://gnu.org/licenses/gpl-3.0.html
 * @author Sepehr Lajevardi - http://sepehr.ws/
 * @version 0.1
 * @requires jQuery
 */
 
 function CoffeeSteam(coffeeSteam, frameSpeed){
	this.animationId;
	this.frameSpeed = frameSpeed; 
	this.sceneSpeed = this.frameSpeed + 200; //frameSpeed * frameCount + offset.
	this.$steam = $(coffeeSteam);
	
	this.startAnimation = function(){ 
		this.$steam.animate(
			{bottom: '143px', opacity: 0}, 
			this.frameSpeed,
			function(){ //position reset
				$(this).css({bottom: '88px', height: '48px', opacity: 1});
			}
		);  
		return this;
	}
	
	this.action = function(){
		if(!jQuery.browser.msie)						
			this.animationId = window.setInterval(function(that){that.startAnimation();}, this.sceneSpeed, this);
		return this;
	}
}