// JavaScript Document

$(window).load(function(){
	$("#loading").hide();
}) ;

$(function(){
	$('#crossslide').crossSlide({
	  sleep: 2,
	  fade: 2
	}, [
	  {src:'images/project_dspot.jpg'},
	  {src:'images/project_doorwerk.jpg'},
	  {src:'images/project_rieuenquete.jpg'},
	  {src:'images/project_aalbekerhoeve.jpg'}
	]);
});

$(document).ready(function(){
	$("img.a").hover(
	function() {
		$(this).stop().animate({"opacity": "0"}, "fast");
	},
	function() {
		$(this).stop().animate({"opacity": "1"}, "fast");
	});
});

$(document).ready(function () {
	$('#slidingDiv').hide();
	$('a#showhideslidingDiv').click(function () {
		$('#slidingDiv').animate({"width": "toggle"}, { duration: 1000 })
	});
});

$(function(){
	var spt = $('span.mailme');
	var at = / at /;
	var dot = / dot /g;
	var addr = $(spt).text().replace(at,"@").replace(dot,".");
		$(spt).after('<a href="mailto:'+addr+'" title="Send an email">'+ addr +'</a>')
		.hover(function(){window.status="Send a letter!";}, function(){window.status="";});
		$(spt).remove();
});

$(function(){
	$.superbox();
});

$.superbox.settings = {
	boxId: "superbox", // Id attribute of the "superbox" element
	boxClasses: "", // Class of the "superbox" element
	overlayOpacity: .8, // Background opaqueness
	boxWidth: "600", // Default width of the box
	boxHeight: "400", // Default height of the box
	loadTxt: "Loading...", // Loading text
	closeTxt: "Close", // "Close" button text
	prevTxt: "Previous", // "Previous" button text
	nextTxt: "Next" // "Next" button text
};
