﻿/* toggle div content */

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready (a little sooner that page load)
  $('.togglebox').hide();
  
 // shows and hides and toggles the togglebox on click  
  $('.show').click(function() {
    $('.togglebox').show('slow');
    return false;
  });
  $('.hide').click(function() {
    $('.togglebox').hide('fast');
    return false;
  });
  $('.toggle').click(function() {
    $('.togglebox').toggle(400);
    return false;
  });

 // slides down, up, and toggle the togglebbox on click    
  $('.down').click(function() {
    $('.togglebox').slideDown('slow');
    return false;
  });
  $('.up').click(function() {
    $('.togglebox').slideUp('fast');
    return false;
  });
  $('.slidetoggle').click(function() {
    $('.togglebox').slideToggle(400);
    return false;
  });  
});


/* Toggle link text */
oldTextAry = new Array();
function changeText (fieldObj, newTexStr) {
if (newTexStr == fieldObj.innerHTML) {
fieldObj.innerHTML = oldTextAry[fieldObj.id];
} else {
oldTextAry[fieldObj.id] = fieldObj.innerHTML;
fieldObj.innerHTML = newTexStr;
	}
}
