//
//
//


var Page = new Class({
	options: {
		basePath:"/complastex.it/new/"
	},
	initialize:function(options) {
		$extend(this.options,options);
		this.pathString = window.location.pathname.replace(this.options.basePath,'');
		this.file = this.pathString.split("/").getLast();
		this.areaName = (this.file.split(".")[0].length>0) ? this.file.split(".")[0] : "index";		
	}
});

var page = new Page();

window.addEvent('domready',function() {

	$$('.tab_sector>li>a')
	.filter(function(a) {return (a.getParent('li').hasClass('selected') === false)})
	.each(function(a) {
		//alert('uh?');
		a.set('morph', {duration:200, transition:Fx.Transitions.Back.easeOut, link:'cancel'})
		.set('style','background-position','0 0')
		.set('events', {
			'mouseover': function() {
				this.morph({'background-position':'0px -29px','color':'#000'});
			},
			'mouseout': function() {
				this.morph({'background-position':'0 0','color':'#999'});
			}
		});
	});

	$$('.tab_sector>li.selected>a').addEvent('click', function() {this.blur(); return false; });

	$$('.banner_promo').setStyles({'opacity':.65})
	.set('events', {
		'mouseover': function() { this.fade(1) },
		'mouseout': function() { this.fade(.65) }
	})
	
	$$('input.submit').addEvent('click', function() {
		//this.set('readonly','readonly');
	});
	
});