{define_derivative name='carousel' width='300' height='350' min_width='350'} {php} global $page, $template; $template->assign('cat_name', $page['category']['name']); {/php} {footer_script}{literal} $(document).ready(function () { var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)), start; if (isTouch==true){ start=""; }else{ start="onStart"; }; $("div.carousel").smoothDivScroll({ autoScrollingMode: start, touchScrolling: true, autoScrollingStep:5, mousewheelScrolling: "allDirections", manualContinuousScrolling: true, }); $("div.carousel").bind("mouseover", function() { $(this).smoothDivScroll("stopAutoScrolling"); }).bind("mouseout", function() { $(this).smoothDivScroll("startAutoScrolling"); }); $('.fancybox').fancybox({ helpers : { title : { type : 'over' }, }, afterLoad: function() { $("div.carousel").smoothDivScroll("stopAutoScrolling"); }, afterClose: function() { $("div.carousel").smoothDivScroll("startAutoScrolling"); } }); }); {/literal}{/footer_script}