var tpMenu = new Class({
	options:{
		duration: 400
	},
	initialize: function(mainId, options){
		this.setOptions(options);
		this.MainObj = $(mainId);
		this.getSubs();
		this.makeEv();
	},
	getSubs: function(){
		this.Subs = this.MainObj.getElements('a');
		this.Fx = new Array();
	},
	makeEv: function(){
		var $this = this;
		this.Subs.each(function(item,i){
			item.id = 'linkAnchor_'+i;
			$this.Fx[i] = new Fx.Style(item.id,'background-position',{duration: $this.options.duration});
			if (item.hasClass('active')==false) {
				item.addEvents({
					'mouseenter': function(){
						$this.Fx[i].stop();
						$this.Fx[i].start('0px 0px', '0px -39px')
					},
					'mouseleave': function(){
						$this.Fx[i].stop();
						$this.Fx[i].start('0px -39px', '0px 0px')
					}
				})
			}
		})
	}
						
});
tpMenu.implement(new Options);
