/*
AN7effects v1.5.5 - John Einselen (http://Iaian7.com)
MooTools v1.2.4 required
*/
function tableOfContents(h1,toc,top){
toc = $(toc);
eln = '';
els = toc.get('html');
var toTop = ''+top+'';
$$(h1).each(function(el) {
eln = el.get('html');
el.set('id', 'toc_'+eln);
els += ''+eln+'
';
if (top != '') {el.set('html', eln+' '+toTop)};
});
toc.set('html', els);
}
function scrollToThis(el) {
var scrollFx = new Fx.Scroll(window);
if(el == 'WindowTop'){
scrollFx.toTop();
} else {
scrollFx.toElement($(el));
}
}
function linkFade(lfDiv) {
$$(lfDiv).each(function(div) {
var mouseFxs = new Fx.Tween(div, {duration: 240, wait: false});
div.set('opacity', 0.85); //Set the starting opacity
div.addEvents({
'mouseover': function(){
mouseFxs.start('opacity', [0.85, 1]);
},
'mouseout': function(){
mouseFxs.start('opacity', [1, 0.85]);
}
});
});
}
function contentFade(cfFade, cfHide) {
$$(cfFade).each(function(div){
var hide = div.getElement(cfHide);
var mouseFx = new Fx.Tween(hide, {duration: 180, wait: false});
hide.set('opacity', 0);
div.addEvents({
'mouseenter': function(){
mouseFx.start('opacity', [0, 1]);
},
'mouseleave': function(){
mouseFx.start('opacity', [1, 0]);
}
});
});
}
function contentSlide(csSlide, csToggle, csHide) {
$$(csSlide).each(function(div){
var link = div.getElement(csToggle);
var hide = div.getElement(csHide);
var fx = new Fx.Slide(hide, {duration: 240, mode: 'vertical'}).hide();
link.addEvent('click', function(){
fx.toggle();
});
});
}
function selfLink(slEl){
var a = $$(slEl);
for(var i=0;i