// JavaScript Document

$(function() {
	$('#foo0').carouFredSel();
	
	$('#foo1').carouFredSel({
		auto: {
			pauseOnHover: 'resume',
			onPauseStart: function( percentage, duration ) {
				$(this).trigger( 'configuration', ['width', function( value ) { 
					$('#timer1').stop().animate({
						width: value
					}, {
						duration: duration,
						easing: 'linear'
					});
				}]);
			},
			onPauseEnd: function( percentage, duration ) {
				$('#timer1').stop().width( 0 );
			},
			onPausePause: function( percentage, duration ) {
				$('#timer1').stop();
			}
		}
	});

	$('#foo2').carouFredSel({
		scroll: 2,
		prev: '#prev2',
		next: '#next2',
		pagination: "#pager2",
		auto: false
	});
	$('#foo3').carouFredSel({
		width: 360,
		height: "auto",
		next: '#next3',
		prev: '#prev3',
		auto: false
	});
	$('#foo4').carouFredSel({
		scroll: 1,
		next: '#next4',
		prev: '#prev4',
		auto: false
	});
});
