// JavaScript Document

//BEGIN CONTENT HIDE/SHOW CODE
//change arrow image on click 
    
$(document).ready(function(){
    $(".textboxsmallheader").click(function () {
        $(this).children(".arrow").toggle();
            return false;
    });
});
$(document).ready(function(){
    $(".textboxheader").click(function () {
        $(this).children(".arrow").toggle();
            return false;
    });
});

// independently show and hide
$(document).ready(function() {
  $('div.content-show > div.textboxcontent:gt(0)').hide();  
  $('div.content-show > .textboxheader').click(function() {
    $(this).next().slideToggle('fast');
  });
});

// independently show and hide
$(document).ready(function() {
  $('div.content-show > div.textboxsmallcontent:gt(0)').hide();  
  $('div.content-show > .textboxsmallheader').click(function() {
    $(this).next().slideToggle('fast');
  });
});

// since first content text box is visible, arrow needs to display as opened
// this code toggles the arrow on initial load of a page for first textcontentbox
$(document).ready(function(){
if( $('.textboxcontent').is(':visible') ) {
    $("div.content-show > .textboxheader:eq(0)").children(".arrow").toggle();
};
});

$(document).ready(function(){
if( $('.textboxsmallcontent').is(':visible') ) {
    $("div.content-show > .textboxsmallheader:eq(0)").children(".arrow").toggle();
};
});
//END CONTENT HIDE/SHOW CODE

//BEGIN CONTENT HIDE/SHOW CODE FOR ALTERNATING ROW STYLE
//change arrow image on click 
    
$(document).ready(function(){
    $(".alternatingrowcollapseheader").click(function () {
        $(this).children(".arrow").toggle();
            return false;
    });
});

// independently show and hide
$(document).ready(function() {
  $('div.content-show > div.alternatingrowcontent:gt(0)').hide();  
  $('div.content-show > .alternatingrowcollapseheader').click(function() {
    $(this).next().slideToggle('fast');
  });
});

// since first content text box is visible, arrow needs to display as opened
// this code toggles the arrow on initial load of a page for first textcontentbox
$(document).ready(function(){
if( $('.alternatingrowcontent').is(':visible') ) {
    $("div.content-show > .alternatingrowcollapseheader:eq(0)").children(".arrow").toggle();
};
});

//END CONTENT HIDE/SHOW CODE


//BEGIN CONTENT HIDE/SHOW CODE FOR DOCLIST TEXTBOX
//change arrow image on click 
    
$(document).ready(function(){
    $(".textboxdocheader").click(function () {
        $(this).children(".arrow").toggle();
            return false;
    });
});

// independently show and hide
$(document).ready(function() {
  $('div.content-show > .textboxdoccontent:gt(0)').hide();  
  $('div.content-show > .textboxdocheader').click(function() {
    $(this).next().slideToggle('fast');
  });
});

// since first content text box is visible, arrow needs to display as opened
// this code toggles the arrow on initial load of a page for first textcontentbox
$(document).ready(function(){
if( $('.textboxdoccontent').is(':visible') ) {
    $("div.content-show > .textboxdocheader:eq(0)").children(".arrow").toggle();
};
});

//END CONTENT HIDE/SHOW CODE



//BEGIN TAB NAVIGATION OPT 1 CODE
$(document).ready(function() {
 $('div.strategycontent').hide();
// $('div.strategyheader a').click(function () {
//    $(this).parent('.strategyheader').next().slideToggle('fast');
//    $(this).toggleClass('strategyselected');
//    return false;
//});
$('div.strategyheader p').click(function () {
    $(this).parent('.strategyheader').next().slideToggle('fast');
    $(this).toggleClass('strategyselected');
    return false;
});
$("div.strategyheader p").hover(function () {
      $(this).addClass("hilite");
      $(this).append("<span class='arrows'>&nbsp;>></span>");
    }, function () {
      $(this).removeClass("hilite");
      $(this).find("span:last").remove();
});
});

$(function () {
       
        var tabContainers = $('div.tabs > div');
        tabContainers.hide().filter(':first').show();
        
        $('div.tabs ul#tabNavigationopt1 a').click(function () {
                tabContainers.hide();
				tabContainers.filter(this.hash).show();
                $('div.tabs ul#tabNavigationopt1 li').removeClass('selected');
                $(this).parent().addClass('selected');
                return false;
        }).filter(':first').click();
        
});
//END TAB NAVIGATION OPT 1 CODE

//BEGIN > SHOWING FOR LEFT NAV

$(document).ready(function(){
	$("span.leftnavindicator").hide();
	$('.activenav .leftnavindicator:eq(0)').show();
	   
});

//END > SHOWING FOR LEFT NAV

//BEGIN ACCORDION FOR BIOS

$(document).ready(function(){
	$('div.bioheader p.biocontent').hide();
	$('div.bioheader p.bioexpander').click(function () {	
		//$('div.biocontainer div.biocontent').hide();
		//$('div.biocontainer div.bionameheader').show();
		//$(this).hide();
		$(this).next().slideToggle('fast');
		//$(this).toggleClass('bioheaderselected');
	});
	$('div.bioheader p.bioexpander').hover(function () {
		$(this).toggleClass('bioexpanderhover');													 
	});
});

//END ACCORDION FOR BIOS

//BEGIN ANCHOR HIDE/SHOW FUNCTIONALITY

$(document).ready(function(){
            
        $('.anchorlinks a').click(function () {
											
				var a = $(this).index()/2;	
				
				$('.textboxcontent:eq(' + $(this).index() + ')').slideToggle('fast');
				$('.textboxheader:eq(' + a +')').children('.arrow').toggle();
				return true;
		});
        
});
//END ANCHOR HIDE/SHOW FUNCTIONALITY

//BEGIN RIGHT NAV REMOVE LINK ON ACTIVE ITEM

$(document).ready(function(){
						   
        $('li.activenav > a').addClass('deadlink');
        $('li.activenav > a').removeAttr('href');
     	     
});

//END RIGHT NAV REMOVE LINK ON ACTIVE ITEM
