function affMentions(url){ var adresse = url || "/mentions.php"; var fen = window.open(adresse,"Mentions","width=700,height=500,menubar=yes,status=no,resizable=no,location=no,toolbar=no,scrollbars=yes"); fen.focus(); } //Nous donne la position du scroll... function getPageScroll( ) { var xScroll, yScroll; if (self.pageYOffset) { // Some browser yScroll = self.pageYOffset; xScroll = self.pageXOffset; } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict yScroll = document.documentElement.scrollTop; xScroll = document.documentElement.scrollLeft; } else if (document.body) { // All other browsers yScroll = document.body.scrollTop; xScroll = document.body.scrollLeft; } var arrayPageScroll = {'xScroll':xScroll,'yScroll':yScroll}; return arrayPageScroll; } Shadowbox.init({ language: "fr", players: ['img', 'html', 'iframe', 'php'], modal: true, handleOversize: "drag" }); /** * Ouvre un ShadowBox avec : * URL : l'url de la page ou image à afficher * PARAMS : Query String pour l'adresse * TODO => passer la taille en paramètres... **/ function shadow_open(url, params, titre, w, h){ if (url == "" || url == undefined) { alert('Pas de page à afficher...'); return; } if (titre == undefined) { titre = ""; } reg = new RegExp('^[0-9]*$', 'g'); if (!reg.test(w)) { w = 700; } reg = new RegExp('^[0-9]*$', 'g'); if (!reg.test(h)) { h = 'auto'; } params += '&w='+w+'&h='+h; Shadowbox.open({ content: url+'?'+params, player: "iframe", title: titre, height: h, width: w }); } /* $(function(){ positionFooter(); function positionFooter(){ if($(document).height() > ($('#global').height() + $('#header').height() + $('#menu').height())){ $("#global").css({height:$(document).height()-$('#header').height()}) $(".aside").css({height:$(document).height()-$('#header').height()}) $("#footer").css({position: "absolute",bottom:0}) } } $(window) .resize(positionFooter) }); */ $(document).ready(function(){ /*changement de format dans les titres (contenus et aside)*/ $(".gabarit_14 .article:odd").addClass('odd'); $(".gabarit_14 .article:even").addClass('even'); $(".gabarit_14 .article") .addClass('biggerlink') .css({'cursor': 'pointer'}) .click(function(){ window.location = $(this).find('a').attr('href'); }) .hover( function(){$(this).addClass('hover')}, function(){$(this).removeClass('hover')} ); /*ajout des classes odd/even*/ $('.listRub li:odd').addClass('odd'); $('.aside .article h2').prepend(''); $('.titreRubrique, .titre_article, .actualites h3 ').each(function(){ var titre = $(this).html(); pattern = /\*(.+)\*/; if(matches = titre.match(pattern)){ titre = titre.replace(matches[0], ''+matches[1]+''); $(this).html(titre); } }); $(".actualites").carousel( { pagination: true } ); $("body:not(.home) .slideshow.paginate").parent().carousel({ pagination: true, loop: true, autoSlide: true, prevBtn:'
', nextBtn:'' }); $(".home .galerie .divArticleImgGauche").carousel( { prevBtn:'', nextBtn:'', dispItems: 3 } ); $('body:not(.home) .galerie-wo-fancybox').before(''+description+'
'); $('.galerie-wo-fancybox').find('.current').removeClass('current'); $(this).parent().addClass('current'); }); /* -----------------------------------------------*/ $('a[rel*=shadowbox], .home .galerie-wo-fancybox li a').live('click', function(event) { Shadowbox.open(this); return false; }); /*vignettes essences*/ if($('.essences li').length > 0) { $('.essences li').each(function(){ $(this) .append('
')
.hover(
function(){$(this).find('img').fadeIn(100)},
function(){$(this).find('img').fadeOut(100)}
)
.find('img').hide()
})
}
/* slider home */
if(typeof $(this).cycle == 'function'){
$('#header img').wrap('');
$.ajax({
type: 'GET',
url: '/visuels.php',
dataType: 'json',
cache: false,
error:function(xhr, status, errorThrown) {
alert(errorThrown+'\n'+status+'\n'+xhr.statusText);
},
success: function(data, textStatus) {
var slides = data.slides;
var visuels = new Array();
var titres = new Array();
for(visuel in slides){
visuels.push(visuel);
titres.push(slides[visuel]);
}
$('#header img').attr('src', visuels.shift());
$('#header img').show();
var totalSlideCount = 1+ visuels.length;
var $slideshow = $('#header .visuel');
/*$slideshow
.after('')
.after('')
*/
$slideshow.prepend('