﻿//Javascript
//NAME: misc.js (Contains multiple jQuery functions)
// #1 DESCRIPTION: When the Contact Infor or identity and mission link in the Quick Links list is 
//clicked, display window (id=c0ntact_info)
//(id=identity)(id=mission)
//
  $(document).ready(function(){
   
      $("#contact").click(function () {
      $("#contact_info").fadeIn("slow")
      $("#identity").fadeOut("slow")
 	  });

   });
 $(document).ready(function(){
 
 	$(".close").click(function () {
 	$("#contact_info").fadeOut("slow")
 	$("#identity").fadeOut("slow")
 	});
 	
   });

  $(document).ready(function(){
   
      $("#ident").click(function () {
      $("#identity").fadeIn("slow")
      $("#contact_info").fadeOut("slow") 
 	  });
   });

// #2 Description: When a photo is clicked (our_stories.htm) the corresponding text is displayed.

$(document).ready(function(){
      $("#photo_1").click(function () {
      $(".txtLayer1").fadeIn("slow")
      $(".txtLayer2").fadeOut("slow")
 	  $(".txtLayer3").fadeOut("slow")
      $(".txtLayer4").fadeOut("slow")
 	  $(".txtLayer5").fadeOut("slow")
	  $(".txtLayer6").fadeOut("slow")
      },
      function () {
       $(".txtLayer1").fadeOut("slow")
       $(".txtLayer0").fadeIn()
 	  });
   });
   
$(document).ready(function(){
      $("#photo_2").click(function () {
      $(".txtLayer2").fadeIn("slow")
      $(".txtLayer1").fadeOut("slow")
 	  $(".txtLayer3").fadeOut("slow")
      $(".txtLayer4").fadeOut("slow")
      $(".txtLayer5").fadeOut("slow")
	  $(".txtLayer6").fadeOut("slow")
      },
      function () {
        $(".txtLayer2").fadeOut("slow")
        $(".txtLayer0").fadeIn()
 	  });
   });
   
   $(document).ready(function(){
      $("#photo_3").click(function () {
      $(".txtLayer3").fadeIn("slow")
      $(".txtLayer1").fadeOut("slow")
 	  $(".txtLayer2").fadeOut("slow")
      $(".txtLayer4").fadeOut("slow")
      $(".txtLayer5").fadeOut("slow")
	  $(".txtLayer6").fadeOut("slow")
      },
      function () {
        $(".txtLayer3").fadeOut("slow")
        $(".txtLayer0").fadeIn()
 	  });
   });

   $(document).ready(function(){
      $("#photo_4").click(function () {
      $(".txtLayer4").fadeIn("slow")
      $(".txtLayer1").fadeOut("slow")
 	  $(".txtLayer2").fadeOut("slow")
      $(".txtLayer3").fadeOut("slow")
      $(".txtLayer5").fadeOut("slow")
	  $(".txtLayer6").fadeOut("slow")
      },
      function () {
        $(".txtLayer4").fadeOut("slow")
        $(".txtLayer0").fadeIn()
 	  });
   });

   $(document).ready(function(){
      $("#photo_5").click(function () {
      $(".txtLayer5").fadeIn("slow")
      $(".txtLayer1").fadeOut("slow")
 	  $(".txtLayer2").fadeOut("slow")
      $(".txtLayer3").fadeOut("slow")
      $(".txtLayer4").fadeOut("slow")
	  $(".txtLayer6").fadeOut("slow")
      },
      function () {
        $(".txtLayer5").fadeOut("slow")
        $(".txtLayer0").fadeIn()
 	  });
   });

   $(document).ready(function(){
      $("#photo_6").click(function () {
      $(".txtLayer6").fadeIn("slow")
      $(".txtLayer1").fadeOut("slow")
 	  $(".txtLayer2").fadeOut("slow")
      $(".txtLayer3").fadeOut("slow")
      $(".txtLayer4").fadeOut("slow")
	  $(".txtLayer5").fadeOut("slow")
      },
      function () {
        $(".txtLayer6").fadeOut("slow")
        $(".txtLayer0").fadeIn()
 	  });
   });



// #3 Description: community.htm - displays workshop panel for each community

 $(document).ready(function(){
      $("#dub_ws").click(function () {
      $("#dublin_ws").fadeIn("slow")
      $(".close_ws").fadeIn("slow")
 	  });
   });

 $(document).ready(function(){
      $("#bf_ws").click(function () {
      $("#belfast_ws").fadeIn("slow")
 	  });
   });

 $(document).ready(function(){
      $("#crk_ws").click(function () {
      $("#cork_ws").fadeIn("slow")
 	  });
   });

 $(document).ready(function(){
      $("#kk_ws").click(function () {
      $("#kilkenny_ws").fadeIn("slow")
 	  });
   });

 $(document).ready(function(){
 
 	$(".close_ws").click(function () {
 	$("#dublin_ws").fadeOut("slow")
  	$("#belfast_ws").fadeOut("slow")
 	$("#cork_ws").fadeOut("slow")
 	$("#kilkenny_ws").fadeOut("slow")
 	$(".close_ws").fadeOut("slow")
 	});
  });

// #4 Description: who_we_are.htm - display Mary McAleese text box
$(document).ready(function(){
      $("#mm_Open").click(function () {
      $("#mm_text").fadeIn("slow")
 	  });
   });

$(document).ready(function(){
      $("#close_mm").click(function () {
      $("#mm_text").fadeOut("slow")
 	  });
   });

// #5 Description: community life.htm - display L'Arche Prayer text box
$(document).ready(function(){
      $("#prayer_open").click(function () {
      $("#prayer").fadeIn("slow")
 	  });
   });

$(document).ready(function(){
      $("#prayer_close").click(function () {
      $("#prayer").fadeOut("slow")
 	  });
   });

// #6 Description: index.htm - Hide the video graphic
$(document).ready(function(){
      $("#video").hover(function () {
      $(".video_player").fadeOut("slow")
       });
   });

// #7 Description: who_we_are.htm - display Kilkenny Story text box
$(document).ready(function(){
      $("#story_Open").click(function () {
      $("#story_text").fadeIn("slow")
	  });
   });

$(document).ready(function(){
     $("#close_story").click(function () {
     $("#story_text").fadeOut("slow")
	  });
  });


