lang=(window.location.toString().indexOf('lang=en')==-1)?'de':'en';
$(function() {
	$('#legal').wrap('<a href="mail'+'to:'+'m.j'+'olic'+'@'+'gma'+'il.com'+'" style="te'+'xt-d'+'ecor'+'ation'+':'+'none;"></a>');
	try {
		$('#gallery a, #gallery2 a').lightBox();
		$('a.lightbox').each(function(i,elm){$(this).lightBox({start:true});});
		}
	catch(e) {}
/*
	try {
		var checks = {
			check: [{
				field:	'input.email',
				type:	'email'
				},{
				field:	'input.name',
				type:	'not_empty'
				},{
				field:	'textarea.message',
				type:	'not_empty'
				}]
			};
		var validator = $('#formContact').observing_validator({
			call_on_success: function(elm) { $(elm).removeClass('error') },
			call_on_failure: function(elm) { $(elm).addClass('error') },
			}, checks );
		$('#formContact').submit(function() {
			if (validator.check_fields()) return true;
			if (lang=='de') alert("Bitte überprüfen Sie die markierten Felder!");
			else alert("Please check the marked fields!");
			return false;
			});
		}
	catch(e) {}
*/
	try {$('#start').fadeIn(1000);}
	catch(e) {}
	try {$('#submenu').tabs({fxFade:true,fxSpeed:750});}
	catch(e) {}
	try {$('#container2').fadeOut(1000,function(e){
		try {$('#content2').fadeIn(1000);}
		catch(e) {}
		try {$('#technic').fadeIn(1000);}
		catch(e) {}
		});}
	catch(e) {}
	try {
		$('ul#theMenu li a').each(function(e) {
			$(this).click(function(e){
				var elm=e.target;
				$('#container2').fadeIn(750,function(e){window.location=elm;});
				return false;
				});
			});
		}
	catch(e) {}
	});

