
		$(document).ready(function() {

		
		
			$('form#msearch').jqTransform({imgPath:'js/transform/jqtransformplugin/img/'});
			
			
			
			$(".sb").hide();
		
//		$("#imagem").click(function(){
			

//			$(".sb").fadeIn(); 



//	});

$(".close_box").click(function(){
$(".sb").fadeOut(); 
$('.sb').css("margin-left",800);
});


////


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



	//$('#myslides').cycle({
	//	fit: 1
	//});
	
	//*$('#myslides').click(function(){
	
	//$('#myslides').cycle.transitions.scrollLeft();


//**});


/////
	
	
	$('#imagem').click(function()
{
if ($('.sb').is(':hidden'))
{
//$('.sb').slideDown('slow');
//$(".sb").fadeIn(); 
$('.sb').css("margin-left",-140);
$('.sb').fadeIn('slow', function() {
   //this.style.removeAttribute('filter');
});

}
else
{
//$('.sb').slideUp('slow');
$(".sb").fadeOut(); 
$('.sb').css("left",-1000);
}
});

//$('em.showhideme').hide();
/*	$('span.link_next').click(function()
{
if ($('em.showhideme').is(':hidden'))
{
//{
//$('.sb').slideDown('slow');
//$(".sb").fadeIn(); 
//$('.sb').css("left",470);
//$('.sb').fadeIn('slow', function() {
//$('span.text').slideDown('slow');
$('em.showhideme').animate({width: 'show'});
}
else
{
$('em.showhideme').animate({width: 'hide'});

}
   //this.style.removeAttribute('filter');
});*/

//}
//else
//{
//$('.sb').slideUp('slow');
//$(".sb").fadeOut(); 
//$('.sb').css("left",-1000);
//}
//});
			
			
			
			
			
			$('span.wanted').html("Votre choix");
			
					var optionsul = $.ajax({
					url: "recherche_ajax.php?firstul=1",
					async: false
					}).responseText;
					
					var optionsselect = $.ajax({
					url: "recherche_ajax.php?firstselect=1",
					async: false
					}).responseText;
			
			$('select#wanted').append(optionsul);
			$('ul.wanted').html(optionsselect);
			var $ul=$('ul.wanted');
			$('ul.wanted li a').click(function(){$('a.selected').removeClass('selected');$ul.hide();$(this).addClass('selected');$('span.wanted').html($(this).html());if ($('span.wanted').html().length>95)$('span.wanted strong').append('');$('select#wanted option').val($('ul.wanted li a.selected').attr('index')).attr('selected','selected');

			$(function(){
			var back=$('#wanted').val();
					$('span.periode').html("Votre choix");
					$('span.region').html("Votre choix");
					var optionsull = $.ajax({
					url: "recherche_ajax.php?secondul=1&before="+back,
					async: false
					}).responseText;
					
					
					//var back=$('#wanted :selected').text()
					var optionsselectt = $.ajax({
					url: "recherche_ajax.php?secondselect=1&before="+back,
					async: false
					}).responseText;
			$('select#periode').html(optionsull);

			$('ul.periode').html(optionsselectt);

			var $ul=$('ul.periode');

		
			$('ul.periode li a').click(function(){$('a.selected').removeClass('selected');$ul.hide();$(this).addClass('selected');$('span.periode').html($(this).html());$('select#periode option').val($('ul.periode li a.selected').attr('index')).attr('selected','selected');
			
			
			$(function(){
		
					var back=$('#wanted').val();
					var backk=$('#periode').val();
					//var bacm=$('#periode').text();
					var bacm=$('span.periode').html();
					$('#msearch').append("<input name='periodetext' type='hidden' value='"+bacm+"'/>");
					$('span.region').html("Votre choix");
					var optionsulll = $.ajax({
					url: "recherche_ajax.php?thirdul=1&beforee="+backk+"&first="+back,
					async: false
					}).responseText;
					
					
					var optionsselecttt = $.ajax({
					url: "recherche_ajax.php?thirdselect=1&beforee="+backk+"&first="+back,
					async: false
					}).responseText;
			$('select#region').html(optionsulll);
			$('ul.region').html(optionsselecttt);
			var $ul=$('ul.region');
			
			$('ul.region li a').click(function(){$('a.selected').removeClass('selected');$ul.hide();$(this).addClass('selected');$('span.region').html($(this).html());$('select#region option').val($('ul.region li a.selected').attr('index')).attr('selected','selected');
			
				
							$(function(){
			
					var optionsulll = $.ajax({
					url: "recherche_ajax.php?thirdul=1",
					async: false
					}).responseText;
					
					var backk=$('#periode').val();
					var optionsselecttt = $.ajax({
					url: "recherche_ajax.php?thirdselect=1&beforepl="+backk,
					async: false
					}).responseText;
			$('select#region2').html(optionsulll);
			$('ul.region2').html(optionsselecttt);
			var $ul=$('ul.region2');
			
			$('ul.region2 li a').click(function(){$('a.selected').removeClass('selected');$ul.hide();$(this).addClass('selected');$('span.region2').html($(this).html());$('select#region2 option').val($('ul.region2 li a.selected').attr('index')).attr('selected','selected');})
		
		
		});
				
			
			
			})
			
		
		});
			

			})
		
		});
			
			})
			

////


// Bloc connexion accés formateur

	$(".accesFormateur").hide();
			
	$('#submitAccesFormateur').click(function()
{
	$(".accesFormateur").show();
});
	
	$('#accesAuFormateur').click(function()
{
if ($('.accesFormateur').is(':hidden'))
{

$('.accesFormateur').css("margin-left",730);
$('.accesFormateur').fadeIn('slow', function() {
  
});

}
else
{

$(".accesFormateur").fadeOut(); 
$('.accesFormateur').css("margin-left",-730);
}
});



//////
/*
	$('#myslides').cycle({ 
    //fx: 'turnRight' 
	fx:     'fade', 
    speed:  'fast', 
	timeout: 0,
	next:   '#next2', 
    prev:   '#prev2' 
});
		*/
		});
		
	
