var Site = new Class({
    initialize : function(){
        $$('.menu a').each(function(el){
            if(!el.hasClass('selected')) {
                var fx = new Fx.Tween(el, {property : 'color', wait : false, duration : 'short'});
                el.addEvents({
                    'mouseenter' : function(){
                        fx.start('#009f2d');
                    },
                    'mouseleave' : function(){
                        fx.start('#fff');
                    }
                });
            }
        });
        $$('.menu2 li a').each(function(el){
        	elP = el.getParent();
            if(!el.hasClass('selected')) {
                var fx3 = new Fx.Tween(el, {property : 'padding-bottom', wait : false, duration : 'short'});
                var fx4 = new Fx.Tween(elP,{property : 'padding-top', wait : false, duration : 'short'});
                el.addEvents({
                    'mouseenter' : function(){
                        fx3.start('14');
                        fx4.start('8');
                    },
                    'mouseleave' : function(){
                        fx3.start('10');
                        fx4.start('12');
                    }
                });
            }
        });           
     
     	if($('contactUs')){
     		this.contactUs();
     	} 
              
    },
    
    contactUs : function(){
        //add class validation
        $$('input[type=text][id!=email], textarea').addClass("validate['required']");
        $('email').addClass("validate['required','email']");
        
        //add formcheck
        new FormCheck('form-contact-us', {
            submitByAjax : false
        });
    }

});

window.addEvent('load', function(){
    new Site();
});























