$.noConflict();




			jQuery(document).ready(function(){
				jQuery('.catalog-product-view .side-droit, .catalog-category-view #colonne_gauche').containedStickyScroll();
				jQuery(".bientot").tooltip({ effect: 'slide', offset: [10,20], relative:true});
				jQuery(".bientot2").tooltip({ effect: 'slide', offset: [95,180], relative:true});
			
				//Examples of how to assign the ColorBox event to elements
				jQuery("a[rel='album']").colorbox();
				var currentYear = (new Date).getFullYear();
				jQuery(".year").text( (new Date).getFullYear() );
				jQuery("#navigation_secondaire ul li:last").css('border-right','0px');
				jQuery("#navigation_secondaire ul li:last").css('padding-right','0px');
				jQuery("#centre_connexion ul li:last").css('border-right','0px');
				jQuery("#bas_bas_header ul li.princ:last").css('padding','18px 0px 0 25px;');
				jQuery("#bas_bas_header ul li.princ:last").css('background','none');
				jQuery("#navigation_categorie ul li:first").css('margin-top','15px');
				jQuery("#navigation_categorie li:last").css('margin-bottom','15px');
				jQuery("#navigation_categorie li:last").css('border-bottom','0px');
				jQuery(".lum-gauche ul li:last").css('border-bottom','0px');
				jQuery(".lum-centre ul li:last").css('border-bottom','0px');
				jQuery(".lum-droit ul li:last").css('border-bottom','0px');
				jQuery("#navigation_categorie ul li ul li a:last").css('margin-bottom','15px');
				jQuery("#vedettes img:first").css('margin-right','12px');
				//jQuery("div#meilleurs_vendeurs ul li:last").last().css('margin-right', '0px');
				jQuery("div#grille_produits ul li:last-child").css('margin-right', '0px');
				jQuery('div#grille_produits ul.liste-categorie li:nth-child(4n)').addClass('dernier').show();
				jQuery("div#grille_produits div#parts ul li:last-child").css('margin-right', '16px'); 
				jQuery("div#grille_produits ul:last").css('border-bottom', '0px'); 
				jQuery("div#gauche_photo li:last").last().css('margin-right', '0px');
				jQuery("ul#topnav ul:last").last().css('background', 'none');
				jQuery(".ul-autre li:last").last().css('border-right', '0');
				
				jQuery('ul.sub').hide(); 
				jQuery("#form1").validationEngine();
				
				jQuery(function(){
jQuery('h3.manufacturier-1').click(function() {
	if(!jQuery('h3.manufacturier-1').hasClass("open"))
        {
            jQuery('h3.manufacturier-1').css('background-position','left -15px');
            jQuery('h3.manufacturier-1').addClass("open");
        } else {
            jQuery('h3.manufacturier-1').css('background-position','left top');
            jQuery('h3.manufacturier-1').removeClass("open");
        }            
        jQuery('p.desc-toggle').slideToggle();
});
});
				
				jQuery("#project-slider-wrap").jCarouselLite({
		btnNext: "#next",
		btnPrev: "#back",
		circular: true,
		easing: "easeInOutQuad",
		speed: 900
	});
	
	jQuery("#project-slider-related").jCarouselLite2({
		btnNext: "#next",
		btnPrev: "#back",
		circular: true,
		easing: "easeInOutQuad",
		speed: 900
	});
				
				jQuery('.text-courriel').each(function() {
    var default_value = this.value;
    jQuery(this).focus(function() {
        if(this.value == default_value) {
            this.value = '';
        }
    });
    jQuery(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
        }
    });
});
				
				function megaHoverOver(){
		jQuery(this).find(".sub").stop().fadeTo('fast', 1).show();
			
		//Calculate width of all ul's
		(function($) { 
			jQuery.fn.calcSubWidth = function() {
				rowWidth = 0;
				//Calculate row
				jQuery(this).find("ul").each(function() {					
					rowWidth += $(this).width(); 
				});	
			};
		})(jQuery); 
		
		if ( jQuery(this).find(".row").length > 0 ) { //If row exists...
			var biggestRow = 0;	
			//Calculate each row
			jQuery(this).find(".row").each(function() {							   
				$(this).calcSubWidth();
				//Find biggest row
				if(rowWidth > biggestRow) {
					biggestRow = rowWidth;
				}
			});
			//Set width
			jQuery(this).find(".sub").css({'width' :biggestRow});
			jQuery(this).find(".row:last").css({'margin':'0'});
			
		} else { //If row does not exist...
			
			jQuery(this).calcSubWidth();
			//Set Width
			jQuery(this).find(".sub").css({'width' : rowWidth});
			
		}
	}
	
	function megaHoverOut(){ 
	  jQuery(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  jQuery(this).hide(); 
	  });
	}


	var config = {    
		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 100, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 500, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};

	jQuery("ul#topnav li .sub").css({'opacity':'0'});
	jQuery("ul#topnav li").hoverIntent(config);

				
			});


jQuery(function(){
	jQuery('li.categorie_titre > a').click(function() {
		
	//Hide (Collapse) the toggle containers on load
	jQuery('li.categorie_titre > a').removeClass("active");
	jQuery("ul.sub").slideUp(); 

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	
		jQuery(this).next("ul.sub").slideToggle('slow');
		jQuery(this).addClass("active");
		return false; //Prevent the browser jump to the link anchor
		
});
});



			
			
//$(function(){
	//$('li.categorie_titre > a').click(function() {
//	$(this).parent().addClass('active');
//	$(this).next("ul.sub").slideToggle();  
//});
//});

jQuery(function() {
    jQuery('#slideshow').before('<div id="nav" class="nav">').cycle({
    fx:     'fade',
    speed:  '1500',
    timeout: '7000',
	pager:  '#nav'

});
		   });	
//		   window.onscroll = function()
//{
//    if( window.XMLHttpRequest ) {
//        if (document.documentElement.scrollTop > 198 || self.pageYOffset > 264) {
//            jQuery('.catalog-category-view #colonne_gauche').css('position','fixed');
//            jQuery('.catalog-category-view #colonne_gauche').css('top','18px');
//			jQuery('.catalog-product-view .side-droit').css('top','18px');
//			jQuery('.catalog-product-view .side-droit').css('margin-left','776px');
//			 jQuery('.catalog-product-view .side-droit').css('position','fixed');
//            jQuery('.catalog-product-view .side-droit').css('top','18px');
//			jQuery('.catalog-product-view .side-droit').css('margin-left','776px');
 //       } else if (document.documentElement.scrollTop < 198 || self.pageYOffset < 264) {
   //         jQuery('.catalog-category-view #colonne_gauche').css('position','absolute');
     //       jQuery('.catalog-category-view #colonne_gauche').css('top','0px');
		//	jQuery('.catalog-category-view #colonne_contenu').css('float','right');
			//jQuery('.catalog-product-view .side-droit').css('position','absolute');
            //jQuery('.catalog-product-view .side-droit').css('top','0px');
			//jQuery('.catalog-product-view .side-droit').css('margin-left','776px');
			
			
		
        //}
    //}
//}

 



