If you use jQuery, it can be very easy:
<html>
<head>
<title>Test</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(function() {
$('#box').hover(function (e) {
$(this).fadeTo('slow', 1.0);
}, function (e) {
$(this).fadeTo('slow', 0.4);
});
});
</script>
</head>
<body>
<div id="box" style="background-color: rgba(0, 0, 0, 0.4)">Picture and label</div>
</body>
</html>