$(document).ready(function(){
    $(".client-image").bind({
        "mouseover": function(){
                if(!$(this).is(":animated")){
                    $(this).fadeTo("slow", 0.4);
                    $(this).next(".client-data").fadeIn("fast");
                }
            },
        "mouseleave": function(){
            if(!$(this).next(".client-data").is(":visible")){
                    $(this).fadeTo("fast", 1);
                }
        }
    });
    $(".client-data").bind({
        "mouseleave": function(){
            $(this).fadeOut("fast");
            $(this).parent("div").find(".client-image").fadeTo("slow", 1);
        }
    });
    $(".client-block-wrap").click(function(){
        var link = $(this).attr("data-link");
        window.location.href = link;
    });
    $(".client-title").each(function(){
        var h = $(this).height() - 15;
        $(this).next(".client-block").find(".client-data").css("margin-top", h+"px");
    });
    $(".logo h1").click(function(){
        window.location.href = 'http://tri-tronicsproelectronics.com/';
    });
    $(".logo h1").css("cursor", "pointer");
});
