jQuery(document).ready(function($) {
    
    $('h1').textShadow();
    
    $('ul#main-menu')
        .supersubs({
            maxWidth:    35,
            minWidth:    15
        })
        .superfish({
            animation:   {opacity:'show',height:'show'},
            easing:      'easeOutBack'
        })
        .find('ul').bgIframe({opacity:false});

});

jQuery(document).ready(function($) {
 
  showMarkup = '<span class="question-toggle show"><span>[+]</span></span>';
  hideMarkup = '<span class="question-toggle show"><span>[&ndash;]</span></span>';
 
  explanationMarkup = '<div class="faq-explanation">' + 
    '<p class="faq-explanation-info">Click on a question to expand the answer.</p>' +
    '<span class="faq-show-all">Show All</span>' +
    '<span class="faq-hide-all">Hide All</span>' +
    '</div>';
 
  questions = $('.faq-question');
  $(questions).eq(0).before(explanationMarkup);
 
  answers = $(questions).next('.faq-answer');
  $(answers).hide();  
 
  $(questions).prepend(showMarkup);
  $(questions).toggle(showAnswer, hideAnswer);
  
  showAllButton = $('.faq-show-all');
  hideAllButton = $('.faq-hide-all');
  
  $(showAllButton).click(showAllAnswers);
  $(hideAllButton).click(hideAllAnswers);
});
 
function hideAllAnswers()
{
  $(hideAllButton).addClass('faq-hide-all-active');
  $(showAllButton).removeClass('faq-show-all-active');
    
  $(answers).slideUp('fast');
  $(questions).find('.question-toggle').replaceWith(showMarkup);
}
 
function showAllAnswers()
{
  $(showAllButton).addClass('faq-show-all-active');
  $(hideAllButton).removeClass('faq-hide-all-active');
    
  $(answers).slideDown('fast');
  $(questions).find('.question-toggle').replaceWith(hideMarkup);
}
function showAnswer()
{
  $(showAllButton).removeClass('faq-show-all-active');
  $(hideAllButton).removeClass('faq-hide-all-active');
    
  $(this).next('.faq-answer').slideDown('fast');
  $(this).find('.question-toggle').replaceWith(hideMarkup);
}
 
function hideAnswer()
{
  $(showAllButton).removeClass('faq-show-all-active');
  $(hideAllButton).removeClass('faq-hide-all-active');
 
  $(this).next('.faq-answer').slideUp('fast');
  $(this).find('.question-toggle').replaceWith(showMarkup);
}
