var hcPopup = {
  open: function(options)
  {
    this.options = { url: '#', name: 'popup', width: 400, height: 400 };
    Object.extend(this.options, options || {});
    window.open(this.options.url, 'hc' + this.options.name, 'width='+this.options.width+',height='+this.options.height);
  }
}

if ( $('hcbodytype_productdetail') ) {
	Event.observe('hcbodytype_productdetail', 'click', function(e){ e.stop(); hcPopup.open({url: "/bodytypes", name: "bodytype"}); });
}

if ( $('hcproductdetail_footer_email') ) {
	Event.observe('hcproductdetail_footer_email', 'click', function(e){ e.stop(); hcPopup({url: e.href, name: "emailfriend"}); });
}

