Select the correct iframe element, pull out the src attribute , make your stuff, assign src to window.location.hash
var iframe = $('iframe');
var src = iframe.attr('src');
window.location.hash = src;
EDIT
If you want to get the dynamic location out iframe, you need to access the property contentWindow:
var iframe = $('iframe');
var contentWnd = iframe.attr('contentWindow');
var url = contentWnd.window.location.href;
window.location.hash = url;
contentWindow:
http://www.bennadel.com/blog/1592-Getting-IFRAME-Window-And-Then-Document-References-With-contentWindow.htm