$(document).ready(function() { 
	$(".videoPopup").fancybox({
	'titlePosition' : 'inside',
	'hideOnOverlayClick' : false, 
	'centerOnScroll' : true, 
	'scrolling' : 'auto', 
	'type' : 'iframe',
	'title' : 'The AGMS Opportunity',
	'width' : 640, 
	'height' : 360,
	'overlayOpacity': 0.75,
	'overlayColor': '#000035',
	'enableEscapeButton': false,
	'onComplete': function() { 
		$("#fancybox-title").css({'top':'0px', 'bottom':'auto'}); 
		$("#fancybox-outer").css({'height':'360px'}); 
		$("#fancybox-inner").css({'height':'360px'}); 
		}
	}); 

	$(".formPopup").fancybox({
	'titlePosition' : 'inside',
	'hideOnOverlayClick' : false, 
	'centerOnScroll' : false, 
	'scrolling' : 'no', 
	'type' : 'iframe',
	'title' : 'The AGMS Opportunity',
	'width' : 640, 
	'height' : 680,
	'overlayOpacity': 0.75,
	'overlayColor': '#000035',
	'enableEscapeButton': false,
	'onComplete': function() { 
		$("#fancybox-title").css({'top':'0px', 'bottom':'auto'}); 
		$("#fancybox-outer").css({'height':'680px'}); 
		$("#fancybox-inner").css({'height':'680px'}); 
		} 
	}); 
});
function switchtoForm(preload) {
	$.fancybox({
	'titlePosition' : 'inside',
	'centerOnScroll' : false, 
	'scrolling' : 'no', 
	'type' : 'iframe',
	'title' : 'The AGMS Opportunity',
	'width' : 640, 
	'height' : 680,
	'overlayOpacity': 0.75,
	'overlayColor': '#000035',
	'enableEscapeButton': false,
	'content' : 'video_sec/videopopup.php?preload=' + escape(preload),
	'onComplete': function() { 
		$("#fancybox-title").css({'top':'0px', 'bottom':'auto'}); 
		$("#fancybox-outer").css({'height':'680px'}); 
		$("#fancybox-inner").css({'height':'680px'}); 
		}
	}); 
}
function switchtoFlash() {
	$.fancybox({
	'titlePosition' : 'inside',
	'centerOnScroll' : true, 
	'scrolling' : 'auto', 
	'type' : 'iframe',
	'title' : 'The AGMS Opportunity',
	'width' : 640, 
	'height' : 360,
	'overlayOpacity': 0.75,
	'overlayColor': '#000035',
	'enableEscapeButton': false,
	'content' : 'video_sec/flash.php',
	'onComplete': function() { 
		$("#fancybox-title").css({'top':'0px', 'bottom':'auto'}); 
		$("#fancybox-outer").css({'height':'360px'}); 
		$("#fancybox-inner").css({'height':'360px'}); 
		}
	}); 
}

