function mycarousel_initCallback(carousel){

    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
 
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
 
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};


$(document).ready(function() {
	$("a.fancybox").fancybox();
	$('.slideshow').cycle({ cleartypeNoBg: true, fx: 'fade', pause: true, speed: 2000, timeout: 5000 });
	$('#carousel').jcarousel({
		scroll: 1,
		auto: 3,
        wrap: 'last',
        initCallback: mycarousel_initCallback
	});	
	
	faq = {
		init : function() {
			$('div.faq .answer').not(':first').slideToggle('fast');
			$('div.faq .question').click(function() { faq.toggle(this) });
		},
		
		toggle : function(elt) {
			$(elt).toggleClass('active');
			$(elt).siblings('.answer').slideToggle('fast');
		}
	}
	 
	$(function() { 
		faq.init();
	});
	
});

