/*
 * Timeline version 1.0
 * Copyright (c) Matsukaze. All rights reserved.
 * @version 1.0
 * @author mach3
 * @require jQuery 1.4 or later
 */
var Timeline=function(a){this.config(a)};Timeline.prototype={EVENT_ENTER_FRAME:"enterFrame",option:{fps:30},tid:null,active:false,config:function(a){if(isNaN(a)){this.option=$.extend({},this.option,a)}else{this.option.fps=a}return this},start:function(){this.active=true;this._enterFrame();return this},_enterFrame:function(){if(this.active){$(this).trigger(this.EVENT_ENTER_FRAME);this.tid=setTimeout($.proxy(this._enterFrame,this),Math.floor(1000/this.option.fps))}},stop:function(){this.active=false;clearTimeout(this.tid);return this},bind:function(a,b){$(this).bind(a,b);return this},unbind:function(a,b){$(this).unbind(a,b);return this}};
