/*
MSIE MENU
Project: Ulyssemag.com
Author: DPh&Co
Version: 1.0
Last change: 07/18/08
*/
var current_size = 2;
var properties = new Array();
properties[0] = {'size':'11px', 'leading':'16px'};
properties[1] = {'size':'12px', 'leading':'18px'};
properties[2] = {'size':'13px', 'leading':'20px'};
properties[3] = {'size':'15px', 'leading':'23px'};
properties[4] = {'size':'17px', 'leading':'27px'};
$(document).ready(function() {
$('#bigger').click(function() {
if (current_size < properties.length - 1) {
current_size++;
$('#article_body,#article_body *:not(.copyright):not(.caption):not(.origin)').css({'font-size':properties[current_size].size, 'line-height':properties[current_size].leading});
$('.asides dl dt,.asides dl dd').css({'font-size':properties[current_size].size, 'line-height':properties[current_size].leading});
}
return false;
});
$('#smaller').click(function() {
if (current_size > 0) {
current_size--;
$('#article_body,#article_body *:not(.copyright):not(.caption):not(.origin)').css({'font-size':properties[current_size].size, 'line-height':properties[current_size].leading});
$('.asides dl dt,.asides dl dd').css({'font-size':properties[current_size].size, 'line-height':properties[current_size].leading});
}
return false;
});
if ($.browser.msie) {
$('#main-nav').children('li').each(function(i, li) {
$(li).mouseover(function(event) {
$(this).addClass('over');
}).mouseout(function() {
$(this).removeClass('over');
});
});
}
$('#article_body h4').each(
function(i) {
if ($(this).parents('.heading').length == 0) {
$(this).wrap("
");
}
});
});
$(document).ready(function() {
/* LOGIN */
if (is_anonymous) {
$('#login div.inner h5 a').toggle(function () {
$(this).addClass('opened');
$('#login div.inner').css({'height':'141px'});
$('#login div.inner').css({'background-position':'right -25px'});
}, function () {
$(this).removeClass('opened');
$('#login div.inner').css({'height':'18px'});
$('#login div.inner').css({'background-position':'top right'});
});
}
function init_select(element) {
$('select#edit-select-'+element + " option[@value=all]").attr('selected','selected');
}
$('select#edit-select-region').change(function() {init_select('country');});
$('select#edit-select-country').change(function() {init_select('region');});
/* SLIDE */
$('#images').after('').cycle({fx: 'turnRight', speed: 'normal', timeout: 3000, pager: '#slide-nav'});
/* TOOLS */
/*
var current = 2;
var properties = new Array();
properties[0] = {'size':'11px', 'leading':'16px'};
properties[1] = {'size':'12px', 'leading':'18px'};
properties[2] = {'size':'13px', 'leading':'20px'};
properties[3] = {'size':'15px', 'leading':'23px'};
properties[4] = {'size':'17px', 'leading':'27px'};
$('#bigger-font').click(function() {
if (current < properties.length - 1) {
current++;
$('#body p:not(.copyright):not(.caption):not(.origin)').css({'font-size':properties[current].size, 'line-height':properties[current].leading});
}
return false;
});
$('#smaller-font').click(function() {
if (current > 0) {
current--;
$('#body p:not(.copyright):not(.caption):not(.origin)').css({'font-size':properties[current].size, 'line-height':properties[current].leading});
}
return false;
});
$('#suggest a').click(function() {
$(this).html('Recommandé
');
return false;
});
*/
$('#send').hover(function() {
$(this).addClass('over');
},
function () {
$(this).removeClass('over');
});
$('#send div').hover(function() {
$('#send > a').addClass('over');
},
function () {
$('#send > a').removeClass('over');
});
$('#share').hover(function() {
$(this).addClass('over');
},
function () {
$(this).removeClass('over');
});
$('#share div').hover(function() {
$('#share > a').addClass('over');
},
function () {
$('#share > a').removeClass('over');
});
/* ACCORDION */
$('div.accordion div.box h5').click(function() {
$(this).css({backgroundImage:'url(/library/images/down-bg.gif)', color: '#FFF'}).next('div.inner').slideToggle(300).parent().siblings('div.box').children('div.inner').slideUp('slow');
$(this).parent().siblings('div.box').children('h5').css({backgroundImage:'url(/library/images/up-bg.gif)', color: '#000'});
});
/* DROPDOWN */
$('#dropdown').click(function() {
if ($('#details').is(':hidden')) {
$('#details').slideDown();
} else {
$('#details').slideUp();
}
});
})
/*
TREE
Project: Ulyssemag.com
Author: DPh&Co
Version: 1.0
Last change: 08/07/08
*/
$(document).ready(function() {
$('.folders li:has(ul)').each(function(i, folder) {
$(folder).click(function(event) {
$(this).toggleClass('open');
});
});
});
function imprimer()
{
$('div.paginate').show();
$('div.numbering').hide();
window.print();
setTimeout("printTimeout()",3000);
}