{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} (function($) { $(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: {/literal}{$Slim.carousel_speed}{literal}, manualContinuousScrolling: true, mousewheelScrolling: "allDirections", }); $("div.carousel").bind("mouseover", function() { $(this).smoothDivScroll("stopAutoScrolling"); }).bind("mouseout", function() { $(this).smoothDivScroll("startAutoScrolling"); }); }); })(jQuery); {/literal}{/footer_script} {if (($Slim.style_slim)!=3)} {footer_script}{literal} (function($) { $(document).ready(function(){ $('.fancybox').fancybox({ helpers : { title : { type : 'over' }, }, afterLoad: function() { $("div.carousel").smoothDivScroll("stopAutoScrolling"); }, afterClose: function() { $("div.carousel").smoothDivScroll("startAutoScrolling"); } }); }); })(jQuery); {/literal}{/footer_script} {/if}