Do you have forceIFrame set to false? If so, the iFrame doesn't exist, so the selector doesn't find one.
Also, it seems that when working with SVG (as opposed to VML, which is what the charts use in IE < 9), you need to set the click handler on the 'svg' element, not the div, so use .find('svg') when the user is not using IE < 9, ie:
if ($.browser.msie && $.browser.version < 9) {
var location_chart_element = $('#location_chart iframe').contents().find('div');
}
else {
var location_chart_element = $('#location_chart iframe').contents().find('svg');
}