jQuery(document).ready(function() {
	var tObj;
	
	jQuery('ul#navi').accordion({ 
		active: true,
		header: '.parent',
		navigation: true, 
		event: 'mouseover', 
		autoheight: false
	});
	
	jQuery('ul#navi').mouseleave(function(){
			tObj=setTimeout("jQuery('#navi').accordion('activate', false);",0);
		}).mouseenter(function(){
		clearTimeout(tObj);
	});
	 
	 /* This is basic - uses default settings */
	jQuery("a.imageLink").fancybox();
	
	/* Using custom settings */
	jQuery("a#inline").fancybox({
	  'hideOnContentClick': true
	});
	
	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 () {
  noSpam();
});
