// JavaScript Document

$(document).ready(function() {
							$("a[rel=gallery]").fancybox({
				'transitionIn'		: 'elastic',
				'transitionOut'		: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					
					
					return '<span id="fancybox-title-over"><span class="imageno">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + ' </span> ' + (title.length ? ' ' + title : '') + '</span>';
				}
			});
 	$(".gallery a").hover(function() {
		$(this).find('img').addClass("hover").stop()
			.animate({
        opacity: '0.23'
			}, 100);
		
		} , function() {
		$(this).find('img').removeClass("hover").stop()
			.animate({
        opacity: '1'
			}, 100);
	});
	
	/* Pajinate Script */
	$('.gallerywrapper').each(function(){
		$(this).pajinate({
			num_page_links_to_display : 5,
			items_per_page : 3	
		});
	});
		
	
	/* Pajinate Script */
	$('.gallerywrapper').each(function(){
		$(this).pajinate({
			num_page_links_to_display : 5,
			items_per_page : 5	
		});
	});
			
			
		});
