$(document).ready(function(){
	$.featureList(
		$("#tabs li a"),
		$("#output li.Onglet"), {
		start_item : 0,
		transition_interval : 13000
		}
	);
	
	/*
		// Alternative
		$('#tabs li a').featureList({
			output			:	'#output li',
			start_item		:	0,
			transition_interval : 13000
		});
	*/
	
	$('.Nouvelles').cycle({
		fx: 'scrollUp',
		timeout: 6000, 
		delay: 2000,
		cleartypeNoBg: true
	});
	
        $('.MapHosannaPrintempsEte, .MapHosannaHiver').mobilymap({
                position: '370 670',
                caption: false,
                cookies: false
        });

        $('.MapNatisk').mobilymap({
                position: '75 500', 
                caption: false,
                cookies: false
        });
        
	$("#Video").fancybox({
		'padding'			: 0,
		'autoScale'			: false,
		'width'				: 800,
		'height'			: 487,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
	
	$("a[rel=Photos]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	$("a[rel=Hosanna]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	
	$("a[rel=Natisk]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
});

function switchMap(element){

	$('.MapHosannaPrintempsEte, .MapHosannaHiver').hide();
	element.fadeIn();

}

