jQuery(document).ready(function() {

    jQuery(".top-link-cart").mouseover(function()
	{
        jQuery("#checkout-cart-top").toggle();
		jQuery(this).addClass("actif");
	}).mouseout(function()
	{
		jQuery("#checkout-cart-top").toggle();
		jQuery(this).removeClass("actif");
	});
	jQuery("#checkout-cart-top").mouseover(function()
	{
		jQuery("#checkout-cart-top").css("display","block")
		jQuery(".top-link-cart").addClass("actif");
	}).mouseout(function()
	{
		jQuery(this).toggle();
		jQuery(".top-link-cart").removeClass("actif");
	});

	if (jQuery('#lofslidecontent45').attr('id') == 'lofslidecontent45') {
		// slider home
	    var buttons = { previous:jQuery('#lofslidecontent45 .lof-previous') ,
							next:jQuery('#lofslidecontent45 .lof-next') };
							
		$obj = jQuery('#lofslidecontent45').lofJSidernews( { interval : 4000,
												direction		: 'opacitys',	
											 	easing			: 'easeInOutExpo',
												duration		: 3000,
												auto		 	: true,
												maxItemDisplay  : 4,
												navPosition     : 'horizontal', // horizontal
												navigatorHeight : 62,
												navigatorWidth  : 168,
												mainWidth       : 660,
												buttons			: buttons} );
			
		jQuery(".bt-navigator").click(function()
		{
			if (jQuery(".bt-navigator").hasClass("ouvert") ) {
				jQuery(".lof-navigator-wapper").animate({ 
					bottom: -69
			  	}, 700 );
			  	jQuery(this).removeClass("ouvert");
			  	return false;
			}
		
			jQuery(".lof-navigator-wapper").animate({ 
				bottom: 0
			}, 700 );
			jQuery(this).addClass("ouvert");
		});
		
		/*jQuery(".lof-navigator-wapper li").click(function()
		{		
			jQuery(".lof-navigator-wapper").animate({ 
				bottom: -69
			}, 700 );
			jQuery(".bt-navigator").removeClass("ouvert");
		});	*/	
	}
});

/**
* 
*/    
function addQty(sens, id)
{
    var qty = parseInt(document.getElementById(id).value);
    if(sens == 'more') {
       qty = qty + 1; 
    }
    else {
       qty = qty - 1;
       if(qty <= 1) {
           qty = 1;
       }
    }
    document.getElementById(id).value = qty;
    $("checkout-cart-form").submit();
}
