// JavaScript Document

/* hoogte formaat 493 x 724 b x h */

$(document).ready(function(){
   $('.aleesmeer').click(function() { 
   /* eerst resetten naar standaard voor hoogte formaat */  
	$(".leesmeer").css('display', 'inline'); 
	$(".leesmeer").css('margin-top', '0px');
 	$(".content").css('margin-left', '0px'); 
	$(".content").css('padding-right', '67px');
	$(".content").css('height', '540px');
	$(".meerinfo").css('float', 'left');
	$(".meerinfo").css('padding-left', '15px');
	$('.foto0').css('height', '165px');
	$(".article").animate({ height: '230px', width:'230px' }, 600);
	/* dan animate naar open */
	$('html,body').animate({scrollTop: $(this).closest('.article').offset().top}, 2000);
	$(this).closest(".meerinfo").css('float', 'right');
    $(this).closest('.article').animate({ height: '724px', width:'493px' }, 1000);
	$(".leesmeer").css('visibility', 'visible');
	$(this).closest('div').css('visibility', 'hidden');  /* .leesmeer */
	$(this).closest('div').css('display', 'none');  /* .leesmeer */
	$(this).closest(".meerinfo").css('display', 'block');
	$("#cv").fadeOut(1000, function() {$(this).css("z-index", "-1")});
	});
});

/* breedte formaat 756 x 480  b x h */

$(document).ready(function(){
   $('.breed').click(function() {   
    /* eerst resetten, als intellingen zijn voor breedte formaat niets verder resetten */  
	$(".article").animate({ height: '230px', width:'230px' }, 600);
	$(".meerinfo").css('float', 'left');
	$(".leesmeer").css('display', 'inline');
	$(".leesmeer").css('margin-top', '0px');	
	$('.foto0').css('height', '165px');
	/* dan animate naar open */
	$('html,body').animate({scrollTop: $(this).closest('.article').offset().top}, 2000);
    $(this).closest('.article').animate({ height: '477px', width:'754px' }, 1000);
	$(".leesmeer").css('visibility', 'visible');
	$(".content").css('padding-right', '86px');
	$(".content").css('margin-left', '242px');
	$(".content").css('height', '400px');
	$(this).closest('div').css('visibility', 'hidden');  /* .leesmeer */
	$(this).closest('div').css('display', 'none');  /* .leesmeer */
	
	// Jan
	$(this).closest('.upper').children('.foto0').css('height', '460px');
	$(this).closest('.upper').children('.meerinfo').each(function() {
		$(this).css('display', 'inline');
		$(this).css('margin-top', '15px');
	});

	$(".meerinfo").css('padding-left', '37px');
	
	$("#cv").fadeOut(1000, function() {$(this).css("z-index", "-1")});
	});
});

/* sluit knop */
$(document).ready(function(){
   $('.bleesmeer').click(function() {
	$('.foto0').css('height', '165px');
    $(".leesmeer").css('visibility', 'visible');
   	$(".leesmeer").css('display', 'inline');
	$(".leesmeer").css('margin-top', '0px');
   $(".article").animate({ height: '230px', width:'230px' }, 400);		
  });
});
  
/* roze */
$(document).ready(function(){
  $('.eerste').click(function() {
   $(".roze").animate( { backgroundColor: '#e2007a' }, 400);
   $("#cv").animate( { backgroundColor: '#e2007a' }, 400);
    $(this).closest('.article').animate( { backgroundColor: '#e2007a' }, 400);
   $('#logo').css("background-image", "url(images/logo_1.png)"); 
  });
});

/* blauw */
$(document).ready(function(){
  $('.tweede').click(function() {
   $(".roze").animate( { backgroundColor: '#0e9ee0' }, 400);
   $("#cv").animate( { backgroundColor: '#0e9ee0' }, 400);
    $(this).closest('.article').animate( { backgroundColor: '#0e9ee0' }, 400);
   $('#logo').css("background-image", "url(images/logo_2.png)"); 
  });
}); 


/* groen */
$(document).ready(function(){
  $('.derde').click(function() {
   $(".roze").animate( { backgroundColor: '#cacb02' }, 400);
   $("#cv").animate( { backgroundColor: '#cacb02' }, 400);
    $(this).closest('.article').animate( { backgroundColor: '#cacb02' }, 400);
   $('#logo').css("background-image", "url(images/logo_3.png)"); 
  });
}); 

/* geel */
$(document).ready(function(){
  $('.vierde').click(function() {
   $(".roze").animate( { backgroundColor: '#fabb00' }, 400);
   $("#cv").animate( { backgroundColor: '#fabb00' }, 400);
    $(this).closest('.article').animate( { backgroundColor: '#fabb00' }, 400);
   $('#logo').css("background-image", "url(images/logo_4.png)"); 
  });
}); 
 
  
/* cv aanroepen en z-index veranderen */
$(document).ready(function(){
  $('.contactlink').click(function() {
	$('.foto0').css('height', '165px');
	$(".article").animate({ height: '230px', width:'230px' }, 600);
		$('.foto0').css('height', '165px');
    $(".leesmeer").css('visibility', 'visible');
   	$(".leesmeer").css('display', 'inline');
	$(".leesmeer").css('margin-top', '0px');
	$(".leesmeer").css('visibility', 'visible');	
	$(".leesmeer").css('display', 'inline'); 
	$(".leesmeer").css('margin-top', '0px');
 	$(".content").css('margin-left', '0px'); 
	$(".content").css('padding-right', '67px');
	$(".content").css('height', '540px');
	$(".meerinfo").css('float', 'left');
	$(".meerinfo").css('padding-left', '15px');
	$('.foto0').css('height', '165px');
	$('#cv').css("z-index", "99"); 
    $("#cv").fadeIn("slow"); 
	});
});

/* klik op logo reset pagina */
$(document).ready(function(){
  $('#logo').click(function() {
		window.location = "index.php";
	});
});							   

	
	
/* ColorBox */
$(document).ready(function(){	
	$(".meertekst").colorbox({width:"580", height:"80%", iframe:true});
	$(".video").colorbox({iframe:true, width:"790", height:"630"});
	$(".popup").colorbox({iframe:true, width:"1000", height:"80%"});
	$(".colorbox").colorbox();
	$("a[rel='r1']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r2']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r3']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r4']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r5']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r6']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r7']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r8']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r9']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r10']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r11']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r12']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r13']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r14']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r15']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r16']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r17']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r18']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r19']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r20']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r21']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r22']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r23']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r24']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r25']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r26']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r27']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r28']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r29']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r30']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r31']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r32']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r33']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r34']").colorbox({transition:"fade",slideshow:true});
	$("a[rel='r35']").colorbox({transition:"fade",slideshow:true});
});


/*
$(document).ready(function(){
   $(".scroll").click(function(event){
   //prevent the default action for the click event
   event.preventDefault();
  //get the full url - like mysitecom/index.htm#home
  var full_url = this.href;
  //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
  var parts = full_url.split("#");
  var trgt = parts[1];
  //get the top offset of the target anchor
  var target_offset = $("#"+trgt).offset();
  var target_top = target_offset.top;
  //goto that anchor by setting the body scroll top to anchor top
  $('html, body').animate({scrollTop:target_top}, 500);
  });
});
*/



