/* Tooltip script - Affichage survol texte noir Slider */
 this.tooltip=function(){xOffset=10;yOffset=20;		
$("a.tooltip").hover(function(e){this.t=this.title;this.title="";$("body").append("<p id='tooltip'>"+ this.t +"</p>");$("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");	},
function(){this.title=this.t;$("#tooltip").remove();});$("a.tooltip").mousemove(function(e){$("#tooltip")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");});};$(document).ready(function(){tooltip();});

/* */
$(window).load(function () {$('#slide-box').cycle({fx: 'scrollHorz',prev: '#slides-prev a',next: '#slides-next a',timeout: 0,speed: 800});});
$(function () {$('.fade').hover(function() {$(this).fadeTo("fast", 0.7);}, function() {$(this).fadeTo("fast", 1);});});
function Fader(imgs) {this.imgs=imgs;this.current=0;this.max=this.imgs.length;window.t=this;window.setInterval(this.slide, 6000);}
Fader.prototype.slide=function() {var next=t.next();$("#topimage img").addClass("fading");$("#topimage").append('<img src="'+t.imgs[next][1]+'" />');$("#mask").attr("href", t.imgs[next][0]);$("#topimage img.fading").fadeOut(1000, function() { $(this).detach(); });t.current=next;}
Fader.prototype.next=function() {var r=this.current+1;return (r<this.max) ? r : 0;}

/* Fading Survol Gris */
$(document).ready(function() {
$("h1#logo").hover(function(){ $(this).find("span").stop().fadeTo('normal',0); }, function(){ $(this).find("span").stop().fadeTo('normal',1); });
$("ul.gallery li").hover(function(){var thumbOver=$(this).find("img").attr("src"); $(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});$(this).find("span").stop().fadeTo('normal', 0 , function(){$(this).hide()}); } , function() {$(this).find("span").stop().fadeTo('normal', 1).show();});});

/*	suckerfish.js */
sfHover=function() {var sfEls=document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++){sfEls[i].onmouseover=function() {this.className+=" sfhover";
if (document.getElementById("sermonLists")) {document.getElementById("sermonLists").style.visibility="hidden";}}
sfEls[i].onmouseout=function() {this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
if (document.getElementById("sermonLists")) {document.getElementById("sermonLists").style.visibility="visible";}}}}
if (window.attachEvent) window.attachEvent("onload", sfHover);
