// JavaScript Document

function setOTreactors() {
	$('#overtext_main').click(
		function(event) {
			$('#overtext_main').animate({opacity: '0'}, 300);
			$('#overtext_bg').animate({opacity: '0'}, 300);
			$('#overtext_container').animate({opacity: '0'}, 200, 'linear', function() {
																		$('#overtext_main').css('display','none');
																		$('#overtext_bg').css('display','none');
																		$('#overtext_main').css('visibility','hidden');
																		$('#overtext_bg').css('visibility','hidden');
																	} );
		}
	);
	$('a.more').click(
		function(event) {
			
			if (parseInt($(window).height())<640) {
				
				$(document).scrollTop(130);
				
			}
			
			var what = $(event.currentTarget).attr('rel');
			
			$('#overtext_bg').css('height',$(document).height() );
			$('#overtext_main').css('height',$(document).height() );
			
			$('#overtext_container').html( $('#'+what).html() );
			$('#overtext_container').css('background-image','url(http://www.techcare.ch/imgs/overtext_bg/'+what+'.jpg)');
				$('#overtext_main').css('visibility','visible');
				$('#overtext_bg').css('visibility','visible');
				$('#overtext_main').css('display','block');
				$('#overtext_bg').css('display','block');
				$('#overtext_main').animate({opacity: '1'}, 400);
				$('#overtext_bg').animate({opacity: '0.75'}, 400);
				$('#overtext_container').animate({opacity: '1'}, 500, 'linear');
				
				event.preventDefault();
		}
	);
}
