function photoBorder()
{
	$('.imageTL, .imageBR').remove();
	$('.photo img').each(function(i){
		$(this).parent().before('<div class="imageTL" style="left:'+($(this).offset().left-8)+'px; top:'+($(this).offset().top-8)+'px">&nbsp;</div>').after('<div class="imageBR" style="left:'+($(this).offset().left+$(this).width()-32)+'px; top:'+($(this).offset().top+$(this).height()-32)+'px">&nbsp;</div>');
	});
}

$(window).load(function(){
  photoBorder();
});

$(window).bind('resize', function(){
	photoBorder();
})
