﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />

function SetupSplash() {
    FadeInSplash();
}

function FadeInSplash(){
    $(".splashEnter").fadeIn(1000, function() { setTimeout("FadeOutSplash();", 1000) });
}

function FadeOutSplash(){
    $(".splashEnter").fadeOut(1000, function() { setTimeout("FadeInSplash();", 100) });
}

function SetupPage() {

    // nice fade in for anything not black
    $(".companyNameTop").fadeIn(3000);
    $("#navMenu").fadeIn(3000);

    // set up our menu
    $("#lnkSwim-wear").click(function() {
        ShowPane(0);
    });
    $("#lnkGlamour").click(function() {
        ShowPane(1);
    });

    $("#lnkContactMe").click(function() {
        ShowPane(2);
    });
    $("#lnkAboutMe").click(function() {
        ShowPane(3);
    });
    $("#lnkFAQ").click(function() {
        ShowPane(4);
    });

    // hide all the panes except the first
    ShowPane(0);


}

function ShowPane(index) {

    if (index == 0) {
        $('.galleria-container').remove();
        $('#swimwear-gallery').galleria({
            width: 800,
            height: 500,
            keepSource: true,
            dataSource: '#pnlSwimwear'
        });
        $('#pnlSwimwear').hide();
    }
    else if (index == 1) {
        $('.galleria-container').remove();
        $('#glamour-gallery').galleria({
            width: 800,
            height: 500,
            keepSource: true,
            dataSource: '#pnlGlamour'
        });
        $('#pnlGlamour').hide();
    }

        if (index == 4) {
            $(".panes").css("overflow", "auto");
        }
        else {
            $(".panes").css("overflow", "hidden");
        }
    $($(".panes > div").hide().removeClass("selected").get(index)).show().addClass("selected");
}
