$(window).load(function() {
	var FirstImageId = 1;
	var caption = new Array();	
	caption["en"] = new Array(49);
	caption["fr"] = new Array(49);
	
		
	caption["en"][0] = "A young Tom Auburn and his first set of linking rings";
	caption["fr"][0] = "Un jeune Tom Auburn et ses premiers anneaux chinois";
		
	caption["en"][3] = "Tom and his mentor were close friends";
	caption["fr"][3] = "Tom avait développé une grande amitié avec son mentor";
	
	caption["en"][4] = "A promotional shot with Joanne the duck";
	caption["fr"][4] = "Une photo promotionnelle avec Joanne";
	
	caption["en"][5] = "Don’t ask what your country can do for you but what you can do for your country";
	caption["fr"][5] = "Si la vie...et la magie vous intéresse";	
		
	caption["en"][6] = "Saving Private Auburn!";
	caption["fr"][6] = "Il faut sauver le soldat Auburn";	
	
	caption["en"][7] = "Is this your card?";
	caption["fr"][7] = "Est-ce votre carte?";
	
	caption["en"][8] = "Do you see your card somewhere?";
	caption["fr"][8] = "Votre carte est-elle dans ce paquet?";
	
	caption["en"][10] = "The beautiful zombie illusion without any cover";
	caption["fr"][10] = "Le zombie sans foulard";	
	
	caption["en"][11] = "Be sure to mix all the cards!";
	caption["fr"][11] = "Soyez certain de bien mélanger les cartes";
	
	caption["en"][12] = "Which envelope has the real money?";
	caption["fr"][12] = "Quelle enveloppe contient l’argent véritable?";
	
	caption["en"][13] = "Don’t put anything in my Armani jacket!";
	caption["fr"][13] = "Prenez garde à ce que vous mettez dans la poche de mon veston Armani";
	
	caption["en"][14] = "Magic Tom makes a girl disappear";
	caption["fr"][14] = "Oncle Tom fait disparaître une jeune fille";
	
	caption["en"][15] = "Can I keep the bird Magic Tom?";
	caption["fr"][15] = "Puis-je garder l’oiseau Oncle Tom?";

	caption["en"][16] = "Magic Tom was always generous with the participants on his tv show";
	caption["fr"][16] = "Oncle Tom était toujours très généreux avec les enfants qui participaient à son émission de télé";

	caption["en"][17] = "On the set of The Magic Tom Road Show";
	caption["fr"][17] = "Une photo prise lors du tournage de l’émission The Magic Tom Road Show";			
			
	caption["en"][18] = "Tom overlooking Montreal";
	caption["fr"][18] = "Tom sur la montagne";
	
	caption["en"][19] = "Tom was very kind with his fans";
	caption["fr"][19] = "Tom était d’une gentillesse avec tous ses fans";
				
	caption["en"][20] = "The floating glass performed on television";
	caption["fr"][20] = "Le verre aérostatique tel que présenté à la télévision";
	
	caption["en"][21] = "What a great experience for this little girl";
	caption["fr"][21] = "Une jeune fille qui n’est pas prête d’oublier sa journée";

	caption["en"][22] = "Magic Tom performed very often for the children’s hospitals";
	caption["fr"][22] = "Oncle Tom se rendait régulièrement auprès des enfants malades";
	
	caption["en"][23] = "Tom also liked to give free shows for the orderly";
	caption["fr"][23] = "Tom donnait souvent des spectacles gratuits pour les personnes âgées";
		
	caption["en"][25] = "Magic with class…and a cape";
	caption["fr"][25] = "De la magie avec beaucoup de classe...et une cape";

	caption["en"][26] = "An autographed picture for Rejean Page";
	caption["fr"][26] = "Une photo dédicacée pour Réjean Pagé";
	
	caption["en"][27] = "Magic Tom and magician Eugene Burger in Montreal";
	caption["fr"][27] = "Oncle Tom et le magicien Eugene Burger à Montréal";
	
	caption["en"][29] = "The first meeting between Magic Tom and a young Rejean Page in 1978";
	caption["fr"][29] = "La première rencontre entre Oncle Tom et un jeune Réjean Pagé en 1978";
	
	caption["en"][30] = "The floating card";
	caption["fr"][30] = "Une carte en apesanteur";
		
	caption["en"][31] = "Tom only used very light cigarettes";
	caption["fr"][31] = "Tom n’utilisait que des cigarettes légères";
	
	caption["en"][32] = "Ready to open a flower shop";
	caption["fr"][32] = "Prêt à ouvrir une boutique de fleurs";
	
	caption["en"][33] = "The cards were appearing from everywhere";
	caption["fr"][33] = "Les cartes semblaient apparaitre de partout";		
			
	caption["en"][34] = "The razor blades illusion";
	caption["fr"][34] = "Un numéro à vous couper l’appétit!";
	
	caption["en"][35] = "Better watch out Houdini!";
	caption["fr"][35] = "Tom venait-il de se marier ou rendait-il hommage à Houdini?";
	
	caption["en"][36] = "A rising card that raise eyebrows";
	caption["fr"][36] = "Une magnifique version de la carte qui lève";
	
	caption["en"][37] = "A silk parade";
	caption["fr"][37] = "Une parade de foulards";
	
	caption["en"][38] = "Tom helps someone get inside the temple of Benares.";
	caption["fr"][38] = "Tom aide une volontaire à s’introduire dans le temple de Benares";
	
	caption["en"][39] = "Tom and his oldest assistant";
	caption["fr"][39] = "Tom et une assistante très âgée";

	caption["en"][40] = "With Tom, any kind of levitation was almost genuine";
	caption["fr"][40] = "Avec Tom, les lévitations de toutes catégories étaient presque réelles";
	
	caption["en"][41] = "The card on the sword illusion";
	caption["fr"][41] = "La carte et l’épée";
	
	caption["en"][42] = "A new kind of fan";
	caption["fr"][42] = "Un nouvel sorte d’éventail avec les cartes";
	
	caption["en"][43] = "Tom and his first spirit cabinet";
	caption["fr"][43] = "Tom et son premier cabinet aux esprits";
		
	caption["en"][44] = "Magic Tom and his first book test";
	caption["fr"][44] = "Tom et son premier test de mentalisme avec un livre";
	
	caption["en"][45] = "Is he too young to smoke?";
	caption["fr"][45] = "Tom serait-il trop jeune pour fumer?";

	caption["en"][46] = "The multiplying billard balls";
	caption["fr"][46] = "Les boules de billard qui se multiplient";
		
	caption["en"][47] = "The trick is over and the girl is still in one piece";
	caption["fr"][47] = "Le numéro est terminé est la fille est toujours en un seul morceau";
	
	caption["en"][48] = "For just a moment, magic makes you forget everything";
	caption["fr"][48] = "L’espace d’un instant, la magie vous fait oublier votre quotidien";
	
	caption["en"][49] = "Almost as dangerous as a grenade!";
	caption["fr"][49] = "Presque aussi dangereux qu’une grenade!";
	
	var lang = "en";
	if (gup("lang") === "fr")
		lang = "fr";
	
	$(".caption").text( caption[lang][FirstImageId - 1 ] );
	
	$(".thumb").each(function() {
		var id = $(this).attr("id");
		$(this).attr("title",caption[lang][id - 1]);		
	});
});

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
