$(document).ready(function(){
	if ($("#gallery a[rel^='prettyPhoto']").length) {
		$("#gallery a[rel^='prettyPhoto']").prettyPhoto({theme: 'light_rounded'});
		$(".popup_class a").prettyPhoto({theme: 'light_rounded'});
	}
});



/* gallery */
/*$(document).ready(function(){

	var gallery = $('#gallery a');
	if (gallery.length) {
		gallery.lightBox();
	}
});
*/

/* gallery2 */
/*
$(document).ready(function(){

	var popups = $('.popup_class a');
	if (popups.length) {
		popups.lightBox();
	}
});
*/
/* ext.Gallery */
/*(function($) {
	$.fn.Gallery = function() {
		return this.each(function() {
			var lightbox = $('<div id="lightbox"><a></a></div>'),
				photo = $('a', lightbox),
				thumbs = $('a', this),
				photos = [],
				i = 0;

			$('.body').append(lightbox);

			thumbs.each(function() {
				var image = new Image();
					image.src = $(this).attr('href');

				photos.push(image);
			});

			thumbs.click(function() {
				i = $(this).parent().index();

				lightbox.show();

				photo.removeAttr('style');
				photo.html(photos[i]);

				var image = photo.find('img');
					image.removeAttr('width').removeAttr('height');

				if (image.width() > $(window).width()) {
					image.attr('width', $(window).width());
				}
				if (image.height() > $(window).height()) {
					image.removeAttr('width');
					image.attr('height', $(window).height());
				}

				photo.css({
					'margin-top': -image.height() / 2,
					'margin-left': -image.width() / 2
				});

				return false;
			});

			photo.click(function() {
				i++;

				if (i > photos.length - 1) {
					i = 0;
				}

				thumbs.eq(i).trigger('click');

				return false;
			});

			lightbox.click(function() {
				$(this).hide();
			});
		});
	}
})(jQuery);
*/
