// Entrypoint for all custom .js calls for the website
$(document).ready(function(){
	// Decrypt all emails
	$('a').edecrypt();
	
	// Change all images in blurbs so that they have a border
	$('.blurb.big img').not('.noborder').wrap("<div class='holder-large-image' />");
	$('.blurb.small img').not('.noborder').wrap("<div class='holder-small-image' />");
	$('#sidebar img').not('.noborder').wrap("<div class='holder-medium-image' />");
	$('#content img.border').each(function(){
		$(this).wrap("<div class='holder-large-image' />");
		$(this).parent().css('float', $(this).css('float'));
		if ($(this).css('float') == 'left') {
			$(this).parent().css('margin-right', '20px');
		}
		if ($(this).css('float') == 'right') {
			$(this).parent().css('margin-left', '20px');
		}
	});

	// Diaporama on each page ( crossfader )
	$('#diaporama .diaporama-item').dumbCrossFade({ 
		'doHoverPause' : false,
		'showTime' : 5000,
		'transitionTime' : 500
	});
});

