
$.fn.gpos = function()
{
  var prm = $.extend({
   left:0,
   top:0,
   right:0,
   bottom:0,
   width:0,
   height:0
   });

  elem = this.get(0);
  prm.width = elem.offsetWidth;
  prm.height = elem.offsetHeight;
  while (elem)
  {
    prm.left += elem.offsetLeft;
    prm.top += elem.offsetTop;
    elem = elem.offsetParent;
  }
  prm.right = prm.left + prm.width;
  prm.bottom = prm.top + prm.height;
  return prm;
};

$(document).ready(function () {

$("a.img").bind("click",function(){return hs.expand($(this).get($(this).index(this)));});
$("img.img").bind("click",function(){return hs.expand($(this).get($(this).index(this)), {src: $(this).attr('src')});});
});
