Image Tagging and Wrap

Texts comes alive when the cursor hovers over a selected image.

by Ken Watanabe

HTML

<div class="show" id="subject01" target="01">
    <div class="frontpage-img-wrap">
        <img src="http://i61.tinypic.com/fw3tpc.jpg" width="250" height="auto" alt="" />
    </div>
    <div class="targetDiv info01">
         <h2>Name</h2>
         <h4>Text</h4>
         <p class="rotate">Image Number</p>
        <p class="detail">Image Detail<br/>Detail<br/>More Detail.</p>
    </div>
</div> <!-- END 01 -->


<div class="show" id="subject02" target="02">
    <div class="frontpage-img-wrap">
        <img src="http://i59.tinypic.com/ogeybn.jpg" width="150" height="auto" alt="" />
    </div>
    <div class="targetDiv info02">
         <h2>Name</h2>
         <h4>Text</h4>
         <p class="rotate">Image Number</p>
        <p class="detail">Image Detail<br/>Detail<br/>More Detail.</p>
    </div>
</div> <!-- END 02 -->

CSS

*, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td {
    margin:0;
    padding:0
}
fieldset, img {
    border:0
}
h1, h2, h3, h4, h5, h6 {
    font-size:100%;
    font-weight:normal
}
a img {
    border:none
}
p, li h2, body, h4, h4 a {
    font-family:"Courier New", Courier, monospace;
    font-size: 12px;
    line-height: 18px;
    font-weight: normal;
    letter-spacing: 1px;
    overflow-x: hidden;
}
h2 {
    font-family:"Apercu Bold", sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 11px;
    text-align: center;
}
h4 {
    text-transform: uppercase;
    text-align: center;
}
a {
    color: red;
    text-decoration: none;
}
header a:hover {
    border-bottom: 1px solid;
}
.frontpage-img-wrap, .img-placeholder, .image-wrapper-inner {
    margin: 0 0 18px;
}
.entry {
    text-align: center;
    position: absolute;
}
.frontpage-img-wrap {
    position: relative;
}
.frontpage-img-wrap img {
    margin: 0;
    display: block;
}
.rotate {
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    -o-transform: rotate(-90deg);
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
    position: absolute;
    right: -45px;
    top:50%;
    font-size: 12px;
    line-height: 18px;
    font-family: monospace;
    letter-spacing: 1px;
    margin: 0;
}
.frontpage-img-wrap {
    display:block;
}

#subject01 {
    left: 50px;
    top: 50px;
    position: fixed;
}
#subject02 {
    right: 50px;
    bottom: 100px;
    position: fixed;
}
h6 {
    position: fixed;
    top:40%;
    margin: 0 auto;
    text-align: center;
    font-family: helvetica;
    font-size: 100px;
    font-weight: bold;
    font-style: normal;
}

JavaScript

$('.targetDiv').hide();

$('.show').mouseover(function () {
    $('.targetDiv').hover();
    $('.info' + $(this).attr('target')).fadeIn();
});

$('.show').mouseout(function () {
    $('.targetDiv').fadeOut();
    $('.info' + $(this).attr('target')).fadeOut();
});