div = {
	show: function(elem) {
		document.getElementById(elem).style.visibility = 'visible';
	},
	hide: function(elem) {
		document.getElementById(elem).style.visibility = 'hidden';
	}
}
	
$(document).ready(function() {
	$(".first").corner("tl 20px");
	$(".last").corner("bl 20px");
	$(".res-art-home").corner("bl 20px");
	$(".sum-art-rub").corner("20px");
	$(".article").corner("tl bl 30px");
	$(".attachment-gallery_thumb").corner("10px");
	$(".comments").corner("tl 20px");
	$(".txt-com").corner("tl 20px");
	$(".form-comment").corner("bl tl 20px");
	$(".form-comment textarea").corner("tl 20px");
	$(".form-comment-author").corner("tl 6px");
	$(".form-comment-email").corner("bl 6px");
	$(".txt-page").corner("tl 25px");
	$(".txt-page-2").corner("tl 25px");
});

function verifauteur() {
if (document.rechercheauteur.auteur.value.length == 0) {
		alert ('Veuillez renseigner le champ auteur');
		return false;
	}
}

function veriftitre() {
if (document.recherchetitre.titre.value.length == 0) {
		alert ('Veuillez renseigner le champ titre');
		return false;
	}
}

$(document).ready(function() {
$(".addcom").click(function(){
    $(".form-comment").slideToggle("normal");
  });
});

$(document).ready(function() {
	$("a.cover").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'titleShow' : false,
		'overlayOpacity': 0.9,
		'overlayColor' : '#33300c',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
});

$(document).ready(function() {
	$("a[rel=gallery]").fancybox({
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'titlePosition' 	: 'outside',
		'overlayOpacity': 0.9,
		'overlayColor' : '#33300c',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
});
