
attachRollOverEvent = function(imageId){
	$(imageId).hover( function () {
		var thumb = $(this).attr('src');
		$(this).attr('oldsrc',thumb);
        $(this).attr('src', '/static/images/promo_greybar.png');
		$(this).css('background', 'url(' + thumb + ')');
		$(this).after('<div id="highlight">' + $(this).attr('alt') + '</div>');
	//	alert("left" + $(this).css('left') + 'top' + $(this).css('top'))
//		alert($(this).position().top + ' ' + $(this).position().left)
//		$('#highlight').css('top',  $('#highlight').css('top') + 100);
//		$('#highlight').css('left', $('#highlight').css('left')  - 100);
//		alert($('#highlight').position().top + ' ' + $('#highlight').position().left);
      }, 
      function () {
		var thumb = $(this).attr('oldsrc');
        $(this).attr('src', thumb );
		//alert(thumb);
		$(this).css('background', 'none');
		$('#highlight').remove();
      } );

}

$(document).ready(function() {
	attachRollOverEvent("img.rollover");
});


