/* ----------------------------------------------------------------------------
NAME: jQuery scripts
AUTHOR: Paulo Elias
URL: http://www.codemytheme.com/

    DESCRIPTION: This JavaScript file extends jQuery plugins or enables jQuery
    
    TABLE OF CONTENTS:
    
        * ONL   LOAD JQUERY
        * POP   ACCESSIBLE POP-UPS
        * FAQ   TOGGLE FREQUENTLY ASKED QUESTIONS

CREATED: 2008.11.12
MODIFIED: 2009.05.09
---------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------
    =ONL START JQUERY ONLOAD FUNCTION
---------------------------------------------------------------------------- */
$(document).ready(function() {
/* ----------------------------------------------------------------------------
    =POP ACCESSIBLE POP-UPS
    http://www.84bytes.com/2008/08/17/creating-beautiful-pop-ups-using-jquery/
---------------------------------------------------------------------------- */
    $("a[rel='pop-up']").click(function() {
            var features = "height=600,width=800,scrollTo,resizable=1,scrollbars=1,location=0";
            newwindow = window.open(this.href, 'popup', features);
            return false;
    });
/* ----------------------------------------------------------------------------
    =FAQ TOGGLE FREQUENTLY ASKED QUESTIONS
---------------------------------------------------------------------------- */
    var $question;
    var $answer;
    $('dd').hide();
    $('dt').bind('click', function() {
        if ($question && $question[0] != this) {
             $answer.slideUp('fast');
             $question.removeClass('open');
          }
          $question = $(this);
          $answer = $question.next();
          $answer.slideDown('fast');
          $question.addClass('open');
       }
    );
}); // End jQuery onLoad function