$(document).ready(function() {
// Following just removes outline on links & can be moved to more generic location.  
$('a').focus(function() {
  this.blur();
});
}); // end doc.ready()

function contentChanger(navLinks, targetTags, linksOffset, startContent, finalOpacity, duration){

// contentChanger() written by Richard Peterson for Watel Design
// richardpeterson@hypercontinuum.com
// http://www.wateldesign.com
// Last update on 8/20/2010
// jQuery is required for this script.

// Explanation of variables
// navLinks = "#recList a"; // CSS definition of links to targets; required.
// targetTags = "#atouts div"; // CSS definition of target content; required.
   		// There should always be an equal number of links and targets.
    	// With both CSS definitions, only have the ID and the element, as shown. 
// linksOffset = 0;  // First link to show; all following links are displayed.
					// Links are an array and first link is 'link(0)' even if not used.
					// Default link is '0'.
// startContent = 0;   // Initial content tag to show.
					// Content is numbered starting at zero.
  				// to have no content show at page load, have content tag(0) be empty.
// finalOpacity = 1;  // opacity at end of animation; default is 1 (opaque)
// duration = 750;   	// default is 500

// Initialize variables if they haven't been already
  linksOffset == undefined ? linksOffset = 0 : linksOffset // 0 shows all
  startContent == undefined ? startContent = 0 : startContent // 0 shows all
	finalOpacity == undefined ? finalOpacity = 1 : finalOpacity // 1 = opaque
	duration == undefined ? duration = 500 : duration // in milliseconds

// Initialize hidden content
	pos = navLinks.search(/\s/);
	navLinksContainer = navLinks.slice(0, pos);
  $(navLinksContainer).show();
  linksLessThan = navLinks + ":lt(" + linksOffset + ")";
	$(linksLessThan).hide();
	pos = targetTags.search(/\s/);
	targetTagsContainer = targetTags.slice(0, pos);
	$(navLinks).each(function(index){
    $(this).attr("href", "#" + index);
    });
  $(targetTags).hide();
  $(targetTags).eq(startContent).show();
  
$(navLinks).click(function(){
	 $(navLinks).removeClass('hot');
 	$(this).addClass('hot');
	thisHref = $(this).attr('href');
	thisHref = thisHref.slice(1);
  $(targetTags).hide().eq(thisHref).css('opacity', '0');
  $(targetTags).eq(thisHref).animate({
  		opacity: finalOpacity,
	    height: 'toggle'
    }, duration);
  return false;
  }); // end click()
} // end contentChanger()


