Cufon.replace('h1, #main-heading, h2, h3:not(.no), .font');
$(document).ready(function(){
	
	$.datepicker.setDefaults({
		dateFormat: 'dd/mm/yy',
		showOptions: { direction: 'up' }
	});
	
	/*
	('#datepicker').datepicker('option', $.extend({showMonthAfterYear: false},
			$.datepicker.regional[$(this).val()]));
	*/
	
	$('.datepicker').datepicker($.datepicker.regional['fr']);
	
	$(function(){
		$('#nav').superMenu();
		$('.cycle').cycle();
		$('.pic-nav').each(function() {
			var size = $(this).attr('class').match(/size-([0-9]+)/)[1];
			$(this).scrollable({size: size});
		});
	});
	
	$('a.external, a[rel="external"]').external();
	
	$('a.highslide').click(function(e){ e.preventDefault(); });
	$('a.highslide').each(function() { 
	    this.onclick = function() { 
	      var group = $(this).attr('rel');	
	      return hs.expand(this, {
	    	  slideshowGroup: group,
	    	  transitions: ['expand', 'crossfade']
	      }); 
	    }; 
	 });
});

/*
 * Highslide
 */

hs.showCredits = false;
hs.graphicsDir = '/assets/highslide/graphics/';
hs.outlineType = 'custom';
hs.fadeInOut = true;
hs.allowMultipleInstances = false;
hs.captionEval = 'this.a.title';
hs.align = 'center';

var galleryDefaults = {
		interval: 5000,
		repeat: true,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: '0.75',
			position: 'bottom center',
			offsetX: '0',
			offsetY: '-10',
			hideOnMouseOut: true
		}
};
