window.addEvent('domready', function() {
    var scroll = new Fx.Scroll('company_wrap', {
        wait: false,
        duration: 350,
        offset: {'x': 0, 'y': 0},
        transition: Fx.Transitions.Quad.easeInOut
    });
		
    var pos = 0;	
    var scrolls = $$('.section');

    $$('.section-controls').each(function(section , i) {
        if(i < scrolls.length) {
            section.addEvent('click', function(event) {
                event = new Event(event).stop();
                scroll.toElement(scrolls[i].id);
                $$('.section-controls').each(function(sec, j) {
                    sec.removeClass('on');
		});
                section.addClass('on');
                pos = i;
            });		    
        }
    });						
    new SmoothScroll();
});
