/* Must function with Prototype */
jQuery.noConflict();

/* Create or extend CLASP object */
jQuery(document).ready(function($) {
    CLASP = $.extend(typeof AgencyQ == "object" ? CLASP : {}, {
        slideshow: function(id, pager, speed, pause, steps) {
            $('#' + id).cycle({
                fx: 'scrollLeft',
                easing: 'easeInOutQuad',
                speed: speed,
                timeout: pause,
                next: '#' + id + ' img',
                pager: '#' + pager,
                pause: true,
                autostop: (steps == 0 ? 0 : 1),
                autostopCount: steps + 1,
                cleartype: true,
                cleartypeNoBg: true,
                pagerAnchorBuilder: function(idx, slide) {
                    return '<li class="slideshow-nav-item"><a href="#">&bull;</a></li>';
                }
            });
        }
    });
});

