﻿
var DaSrc
var overstate
    function MenuOver(MenuID)
    {
        if(!overstate)
        {
            if(document.getElementById(MenuID).src.indexOf("_o.jpg") < 0)
            {
                DaSrc = document.getElementById(MenuID).src.replace(".jpg","_o.jpg");
                document.getElementById(MenuID).src = DaSrc;
                overstate = true;
            }     
        }
    }
    function MenuOut(MenuID)
    {
        if(overstate)
        {
            DaSrc = document.getElementById(MenuID).src.replace("_o.jpg",".jpg");
            document.getElementById(MenuID).src = DaSrc;
            overstate = false;
        }
    }
    
    
    
$(document).ready(function() {     
      
    $("#homeLink").hover(function() {
        MenuOver("homeimg");
    },
    function() {
        MenuOut("homeimg")
    });
      
    $("#aboutLink").hover(function() {
        MenuOver("aboutimg");
    },
    function() {
    MenuOut("aboutimg")
    });
    
    
    $("#servicesLink").hover(function() {
        MenuOver("servicesimg");
    },
    function() {
        MenuOut("servicesimg")
    });

    $("#advantagesLink").hover(function() {
        MenuOver("advantagesimg");
    },
    function() {
        MenuOut("advantagesimg")
    });

    $("#routemapLink").hover(function() {
        MenuOver("routemapimg");
    },
    function() {
    MenuOut("routemapimg")
    });

    $("#quotationLink").hover(function() {
        MenuOver("quoteimg");
    },
    function() {
        MenuOut("quoteimg")
    });

    $("#contactLink").hover(function() {
        MenuOver("contactimg")
    },
    function() {
        MenuOut("contactimg")
    });

    $("#linksLink").hover(function() {
    MenuOver("linksimg")
    },
    function() {
    MenuOut("linksimg")
    });
});
