/**
 * jQuery.jFader
 * Copyright (c) 2008 XombieDesign - http//xombiedesign.com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * Date: 8/13/2008
 * @authors Ryan Holt + Trip Oneal
 * @version 1.0.4
 *
 * Requires: jQuery 1.2+
 *
 */
 
 
 $(function() {
// Create all "top" anchors
	$("#content>div.section").addClass('faqItem'); // Add class to the li

// Start "subNav" list, read content of each Header tag and create "subNav" li dynamically
	$("#ideal").after('<table width="100%" id="pdfs"><tr id="bandaMenu"></tr></table>');
	$(".faqItem").attr("goat", function (a) { return a; });
	$(".faqItem>h2").each(function(i){
		$('<td width="50%" align="center"><a href="#'+(i)+'" monkey="'+(i)+'" title="'+$(this).text()+'">'+$(this).html()+'</a></td>').appendTo('#bandaMenu');
	});
	$(".faqItem").hide();
	
	$('a[monkey*=]').click(function() {
		
		if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[goat=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset-0}, 'slow');
				($target).addClass('sectionStyle').fadeIn("slow").siblings(".faqItem").hide(); // Add class to the target li
				return false;
			}
		}
	});

	
// remove box from links
	$('a').focus(function(){
		this.blur();
	});
});
 
 