//var alphaBGs = [['div_frame', 'crop'], ['div_content', 'scale'], ['div_footer', 'crop'], ['shadow1', 'scale']];
xpngFix();
(function($) 
{
	$.noConflict();
	$(document).ready(function(){
	
		//slideshow in header
		//$('#headslideshow').slideShow( images, {
		//		fadeSpeed: 1200,
		//		changeSpeed: 3000,
		//		delayBeforeStart: 1000
		//});
		
		//Lightbox
		$(".slideshowgalerie a[@rel*=lightbox]").tinyLightbox({autostart: 2000});
		//Lightbox
		$(".slideshowgalerie2 a[@rel*=lightbox]").tinyLightbox2({autostart: 2000});
		//tooltip
		$('.tooltip').tooltip({showURL: false });

		//Holztueren accordion menu
		$('#accordion').show().accordion({
			autoHeight: false
		});
	
		//easing equation, borrowed from jQuery easing plugin
		//http://gsgd.co.uk/sandbox/jquery/easing/
		$.easing.easeOutQuart = function (x, t, b, c, d) {
			return -c * ((t=t/d-1)*t*t*t - 1) + b;
		};
	
	
		//scroll the conntent inside of accordion
		$('#accordion .slider').serialScroll({
			items:'li',
			prev:'.top',
			next:'.bottom',
			axis:'y',
			offset:-150, //when scrolling to photo, stop 230 before reaching it (from the left)
			start:1, //as we are centering it, start at the 2nd
			duration:1200,
			force:true,
			stop:true,
			lock:false,
			cycle:false, //don't pull back once you reach the end
			easing:'easeOutQuart', //use this easing equation for a funny effect
			jump: true, //click on the images to scroll to them
			step: 5,
			onBefore: function(){}

		});
		
		//set the clicked element in accordion active
		$('#accordion .item li').click(function(){
			$(this).parent().children('li').children('.background').removeClass('active');
			$(this).children('.background').addClass('active');
		
		});


	});	
	

})(jQuery);
	
function toggleWood(color)
{
	jQuery('#accordion .farbe li').hide();
	jQuery('#accordion .farbe .'+color).show();
	jQuery('#accordion').accordion("activate", 1);
}

