// Fancybox code

$(document).ready(
	function() 
	{
		$("a[rel=example_group]").fancybox(
			{
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) 
										{
											return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
										}
			}
		);
				
		$("#mywayvid").click(
			function() 
			{
				$.fancybox(
					{
						'padding'		: 0,
						'autoScale'		: false,
						'transitionIn'	: 'elastic',
						'transitionOut'	: 'elastic',
						'title'			: this.title,
						'width'		: 680,
						'height'		: 495,
						'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
						'type'			: 'swf',
						'swf'			: {
							 'wmode'		: 'transparent',
							'allowfullscreen'	: 'true'
						}
					}
				);
				return false;
			}
		);
		// PIR Text to Images
		$("h6").pir({font: "Requiem.ttf", color: "gray", size: "12", wrap: true});
		$("h5").pir({font: "Requiem.ttf", color: "white", size: "12", wrap: true});
	}
);
