jQuery.noConflict();
jQuery(document).ready(function($) {
	// as soon as the DOM is ready
	// (a little sooner than page load)
	$('#honoraryLawyers').hide();
	$('#collaboratorsContainer').html('<img src="images/medewerkers.jpg" alt="Medewerkers" style="border: 1px solid #fff;" />');
	$('#collaboratorsContainer').hide();
	var checkForPhotographs = document.getElementById('photoContainer');
	var checkPhotoClass = $('#photoContainer img').attr('class');
	var checkForIntroId = document.getElementById('intro');
	if (checkForPhotographs) {
		$('#photoContainer img').hide();
		$('#photoContainer img').fadeIn('slow');
	}
	else {
		$('.partners1').fadeIn('slow');
	};
	$('#partnerLawyers li a').removeAttr("title");
	$('#honoraryLawyers li a').removeAttr("title");
	$('#collaboratingLawyers li a').removeAttr("title");
	
	// when clicking honoraryLawyersNav
	$('#honoraryLawyersNav').click(function() {
		$('#collaboratorsContainer').hide();
		$('#partnerLawyers').fadeOut('fast');
		$('#collaboratingLawyers').fadeOut('fast');
		$('#honoraryLawyers').fadeIn('fast');
		$('#switcher a').removeClass('activeNavItem');
		$('#honoraryLawyersNav').addClass('activeNavItem');
		if (checkForIntroId) {
			$('#intro').fadeIn('slow');
		}
		else {
			$('#lawyerDescription').fadeIn('fast');
			$('#lawyerFacts').fadeIn('fast');
			$('#photoContainer').fadeIn('fast');
		};
		return false;
	});

	// when clicking partnerLawyersNav
	$('#partnerLawyersNav').click(function() {
		$('#collaboratorsContainer').hide();
		$('#honoraryLawyers').fadeOut('fast');
		$('#collaboratingLawyers').fadeOut('fast');
		$('.partners1').show();
		$('#partnerLawyers').fadeIn('fast');
		$('#switcher a').removeClass('activeNavItem');
		$('#partnerLawyersNav').addClass('activeNavItem');
		if (checkForIntroId) {
			$('#intro').fadeIn('slow');
		}
		else {
			$('#lawyerDescription').fadeIn('fast');
			$('#lawyerFacts').fadeIn('fast');
			$('#photoContainer').fadeIn('fast');
		};
		return false;
	});
  
	// when clicking collaboratorsLawyersNav
	$('#collaboratorsLawyersNav').click(function() {
		$('#collaboratorsContainer').hide();
		$('#honoraryLawyers').fadeOut('fast');
		$('#partnerLawyers').fadeOut('fast');
		$('.collaborators2').hide();
		$('.collaborators1').show();
		$('#collaboratingLawyers').fadeIn('fast');
		$('#switcher a').removeClass('activeNavItem');
		$('#collaboratorsLawyersNav').addClass('activeNavItem');
		if (checkForIntroId) {
			$('#intro').fadeIn('slow');
		}
		else {
			$('#lawyerDescription').fadeIn('fast');
			$('#lawyerFacts').fadeIn('fast');
			$('#photoContainer').fadeIn('fast');
		};
		return false;
	});

	
		// when clicking collaborators
	$('#collaborators').click(function() {
		$('#honoraryLawyers').fadeOut('fast');
		$('#partnerLawyers').fadeOut('fast');
		$('#collaboratingLawyers').fadeOut('fast');
		$('.collaborators2').hide();
		$('.collaborators1').hide();
		if (checkForIntroId) {
			$('#intro').hide();
		}
		else {
			$('#lawyerDescription').fadeOut('fast');
			$('#lawyerFacts').fadeOut('fast');
			$('#photoContainer').fadeOut('fast');
		};
		$('#CollaboratorsLawyers').hide('fast');
		$('#switcher a').removeClass('activeNavItem');
		$('#collaborators').addClass('activeNavItem'); 
		$('#collaboratorsContainer').fadeIn('slow');
		return false;
	});
	
	
    $(window).load(function () {
		var checkPhoto = $('#photoContainer > *').attr('class');
		switch (checkPhoto) {
		case 'Deleu': $('#Deleu').fadeOut('slow'); break;
		case 'Swennen': $('#Swennen').fadeOut('slow'); break;
		case 'Maeschalck': $('#Maeschalck').fadeOut('slow'); break;
		case 'Laporte': $('#Laporte').fadeOut('slow'); break;
		case 'VanDeVelde': $('#VanDeVelde').fadeOut('slow'); break;
		case 'Hertegonne': $('#Hertegonne').fadeOut('slow'); break;
		case 'Buekens': $('#Buekens').fadeOut('slow'); break;
		case 'DeCuyper': $('#DeCuyper').fadeOut('slow'); break;
		case 'DeGreef': $('#DeGreef').fadeOut('slow'); break;
		case 'VanMelkebeke': $('#VanMelkebeke').fadeOut('slow'); break;
		case 'Naudts': $('#Naudts').fadeOut('slow'); break;
		case 'Denoo': $('#Denoo').fadeOut('slow'); break;
        }
	});
});


