//recherche
$(document).ready(function() {
	
	
	$("#filterOptions").hide();
	
	$("#search_sort").click(function() {
		
		$("#filterOptions").toggle('slow');
	
	});
	
	$("#filterOptions li a").click(function() {
		
				
			$("#filterOptions").toggle();
	
	});
	
});



//quicksand
$(document).ready(function() {
  // get the action filter option item on page load
  var $filterType = $('#filterOptions option.active ').attr('class');

  // get and assign the ourHolder element to the
  // $holder varible for use later
  var $holder = $('ul.ourHolder');

  // clone all items within the pre-assigned $holder element
  var $data = $holder.clone();

  // attempt to call Quicksand when a filter option
  // item is clicked
  $('#filterOptions li a').click(function(e) {
    // reset the active class on all the buttons
    $('#filterOptions li').removeClass('active');

    // assign the class of the clicked filter option
    // element to our $filterType variable
    var $filterType = $(this).attr('class');
    $(this).parent().addClass('active');
    if ($filterType == 'all') {
      // assign all li items to the $filteredData var when
      // the 'All' filter option is clicked
      var $filteredData = $data.find('li');
    }
    else {
      // find all li elements that have our required $filterType
      // values for the data-type element
      var $filteredData = $data.find('li[data-type=' + $filterType + ']');
    }

    // call quicksand and assign transition parameters
    $holder.quicksand($filteredData, {
      duration: 800,
      easing: 'easeInOutQuad',
      adjustHeight: false
    });
    //return false;
  });
});



//prettyphoto
$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto({
							
			theme: 'pp_default', /* pp_default / light_rounded / dark_rounded / light_square / dark_square / facebook */
			social_tools: false
	
	
	});
	
});


//Diaporama
// SPEED: In milliseconds - how long the transition should take.
// TYPE: Type of slideshow: 'sequence', 'random' or 'random_start'
// CONTAINERHEIGHT: The height of the div that is calling the innerfade method.


$(document).ready(function(){
    
    $('#header_block').innerfade({
        speed: 3000,
        timeout: 4500,
        type: 'sequence',
        containerheight: '300px'
    });

});
