/*************************************************
  JavaScript functions for Iris Ministris
  Created: June 4, 2009, by FORGE (forgeideas.com)
  Author: Ben Callahan
*************************************************/

/**************************************************
  All jQuery calls should be placed inside
  this function.

	This jQuery function will hid the primary nav
	sub-items, then show the "current" sub-item.
		- it also handles the sliding/revealing on
			click events
**************************************************/
$(function() {

/*   $("#sub-nav").addClass("has-sub-links"); */

	$('#pri-nav .top ul').hide();
	$('#pri-nav .top.current ul').show();
	$('#pri-nav .top.current ul ul').hide();
	$('#pri-nav .top.current ul .current ul').show();


/*   Removing Clicks: BDC
	$('#pri-nav li.top').click(function() {
		// $('#pri-nav .top ul').slideUp();
		$('#pri-nav .top').removeClass("current");
		// $(this).children("ul").slideDown();
		$(this).addClass("current");
		
		// reset the display
		$('#pri-nav .top ul').hide();
		$('#pri-nav .top.current ul').show();
		$('#pri-nav .top.current ul ul').hide();
		$('#pri-nav .top.current ul .current ul').show();
	});

	$('#pri-nav li.top ul li').click(function() {
		// $('#pri-nav .top ul li ul').slideUp();
		$('#pri-nav .top ul li').removeClass("current");
		// $(this).children("ul").slideDown();
		$(this).addClass("current");
		
		// reset the display
		$('#pri-nav .top ul').hide();
		$('#pri-nav .top.current ul').show();
		$('#pri-nav .top.current ul ul').hide();
		$('#pri-nav .top.current ul .current ul').show();
	});
*/




     $('#sub-nav ul ul').hide();
     $('#sub-nav ul ol').hide();

     $('#sub-nav ul li.current ul').show();
     $('#sub-nav ul li.current ol').show();

/*   Removing Clicks: BDC
     $('#sub-nav li a').click(function() {
          $('#sub-nav *').removeClass("current");
          $(this).parent().parent().parent('li').addClass("current");
          $(this).parent().addClass("current");

          $('#sub-nav ul ul').hide();
          $('#sub-nav ul li.current ul').show();

          $('#sub-nav ul ol').hide();
          $('#sub-nav ul li.current ol').show();
     });
*/



/*
     $('#map-holder #region-africa-northern').hover(
          function() {
               $(this).children("img").fadeIn();
          },
          function() {
               $("#region-africa-northern img").fadeOut();
          }
     );
*/

/*
     $('#map-holder .region').hide();
     $('div.location1 #location1').show();
     $('div.location2 #location2').show();

     $('a.location1').hover(
          function() {
               $('#map-holder #location1').fadeIn();
          },
          function() {
               $('#map-holder #location1').fadeOut();

               $('div.location1 #location1').fadeIn();
               $('div.location2 #location2').fadeIn();

          }
     );

     $('a.location2').hover(
          function() {
               $('#map-holder #location2').fadeIn();
          },
          function() {
               $('#map-holder #location2').fadeOut();

               $('div.location1 #location1').fadeIn();
               $('div.location2 #location2').fadeIn();
               
          }
     );
*/
	
	/*
$('select#paymentType').change( function (){
		var str = $('select#paymentType option:selected').text();
		if(str == 'Electronic Check'){
			$('#ccInfo').hide();
			$('#checkInfo').fadeIn("slow");
		}else{
			$('#ccInfo').fadeIn("slow");
			$('#checkInfo').hide();
		}
	});
*/
	
	/*
$('select#paymentType').change();
*/
	
	$(window).load(function(){
		$('h5#theMessage').css('backgroundColor', 'yellow');
		$('h5#theMessage').css('paddingTop', 10);
		$('h5#theMessage').css('marginTop', 4);
		$('h5#theMessage').css('paddingBottom', 10);
		$('h5#theMessage').animate({
			opacity: .8,
			backgroundColor: "white"
		}, 2000);
	});
	
	//go up a z-index, or whatever
	function flashBig() 
	{
		//alert('flash on top!');
		
		$("#expanding-map").animate({
			width: "394px",
			height: "511px"
			}, 0 );	
			
	}
	
	//go down a z-index
	function flashSmall()
	{
		//alert('flash on bottom');
		
		$("#expanding-map").animate({
			width: "194px",
			height: "250px"
			}, 150 );
	}
	
	

	//NEXT jQuery Call Goes HERE
	
});