$(document).ready(function(){

$(".thumbs").click(function(){
id=this.id;
id=id.split("h");
$("#bigimg").html("<div style='text-align:center;padding-top:240px; color:black'><img src=grafix/ajax-loader.gif id=loading width=220 height=19 valign=top></div>");
	$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_newbigone.php",
		data: {
		id:id[1],
		count:'yes'
		},
		success: function(response){
		response=response.split('||');
		$("#bigimg").hide();
		//$("#bigimg").html(response[0]).fadeIn(1000);
		$("#bigimg").html(response[0]);$("#bigimg").hide();
		$("#bigimg").fadeIn(1000);
		$(".title").html(response[1]);
		$("#slide").html(response[2]);
		$(".date").html(response[3]);
		//$("#lg").focus();
		}
	});
});



$("#slide").hide();
$("#plus").click(function(){
if ($("div#slide").is(":hidden")) {
        $("#slide").slideDown("slow");
		$("#plus").attr("src","grafix/min.gif");
      } else {
        $("#slide").slideUp("slow");
		$("#plus").attr("src","grafix/plus.gif");
		}
});



$("a.react").click(function(){
	id=this.id;//alert(id);
	
	id=id.split("r");
	id=id[1];
	$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_react.php",
		data: {
		id:id
		},
		success: function(response){
				//$("#plus").html('');
		$("#rightslide").html("");
		$("#plus").attr("src","grafix/plus.gif");
		$("#bigimg").html(response);
$("#slide").slideUp("slow");

		}
	});
	
	
	
	
	
	
	
	
});




//----archief---
$("#arch").click(function(){

//$(".bigimg").html("<div style='text-align:center;padding-top:240px; color:black'><img src=grafix/ajax-loader.gif id=loading width=220 height=19 valign=top></div>");
$(".bigimg").load("archief.php");
$(".title").html("");
//$("img#plus").html("");
});





//sendcontact
$("#sendcontact").click(function(){
email=$("#email").val();
reactie=$("#bericht").val();
$("#form").html("<div style='text-align:center;padding-top:140px;padding-left:180px; color:black;><img src=grafix/ajax-loader.gif id=loading width=220 height=19 valign=top></div>");

	$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_contact.php",
		data: {
		email:email,
		reactie:reactie
		},
		success: function(response){
			response=response.split("|");
			a=response[0];
			
			if(a=='1'){
				$("#err").html(response[1]);}
			if(a=='2'){
				$("#form").html(response[1]);
				$("#err").html('');
				}
		}
	});
});




});



//-----------end  bodyload------
function sendreact(){
id=$("#id").val();
naam=$("#naam").val();
comment=$("#reactie").val();
if(naam==''){
alert('uw naam invullen aub');
return false;
}
key=$("#key").val();
keysol=$("#keysol").val();

if(key==''){
alert('uw anti-spam key mag niet leeg zijn');
return false;
}
if(key!=keysol){
alert('uw anti-spam key is fout');
return false;
}

if(comment==''){
alert('uw commentje is leeg');
return false;
}


url=$("#url").val();
reactie=$("#reactie").val();
	$.ajax({
			type: "POST",
			dataType: "html",
			url: "scr_postreact.php",
			data: {
			id:id,
			naam:naam,
			key:key,
			url:url,
			reactie:reactie
			},
			success: function(response){
					response=response.split('||');
			$("#rightreact").html(response[0]);
			//$(".title").html(response);
			$("#form").html(response[1]);
			//$(".date").html(response[3]);
			//$("#lg").focus();
			}
	
	});
}


function toonreact(id){
	$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_react.php",
		data: {
		id:id
		},
		success: function(response){
		$("#slide").slideUp("slow");
		$("#plus").attr("src","grafix/plus.gif");
		$("#bigimg").html(response);
		$("#rightslide").html('');
		}
	});
}

function returntobigpic(id){

$("#bigimg").html("<div style='text-align:center;padding-top:240px; color:black'><img src=grafix/ajax-loader.gif id=loading width=220 height=19 valign=top></div>");

	$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_newbigone.php",
		data: {
		id:id,
		count:'no'
		},
		success: function(response){
		response=response.split('||');
		$("#bigimg").html(response[0]).fadeIn();
		$(".title").html(response[1]);
		$("#slide").html(response[2]);
		$(".date").html(response[3]);
		//$("#lg").focus();
		}
	});

}

function showbigpic(id){

$("#bigimg").html("<div style='text-align:center;padding-top:240px; color:black'><img src=grafix/ajax-loader.gif id=loading width=220 height=19 valign=top></div>");

	$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_newbigone.php",
		data: {
		id:id,
		count:'yes'
		},
		success: function(response){
		response=response.split('||');
		$("#bigimg").html(response[0]).fadeIn();
		$(".title").html(response[1]);
		$("#slide").html(response[2]);
		$(".date").html(response[3]);
		//$("#lg").focus();
		}
	});

}



function more(from){
$.ajax({
		type: "POST",
		dataType: "html",
		url: "scr_fotofooter.php",
		data: {
		from:from
		},
		success: function(response){
		$("#bigfooterinner").html(response);
	
		}
	});
}