$(document).ready(function() {
});

$(window).load(function() {

	$("a[href*='.jpg']").addClass("fancybox");
	$("a.fancybox").fancybox();

	// sorry wordpress.
	if ( $('body').hasClass("single-studie")) {
		$("li#menu-item-23").removeClass("current_page_parent");
		$("li#menu-item-30").addClass("current_page_parent");
	}

	if ( $('body').hasClass("page-id-16")) {
		$("#accordion").accordion();
	}

	$('a').each(function(){
		if (this.hostname !== location.hostname) {
			$(this).attr({
				target: "_blank",
				title: this.href + " (externer Link, öffnet sich in einem neuen Fenster)"
			});
		}
	});


	$('#featured').orbit({
		animation: 'fade',			 		// fade, horizontal-slide, vertical-slide, horizontal-push
		animationSpeed: 500, 				// how fast animtions are
		timer: true, 						// true or false to have the timer
		advanceSpeed: 5000, 				// if timer is enabled, time between transitions 
		pauseOnHover: true, 				// if you hover pauses the slider
		startClockOnMouseOut: true, 		// if clock should start on MouseOut
		startClockOnMouseOutAfter: 0,	 	// how long after MouseOut should the timer start again
		directionalNav: false, 				// manual advancing directional navs
		captions: false, 					// do you want captions?
		captionAnimation: 'fade', 			// fade, slideOpen, none
		captionAnimationSpeed: 600, 		// if so how quickly should they animate in
		bullets: true,						// true or false to activate the bullet navigation
		bulletThumbs: false,				// thumbnails for the bullets
		bulletThumbLocation: '',			// location from this file where thumbs will be
		afterSlideChange: function(){} 		// empty function 
	});
});
