jQuery(document).ready(function(){	
	// Slider
	jQuery("#slider").easySlider({
		auto:	true,
		continuous:	true,
		speed:	1500,
		pause:	12000,
		numeric:	true
	});
  // !Gallery
  jQuery("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
  // picto PDF
  jQuery("a[href$='.pdf']").addClass('pdflink');
  // !Equalheight
  jQuery('.equalheight').equalHeights();
  jQuery('.equalheight2').equalHeights();
	// !Accordion
  jQuery('ul.accordion a.heading').click(function() {
        jQuery(this).css('outline', 'none');
        if (jQuery(this).parent().hasClass('current')) {
            jQuery(this).siblings('ul').slideUp('slow',
            function() {
                jQuery(this).parent().removeClass('current');
            });
        } else {
            jQuery('ul.accordion li.current ul').slideUp('slow',
            function() {
                jQuery(this).parent().removeClass('current');
            });
            jQuery(this).siblings('ul').slideToggle('slow',
            function() {
                jQuery(this).parent().toggleClass('current');
            });
        }
        return false;
    });
	jQuery('ul.accordion a.activeclass').parent('li').parent('ul').show().parent('li').addClass('current');
  
  
  // GA
  $('a[href$=".pdf"]').click(function(e) {
  	e.preventDefault();
	var $this = $(this);
	_gaq.push(['_trackEvent', 'Téléchargement', 'PDF', $this.attr('href'), $this.text()]);
	window.open($this.attr('href'));
  });
});
