//THIS FUNCTION SOLVES THE PROBLEM WITH NAME.DLL
//DON'T DELETE!!!!
function ProcessImn() {

}

/* This part defines the sIFR stuff */
$().ready(function(){
	if(typeof sIFR == "function"){
											
		// Titrailles - H1 ----------------------------------------
		contentArea_h1=named({
						sSelector:"#contentArea h1",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(contentArea_h1);
		
		// Titrailles - H2 ----------------------------------------
		contentArea_h2=named({
						sSelector:"#contentArea h2",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(contentArea_h2);
		
		// Titrailles - H3 ----------------------------------------
		contentArea_h3=named({
						sSelector:"#contentArea h3",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(contentArea_h3);
		
		// Titrailles - H4 ----------------------------------------
		contentArea_h4=named({
						sSelector:"#contentArea h4",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(contentArea_h4);
		
		// Titrailles - H5 ----------------------------------------
		contentArea_h5=named({
						sSelector:"#contentArea h5",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(contentArea_h5);
		
		// Titrailles - H6 ----------------------------------------
		contentArea_h6=named({
						sSelector:"#contentArea h6",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(contentArea_h6);
		
		// Titrailles - sitetitre ----------------------------------------
		sitetitre=named({
						sSelector:".sitetitre",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0,
						nPaddingLeft:20,
						nPaddingRight:20,
						nPaddingBottom:0
					});
		sIFR.replaceElement(sitetitre);
		
		// Titrailles - home_txtvert ----------------------------------------
		home_txtvert=named({
						sSelector:".home_txtvert",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(home_txtvert);

		// Titrailles - home_txtblanc ----------------------------------------
		home_txtblanc=named({
						sSelector:".home_txtblanc",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#FFFFFF",
						sLinkColor:"#FFFFFF",
						sBgColor:"#FFFFFF",
						sHoverColor:"#000000",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(home_txtblanc);
		
		// Titrailles - sitemap_h3 ----------------------------------------
		sitemap_h3=named({
						sSelector:".sitemap h3",
						sFlashSrc:"/asset/js/vagRounded.swf",
						sColor:"#ff7200",
						sLinkColor:"#ff7200",
						sBgColor:"#FFFFFF",
						sHoverColor:"#ff7200",
						sFlashVars:"textalign=left",
						sWmode: "transparent",
						nPaddingTop:0, 
						nPaddingBottom:0
					});
		sIFR.replaceElement(sitemap_h3);
		
	};	
								
});


/* improving accessibility adding hover/focus capabilities to IE6 buttons */
$().ready(function(){	
	if($.browser.msie){	
		$("button").focus(function(){
								   	$(this).addClass("hover")}
						).blur(function(){
									$(this).removeClass("hover")
						}).hover(	function(){
								   	$(this).addClass("hover")},
							function(){
									$(this).removeClass("hover")}
						 )							
	}
							
});

/* initialize the Ajax handler */
$().ready(function(){
	Adecco.init();
	//Adecco.dynamicInputText();
	//Adecco.footerDropDownLinks();
	//Adecco.faqPanelsInit();
	//Adecco.miniPanelsInit();
});




Adecco={
	
	//used by the firstPage / lastPage buttons	
	currentPage:1,		
	pagesCount:0,
	sortBy:null,
	newsCollection:null,
	currentNews:-1,
	rotatorHandler:null,
	
	init:function(){			
            
		$(document.body).addClass("hasJs");
			
	}
}


//main navMenu
$().ready(function(){

	/*
	$("#primaryNav li a").add($("#primaryNav .subMenu li")).click(function(){
									  		var li=$(this.parentNode);
									  		if(li.hasClass("hover")){
												li.removeClass("hover");
											}else{
												li.addClass("hover");
											}
										});

	$("#primaryNav li").add($("#primaryNav .subMenu li")).focus(function(){$(this).addClass("hover")});
	$("#primaryNav li").add($("#primaryNav .subMenu li")).blur(function(){$(this).removeClass("hover")});
	
	$("#primaryNav ul li").add($("#primaryNav ul li .subMenu li")).hover(
		function(){$(this).addClass("hover")},
		function(){$(this).removeClass("hover")}
	);
   
	$("#primaryNav .subMenu .subMenu").each(function(){
													 
 		$(this.parentNode.parentNode).addClass("hasChild");
	 
	});
	*/
	
	/*
	$("#primaryNav li .subMenu li a").mouseover(function(){
		$("#primaryNav li span a").css('background-position', 'left bottom');
		$("#primaryNav li span a").css('color', '#FFF');
	});
	$("#primaryNav li .subMenu li a").mouseout(function(){
		// $("#primaryNav li span a").css('background-position', 'top bottom');
		// $("#primaryNav li span a").css('color', 'none');
	});
	*/
	
	// Corrections du menu principal pour IE6 !!!!!!!!!!!!!!!!!!!!!!!!
	if(navigator.appName == "Microsoft Internet Explorer") {


		$("#primaryNav li").mouseover(function(){
				$(this).children().css('display', 'block');
				$(this).css('background-position', 'left bottom');
		});
		$("#primaryNav li").mouseout(function(){
				$("#primaryNav li .subMenu").css('display', 'none');
		});
		
		$("#primaryNav li .subMenu").mouseover(function(){
				//alert('fuck');
				$(this).parent("li").children("span").children("a").css('background-position', 'left bottom');
				$(this).parent("li").children("span").children("a").css('color', '#FFFFFF');
		});
		$("#primaryNav li .subMenu").mouseout(function(){
				//alert('fuck');
				$(this).parent("li").children("span").children("a").css('background-position', 'left top');
				$(this).parent("li").children("span").children("a").css('color', '#625959');
		});
	
		$("#primaryNav li.selected .subMenu").mouseover(function(){
				//alert('fuck');
				$(this).parent("li").children("span").children("a").css('background-position', 'left bottom');
				$(this).parent("li").children("span").children("a").css('color', '#FFFFFF');
		});
		$("#primaryNav li.selected .subMenu").mouseout(function(){
				//alert('fuck');
				$(this).parent("li").children("span").children("a").css('background-position', 'left bottom');
				$(this).parent("li").children("span").children("a").css('color', '#FFFFFF');
		});
		
		$("#primaryNav li span a").mouseover(function(){
				$(this).css('background-position', 'left bottom');
				$(this).css('color', '#FFFFFF');
		});
		$("#primaryNav li span a").mouseout(function(){
				$(this).css('background-position', 'left top');
				$(this).css('color', '#625959');
		});
		
		$("#primaryNav li.selected span a").mouseover(function(){
				$(this).css('background-position', 'left bottom');
				$(this).css('color', '#FFFFFF');
		});
		$("#primaryNav li.selected span a").mouseout(function(){
				$(this).css('background-position', 'left bottom');
				$(this).css('color', '#FFFFFF');
		});
		
	}
	
});