// Coda Popup Bubbles
$(function(){$('.coda-bubble').each(function(){var distance=10;var time=250;var hideDelay=500;var hideDelayTimer=null;var beingShown=false;var shown=false;var trigger=$('.coda-bubble-trigger',this);var info=$('.coda-bubble-popup',this).css('opacity',0);$([trigger.get(0),info.get(0)]).mouseover(function(){if(hideDelayTimer)clearTimeout(hideDelayTimer);if(beingShown||shown){return}else{beingShown=true;info.css({top:-90,left:-33,display:'block'}).animate({top:'-='+distance+'px',opacity:1},time,'swing',function(){beingShown=false;shown=true})}return false}).mouseout(function(){if(hideDelayTimer)clearTimeout(hideDelayTimer);hideDelayTimer=setTimeout(function(){hideDelayTimer=null;info.animate({top:'-='+distance+'px',opacity:0},time,'swing',function(){shown=false;info.css('display','none')})},hideDelay);return false})})});

// Show/Hide
$(document).ready(function(){
    $(".toggle_container").hide();
    $("h2.expand_heading").toggle(function(){
        $(this).addClass("active");
        }, function () {
        $(this).removeClass("active");
    });
    $("h2.expand_heading").click(function(){
        $(this).next(".toggle_container").slideToggle("slow");
    });
    $(".expand_all").toggle(function(){
        $(this).addClass("expanded");
        }, function () {
        $(this).removeClass("expanded");
    });
    $(".expand_all").click(function(){
        $(".toggle_container").slideToggle("slow");
    });
});


// Lights Out - Dimming/Covering Background Content with jQuery by buildinternet
$(document).ready(function(){$("#dimmer").css("height",$(document).height()).hide();$(".video-lights-on").click(function(){$("#dimmer").toggle();if($("#dimmer").is(":hidden"))
$(this).html("Lights off").removeClass("video-lights-off");else
$(this).html("Lights on").addClass("video-lights-off");});});

