$(document).ready(function () {

$("#btn_signup").click(function(){
value = $("#email").val();
email = new RegExp("[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]","g");
if(email.test(value)){$("#email_signup").submit();} else {
$("#email_note").html("You have entered an invalid email");
}
 });
if(document.getElementById("widget_space"))
	document.getElementById("widget_space").src="http://nbc17.mync.com/site/content_blocks/nbc17_free_widget/";
if(document.getElementById("ad_space"))	
	document.getElementById("ad_space").src="http://nbc17.mync.com/site/ads/all_ad_grab/";
if(document.getElementById("video_box"))	
	document.getElementById("video_box").src="http://nbc17.mync.com/site/content_blocks/nbc17_video_box";

// Set specific variable to represent all iframe tags.
		var iFrames = document.getElementsByTagName('iframe');

		// Resize heights.
		function iResize()
		{
			// Iterate through all iframes in the page.
//			for (var i = 0, j = iFrames.length; i < j; i++)
//			{
				// Set inline style to equal the body height of the iframed content.
//				iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';
//			}
		}

		// Check if browser is Safari or Opera.
		if ($.browser.safari || $.browser.opera)
		{
			// Start timer when loaded.
			$('iframe').load(function()
				{
					setTimeout(iResize, 0);
				}
			);

			// Safari and Opera need a kick-start.
			for (var i = 0, j = iFrames.length; i < j; i++)
			{
				var iSource = iFrames[i].src;
				iFrames[i].src = '';
				iFrames[i].src = iSource;
			}
		}
		else
		{
			// For other good browsers.
			$('iframe').load(function()
				{
					// Set inline style to equal the body height of the iframed content.
                                      if(this.id!="video_box"){
                                    
                                     this.style.height = (this.contentWindow.document.body.scrollHeight) + 'px';
                                       this.style.width= (this.contentWindow.document.body.scrollWidth) + 'px';
                              }				
}
			);
		}
	}

);