/*
 * Put customized script for specific actions in this document
 */

	$(document).ready(function() {
/*
* Iframe 
*/

            $(".map-popup").fancybox({
				'width' : '75%',
				'height' : '75%',
				'autoScale' : false,
				'transitionIn' : 'none',
				'transitionOut' : 'none',
				'type'				: 'iframe'
			});
		

/*
* Gallery - popup image
*/

			$("a.img-popup").fancybox({
				'titleShow'		: false,
				'overlayOpacity'	: '0.5',
				'overlayColor'		: '363636'
			});
			
/*
* Video/Inline content - popup 
*/			
			
			$(".inline-popup").fancybox({
				'titleShow'		: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'overlayOpacity'	: '0.5',
				'overlayColor'		: '363636'
			});
	
	
	
/*
* Gallery - popup 
*/		
	
			$("a[rel=gallery-group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'overlayOpacity'	: '0.5',
				'overlayColor'		: '363636',
				'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		   	 return '<span id="fancybox-title-over"><strong>Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' </strong>&ndash; ' + title + '</span>';
			}
	});
	
			$("a[rel=gallery-group2]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'overlayOpacity'	: '0.5',
				'overlayColor'		: '363636',
				'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		   	 return '<span id="fancybox-title-over"><strong>Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' </strong>&ndash; ' + title + '</span>';
			}
	});
	
});	
