var _gaq = _gaq || [];
_gaq.push([ '_setAccount', 'UA-17773735-1' ]);
_gaq.push([ '_trackPageview' ]);

(function() {
	var ga = document.createElement('script');
	ga.type = 'text/javascript';
	ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl'
			: 'http://www')
			+ '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0];
	s.parentNode.insertBefore(ga, s);
})();

function affichageProgressif() {
	var p = document.getElementsByTagName('p');
	for (var i = 0; i < p.length; i++) {
		var currentElement = p[i];
		if (currentElement.className == "invisible") {
			currentElement.className = "visible";
		}
	}
}

function waitAndPrint() {
	window.setTimeout(affichageProgressif, 1000);
}

$(document).ready(waitAndPrint);

function loadGalleria() {
	Galleria.loadTheme('ressources/js/galleria/themes/classic/galleria.classic.js');
	// run galleria and add some options
	$('#galleria').galleria({
		image_crop : true,
		data_config : function(img) {
			return {
				title : $(img).parent().next('strong').html(),
				description : $(img).parent().next('strong').next().html()
			};
		}
	});
}

