/**
 * @name Alcahyd.js
 * @author Boudchicha khaled - boudchicha.kh@gmail.com
 * @date Avril 01, 2010
 * @copyright (c) 2008,Alcahyd.com
 */
$(document).ready(function(){	
   $('.b1').lightBox();						   
   $('.b2').lightBox();						   
   $('.b3').lightBox();						   
   $('.b4').lightBox();						   
   $('.b5').lightBox();			
   $('.glry').lightBox();			
   $('.glry2').lightBox();			
   $('.prdglr').lightBox();			
   $('.lienconform').lightBox();			
   
	// This initialises carousels on the container elements specified, in this case, carousel1.
	$('#carousel1 img').css({display:'block'});
	$("#carousel1").CloudCarousel(		
		{
			xPos: 500,
			yPos: 110,
			reflHeight: 56,
			reflGap:2,			
			minScale:0.25,
			autoRotate : 'right',
			buttonLeft: $("#left-but"),
			buttonRight: $("#right-but"),
			altBox: $("#alt-text"),
			titleBox: $("#title-text")
		}
	);
	//menu
	$('.allmodels li a').click(function(){
		$('.selection p.clrslcted').removeClass().addClass('clrslcted cl6');		
		$('.selection li').html('<img src="images/produits/'+$(this).attr('id')+'g.jpg"  width="204" height="175"/>');
		$('.selection li').attr('id',$(this).attr('id'));
		$('.selection .modelname').html($(this).parent().children('p').html());
		return false;
	})

	$('.coloris a').click(function(){
		$('.selection p.clrslcted').removeClass().addClass('clrslcted '+$(this).attr('class'));			
		pro = $(this).attr('rel');
		$('.selection li').html('<img src="images/produits/'+$('.selection li').attr('id')+pro+'.jpg"  width="204" height="175"/>');
		
		return false;
	})
});
 
