$(document).ready(function(){ 

		
	// Si jS activé on enleve les class de l imageflow
	$('#myImageFlow').removeClass();
	$('#myImageFlow').addClass('imageflow');

	/*
	===================
	Tabs
	=================== 
	*/
	/* Page Home */
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
		
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
		
		
	/* Page Search */
	<!-- Produit -->
	//Default Action 
	$(".search .pagenavi").show();
	
	$(".search .pagenavi#produits > a:first").addClass("active");
	$(".search .pagenavi#actualite > a:first").addClass("active");	
	
	$(".search .produits .contentProd").not(":first").hide();
	$(".search .actualite .contentProd").not(":first").hide();

	$(".search .pagenavi a").click(function() {
		$parent	=	$(this).parent().attr("id");
		//console.log($parent);
		
		$(".search .pagenavi#"+$parent+" a").removeClass("active");
		$(this).addClass("active");
		$(".search ."+$parent+" .contentProd").hide();
		var activeTab = $(this).attr("href");
		$(activeTab).fadeIn();
		return false;
	});

	/*
	===================
	Detecteur de navigateur
	=================== 
	*/

	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,version,total,thestring;
	
	if (checkIt('konqueror'))
	{
		browser = "Konqueror";
		OS = "Linux";
	}
	else if (checkIt('safari')) browser = "Safari"
	else if (checkIt('omniweb')) browser = "OmniWeb"
	else if (checkIt('opera')) browser = "Opera"
	else if (checkIt('webtv')) browser = "WebTV";
	else if (checkIt('icab')) browser = "iCab"
	else if (checkIt('msie')) browser = "Internet Explorer"
	else if (!checkIt('compatible'))
	{
		browser = "Netscape Navigator"
		version = detect.charAt(8);
	}
	else browser = "An unknown browser";
	
	function checkIt(string)
	{
		place = detect.indexOf(string) + 1;
		thestring = string;
		return place;
	}
	
		if (browser != "Internet Explorer")
	{
		// JQUERY CORNER
		$('#menu, .content, .box, .formulaire input, .formulaire textarea').corner('10px');
		$('.pagenavi a,.pagenavi .current,.pagenavi .active').corner('5px');
		$('.tab_container').corner('bottom 5px');
		$('ul.tabs li').corner('top 5px');
		//$("#menu li li:last").corner('bottom 10px');
	}
	
	
	

});
