﻿

$(document).ready(function() {
	
	//to hide double Nathalie Gloudemans-Voogd
		//$("#Fotootje63").prev(".person").hide();
		//$("#Fotootje63").next().hide();	
	
	
	
        $(".archief").click(function() {
            $(this).next(".hidden").slideToggle("slow");
            $(this).toggleClass("active");
            return false;
        });
        
        /*show panellinkin*/
        $('.linkedinpanel').hide();
        var test = $(location).attr('href'); //alert(test); 
        if(test.toLowerCase().indexOf("werken+bij+ons") > 0)
        {
			$('.linkedinpanel').show();
        } 
        if(test.toLowerCase().indexOf("working+with+us") > 0)
        {
			$('.linkedinpanel').show();
        }   
        
        /*show paneladdthis
        $('.addthispanel').hide();
        var test = $(location).attr('href'); //alert(test); 
        if(test.toLowerCase().indexOf("nieuwsbrief+") < 0) //|| (test.toLowerCase().indexOf("aankondigingen") > 0) || (test.toLowerCase().indexOf("artikelen") > 0) || (test.toLowerCase().indexOf("vacatures") > 0))
        {
			$('.addthispanel').show();
        }
        if(test.toLowerCase().indexOf("in+de+pers") > 0) {$('.addthispanel').show();}
        */
        
        /*show pdfpanel
        $('.pdfpanel').hide();
        if(test.toLowerCase().indexOf("nieuwsbrief+") > 0)
        {
			$('.pdfpanel').show();
        }*/
        
        /*change second photo*/
		// https://support.tamtam.nl/Issues/IssueDetail.aspx?id=21642
		// get the spacer paragraph
        var spacerParagraph = $('#kolom3a .normal:last').prev().prev();
		// if it exists, get the offset top (the 'top' relative to the document)
        if (spacerParagraph.length > 0){
			spacerOffsetTop = spacerParagraph.offset().top;
			$(spacerParagraph[0]).css('margin-bottom', '' + (555 - spacerOffsetTop) + 'px');
		}

        //alert(test);
        if (test.toLowerCase().indexOf("authoringreedit") > 0)
        {
			$('#_ctl2_Auteurs').css('position', 'relative');
			$('#_ctl2_Auteurs').css('top', '300px');
			$('#_ctl0_Auteurs').css('position', 'relative');
			$('#_ctl0_Auteurs').css('top', '300px');
        }
       
       var beeldtest1 = $('span.beeld a img').length;
       var beeldtest2 = $('img.beeld').length;
       
       if((beeldtest1 == 0) && (beeldtest2 == 0))
       {
		$('#topbar').css('width', '505px')
       }
      
       
	
});
