// JavaScript Document

/*////// INIT drag and drop  /////*/
$(function() {
	$("div.draggable").draggable();
});

/*//////  Init modal  /////*/
$(document).ready(function(){
	//Examples of how to assign the ColorBox event to elements
	$("a.modal-amie").colorbox();
	$("a.modal-mentions").colorbox();
    $("a.modal-contact").colorbox();
    $("a.modal-collection").colorbox();
    $("a.modal-edition").colorbox();
    $("a.modal-atelier").colorbox();
    $("a.modal-compte").colorbox();
	$("a.modal-reminder").colorbox();
	$("a#autoload-reminder").colorbox({open:true});
	$("a.epingle").colorbox();
});

/*/////  Init News  /////*/
$(document).ready(
	function()
	{
		$("#news").newsTicker();
	}
);

// Fonction pour afficher le carousel
function showCarousel(){
	
	// Init carousel lite
	$(".liste-carousselle").jCarouselLite({
		btnNext: ".fleche-droite",
		btnPrev: ".fleche-gauche",
		//auto: 4000,
		speed: 300,
		mouseWheel: true,
		scroll: 1,
		visible: 3,
		circular: true
	});	
	// Init carousel lite
	$(".liste-carousselle-2").jCarouselLite({
		btnNext: ".fleche-droite-2",
		btnPrev: ".fleche-gauche-2",
		//auto: 4000,
		speed: 300,
		mouseWheel: true,
		scroll: 1,
		visible: 3,
		circular: true
	});	
}

// Fonction pour montrer le cadre d'ajout au panier
function showAjoutPanier(){
	$('#ajout-panier').show(); 
	$('#ajout-panier').fadeOut(5000);
}

// Fonction pour decter ie6
function detectBrowser()
{
	var browser=navigator.appName;
	var b_version=navigator.appVersion;
	var version=parseFloat(b_version);
	if ((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (version>=5)){
		
	}
	else{
		document.location='index-IE6.php';
	}
}
