this.terixReload = function() {
  
    $('.list-element').click(function(){
		$( 'html, body' ).animate( { scrollTop: 0 }, 0,function(){ $('#article-content').slideDown("slow");} );     
		$('#prev-button').fadeTo('fast',0.3);
		$('#next-button').fadeTo('fast',0.3);
		var newsrc = this.src;
		$('#main-foto').fadeOut('slow',function(){$('#main-foto').attr('src',newsrc);});
		$('#main-foto').fadeIn('slow');	
		$('#article-info div').css('display','none');
		$('#' + this.title).css('display','block');		
    });   
	
	$('#next-button').click( function(){	
		var tmpsrc = $('#main-foto').attr('src');				
		var tit = $('li>img[src='+tmpsrc+']').parent().next().children().attr('title');
		tmpsrc = $('li>img[src='+tmpsrc+']').parent().next().children().attr('src');	
		if (tmpsrc != null)
		{
			$('#main-foto').fadeOut('slow',function(){$('#main-foto').attr('src',tmpsrc);});
			$('#main-foto').fadeIn('slow');	
			$('#article-info div').css('display','none');
			$('#' + tit).css('display','block');		
		}
	});
	
	$('#prev-button').click( function(){	
		var tmpsrc = $('#main-foto').attr('src');				
		var tit = $('li>img[src='+tmpsrc+']').parent().prev().children().attr('title');
		tmpsrc = $('li>img[src='+tmpsrc+']').parent().prev().children().attr('src');	
		if (tmpsrc != null)
		{
			$('#main-foto').fadeOut('slow',function(){$('#main-foto').attr('src',tmpsrc);});
			$('#main-foto').fadeIn('slow');	
			$('#article-info div').css('display','none');
			$('#' + tit).css('display','block');				
		}
	});
	
	$('#prev-button').hover( function()
	{
		var tmpsrc = $('#main-foto').attr('src');				
		var tit = $('li>img[src='+tmpsrc+']').parent().prev().children().attr('title');
		tmpsrc = $('li>img[src='+tmpsrc+']').parent().prev().children().attr('src');	
		if (tmpsrc != null)
			$(this).fadeTo('fast',1);
	},
	function()
	{
		$(this).fadeTo('fast',0.3);
	}
	);
	
	$('#next-button').hover( function()
	{
		var tmpsrc = $('#main-foto').attr('src');				
		var tit = $('li>img[src='+tmpsrc+']').parent().next().children().attr('title');
		tmpsrc = $('li>img[src='+tmpsrc+']').parent().next().children().attr('src');	
		if (tmpsrc != null)
			$(this).fadeTo('fast',1);
	},
	function()
	{
		$(this).fadeTo('fast',0.3);
	}
	);
};

$(document).ready(function() {
    terixReload();
	
});