

/*========== FancyBox Customizations ==========*/

$(document).ready(function() {
	
	// add class="fbox"
	// default fbox settings
	$(".fbox").fancybox({
		'transitionIn'				: 'fade',
		'transitionOut'				: 'fade',
		'speedIn'					: 600,
		'speedOut'					: 300,
		'overlayOpacity'			: 0.4,
		'overlayColor'				: '#fff'
	});
	
	// add class="fbox_inline"
	// auto-size fbox for inline content - the content div to be displayed must have dimensions set with CSS
	$(".fbox_inline").fancybox({
		'autoDimensions'			: true,
		'width'						: 680,
		'height'					: 460,
		'autoScale'					: true,
		'transitionIn'				: 'fade',
		'transitionOut'				: 'fade',
		'speedIn'					: 600,
		'speedOut'					: 300,
		'overlayShow'				: false,
		'padding'					: 20,
		'hideOnContentClick'		: false,
		'titleShow'					: false
	});
	
	// add class="fbox_inline_fixed_size"
	// a fixed size version for inline fbox content - set to 680px:460px
	$(".fbox_inline_fixed_size").fancybox({
		'autoDimensions'			: false,
		'width'						: 640,
		'height'					: 480,
		'autoScale'					: false,
		'transitionIn'				: 'fade',
		'transitionOut'				: 'fade',
		'speedIn'					: 600,
		'speedOut'					: 300,
		'padding'					: 10,
		'overlayOpacity'			: 0.4,
		'overlayColor'				: '#fff',
		'hideOnContentClick'		: false,
		'titleShow'					: false
	});
	
	// add class="fbox_iframe"
	// default settings for fbox content in an iFrame
	$(".fbox_iframe").fancybox({
		'width'						: '75%',
		'height'					: '75%',
		'autoScale'					: false,
		'transitionIn'				: 'none',
		'transitionOut'				: 'none',
		'type'						: 'iframe',
		'titleShow'					: false
	});
	
	$(".fbox_iframe_video_720x405").fancybox({
		'width'						: 720,
		'height'					: 405,
		'autoScale'					: false,
		'transitionIn'				: 'none',
		'transitionOut'				: 'none',
		'type'						: 'iframe',
		'overlayShow'				:	true,
		'overlayOpacity'			:	0.8,
		'scrolling'					: 'no',
		'titleShow'					: false
	});
	
	$(".fbox_iframe_video_640x480").fancybox({
		'width'						: 640,
		'height'					: 480,
		'autoScale'					: false,
		'transitionIn'				: 'none',
		'transitionOut'				: 'none',
		'type'						: 'iframe',
		'overlayShow'				:	true,
		'overlayOpacity'			:	0.8,
		'scrolling'					: 'no',
		'titleShow'					: false
	});
	
	// add class="fbox_video_610x343"
	// fbox for use with a dynamic flash video player on this site (plays .mp4 & .flv videos)
	// for this funtion we're standardizing the dimensions: 610px : 343px, but the vid. player's size is dynamic
	$(".fbox_video_720x405").fancybox({
		'autoDimensions'			: false,
		'width'						: 720,
		'height'					: 405,
		// this script centers the box using javascript (rather than css), which makes it jumpy on some browsers.
		// disabling the vertical centering for now because of that
		//'centerOnScroll'			: true,
		'transitionIn'				:	'fade',
		'transitionOut'				:	'fade',
		'speedIn'					:	200, 
		'speedOut'					:	200, 
		'hideOnContentClick'		: 	false,
		'padding'					: 	5,
		'overlayShow'				: 	true,
		'overlayOpacity'			: 	0.8,
		'overlayColor'				: 	'#fff',
		'type'						: 	'swf',
		'swf'						: 	{wmode: 'opaque', allowFullScreen:'true', allowScriptAccess:'always'},
		'titleShow'					: 	false
	});
	
	// fbox video for the size of 640 x 480
	$(".fbox_video_640x480").fancybox ({
		'autoDimentions'		:	false,
		'width'					:	640,
		'height'				:	480,
		'transitionIn' 			:	'fade',
		'transitionOut'			:	'fade',
		'speedIn'				:	200,
		'speedOut'				:	200,
		'hideOnContentClick'	:	false,
		'padding'				:	5,
		'overlayShow'			:	true,
		'overlayOpacity'		:	0.8,
		'overlayColor'			:	'#fff',
		'type'					:	'swf',
		'swf'					:	{wmode: 'opaque', allowFullScreen:'true', allowScripyAccess:'always'},
		'titleShow'				:	false
	});
	

});
