﻿jQuery(function($) {
    var descs = $("table.news-list tr.desc")
    descs.hide();
    descs.prev("tr").click(function() {
        $(this).next("tr.desc").toggle();
    });

    var preview = "preview-image";
    $("a[rel^=preview-image]").click(function() {
        var a = $(this);
        var targetId = a.attr("rel").substring(preview.length + 1);
        var target = $("#" + targetId);
        target.attr("src", a.attr("href"));
        target.attr("alt", $("img:first", a).attr("alt"));
        return false;
    });
});

var timeOut = 500;
$(document).ready(function() {
    /***************************************
    Product-list-item info-Popup 
    ***************************************/
    var $lastListItm;

    $(".person-item a").mouseover(function() {
        var $el = $(this).parent().prev();
        if ($lastListItm != null)
            $lastListItm.removeClass("person-item-visible");
        $el.addClass("person-item-visible");
        $lastListItm = $el;
    });

    $(".tab-content").mouseleave(function() {
        setTimeout(function() {
            $(".person-item-visible").removeClass("person-item-visible");
        }, timeOut);
    });
    /* END - Product-list-item info-Popup
    ______________________________________*/

});
