// JavaScript Document  lightbox

$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox({
				'titleShow'		    : false,
				'padding'			: 0,
				'width'				: 635,
				'height'			: 332,
				'autoScale'			: false,
				'type'				: 'iframe',
				'overlayOpacity'    : 0.75,
				'overlayColor'      : '#000',
				'speedIn'           : 500,
				'speedOut'          : 300,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example2").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'
			});

			$("a#example4").fancybox();

			$("a#example5").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example6").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			
$("a.grouped_elements").fancybox({
				'padding'			: 0,
				'overlayOpacity'    : 0.65,
				'overlayColor'      : '#000',
				'speedIn'           : 450,
				'speedOut'          : 300,
				'transitionIn'	    : 'elastic',
				'transitionOut'	    : 'elastic',
				'autoScale'			: true,
				'titleShow'		    : false,
				'titlePosition' 	: 'outside',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
	return '<span id="fancybox-title-outside">' + (title.length ? ' &nbsp; ' + title : '') + ' ('+ (currentIndex + 1) + ' / ' + currentArray.length +')'+ '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
			    'padding'			: 10,
				'width'				: '50%',
				'height'			: '45%',
				'autoScale'			: false,
				'type'				: 'iframe',
				'overlayOpacity'    : 0.65,
				'overlayColor'      : '#000',
				'speedIn'           : 500,
				'speedOut'          : 250
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
