$(document).ready(function() {

		 /**
		   * FANCYBOX
		   */

			/* This is basic - uses default settings */
			
			$("a.single_image").fancybox();
			
			/* Using custom settings */
			
			$("a#inline").fancybox({
				'hideOnContentClick': true
			});

			/* Apply fancybox to multiple items */
			
			$("a.group").fancybox({
				'transitionIn'	:	'elastic',
				'transitionOut'	:	'elastic',
				'speedIn'		:	600, 
				'speedOut'		:	200, 
				'overlayShow'	:	false
			});
			
			
			$("a.grouped_elements").fancybox();
			
			/**
			 * ACCORDION
			 */

			$('#accordion .aufklappen').click(function() {
			
			noslide = false;
			if ($.browser.msie) {
				if ($.browser.version <= 8) noslide = true;
			}	
			//alert(noslide);
			
				//if ($(this).is(":hidden")) 
				if ($(this).next().is(":visible")) 
				{
					
					// if (noslide) $('#accordion div:visible').fadeOut('fast', 'easeOutCirc');
					
					if (noslide) $('#accordion div:visible').hide();
					if (!noslide) $('#accordion div:visible').slideUp('slow', 'easeOutCirc');
				}
				else 
				{
					
					// if (noslide) $('#accordion div:visible').fadeOut('fast', 'easeOutCirc');
					if (noslide) $('#accordion div:visible').hide();
					if (!noslide) $('#accordion div:visible').slideUp('slow', 'easeOutCirc');
					
					//if (noslide) $(this).next().fadeIn('fast', 'linear');
					if (noslide) $(this).next().show();
					if (!noslide) $(this).next().slideDown(1000, 'easeOutCirc');
					
					
				}
				return false;
			}).next().hide();
			 
			$('#accordion #erster + div').show();
			
});

			/**
			 * SLIDEBOX
			 */
$(window).load(function() {

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