$(document).ready(function(){

   var pic1 = new Array();

   for (i=1;i<=35;i++) {

      pic1[i] = new Image(220,220); 

   		pic1[i].src ="http://isa-degermann.com/images/img" + i + ".jpg"; 

	 }

	 var pic2 = new Array();

	 for (i=1;i<=35;i++) {

   		pic2[i] = new Image(220,220); 

			pic2[i].src ="http://isa-degermann.com/images/lgimg" + i + ".jpg";

	 } 

	 var text_fr = new Array();
	 var text_en = new Array();

   		text_fr[0] = '"La femme qui craint l\'Eternel est digne de louanges." ( Prov 31 : 30 )'; 
   		text_fr[1] = '"Roi des rois, Seigneur des Seigneurs"'; 
   		text_fr[2] = '"Toutes les familles de la terre seront bénies en toi" ( Gen 12 : 3 )'; 
   		text_fr[3] = '"Ton peuple sera mon peuple, ton Dieu sera mon Dieu" ( Ruth 1 : 16 )'; 
   		text_fr[4] = '"Mon âme a soif du Dieu vivant" ( Ps 42 : 3 )'; 
   		text_fr[5] = '"Si je t\'oublie Jérusalem" ( Ps 137 : 5 )'; 
   		text_fr[6] = '"Je t\'ai gravée sur mes mains" ( Esaie 49 : 16 )'; 
   		text_fr[7] = '"Je suis à mon Bien-Aimé et mon Bien-Aimé est à moi" ( Cant. des Cant. 6 : 3 )'; 
   		text_fr[8] = '"Tu aimeras l\'Eternel, ton Dieu, de tout ton coeur, de toute ton âme et de toute ta force." ( Dt 6 : 5 )'; 
   		text_fr[9] = '"Ni par la puissance, ni par la force mais par Mon Esprit." ( Zac 4 : 6 )'; 
   		text_fr[10] = '"Je me souviendrai de mon alliance avec vous." ( Gen 9 : 15 )'; 
   		text_fr[11] = '"L\'arbre de la vie au milieu du jardin." ( Gen 12 : 3 )'; 
   		text_fr[12] = '"I am my loved, and my loved is mine." ( Cant. des Cant. 6 : 3 )'; 
   		text_fr[13] = '"Si je veux qu\'il demeure jusqu\'à ce que je vienne, que t`\'importe? Toi, suis-moi !" ( Jean 21 : 22 )'; 
   		text_fr[14] = '"Il dit et la chose arrive." ( Ps 33 : 9 )'; 
   		text_fr[15] = '"Ma colombe fais-moi voir ton visage, fais-moi entendre ta voix." ( Cant. des Cant. 2 : 14 )'; 
   		text_fr[16] = '"Et Dieu dit à Noé: Tel est le signe de l\'alliance que j\'établis entre moi et toute chair qui est sur la terre." ( Gen 9 : 17 )'; 
   		text_fr[17] = 'Le début de la vie.'; 
   		text_fr[18] = '"Ecoute la prière que ton serviteur fait en ce lieu." (1 Rois 8 : 29)'; 
   		text_fr[19] = 'L\'engagement.'; 
   		text_fr[20] = '"Je ramènerai de l\'orient ta race et je te rassemblerai de l\'occident. Je dirai au nord : Donne, et au sud : Ne retiens pas" ( Esaïe 43 : 5 ) "Ne crains rien car Je suis avec toi."'; 
   		text_fr[21] = '"Reviens vierge d\'Israël dans ces villes qui sont à toi" ( Jer. 31 : 21 )'; 
   		text_fr[22] = '"Je vous ramènerai sur la terre d\'Israël."<br /> ( Jér. 31 : 21 )'; 
   		text_fr[23] = '"Vous m\'invoquerez et vous partirez " " Vous me prierez et je vous exaucerai." ( Jer. 29 : 12 )'; 
   		text_fr[24] = '"Je ramènerai les captifs de mon peuple d\'Israël. Ils rebâtiront les villes dévastées et les habiteront..., ils cultiveront des jardins et en mangeront les fruits." ( Amos 9 : 14 )'; 
   		text_fr[25] = '"La terre est déchirée, La terre se brise, La terre chancelle." ( Esaïe 24 : 19 )'; 
   		text_fr[26] = 'La Parabole des Dix Vierges<br />( Matthieu 25:1-13 )'; 
   		text_fr[27] = '"C\'est la voix de mon bien-aimé! Le voici, il vient, Sautant sur les montagnes,<br /> Bondissant sur les collines."<br />( Cant. des Cant. 2:8 )'; 
   		text_fr[28] = '"Moi et ma maison nous servirons l\'Eternel."'; 
   		text_fr[29] = '"L\'Éternel est mon berger: je ne manquerai de rien."<br />( Psaume 23:1 )'; 
   		text_fr[30] = '"C\'est dans le calme et la confiance que sera votre force."<br />( Esaïe 30:15 )'; 
   		text_fr[31] = 'La Rivière du Temple<br />( Ezéchiel 47 )'; 
   		text_fr[32] = 'La Terre Promise<br />( Nombres 13:27 )'; 
   		text_fr[33] = 'L\'échelle de Jacob<br />( Genèse 28:12 )'; 
   		text_fr[34] = 'Le Trône au Ciel<br />( Apocalypse 4 )'; 

   		text_en[0] = '"But a woman who fears the LORD, she shall be praised."<br />( Proverbs 31:30 )'; 
   		text_en[1] = '"KING OF KINGS, AND LORD OF LORDS."<br />( Revelation 19:16 )'; 
   		text_en[2] = '"And in you all the families of the earth will be blessed."<br />( Genesis 12:3 )'; 
   		text_en[3] = '"Your people shall be my people, and your God, my God."<br />( Ruth 1:16 )'; 
   		text_en[4] = '"My soul thirsts for God, for the living God"<br />( Psalm 42:3 )'; 
   		text_en[5] = '"If I forget you, O Jerusalem."<br />( Psalm 137:5 )'; 
   		text_en[6] = '"Behold, I have inscribed you on the palms of My hands"<br /> ( Isaiah 49:16 )'; 
   		text_en[7] = '"I am my beloved\'s and my beloved is mine."<br />( Song of Solomon 6:3 )'; 
   		text_en[8] = '"Love the Lord with all your heart."<br />( Deuteronomy 6:5 )'; 
   		text_en[9] = '"Not by might nor by power, but by My Spirit."<br />( Zechariah 4:6 )'; 
   		text_en[10] = '"And I will remember My covenant, which is between Me and you."<br />( Genesis 9:15 )'; 
   		text_en[11] = '"The tree of life was in the middle of the garden."<br />( Genesis 12:3 )'; 
   		text_en[12] = '"I am my loved, and my loved is mine." ( Song of Songs 6 : 3 )'; 
   		text_en[13] = '"If I will that he remain till I come, what is that to you? You follow me."<br />( John 21:22 )'; 
   		text_en[14] = '"For He spoke, and it was done; He commanded, and it stood fast."<br />( Psalm 33:9 )'; 
   		text_en[15] = '"Let me see your form, Let me hear your voice."<br />( Song of Solomon 2:14 )'; 
   		text_en[16] = '"And God said to Noah,"This is the sign of the covenant which I have established between Me and all flesh that is on the earth."<br />( Genesis 9:17 )'; 
   		text_en[17] = '"Every male among you shall be circumcised."<br />( Genesis 17:10 )'; 
   		text_en[18] = '"Listen to the prayer which Your servant shall pray toward this place."<br /> ( 1 Kings 8:29 )'; 
   		text_en[19] = 'Commitment.'; 
   		text_en[20] = '"I will bring your offspring from the east, and gather you from the west. I will say to the north, \'Give them up!\' and to the south, \'Do not hold them back.\'"<br />( Isaiah 43:5-6 )<br />"Fear not for I am with you."'; 
   		text_en[21] = '"Return, O virgin of Israel, Return to these your cities."<br />( Jeremiah 31:21 )'; 
   		text_en[22] = '"And you will know that I am the LORD, when I bring you into the land of Israel, into the land which I swore to give to your forefathers."<br />( Ezekiel 20:42 )'; 
   		text_en[23] = '"Then you will call upon Me and come and pray to Me, and I will listen to you."<br />( Jeremiah 29 : 12 )'; 
   		text_en[24] = '"Also I will restore the captivity of My people Israel, and they will rebuild the ruined cities and live in them; "<br />"They will also plant vineyards and drink their wine, and make gardens and eat their fruit." <br />( Amos 9 : 14 )'; 
   		text_en[25] = '"The earth reels to and fro like a drunkard and it totters like a shack." <br />( Isaiah 24:20 )'; 
   		text_en[26] = 'The Parable of the Ten Virgins<br />( Matthew 25:1-13 )'; 
   		text_en[27] = '"Listen! My Lover! Look! Here he comes, leaping across the mountains,<br />bounding over the hills."<br />( Song of Songs 2:8 )'; 
   		text_en[28] = '"Me and my house, we will serve the Lord"'; 
   		text_en[29] = '"The Lord is my shepherd, I shall not be in want."<br />(  Psalm 23:1 )'; 
   		text_en[30] = '"..in quietness and trust is your strength.."<br />( Isaiah 30:15 )'; 
   		text_en[31] = 'The River From the Temple<br />( Ezekiel 47 )'; 
   		text_en[32] = 'The Promised Land<br />( Numbers 13:27 )'; 
   		text_en[33] = 'Jacob\'s Ladder<br />( Genesis 28:12 )'; 
   		text_en[34] = 'The Throne in Heaven<br />( Revelation 4 )'; 

			
$(".img").hover(

function () {

var url = $(this).css("backgroundImage");

var tmp1 = url.search(/img/) + 3;

var tmp2 = url.search(/.jpg/);

var curimg_no = parseInt(url.substr(tmp1,tmp2-tmp1));

//alert(curimg_no);

this.style.background='url(' + pic1[curimg_no + 1].src + ') no-repeat center';

}, function () {

var url = $(this).css("backgroundImage");

var tmp1 = url.search(/img/) + 3;

var tmp2 = url.search(/.jpg/);

var curimg_no = parseInt(url.substr(tmp1,tmp2-tmp1));

this.style.background='url(' + pic1[curimg_no - 1].src + ') no-repeat center';

});



      $(".c3alyah").each(function (i) {

        this.style.background='url(' + pic1[i+21].src + ') no-repeat center';

      });



      $(".c3paroles").each(function (i) {

        this.style.background='url(' + pic1[i+1].src + ') no-repeat center';

      });



      $(".c3scenes").each(function (i) {

        this.style.background='url(' + pic1[i+18].src + ') no-repeat center';

      });



      $(".smlimg").each(function (i) {

        this.style.background='url(' + pic1[i+1].src + ') no-repeat center';

      });



      $(".smlimg").hover(

      function () {

      $(this).css("color","#ffcc00");

      }, function () {

      $(this).css("color","#0066ee");

      });

			

      $("a").hover(

      function () {

      $(this).css("color","#ffcc00");

      }, function () {

      $(this).css("color","#0066ee");

      });

			

			$(".smlimg").click(function () {

        var url = this.style.backgroundImage;

        var tmp1 = url.search(/img/) + 3;

        var tmp2 = url.search(/.jpg/);

        var curimg_no = parseInt(url.substr(tmp1,tmp2-tmp1));

				$(".popupgallery").css("background",'url(' + pic2[curimg_no].src + ') no-repeat center center');

				ver = document.getElementById('ver').text;
				
				if(ver == "english version"){
				  $(".popuptext").html(text_fr[curimg_no-1]);
				}
				else{
				  $(".popuptext").html(text_en[curimg_no-1]);				
				}

			  $(".c6galerie").hide("fast");

			  $(".popupimage").show("fast");

      });

      $(".popupimage").click(function () {

			   $(".popupimage").hide("fast");

				 $(".c6galerie").show("fast");

			});

});

