Subversion Repositories eFlore/Applications.cel-consultation

Rev

Rev 2 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 aurelien 1
function initialiserElementsPliables() {
2
 
3
 
4
	$('.conteneur_image_deplie').addClass('conteneur_image');
5
	$('.conteneur_image').removeClass('conteneur_image_deplie');
6
 
7
	$('.image_information').addClass('image_information_pliable');
8
 
9
	$('.lien_pliage_invisible').removeClass('lien_pliage_invisible');
10
	$('.pliage h4').addClass('lien_pliage');
11
 
12
	$('.pliage dl').hide();
13
 
14
	$('.pliage').bind('click', function() {
15
 
16
		$(this).children('h4').toggleClass('lien_pliage_deplie');
17
		$(this).children('dl').slideToggle();
18
		return false;
19
	});
20
}
21
 
22
function reparerLiensDD() {
23
 
24
	$('.image_information a').bind('click', function() {
25
 
26
		window.location = $(this).attr('href');
27
		return false;
28
	});
29
 
30
}
31
 
32
function initialiserZoom() {
33
 
34
	$('a.lien_voir_image').fancybox({
35
		'autoDimension'		:	true,
36
		'showCloseButton'	:	true,
37
		'showNavArrows'		:	true,
38
		'titlePosition'  	:	'inside',
39
		'transitionIn'		:	'fade',
40
		'transitionOut'		:	'elastic',
41
		'cyclic'			:	true,
42
	});
43
 
44
}
45
 
46
function initialiserLazyLoading() {
47
	$("img").lazyload();
48
}
49
 
3 aurelien 50
function initialiserPanneauRechercheAvancee() {
51
 
52
	$("#afficher_cacher_aide").bind('click', function() {
53
 
54
		if($("#ref-rech-opt").is(':visible')) {
55
			$('#ref-rech-opt').slideUp('slow', function() {
56
				$("#afficher_cacher_aide").html("Afficher l'aide")
57
			});
58
		} else {
59
			$('#ref-rech-opt').slideDown('slow', function() {
60
				$("#afficher_cacher_aide").html("Cacher l'aide");
61
			});
62
		}
63
	});
64
 
65
	$("#ref-rech-opt").hide();
66
}
67
 
2 aurelien 68
$(document).ready(function() {
69
	reparerLiensDD();
70
	initialiserZoom();
71
	initialiserElementsPliables();
3 aurelien 72
	initialiserPanneauRechercheAvancee();
2 aurelien 73
	initialiserLazyLoading();
74
});