/*
 * author: Thomas Meyer
 *
 * JS Source fuer den Slider der die Top 3 Produkte in einem Slider durchfahren laesst
 */
jQuery(document).ready(function(){
    var RandomStartIndex = Math.floor(Math.random() * 2.9);
    jQuery('#bestSellCarousel').jcarousel({
        start: RandomStartIndex,
        scroll: 1,
       	auto: 6,
        wrap: 'circular',
        setupCallback: function(){
            jQuery(function($){
                $(".reflected").reflect({});
				$("img.reflect").reflect({});
            });
        },
        animationStepCallback: function(){
            jQuery(function($){
                $(".reflected").reflect({});
            });
        }
    });
    // @todo
    // TODO nur bei mehr als 3 bildern, keine auto, mit buttons
    // jcarouselVerticalDetail
    // jcarouselDetailVerticalItem
    if (jQuery(".productImageSmallBox").length > 3) {
        jQuery('#jcarouselVerticalDetail').jcarousel({
            scroll: 1,
            vertical: true,
            wrap: 'circular',
            setupCallback: function(){
            },
            animationStepCallback: function(){
            }
        });
    }
});

