//
// hover.js - show a div when hovering over an element
//
// hoverElem must have an id (number) and showElem must have a id that matches
// it, and a class of the same name, e.g.:
//
//    <li id='1' class='hover'>            - hoverElem
//    <div id='person1' class='person'>    - showElem
//
// ... then call
//
//    hoverShow('li.hover', 'person')
//
function hoverShow(hoverElem, showElem) {

    $(hoverElem).mouseover(
        function() {
            $('div.' + showElem).each(
                function() {
                    $(this).hide()
                })
            var id = $(this).attr('id')
            $('div#' + showElem + id).fadeIn()
        }
    )
}

