﻿		$(document).ready(function() {

			$("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>';
				}
			});
<?php
require_once('../includes/DbConnector.php');
$connector = new DbConnector();
$resultnew = $connector->query("SELECT * FROM gallery WHERE section = '38' LIMIT 15");
$i = 0;
while ($rownew = $connector->fetchArray($resultnew)){
?>
			$("#various1<?php echo $i; ?>").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
<?php
$i++;
}
?>
<?php
$resultnew = $connector->query("SELECT * FROM gallery WHERE section = '39' LIMIT 15");
$i = 0;
while ($rownew = $connector->fetchArray($resultnew)){
?>
			$("#various2<?php echo $i; ?>").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
<?php
$i++;
}
?>
<?php
$resultnew = $connector->query("SELECT * FROM gallery WHERE section = '40' LIMIT 15");
$i = 0;
while ($rownew = $connector->fetchArray($resultnew)){
?>
			$("#various3<?php echo $i; ?>").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
<?php
$i++;
}
?>
		});

