function include(fileName){	document.write("<script type='text/javascript' src='"+fileName+"'></script>" );}include('/include/colorbox/js/jquery.colorbox.js');var flg;var color;var open;var shutter;$(document).ready(function(){	//FOOTER COLORBOX	$('#banner_space .register_popup').colorbox();	open = 0;	/*** NAVIGATION ***/	$("#menu-nav #menu_items .item").eq(0).css("color", "#fff");	$("#menu-nav #menu_items .item").eq(1).css("color", "#1f9bda");	$("#menu-nav #menu_items .item").eq(2).css("color", "#88b200");	$("#menu-nav #menu_items .item").eq(3).css("color", "#f50060");	//$("#menu-nav #menu_items .item").eq(3).css("color", "#de6c00");	$("#menu-nav #menu_items .item").eq(4).css("color", "#e7df1f");		$("#menu_border_left").eq(0).css("border-top", "1px solid #fff");	$("#menu_border_right").eq(0).css("border-top", "1px solid #adbe00");		$(".border_color").eq(0).css("background", "#fff");	$(".border_color").eq(1).css("background", "#1f9bda");	$(".border_color").eq(2).css("background", "#88b200");	$(".border_color").eq(3).css("background", "#f50060");	//$(".border_color").eq(3).css("background", "#de6c00");	$(".border_color").eq(4).css("background", "#e7df1f");		$("#header_shutter2").css("border-bottom", "1px solid #1f9bda");	/*$("#header_shutters #header_shutter2").css("border-bottom", "1px solid #88b200");	$("#header_shutters #header_shutter3").css("border-bottom", "1px solid #f50060");	$("#header_shutters #header_shutter4").css("border-bottom", "1px solid #de6c00");*/		//$("menu .header_shut").css("top", "-400px");		//Hover produits	$("#menu .header_shut_item").hover(function(){		$(this).children().children().children().attr("src", $(this).children().children().children().attr("src").substr(0, $(this).children().children().children().attr("src").length - 4)+"_over.png");	}, function(){		$(this).children().children().children().attr("src", $(this).children().children().children().attr("src").substr(0, $(this).children().children().children().attr("src").length - 9)+".png");	});		//Menu	$("#menu-nav #menu_items .onglet").mousemove(function()	{		// if ($(this).index() == 1)			 // open = 0;		if (open == 1 && shutter != $(this).index()) {			$("#menu .header_shut").stop().animate({top: "-400px"}, {duration: 200, 				complete: function() {					$("#menu #header_shutter"+ parseInt(shutter +1)).stop().animate({top: "50px"}, {duration: 200});					open = 0;				}			});					}		else {			$("#menu #header_shutter"+ parseInt($(this).index() +1)).stop().animate({top: "50px"}, {duration: 200});			open = 1;		}		shutter = $(this).index();			});		$("#header_zone").mouseleave(function(){		open = 0;		$("#menu .header_shut").stop().animate({top: "-400px"}, 200);	});		$("#menu-nav #menu_items .item").mouseenter(function(){		$("#menu-nav #menu_items .item").eq(0).css("color", "#fff");		$("#menu-nav #menu_items .item").eq(1).css("color", "#1f9bda");		$("#menu-nav #menu_items .item").eq(2).css("color", "#88b200");		$("#menu-nav #menu_items .item").eq(3).css("color", "#f50060");		//$("#menu-nav #menu_items .item").eq(3).css("color", "#de6c00");		$("#menu-nav #menu_items .item").eq(4).css("color", "#e7df1f");		color = $(this).css("color");		$("#menu-nav #menu_items .item").css("color", "#656565");		$(this).css("color", color);	});		$("#menu").mouseleave(function(){		$("#menu-nav #menu_items .item").eq(0).css("color", "#fff");		$("#menu-nav #menu_items .item").eq(1).css("color", "#1f9bda");		$("#menu-nav #menu_items .item").eq(2).css("color", "#88b200");		$("#menu-nav #menu_items .item").eq(3).css("color", "#f50060");		//$("#menu-nav #menu_items .item").eq(3).css("color", "#de6c00");		$("#menu-nav #menu_items .item").eq(4).css("color", "#e7df1f");	});			//Country flags	$("#country_flag img").css("cursor", "pointer");	if ($("#value_id_language").val() == 1)		$("#country_flag img").eq(0).attr("src", $("#country_flag img").eq(0).attr("src").substr(0, $("#country_flag img").eq(1).attr("src").length - 9) +".png").css("cursor", "default");	else		$("#country_flag img").eq(1).attr("src", $("#country_flag img").eq(1).attr("src").substr(0, $("#country_flag img").eq(1).attr("src").length - 9) +".png").css("cursor", "default");		$("#country_flag img").click(function(){		if ($("#value_id_language").val() != parseInt($(this).index() +1))		{			var id_language = parseInt($(this).index() +1);			$.ajax({				type: "POST",				url: "/pages/fo/ajax/switch_language.php",				data: "id_language="+parseInt($(this).index() +1),				success: function(res) {					if (id_language == 2)						document.location.href = "http://www.funai.es/"+res;					if (id_language == 1)						document.location.href = "http://www.funai.fr/"+res;				}			});		}			});		$("#country_flag img").css('cursor', 'default');	/*** SEARCH ***/		flg = 0;	$('#search_zone #search_content #search_content_item').css('left', '230px');	$('#search_field input').val("Search");		$('#search_zone #search_field input').change(function(){		if ($(this).val() == "") {			$('#search_zone #search_content #search_content_item').animate({left: '230px'}, 400);			$('#search_zone #search_field input').val("Search");		}	});		$("#header_loop").mouseenter(function(){		$('#search_zone #search_content #search_content_item').stop().animate({left: '35px'}, 400);	});		$('#search_zone #search_field input').focusin(function(){		flg = 1;		$(this).val('');	});		$('#search_zone #search_field input').focusout(function(){		if ($('#search_zone #search_field input').val() == "Search" || $(this).val() == "") {			flg = 0;			$('#search_zone #search_content #search_content_item').stop().animate({left: '230px'}, 400);			$('#search_zone #search_field input').val("Search");		}	});		$("#search_zone").mouseleave(function(){		if (flg == 0) {			$('#search_zone #search_content #search_content_item').stop().animate({left: '230px'}, 400);		}	});		/** Bannière **/		$("#banner_space #banner_band .banner_shutter .banner").css("bottom", "0px");	$("#banner_space #banner_band .banner_shutter .banner").eq(0).css("border-top", "1px solid #1f9bd9");	$("#banner_space #banner_band .banner_shutter .banner").eq(1).css("border-top", "1px solid #759903");	$("#banner_space #banner_band .banner_shutter .banner").eq(2).css("border-top", "1px solid #f70162");	$("#banner_space #banner_band .banner_shutter .banner").eq(3).css("border-top", "1px solid #e7de1f");		$("#banner_space #banner_band .banner").each(function(){		$(this).css('height', $(this).children().eq(1).height() + 20);	});		$("#banner_space #banner_band .banner").mouseenter(function(){		if ($(this).parent().index() == 0)			$("#banner_shutter"+ parseInt($(this).parent().index()+1) +" .banner .title").css("color", "#1f9bd9");		if ($(this).parent().index() == 1)			$("#banner_shutter"+ parseInt($(this).parent().index()+1) +" .banner .title").css("color", "#759903");		if ($(this).parent().index() == 2)			$("#banner_shutter"+ parseInt($(this).parent().index()+1) +" .banner .title").css("color", "#f70162");		if ($(this).parent().index() == 3)			$("#banner_shutter"+ parseInt($(this).parent().index()+1) +" .banner .title").css("color", "#e7de1f");		height = $(this).css("height");		height = parseInt(height.substr(0, height.length - 2));		$(this).stop().animate({top: "-"+ height});	});	$("#banner_space #banner_band .banner_shutter").mouseleave(function(){		$(this).children().eq(0).stop().animate({top: "0px"}, {duration:500, step:function() {				$("#banner_shutter"+ parseInt($(this).parent().index()+1) +" .banner .title").css("color", "#FFF");		}});	});});
