//Drop Down Menu//
var idsto;
function startList(){
	$('#nfw-mainnav').children('li').each(function(i){
		$(this).mouseover(function(){cr();r();$(this).addClass('over');});	
		$(this).mouseout(function(){idsto=window.setTimeout('r()',500);});
	});
}
function cr(){window.clearTimeout(idsto);}
function r(){$('#nfw-mainnav').children('li').each(function(i){$(this).removeClass('over');});}

/**
 * Lightbox 4.0
 * 
 */
$(function() {
  $('#gallery a').lightBox({
  	overlayBgColor: '#000000',
	overlayOpacity: 0.8,
	imageLoading: 'http://www.navigatortest.com/blueimp/images/lightbox/lightbox-ico-loading.gif',
	imageBtnClose: 'http://www.navigatortest.com/blueimp/images/lightbox/lightbox-btn-close.gif',
	imageBtnPrev: 'http://www.navigatortest.com/blueimp/images/lightbox/lightbox-btn-prev.gif',
	imageBtnNext: 'http://www.navigatortest.com/blueimp/images/lightbox/lightbox-btn-next.gif',
	imageBlank:'http://www.navigatortest.com/blueimp/images/lightbox/lightbox-blank.gif',
	containerResizeSpeed: 400,
	txtImage: 'Photo',
	txtOf: 'of',
	keyToClose: 'c',
	keyToPrev: 'p',
	keyToNext: 'n'
   });
});

/**
 * Accordian Menu Show One at a Time
 * .slideToggle values(slow, normal, fast)
 */
 $(document).ready(function() {
 $('.btEvent').click( function(){
							   if ($(this).html()=='Hide Article') $(this).addClass('tmp_hide');
							   $('.btEvent').html('Read More');
							   if ($(this).html()=='Read More') $(this).html('Hide Article');
							   else $(this).html('Read More');
							   $('.tmp_hide').html('Read More').removeClass('tmp_hide');
							   }
					  );
 
 $('.header:eq(0)').addClass('on');		
 $('.btEvent','.header:eq(0)').click();
 $('div#event> .txt:gt(0)').hide(); 
 $('div#event> .header').click(function() {
 $('.btEvent',$(this)).click();
 $(this).addClass('on')
 .siblings('.header').removeClass('on');
	var $nextDiv = $(this).next();
    var $visibleSiblings = $nextDiv.siblings('.txt:visible');

	if ($visibleSiblings.length ) {
      $visibleSiblings.slideUp('fast', function() {
        $nextDiv.slideToggle('fast');

      });
    } else {
       $nextDiv.slideToggle('fast');
    }
  });
});
