{*
* Man Carousel v1.0
* @author kik-off.com <info@kik-off.com>
*}
<!-- MODULE Man Carousel -->
{if isset($mancarousel_items) && $mancarousel_items}
<script type="text/javascript">
{literal}
$(document).ready(function(){
	$("#mancarousel").carouFredSel({
		debug : false,
		circular : {/literal}{$mancarousel['circular']}{literal},
	    infinite : {/literal}{$mancarousel['infinite']}{literal},
	    align : "center",
		{/literal}{if $mancarousel['responsive'] == 'true'}{literal}
		width : "100%",
		{/literal}{else}{literal}
		width : null,
		height : null,
		{/literal}{/if}{literal}
	    auto : {
    		play : {/literal}{$mancarousel['start']}{literal},
	    	timeoutDuration : {/literal}{$mancarousel['time']}{literal}
	    },
	    items : {
		    {/literal}{if $mancarousel['responsive'] == 'true'}{literal}
			visible : null,
			{/literal}{else}{literal}
			visible : {/literal}{$mancarousel['items']}{literal},
			{/literal}{/if}{literal}
			start : {/literal}{if $mancarousel['random'] == 'true'}'random'{else}0{/if}{literal},
			width : "{/literal}{$imageSize.width}{literal}",
			height : "{/literal}{$imageSize.height}{literal}"
		},
		scroll : {
			{/literal}{if $mancarousel['responsive'] == 'false'}{literal}
			items : {/literal}{$mancarousel['items']}{literal},
			{/literal}{/if}{literal}
			fx : "{/literal}{$mancarousel['fx']}{literal}",
			duration : {/literal}{$mancarousel['fx_time']}{literal},
			pauseOnHover : {/literal}{$mancarousel['mouseover_pause']}{literal}
		},
		prev : {
			button : "#mancarousel_prev",
			key : "left"
		},
		next : {
			button : "#mancarousel_next",
			key : "right"
		}
	}, {
		wrapper : {
		    element : "div",
		    classname : "mancarousel_wrapper"
	    },
	    classnames : {
		    selected : "selected",
		    hidden : "hidden",
		    disabled : "disabled",
		    paused : "paused",
		    stopped : "stopped"
	    }
    });
});
{/literal}
</script>
<div class="clearfix_mancarousel"></div>
<div class="mancarousel_slider{if $mancarousel['responsive'] == 'true'} mancarousel_responsive{/if}">
	<div id="mancarousel">
		{foreach $mancarousel_items as $item}
		    <a href="{$link->getmanufacturerLink($item.id_manufacturer, $item.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$item.name|escape:'htmlall':'UTF-8'}">
				<img src="{$img_manu_dir}{$item.id_manufacturer|escape:'htmlall':'UTF-8'}-{$mancarousel['type']}.jpg" alt="{$item.name|escape:'htmlall':'UTF-8'}" width="{$imageSize.width}" height="{$imageSize.height}" />
			</a>
		{/foreach}
	</div>
	<div class="clearfix_mancarousel"></div>
	<a class="prev" id="mancarousel_prev" href="#" style="top: {math equation="height / division + px" height=$imageSize.height px=8 division=2}px;"><span>{l s='prev' mod='mancarousel'}</span></a>
	<a class="next" id="mancarousel_next" href="#" style="top: {math equation="height / division + px" height=$imageSize.height px=8 division=2}px;"><span>{l s='next' mod='mancarousel'}</span></a>
</div>
{/if}
<!-- /MODULE Man Carousel -->