﻿$(document).ready(function() {
    $("div.topNav ul li a").mouseover(function() {
        mouseover(this);
    });

    $("div.topNav ul li a").mouseout(function() {
        mouseout(this);
    });	
});

function mouseover(me)
{
    if(me.className!="current")
    {
        $(me).stop().animate({ color: "#DE6528" }, 1000);
    }  
}

function mouseout(me)
{
    if(me.className!="current")
    {
        $(me).stop().animate({color: "#ffffff"}, 1000 );
    }
}

function galleryStart(galleryPort) {
    var current = $("#"+galleryPort+" img.show");
    var next = current.next().length ? current.next() : $("#"+galleryPort+" img:first");
    next.css({ opacity: 0.0 });
    next.addClass('show');
    next.animate({ opacity: 1.0 }, 2000);
    current.animate({ opacity: 0.0 }, 2000);
    current.removeClass('show');
}
