/*
 * equipement_usage.js
 * js de la section Équipement usagé
 * simon - egzakt.com
 * 2009-03-04
 */

var activepreview = null;

function document_ready_equipused() {

	activepreview = $("#equipphotos .preview a:first");

	$("#equipphotos .preview a").click(function() {
		var img_src = $(this).children("img").attr("src");
		activepreview = $(this);

		low_res = LowResourcePath[img_src];

		$("#equipphoto img").attr("src",low_res);

		$("#equipphoto a.enlarge").attr("href",$(this).attr('href'));
		return false;
	});
	
	$("#equipphoto a.enlarge").click(function() {
		var href = $(this).attr('href');
		if (document_port != 80)
			href = ':'+document_port+href;	// Pour hewitt en DEV
		tb_show(activepreview.children('img').attr('alt'),'http://'+document.domain+href,activepreview.attr('rel'));
		return false;
	});
	$("#equipphoto .view span").click(function() {
		var href = $(this).parent().prev().attr('href');
		if (document_port != 80)
			href = ':'+document_port+href;	// Pour hewitt en DEV
		tb_show(activepreview.children('img').attr('alt'),'http://'+document.domain+href,activepreview.attr('rel'));
		return false;
	});
}
