
/**
 * Onload
 */

jQuery(document).ready(function()
{
    /**
     * Assign Links Targets
     */

    jQuery('a[rel="external"], a[href^="http://"], a[href^="/pdf"]').click(function()
    {
        window.open(jQuery(this).attr('href'));
        return false;
    });


    /**
     * Definition List Accordian
     */

    jQuery('dl dd').hide();

    jQuery.tools.tabs.addEffect('slide', function(i, done) {
        this.getPanes().slideUp('fast').css({ backgroundColor: 'transparent' });
        this.getPanes().eq(i).slideDown('fast').css({ backgroundColor: '#fff' });
        done.call();
    });

    jQuery('dl').tabs('dl dd', { tabs: 'dt', effect: 'slide', initialIndex: null });


    /**
     * Cycle Through Quotes
     */

    jQuery('#quote img').hide();

    cycle(jQuery('#quote > img').size() - 1);
 
    function cycle(intIndex)
    {
        intIndex = ((intIndex) > (jQuery('#quote > img').size() - 1)) ? 0 : intIndex;
 
        jQuery('#quote img').eq(intIndex).delay(500).fadeIn('slow').delay(7500).fadeOut('slow', function() {
            cycle(intIndex + 1);
        });
    }
});

