// JavaScript Document

jQuery(document).ready(function() {

$(".youtube").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 640,
			'height'		: 390,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
});


$(".cs-images").fancybox({
		'titleShow'     : false
	});
	

$("a[rel=cs-groups]").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 + '</span>';
		}
	});
	

	$("#integration").fancybox({
	    'padding'           : 0,
        'autoScale'     	: false,
		'width'				: 490,
		'height'			: 490,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});


});
