// JavaScript Document
(function($) {$(function() {
    // more code using $ as alias to jQuery
	$('.adc-gallery-wrapper a').lightBox();
	$('.adc-gallery-wrapper > img:not(.gallery1, .viewLarger)').css({'display': 'none'});
	$('.adc-gallery-wrapper > a:not(.gallery1)').css({'display': 'none'});
	/*$('.thumbWrapper img:not(.gallery1)').css({'opacity': .4});*/
	$('.thumbWrapper img').wrap("<span></span>").hover(function() {
		  	$(this).css({'opacity': .4});
		  }, function() {
		  	$(this).css({'opacity': 1});
		  });
	$('.thumbWrapper img').click(function() {
		  	/*$('.thumbWrapper img:not(.' + $(this).attr('class') + ')').css({'opacity': .4});
		  	$(this).css({'opacity': 1});*/
		  	$('.adc-gallery-wrapper > img:not(.viewLarger)').hide();
		  	$('.adc-gallery-wrapper > a:not(.' + $(this).attr('class') + ')').hide();
		  	$('.adc-gallery-wrapper > .' + $(this).attr('class')).show().css({'display': 'block'});
		});
	
	if ($('.current_page_item').prev().children().attr('href') == undefined) {
		$('.previousBtn').hide();
	} else {
		$('.previousBtn').attr('href', $('.current_page_item').prev().children().attr('href'));
	}
	
	if ($('.current_page_item').next().children().attr('href') == undefined) {
		$('.nextBtn').hide();
	} else {
		$('.nextBtn').attr('href', $('.current_page_item').next().children().attr('href'));
	}
});})(jQuery)