/************************************************* init.js ************************************************/
$(document).ready(function(){

jQuery.noConflict();

/* navigigation */
function ouvre(){
	jQuery(this).addClass("ouverture");
	}
function ferme(){
	jQuery(this).removeClass("ouverture");
	}
function ouvreFerme(){
jQuery('#navigation ul.nv1 ul').removeClass("ouverture");
jQuery(this).addClass("ouverture");
};
jQuery("#navigation ul.nv1").hover(ouvre,ferme);
jQuery("#navigation ul.nv1 ul").click(ouvreFerme);

/* roll */
jQuery(".roll").hover(function(){jQuery(this).attr("src", jQuery(this).attr("src").split('_0').join('_1'))}, function(){jQuery(this).attr("src", jQuery(this).attr("src").split('_1').join('_0'))}); 
/**/
/* init accordeon */
jQuery(".accordeon").accordeon();

/*Gestion des popup d'aide */
jQuery('#credits').nyroModal({width: '458', height: '262'});

/*Gestion blocs onglets */
jQuery(".bloc_onglet").css('display','none');
jQuery(".bloc_onglet.ong0").css('display','block');
jQuery(".onglet img").click(function () {
jQuery(".bloc_onglet").css('display','none');
jQuery('.onglet img').each(function(i){jQuery(this).attr("actif","ong"+i).attr("src",jQuery(this).attr("actif","ong"+i).attr("src").split('_1').join('_0'));});
var titi=".bloc_onglet."+jQuery(this).attr("actif");
jQuery(this).attr("src", jQuery(this).attr("src").split('_0').join('_1'));
jQuery(titi).css('display','block');
});


});

/* gestion registration by country */
function affichePages(){
 if(jQuery("#csr").is(":selected"))
 	{
	//alert('../pages/transversal/italy.php');
	window.location.href='/pages/transversal/czech_slovak_reps.php';
	}
 if(jQuery("#denmark").is(":selected"))
 	{
	//alert('../pages/transversal/italy.php');
	window.location.href='/pages/transversal/denmark.php';
	}
 if(jQuery("#france").is(":selected"))
 	{
	//alert('../pages/transversal/italy.php');
	window.location.href='/pages/transversal/france.php';
	}
 if(jQuery("#germany").is(":selected"))
 	{
	window.location.href='/pages/transversal/germany.php';
	}
 if(jQuery("#greece").is(":selected"))
 	{
	window.location.href='/pages/transversal/greece.php';
	}
 if(jQuery("#iceland").is(":selected"))
 	{
	window.location.href='/pages/transversal/iceland.php';
	}
 if(jQuery("#italy").is(":selected"))
 	{
	window.location.href='/pages/transversal/italy.php';
	}
 if(jQuery("#norway").is(":selected"))
 	{
	window.location.href='/pages/transversal/norway.php';
	}
 if(jQuery("#poland").is(":selected"))
 	{
	window.location.href='/pages/transversal/poland.php';
	}
 if(jQuery("#portugal").is(":selected"))
 	{
	window.location.href='/pages/transversal/portugal.php';
	}
 if(jQuery("#spain").is(":selected"))
 	{
	window.location.href='/pages/transversal/spain.php';
	}
 if(jQuery("#turkey").is(":selected"))
 	{
	window.location.href='/pages/transversal/turkey.php';
	}
 if(jQuery("#unitedkingdom").is(":selected"))
 	{
	window.location.href='/pages/transversal/unitedkingdom.php';
	}
 
}


// pour foncton prototype //
//$('id').style.display = 'block';
