// JavaScript Document
// Tous les comportements hors Carousel (carousel.js)

// LabelInInput
(function() {	
    jQuery.fn.labelInInput = function(settings) {
		
		theSearchForm = this; //THE jquery object
		
		$(theSearchForm).children(".containLabel").css({
			position: "relative"
		});
		$(theSearchForm).children(".containLabel").children("label").css({
			position: "absolute",
			top: "5px",
			left: "4px"
		}).show();
		$(theSearchForm).children(".containLabel").children("input.text").focus( function() {
			$(this).prev("label").hide();
		});
		$(theSearchForm).children(".containLabel").children("input.text").blur( function() {
			if($(this).val()=="")$(this).prev("label").show();
		});
    };
})(jQuery);

// tabSystem
(function() {	
    jQuery.fn.tabSystem = function(settings) {
		
		theZone = this; //THE jquery object
		
		settings = jQuery.extend({
			tabClass: "tabs",
			contentClass: "onglet"
        }, settings);
		
		$("."+settings.contentClass).hide();
		$("#is_"+$(theZone).children("ul").children("li.active").attr("id")).show();
		$("."+settings.tabClass).click(function() {
			$("."+settings.tabClass).parent("li").removeClass("active");
			$(this).parent("li").addClass("active");
						
			$("."+settings.contentClass).hide();
			$("#is_"+$(this).parent("li").attr("id")).show();
			
			return false;
		});
    };
})(jQuery);



// displayProducts
(function() {	
    jQuery.fn.displayProducts = function(settings) {		
		
		$(this).hover(function() {
			$(this).children("span").css("visibility","visible");
		},function() {
			$(this).children("span").css("visibility","hidden");
		});
    };
})(jQuery);