$(document).ready(function(){
			manageSlimBox();
			manageExtLnk();
						   })
function manageSlimBox(){
	var post = $('.dc-post #main').find('.post')
	$(post).each(function (i) {
		
		var elImg = $(this).find('a').children('img');
		var el = $(elImg).parent('a')

		$(el).attr('rel','lightbox-' + i); 
		$(el).slimbox({counterText: "Image {x} sur {y}"});
		
		$(elImg).each(function (i) {
			var imgAlt = $(this).attr('alt');
			$(this).parent('a').attr('title', imgAlt);
			
			$(this).parent('a').attr('class','img2Click')
			$(this).parent('a').append('<span class="clickMe"></span>');
 			var float = $(this).css("float");
			if($(float)){
				$(this).parent('a').css("float",float)
				$(this).css("float","none")
			}
  			$(this).next().css({top:$(this).height() - 17 , left:$(this).width()-17});
			});
		});
}
function manageExtLnk(){
	$('.catalogueHeader a').click(function(){window.open(this.href);return false;})

}