jQuery(window).load(function () {
  noSpam();
});

sfHover = function() {
	var sfEls = document.getElementById("mainNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

jQuery(document).ready(function() {
	
	jQuery("a[rel=lightbox]").fancybox({
		 'transitionIn'		: 'none',
		 'transitionOut'		: 'none',
		 'titlePosition' 	: 'over',
		 'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			  return '<span id="fancybox-title-over">Bild ' + (currentIndex + 1) + ' von ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		 }
	});
	
});

jQuery(window).load(function() {
	  jQuery('#slider').nivoSlider();
	  jQuery("#sliderSidebar").nivoSlider({
		  effect:'fade',
		  directionNav:true,
		  directionNavHide:true,
		  controlNav:false,
		  controlNavThumbs:false,
		  startSlide:0,
		  boxCols:8,
		  boxRows:4,
		  pauseOnHover:false
	 });
 });
