﻿/* $(function() {
    $('.hpCallout').each(function(item) {
        var calloutId = $(this).attr('id');
        trans(calloutId);
        $(this).hover( function() { $("#" + $(this).attr('id')).addClass('hpCallout_over'); }, function() { $("#" + $(this).attr('id')).removeClass('hpCallout_over'); });
    });
    
}); */

function trans(id)
{
    var parentObj = document.getElementById('main_callout');
    var el = document.getElementById(id);
    var l = findPos(el)[0] - findPos(parentObj)[0];
    var t = findPos(el)[1] - findPos(parentObj)[1];            
    el.style.backgroundPosition = (-1 * l) + "px " + (-1 * t) + "px";
} 