$(document).ready(function() {
    
});

//GENERIC SITE----------------------------------------------------------------------------->
function InitGallery(){
    $('ul.gallery li a').lightBox();
}

function InitMainImage(){
    $('A#main-image').lightBox();
}

function InitDemo(){
    $('#subnav UL LI A').click(function(evt) {
        $('#subnav UL LI A').removeClass("selected");
        $(this).addClass("selected");
        
        var newChapter = $(this).attr("rel");
        if(newChapter == "chapter1"){
            $("#player1").css("display", "block");
            $("#player2").css("display", "none");
            $("#player3").css("display", "none");
            $("#player4").css("display", "none");
            
            $("H1").text("Chapter 1: ILD Testing the membrane surface directly");
        }else if(newChapter == "chapter2"){
            $("#player1").css("display", "none");
            $("#player2").css("display", "block");
            $("#player3").css("display", "none");
            $("#player4").css("display", "none");
            
            $("H1").text("Chapter 2: ILD Testing the membrane through overburden");
        }else if(newChapter == "chapter3"){
            $("#player1").css("display", "none");
            $("#player2").css("display", "none");
            $("#player3").css("display", "block");
            $("#player4").css("display", "none");
            
            $("H1").text("Chapter 3: ILD Installed on green roof");
        }else if(newChapter == "chapter4"){
            $("#player1").css("display", "none");
            $("#player2").css("display", "none");
            $("#player3").css("display", "none");
            $("#player4").css("display", "block");
            
            $("H1").text("Building a Green Roof: Leak Detection");
        }
    
        evt.preventDefault();
    });
}
