//     A C C O R D I A N 
// - - - - - - - - - - - - - - - - - - - -


$(function () {
  $('ul.drawers').accordion({
    header: 'h3.drawer-handle',
    selectedClass: 'open',
    event: 'click'
  });
});

//     C S S   B I T S
// - - - - - - - - - - - - - - - - - - - -


$(document).ready(function () {
	$('#awards li:nth-child(2n-1)').addClass('theLeftCol');
	$('.splitCols dl:nth-child(2n-1)').addClass('theLeftCol');
	$('#homeCols div.ohLookaColumn:nth-child(3n-1)').addClass('midCol');
});

//     H O M E   P A G E   S L I D E S
// - - - - - - - - - - - - - - - - - - - -

function slideSwitch() {
    var $active = $('#slideshow img.active');

    if ( $active.length == 0 ) $active = $('#slideshow img:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow img:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 4000 );
});


