$(document).ready(function() {
	$('.blocPDV p').css({display:'none'});
	$('.blocPDV').css({cursor:'pointer'}).hover(function(){$('.blocPDV p').slideToggle('fast');});
	
	$('#blocFamily, .short_product').css({cursor:'pointer'}).click( function() { 
		     window.location.href = $(this).find('a').attr('href');
		    return false;
		    } );
		
		
	$('#main .diapoPopup2').each(function(){
		var url = $(this).attr('href');
		url = url.replace(url,url+'-popup');
		$(this).attr('href',url);
	});



	
	// var blockWidth2 = 0;
	// 	var nbThumb = $('.short_product').length;
	// 	for (var i=1 ; i< nbThumb ; i++) {
	// 		var prodWidth = $('.short_product').width();
	// 		var blockWidth = blockWidth2 + prodWidth;
	// 		blockWidth2 = blockWidth;
	// 		$('.blocks').width(blockWidth2);
	// 	}
	
	//$('#contents').height($('#conteneur').height());
	if ($('#leftbar').height() > $('#conteneur').height()) {	
	$('#contents').height($('#leftbar').height());
	}
	

	
	$("a.diapoPopup").fancybox({
				'width'				: 600,
				'height'			: 450,		
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe',
				'scrolling'			: 'no'
			});
	
			$("a.diapoPopup2").fancybox({
						'width'				: 800,
						'height'			: 560,		
						'autoScale'			: false,
						'transitionIn'		: 'none',
						'transitionOut'		: 'none',
						'type'				: 'iframe',
						'scrolling'			: 'no'
					});
	
	
});
