
$(document).ready(init);

function init(){
	// global
	//defeatSpam3000();
	
	$('.abblender').fadeTo(0, 0.0);
	
	$('#bioButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#bioButton').hide();
		$('#bioButtonOver').show();
		$('#personBgDiv').show(); 
		}
	);
	
	$('#newsButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#newsButton').hide();
		$('#newsButtonOver').show();
		$('#personBgDiv').show();
		}
	);
	
	$('#soundButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#soundButton').hide();
		$('#soundButtonOver').show();
		$('#personBgDiv').hide();
		}
	);
	
	$('#videoButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#videoButton').hide();
		$('#videoButtonOver').show();
		$('#personBgDiv').show();
		}
	);
	
	$('#presseButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#presseButton').hide();
		$('#presseButtonOver').show();
		$('#personBgDiv').hide();
		}
	);
	
	$('#galerieButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#galerieButton').hide();
		$('#galerieButtonOver').show();
		$('#personBgDiv').show();
		}
	);
	
	$('#kontaktButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#kontaktButton').hide();
		$('#kontaktButtonOver').show();
		$('#personBgDiv').show();
		}
	);
	
	$('#linksButton').hover(function(){
		$('.hoverPic').hide();
		$('.outPic').show();
		$('#linksButton').hide();
		$('#linksButtonOver').show();
		$('#personBgDiv').show();
		}
	);

	$('.hoverPic').click(function() {showPage(this)});
	
	$('.closeButton').click(function() {hidePage(this)});
	//$('body').click(function() {resetPage()});
	
	//$('#soundButtonOver').hover(function(){$('#soundButtonOver').show('fast'),$('.personBgDiv').hide()});

	//$('.hoverPic').click(function(){showDivContent(this)});
	
	//jQuery('.media_gallery').media_gallery({thumbnail_element: 'span', target_container: '#gallery_display'});
	
	//$('#gallery a').lightBox();
	
	$(".scrollable").scrollable({ 
        vertical:true,  
        size: 0
         
    // use mousewheel plugin 
    }).mousewheel();

}

function showPage(page){
	var selectedPage = $(page).attr('id').replace(/ButtonOver/,'Div');
	
	//$('#newsDiv .pageContentDiv').load('content_de/news.de.html');
	$('#'+selectedPage).fadeIn('fast');
	$('.abblender').show().fadeTo(200, 0.4);

	//alert(selectedPage);
}

function hidePage(page){
	$(page).parent().fadeOut('fast');
	$('.abblender').fadeTo(200, 0.0).hide();
	//alert(selectedPage);
}

function resetPage(){
	$('.pageDiv').hide();
	$('.abblender').fadeTo(200, 0.0).hide();
	//alert(selectedPage);
}


