function showFunction(c, t) {
	$$('.contenttabs').setStyle('display', 'none'); 
	c.setStyle('display', 'block');
	$$('.current').set('class', '');
	t.set('class', 'current');
}

function showFunction1(c, t) {
	$$('.contenttabs1').setStyle('display', 'none'); 
	c.setStyle('display', 'block');
	$$('.current1').set('class', '');
	t.set('class', 'current1');
}

function showFunction2(c, t) {
	$$('.contenttabs2').setStyle('display', 'none'); 
	c.setStyle('display', 'block');
	$$('.current2').set('class', '');
	t.set('class', 'current2');
}



window.addEvent('domready', function(event) {					 
	
	// slideshow
	new BarackSlideshow('menu', 'pictures', 'loading', {transition: 'fade', auto: true, autostart:true, autointerval: 3000, tween: {duration: 500} });
	
	//tabs

	var tabOne = $('tabOne');
	var tabTwo = $('tabTwo');
	var tabThree = $('tabThree');
	var tabFour = $('tabFour');
	var tabFive = $('tabFive');
	var tabSix = $('tabSix');
	var tabSeven = $('tabSeven');
	
	var contentOne = $('contentOne');
	var contentTwo = $('contentTwo');
	var contentThree = $('contentThree');
	var contentFour = $('contentFour');
	var contentFive = $('contentFive');
	var contentSix = $('contentSix');
	var contentSeven = $('contentSeven');
 
	$('tabOne').addEvent('click', function(e) { e.stop(); showFunction(contentOne, tabOne); });
	$('tabTwo').addEvent('click', function(e) { e.stop(); showFunction(contentTwo, tabTwo); });
	
	$('tabThree').addEvent('click', function(e) { e.stop(); showFunction1(contentThree, tabThree); });
	$('tabFour').addEvent('click', function(e) { e.stop(); showFunction1(contentFour, tabFour); });
	$('tabFive').addEvent('click', function(e) { e.stop(); showFunction1(contentFive, tabFive); });
	
	$('tabSix').addEvent('click', function(e) { e.stop(); showFunction2(contentSix, tabSix); });
	$('tabSeven').addEvent('click', function(e) { e.stop(); showFunction2(contentSeven, tabSeven); });
});