$(document).ready(function() {

	jQuery('#mycarousel').jcarousel({
	  // Configuration goes here
	});
	if (typeof $.fn.fancybox != "undefined") {
		 /* This is basic - uses default settings */
		 
		 $("a.imageLink").fancybox();
		 
		 /* Using custom settings */
		 
		 $("a#inline").fancybox({
			  'hideOnContentClick': true
		 });

		$("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>';
			 }
		});
	}
	Cufon.replace('h2, h3, #company');
	Cufon.replace('#navigationSidebar ul li span.cufon a, .footerBox h3 a, #navigationSidebar a#newsletter', { hover: 'true', textShadow: '1px 2px #314045' });
});

sfHover = function() {
	var sfEls = document.getElementById("navigationSidebar").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"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
