﻿// JScript File

Event.observe(window,'load', function()
{
    var navLinks = $$(".navigation a");
    navLinks.each(function (item, index) 
    { 
        item.observe('mouseover', navLink_mouseover); 
        item.observe('mouseout', navLink_mouseout); 
    } );
});

function navLink_mouseover(e)
{
    var div = get_div(e.element());
    if(div!=null)
    {
        if(div._effect!=null) div._effect.cancel()
        
        if(Prototype.Browser.IE)
            div.style.display='';
        else    
            div._effect=new Effect.Appear(div, {duration:0.2});
    }
}

function navLink_mouseout(e)
{
    var div = get_div(e.element());
    if(div!=null)
    {
        if(div._effect!=null) div._effect.cancel()
        if(Prototype.Browser.IE)
            div.style.display='none'
        else
            div._effect=new Effect.Fade(div, {duration:0.2});
    }
}

function get_div(anchor) { return anchor.parentNode.getElementsByTagName('div')[0]; }
