/*************************************TRIER****************************************************/
		/*	NE FONCTIONNE PAS SOUS IE6-7	
		$(document).ready(function(){
		$('#ActionPreparatoire').live('change', function(){
		document.location.href = $(this).val();
		});
		});*/
		
		/*onchange="document.location.href=this[this.selectedIndex].value;"*/
		
		
		/****************************** VERIF CONTENU DESIGNATION ARTICLE / COLIS *********************************/
		

	
		/******************************* COLORBOX **********************************/

		
	
			$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements
				$("a[rel='zoombox']").colorbox();
				$("a[rel='example1']").colorbox();
				$("a[rel='example2']").colorbox({transition:"fade"});
				$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
				$("a[rel='example4']").colorbox({slideshow:true});
				$(".example5").colorbox();
				$(".iframe").colorbox({iframe:true, innerWidth:630, innerHeight:400});
				$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
				$(".example8").colorbox({width:"50%", inline:true, href:"#paiement"});
				$(".example9").colorbox({
					onOpen:function(){ alert('onOpen: colorbox is about to open'); },
					onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
					onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
					onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
					onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
				});
				
				//Example of preserving a JavaScript event for inline calls.
				$("#click").click(function(){ 
					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});
			});
		
		
	
	/******************************* ZOOM **********************************/
	
	$(function() {
	var option = {
	
	zoomWidth: 350,
	zoomHeight: 350,
	position : 'right',
	xOffset :20,
	showEffect:'show',
	hideEffect:'fadeout',
	fadeoutSpeed: 'slow'
	}
	
	$(".jqzoom").jqzoom(option);});	
	
	/******************************* ONGLETS **********************************/
	
	$(document).ready(function(){
				$("#onglet_menu_view").facileTabs({targetElements:".bloc"});
				$("#onglet_menu_view2").facileTabs({targetElements:".bloc"});
			});
			
	/*TEST CONTENU ONGLET FacileTab*/
	$(document).ready(function(){

			var contenu1 = $.trim($("#onglet1").html());
			var contenu2 = $.trim($("#onglet2").html());
			var contenu3 = $.trim($("#onglet3").html());
			
			if (contenu1 == ""){
				$("#onglet1").remove();
				$("#liOnglet1").remove();
				$("#liOnglet2").addClass("selected");
				$("#liOnglet2").children().addClass("selected");
				$("#onglet2").css("display","block");
				}
				
			if (contenu2 == ""){
				$("#onglet2").remove();
				$("#liOnglet2").remove();
				}
								
				
			if (contenu1 == "" && contenu2 == ""){
				$("#onglet_content2").remove();
				$("#onglet_menu_view2").remove();
				
				}
			
	});
			
	/******************************* CAROUSEL **********************************/
		
	$(document).ready(function(){
				$("#onglet_content").tinycarousel();			
			});
					
	/******************************* COMPTE ARTICLE **********************************/

	
	function compterArticles() {
    if ($('#lbl_001_VueWebKey_CatalogueTheme_ArticleTousFils .PaginationBas table td:fist')[0]) {
        $('#NbArticles').innerHTML = $('#lbl_001_VueWebKey_CatalogueTheme_ArticleTousFils .PaginationBas table td:fist')[0].innerHTML;
    } else {
    if ($(".ListArticl_elmt").length > 0) $('#NbArticles').innerHTML = $(".ListArticl_elmt").length + " ARTICLE";
    if ($(".ListArticl_elmt").length > 1) $('#NbArticles').innerHTML += "S"; 
    }
	}
	
	/******************************* DEROULANT-BTN **********************************/

	
	$(document).ready(function(){
	
	$("#blocaction2").hover(function(){
	if($("#deroulant2").css("display")=="none")
	{
	$("#deroulant2").slideToggle();
	}
	});
	$("#blocaction2").hover(function(){
	},function(){
	if($("#deroulant2").css("display")=="block")
	{
	$("#deroulant2").slideToggle();
	}
	});
	});
	
	$(document).ready(function(){
	
	$("#blocaction").hover(function(){
	if($("#deroulant").css("display")=="none")
	{
	$("#deroulant").slideToggle();
	}
	});
	$("#blocaction").hover(function(){
	},function(){
	if($("#deroulant").css("display")=="block")
	{
	$("#deroulant").slideToggle();
	}
	});
	});
	
	/******************************* VOIR PANIER **********************************/
	$(document).ready(function(){
	
    $("#MNPanier").mouseenter(function () {
		$("#MP_detail").show("fast");
		});
	
		
	$("#panier").mouseleave(function () {
		$("#MP_detail").delay(2000).hide("normal");
		});
		
	});
		
	
	/*******************************INFOBULLE*********************************************/
	
	$(document).ready(function(){
	    		
	$(".TabDetailPrix").mouseover(function () {
	    $(this).css("display","none");
		});
		
	$(".TabDetailPrix").mouseout(function () {
		$(this).css("display","");
		});
		
		
	});
	
	/******************************* SCROLL **********************************/
	
     $(document).ready(function(){
            $("#myScroll").scrollSomething({
                scrollerWidth: 350,
                scrollerHeight: 90,
				scrollPrefix: "scroll_",
				itemsVisable: 4,
                itemsScrolling: 4, 
				scrollRewind : 60000,
                buttonPosition: "bottomRight",
                buttonSettings: "show"

            });
			
			var num_img = $("#myScroll > span").size();
			if(num_img == 1){ 
			$("#thumbs").css("display","none"); };
			
        });
    

	
  
		
   
		
		

