var Site = new Class({
	options: {
		scrollFX: {
			duration: 750,
			transition: Fx.Transitions.Sine.easeOut
		},
		
		accordionFX: {
			duration: 350,
			transition: Fx.Transitions.Sine.easeOut,
			alwaysHide: true
		},
		
		validateFX: {
			duration: 750,
			wait: false	
		}
	},
	
	initialize: function(options) {
		this.setOptions(options);
		this.details = $$('.details-btn');
		this.projinfo = $$('.proj-info');
		this.news = $$('.news-btn');
		this.newsinfo = $$('.news-info');
		this.hideElements = [$('flashContent')];
		this.boxElements = $$('a.boxed');
		this.validateForm = $('contactForm');
		
		this.plugins();
		this.validator();
		
	},
	
	plugins: function() {
		new SmoothScroll(this.options.scrollFX);
		new Accordion(this.details, this.projinfo, this.options.accordionFX);
		new Accordion(this.news, this.newsinfo, this.options.accordionFX);
	},
	
	validator: function() {
		var that = this;
		var validator = new FormValidator(this.validateForm, {
 			onElementValidate: function(isValid, field) {
 				field.fx = field.fx || field.effect('border-color', that.options.validateFX);
 				field.fx.start(!isValid ? '#2a2a2a' : '#f00', isValid ? '#2a2a2a' : '#f00');
			}
 		});	
	}
});
Site.implement(new Options);