1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
function menuFx() {
var menus = $$('a.menu');
var bgFx = [];
menus.each(
function(menu, i) {
menu.defaultColor = menu.getStyle('background-color');
bgFx[i] = new Fx.Styles(menu, { duration: 300, wait: false });
menu.addEvent('mouseenter',function () {
bgFx[i].start({
'background-color': '#6699ff'
});
});
menu.addEvent('mouseleave',function () {
bgFx[i].start({
'background-color': menu.defaultColor
});
});
}
);
var submenus = $$('a.submenu, a.subsubmenu');
var subBgFx = [];
submenus.each(
function(submenu, i) {
subBgFx[i] = new Fx.Styles(submenu, { duration: 300, wait: false });
submenu.addEvent('mouseenter',function () {
subBgFx[i].start({
'color': '#ffffff',
'background-color': '#3366ff',
'padding-left': '8px'
});
});
submenu.addEvent('mouseleave',function () {
subBgFx[i].start({
'color': '#3366ff',
'background-color': '#ffffff',
'padding-left': '2px'
});
});
}
);
}
function loadBufferZone() {
var container = $('body');
new Drag.Move('buffer', {'container': container,});
}
// Initialisation des effets
//var load_method = (window.ie ? 'load' : 'domready');
window.addEvent('domready', function () {
menuFx();
loadBufferZone();
$('left').setStyle('height', (window.getHeight() - 93) + 'px');
$('corpse').setStyle('height', (window.getHeight() - 83) + 'px');
});
// Resize les divs du bas avec la fenêtre.
window.addEvent('resize', function () {
$('left').setStyle('height', (window.getHeight() - 93) + 'px');
$('corpse').setStyle('height', (window.getHeight() - 83) + 'px');
}); |
Partager