/*
RealTimeWorks' Diary Text module has a major problem with iframes:
1- It strips out the closing iframe tag (illegal), 
2- And strips out *any* code that follows the iframe (and I mean any!)
	
The following code is a workaround to insert a Silverlight Streaming iframe into Diary Text.
	
It looks for the following code and replaces it correctly:
  <div class="silverlight-streaming-iframe" style="width:[IFRAME_WIDTH]px;height:[IFRAME_HEIGHT]px;">
     <a href="URL_TO_SILVERLIGHT_STREAMING_IFRAME"></a>
  </div>
	  
Above, replace [IFRAME_WIDTH] and [IFRAME_HEIGHT] with the actual numeric dimensions of the iframe.
*/
$(document).ready( function() {

	var iframeURL = $(".silverlight-streaming-iframe").children("a").attr("href");
	var iframeWidth = $(".silverlight-streaming-iframe").css("width");
	var iframeHeight = $(".silverlight-streaming-iframe").css("height");
		
	var iframeCode = "<iframe src=\"" + iframeURL + "\" scrolling=\"no\"";
	iframeCode += "frameborder=\"0\" style=\"width:" + iframeWidth + "; height:" + iframeHeight + "\"></iframe>";
		
	$(".silverlight-streaming-iframe").html(iframeCode);
		
});