﻿$(document).ready(function() {
    if ($('.slideshow').length > 0)
    {
        $('.slideshow').each(function() {
            currentSlideshow = $(this);
            currentSlideshowParent = currentSlideshow.parent();
            currentSlideshow.cycle({
                fx: 'scrollHorz',
				next: currentSlideshowParent.children('.nextbutton'),
				prev: currentSlideshowParent.children('.prevbutton'),
                speed: 500,
				prevNextClick: function(isNext, zeroBasedSlideIndex, slideElement) {
				    currentSlideshow.cycle('pause');
					        },
		        before: function(currSlideElement, nextSlideElement, options, forwardFlag) {
				
		        }
	        });
		    currentSlideshow.cycle('pause');
        });
    }
});
