
	var Section = {};
	
	Section.onReady = function() {
		this.initTestimonials();
		this.initCarousel();
	}
	
	Section.onLoad = function() {
		
	}
	
	Section.initTestimonials = function() {
		var testimonials = $('.testimonials .testimonial');
		var i = 0;
		setInterval( function() {
			$(testimonials[i]).fadeOut();
			i++;
			if( i >= testimonials.length )
				i = 0;
			$(testimonials[i]).fadeIn();
		}, 9000);
	};
	
	Section.initCarousel = function() {
		$(document).find( '.scrollable' ).each( function() {
			var $elm = $(this),
				api;
			
			$elm.scrollable({
				circular : $elm.hasClass( 'circular' ),
				vertical : $elm.hasClass( 'vertical' ),
				speed : 800
			});
				
			if ( $elm.hasClass( 'autoscroll' ) ) {
				console.log("autoscroll");
				$elm.autoscroll( { interval : 6000 } );
			}
			
			// $elm.navigator( { navi : '.carousel-pages' } );
			// api = $elm.data( 'scrollable' );
			// $( '.carousel-pages' ).hover( api.pause, api.resume );
		});
	}
	
	$( $.proxy( Section.onReady, Section ) );
	$(window).load( $.proxy( Section.onLoad, Section ) );


