code: function getiframeDocument($iframe) {
              var iframeDoc = $iframe[0].contentWindow || $iframe[0].contentDocument;
              if (iframeDoc.document) {
                  iframeDoc = iframeDoc.document;
              }
              return iframeDoc;
          }
docs: gets an iframes document in a cross browser compatible manner