﻿
var currentModel = null;

function showModel(a)
{
    if (a == currentModel)
        return;
        
    $("#" + $(a).attr("id") + "_Description").show();
    
    if (currentModel)
    {
        $("#" + $(currentModel).attr("id") + "_Description").hide();
    }

    currentModel = a;
}

showModel($("#Lagoon"));


var flashvars = { var1 : "1" };
var params = { menu: "false", wmode: "transparent" };
var attributes = { id: "Watershed-Map", name: "Watershed-Map" };

swfobject.embedSWF("/Homepage.swf", "flash", "995", "328", "9.0.0","expressInstall.swf", flashvars, params, attributes);

//
// Pull Down Navigation. Source: http://javascript-array.com/scripts/jquery_simple_drop_down_menu/
//

var timeout         = 500;
var closetimer		= 0;
var ddmenuitem      = 0;

function jsddm_open()
{	jsddm_canceltimer();
	jsddm_close();
	ddmenuitem = $(this).find('ul').eq(0).show();}

function jsddm_close()
{	if(ddmenuitem) ddmenuitem.hide();}

function jsddm_timer()
{	closetimer = window.setTimeout(jsddm_close, timeout);}

function jsddm_canceltimer()
{	if(closetimer)
	{	window.clearTimeout(closetimer);
		closetimer = null;}}

$(document).ready(function()
{	$('#jsddm > li').bind('mouseover', jsddm_open);
	$('#jsddm > li').bind('mouseout',  jsddm_timer);});

document.onclick = jsddm_close;


$(document).ready(function()
{
    $("a[rel='imagePreview']").colorbox({slideshow:false});
    $("a[rel='PhotoGallery']").colorbox({slideshow:true});
});

function launchPhotoGallery()
{
    $.fn.colorbox({href:"/public/images/gallery/1Atlantic-3.jpg", slideshow:true});
    
}

var mailOn = false;

function mail(o)
{
    if (mailOn)
    {
        $("#mail-fields").hide();
        mailOn = false;
    }
    else
    {
        $("#mail-fields").show();
        mailOn = true;
    }
}